diff options
author | millaway <millaway> | 2002-04-19 21:53:28 +0000 |
---|---|---|
committer | millaway <millaway> | 2002-04-19 21:53:28 +0000 |
commit | 467a39bf29b0eeb5b8bd88f4b432a8c771ed195a (patch) | |
tree | 7787475477eacc12cf35b3a885fbc0c6e7e7988a | |
parent | 9e32e0241f358b1a914b0aab7aea9a81de1ae93b (diff) | |
download | flex-467a39bf29b0eeb5b8bd88f4b432a8c771ed195a.tar.gz |
Changed 'char[]' to 'const char*' wherever in conflicted with gettext.
-rw-r--r-- | flexdef.h | 58 | ||||
-rw-r--r-- | gen.c | 16 | ||||
-rw-r--r-- | misc.c | 30 |
3 files changed, 52 insertions, 52 deletions
@@ -777,10 +777,10 @@ extern void gen_start_state PROTO((void)); extern void gentabs PROTO((void)); /* Write out a formatted string at the current indentation level. */ -extern void indent_put2s PROTO((char[], char[])); +extern void indent_put2s PROTO((const char *, const char *)); /* Write out a string + newline at the current indentation level. */ -extern void indent_puts PROTO((char[])); +extern void indent_puts PROTO((const char *)); extern void make_tables PROTO((void)); /* generate transition tables */ @@ -831,19 +831,19 @@ extern void dataend PROTO((void)); extern void dataflush PROTO((void)); /* Report an error message and terminate. */ -extern void flexerror PROTO((const char[])); +extern void flexerror PROTO((const char *)); /* Report a fatal error message and terminate. */ -extern void flexfatal PROTO((const char[])); +extern void flexfatal PROTO((const char *)); /* Convert a hexadecimal digit string to an integer value. */ extern int htoi PROTO((Char[])); /* Report an error message formatted with one integer argument. */ -extern void lerrif PROTO((const char[], int)); +extern void lerrif PROTO((const char *, int)); /* Report an error message formatted with one string argument. */ -extern void lerrsf PROTO((const char[], const char[])); +extern void lerrsf PROTO((const char *, const char *)); /* Spit out a "#line" statement. */ extern void line_directive_out PROTO((FILE*, int)); @@ -862,7 +862,7 @@ extern void mk2data PROTO((int)); extern void mkdata PROTO((int)); /* generate a data statement */ /* Return the integer represented by a string of digits. */ -extern int myctoi PROTO((char [])); +extern int myctoi PROTO((const char *)); /* Return character corresponding to escape sequence. */ extern Char myesc PROTO((Char[])); @@ -871,17 +871,17 @@ extern Char myesc PROTO((Char[])); extern int otoi PROTO((Char [] )); /* Output a (possibly-formatted) string to the generated scanner. */ -extern void out PROTO((const char [])); -extern void out_dec PROTO((const char [], int)); -extern void out_dec2 PROTO((const char [], int, int)); -extern void out_hex PROTO((const char [], unsigned int)); -extern void out_line_count PROTO((const char [])); -extern void out_str PROTO((const char [], const char [])); +extern void out PROTO((const char *)); +extern void out_dec PROTO((const char *, int)); +extern void out_dec2 PROTO((const char *, int, int)); +extern void out_hex PROTO((const char *, unsigned int)); +extern void out_line_count PROTO((const char *)); +extern void out_str PROTO((const char *, const char *)); extern void out_str3 - PROTO((const char [], const char [], const char [], const char [])); -extern void out_str_dec PROTO((const char [], const char [], int)); + PROTO((const char *, const char *, const char *, const char *)); +extern void out_str_dec PROTO((const char *, const char *, int)); extern void outc PROTO((int)); -extern void outn PROTO((const char [])); +extern void outn PROTO((const char *)); /* Return a printable version of the given character, which might be * 8-bit. @@ -949,23 +949,23 @@ extern void new_rule PROTO((void)); /* initialize for a new rule */ extern void build_eof_action PROTO((void)); /* Write out a message formatted with one string, pinpointing its location. */ -extern void format_pinpoint_message PROTO((char[], char[])); +extern void format_pinpoint_message PROTO((const char *, const char *)); /* Write out a message, pinpointing its location. */ -extern void pinpoint_message PROTO((char[])); +extern void pinpoint_message PROTO((const char *)); /* Write out a warning, pinpointing it at the given line. */ -extern void line_warning PROTO(( char[], int )); +extern void line_warning PROTO(( const char *, int )); /* Write out a message, pinpointing it at the given line. */ -extern void line_pinpoint PROTO(( char[], int )); +extern void line_pinpoint PROTO(( const char *, int )); /* Report a formatted syntax error. */ -extern void format_synerr PROTO((char [], char[])); -extern void synerr PROTO((char [])); /* report a syntax error */ -extern void format_warn PROTO((char [], char[])); -extern void warn PROTO((char [])); /* report a warning */ -extern void yyerror PROTO((char [])); /* report a parse error */ +extern void format_synerr PROTO((const char *, const char *)); +extern void synerr PROTO((const char *)); /* report a syntax error */ +extern void format_warn PROTO((const char *, const char *)); +extern void warn PROTO((const char *)); /* report a warning */ +extern void yyerror PROTO((const char *)); /* report a parse error */ extern int yyparse PROTO((void)); /* the YACC parser */ @@ -989,15 +989,15 @@ extern void cclinstal PROTO ((Char [], int)); /* Lookup the number associated with character class. */ extern int ccllookup PROTO((Char [])); -extern void ndinstal PROTO((char[], Char[])); /* install a name definition */ -extern Char *ndlookup PROTO((char[])); /* lookup a name definition */ +extern void ndinstal PROTO((const char *, Char[])); /* install a name definition */ +extern Char *ndlookup PROTO((const char *)); /* lookup a name definition */ /* Increase maximum number of SC's. */ extern void scextend PROTO((void)); -extern void scinstal PROTO((char[], int)); /* make a start condition */ +extern void scinstal PROTO((const char *, int)); /* make a start condition */ /* Lookup the number associated with a start condition. */ -extern int sclookup PROTO((char[])); +extern int sclookup PROTO((const char *)); /* from file tblcmp.c */ @@ -38,8 +38,8 @@ void gen_next_state PROTO((int)); void genecs PROTO((void)); -void indent_put2s PROTO((char [], char [])); -void indent_puts PROTO((char [])); +void indent_put2s PROTO((const char *, const char *)); +void indent_puts PROTO((const char *)); static int indent_level = 0; /* each level is 8 spaces */ @@ -53,10 +53,10 @@ static int indent_level = 0; /* each level is 8 spaces */ * to this is that the fast table representation generally uses the * 0 elements of its arrays, too.) */ -static char C_int_decl[] = "static yyconst int %s[%d] =\n { 0,\n"; -static char C_short_decl[] = "static yyconst short int %s[%d] =\n { 0,\n"; -static char C_long_decl[] = "static yyconst long int %s[%d] =\n { 0,\n"; -static char C_state_decl[] = +static const char *C_int_decl = "static yyconst int %s[%d] =\n { 0,\n"; +static const char *C_short_decl = "static yyconst short int %s[%d] =\n { 0,\n"; +static const char *C_long_decl = "static yyconst long int %s[%d] =\n { 0,\n"; +static const char *C_state_decl = "static yyconst yy_state_type %s[%d] =\n { 0,\n"; @@ -1036,7 +1036,7 @@ void gentabs() */ void indent_put2s( fmt, arg ) -char fmt[], arg[]; +const char *fmt, *arg; { do_indent(); out_str( fmt, arg ); @@ -1049,7 +1049,7 @@ char fmt[], arg[]; */ void indent_puts( str ) -char str[]; +const char *str; { do_indent(); outn( str ); @@ -334,7 +334,7 @@ void dataflush() /* flexerror - report an error message and terminate */ void flexerror( msg ) -const char msg[]; +const char *msg; { fprintf( stderr, "%s: %s\n", program_name, msg ); flexend( 1 ); @@ -344,7 +344,7 @@ const char msg[]; /* flexfatal - report a fatal error message and terminate */ void flexfatal( msg ) -const char msg[]; +const char *msg; { fprintf( stderr, _( "%s: fatal internal error, %s\n" ), program_name, msg ); @@ -368,7 +368,7 @@ Char str[]; /* lerrif - report an error message formatted with one integer argument */ void lerrif( msg, arg ) -const char msg[]; +const char *msg; int arg; { char errmsg[MAXLINE]; @@ -380,7 +380,7 @@ int arg; /* lerrsf - report an error message formatted with one string argument */ void lerrsf( msg, arg ) -const char msg[], arg[]; +const char *msg, arg[]; { char errmsg[MAXLINE]; @@ -397,7 +397,7 @@ int do_infile; { char directive[MAXLINE], filename[MAXLINE]; char *s1, *s2, *s3; - static char line_fmt[] = "#line %d \"%s\"\n"; + static const char *line_fmt = "#line %d \"%s\"\n"; if ( ! gen_line_dirs ) return; @@ -523,7 +523,7 @@ int value; /* myctoi - return the integer represented by a string of digits */ int myctoi( array ) -char array[]; +char *array; { int val = 0; @@ -630,14 +630,14 @@ Char str[]; */ void out( str ) -const char str[]; +const char *str; { fputs( str, stdout ); out_line_count( str ); } void out_dec( fmt, n ) -const char fmt[]; +const char *fmt; int n; { printf( fmt, n ); @@ -645,7 +645,7 @@ int n; } void out_dec2( fmt, n1, n2 ) -const char fmt[]; +const char *fmt; int n1, n2; { printf( fmt, n1, n2 ); @@ -653,7 +653,7 @@ int n1, n2; } void out_hex( fmt, x ) -const char fmt[]; +const char *fmt; unsigned int x; { printf( fmt, x ); @@ -661,7 +661,7 @@ unsigned int x; } void out_line_count( str ) -const char str[]; +const char *str; { register int i; @@ -671,7 +671,7 @@ const char str[]; } void out_str( fmt, str ) -const char fmt[], str[]; +const char *fmt, str[]; { printf( fmt, str ); out_line_count( fmt ); @@ -679,7 +679,7 @@ const char fmt[], str[]; } void out_str3( fmt, s1, s2, s3 ) -const char fmt[], s1[], s2[], s3[]; +const char *fmt, s1[], s2[], s3[]; { printf( fmt, s1, s2, s3 ); out_line_count( fmt ); @@ -689,7 +689,7 @@ const char fmt[], s1[], s2[], s3[]; } void out_str_dec( fmt, str, n ) -const char fmt[], str[]; +const char *fmt, str[]; int n; { printf( fmt, str, n ); @@ -707,7 +707,7 @@ int c; } void outn( str ) -const char str[]; +const char *str; { puts( str ); out_line_count( str ); |