diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2017-08-17 19:27:10 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2017-08-17 19:27:10 +0000 |
commit | 4dfd02516f6c8c51bfa327b397062b6817363c87 (patch) | |
tree | 38f2aac261098f64a8fd5d16d26a75cd3a0bd4da /usr.bin/lex | |
parent | e2cdefbbb18854bc2d2dac3793526a9ba94561ef (diff) |
delete some not used code. from Michael W. Bombardieri
Diffstat (limited to 'usr.bin/lex')
-rw-r--r-- | usr.bin/lex/tables.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/usr.bin/lex/tables.c b/usr.bin/lex/tables.c index d58ecb584ce..3d57f67889b 100644 --- a/usr.bin/lex/tables.c +++ b/usr.bin/lex/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.3 2015/12/11 00:08:43 mmcc Exp $ */ +/* $OpenBSD: tables.c,v 1.4 2017/08/17 19:27:09 tedu Exp $ */ /* tables.c - tables serialization code * @@ -59,11 +59,6 @@ int yytbl_write16 (struct yytbl_writer *wr, flex_uint16_t v); int yytbl_write8 (struct yytbl_writer *wr, flex_uint8_t v); int yytbl_writen (struct yytbl_writer *wr, void *v, flex_int32_t len); static flex_int32_t yytbl_data_geti (const struct yytbl_data *tbl, int i); -/* XXX Not used -static flex_int32_t yytbl_data_getijk (const struct yytbl_data *tbl, int i, - int j, int k); - */ - /** Initialize the table writer. * @param wr an uninitialized writer @@ -332,45 +327,6 @@ int yytbl_write8 (struct yytbl_writer *wr, flex_uint8_t v) return bytes; } - -/* XXX Not Used */ -#if 0 -/** Extract data element [i][j] from array data tables. - * @param tbl data table - * @param i index into higher dimension array. i should be zero for one-dimensional arrays. - * @param j index into lower dimension array. - * @param k index into struct, must be 0 or 1. Only valid for YYTD_ID_TRANSITION table - * @return data[i][j + k] - */ -static flex_int32_t yytbl_data_getijk (const struct yytbl_data *tbl, int i, - int j, int k) -{ - flex_int32_t lo; - - k %= 2; - lo = tbl->td_lolen; - - switch (YYTDFLAGS2BYTES (tbl->td_flags)) { - case sizeof (flex_int8_t): - return ((flex_int8_t *) (tbl->td_data))[(i * lo + j) * (k + 1) + - k]; - case sizeof (flex_int16_t): - return ((flex_int16_t *) (tbl->td_data))[(i * lo + j) * (k + - 1) + - k]; - case sizeof (flex_int32_t): - return ((flex_int32_t *) (tbl->td_data))[(i * lo + j) * (k + - 1) + - k]; - default: - flex_die (_("invalid td_flags detected")); - break; - } - - return 0; -} -#endif /* Not used */ - /** Extract data element [i] from array data tables treated as a single flat array of integers. * Be careful for 2-dimensional arrays or for YYTD_ID_TRANSITION, which is an array * of structs. |