diff options
Diffstat (limited to 'usr.bin/colldef')
-rw-r--r-- | usr.bin/colldef/common.h | 10 | ||||
-rw-r--r-- | usr.bin/colldef/parse.y | 4 | ||||
-rw-r--r-- | usr.bin/colldef/scan.l | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/usr.bin/colldef/common.h b/usr.bin/colldef/common.h new file mode 100644 index 0000000..9497e17 --- /dev/null +++ b/usr.bin/colldef/common.h @@ -0,0 +1,10 @@ +/* + * $FreeBSD$ + */ + +#define CHARMAP_SYMBOL_LEN 64 + +extern int line_no; + +extern u_char charmap_table[UCHAR_MAX + 1][CHARMAP_SYMBOL_LEN]; +extern char map_name[FILENAME_MAX]; diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y index af247a5..0525955 100644 --- a/usr.bin/colldef/parse.y +++ b/usr.bin/colldef/parse.y @@ -36,8 +36,8 @@ #include <unistd.h> #include <sysexits.h> #include "collate.h" +#include "common.h" -extern int line_no; extern FILE *yyin; void yyerror(char *fmt, ...) __printflike(1, 2); int yyparse(void); @@ -47,7 +47,7 @@ static void usage __P((void)); char map_name[FILENAME_MAX] = "."; char __collate_version[STR_LEN]; -u_char charmap_table[UCHAR_MAX + 1][STR_LEN]; +u_char charmap_table[UCHAR_MAX + 1][CHARMAP_SYMBOL_LEN]; u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN]; struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1]; struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE]; diff --git a/usr.bin/colldef/scan.l b/usr.bin/colldef/scan.l index 9b25e13..cfeee74 100644 --- a/usr.bin/colldef/scan.l +++ b/usr.bin/colldef/scan.l @@ -35,13 +35,12 @@ #include <string.h> #include <sysexits.h> #include "collate.h" +#include "common.h" #include "y.tab.h" int line_no = 1, save_no, fromsubs; u_char buf[STR_LEN], *ptr; FILE *map_fp; -extern char map_name[]; -extern u_char charmap_table[UCHAR_MAX + 1][STR_LEN]; YY_BUFFER_STATE main_buf, map_buf; #ifdef FLEX_DEBUG YYSTYPE yylval; |