Move extern definitions to common.h

Increase charmap symbol length to 64
This commit is contained in:
ache 2001-11-27 23:11:05 +00:00
parent df947dedc9
commit 8eefba4b03
3 changed files with 13 additions and 4 deletions

10
usr.bin/colldef/common.h Normal file
View File

@ -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];

View File

@ -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];

View File

@ -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;