diff options
Diffstat (limited to 'usr.bin/indent/indent.c')
-rw-r--r-- | usr.bin/indent/indent.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index 71259a8..62310fc 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -63,9 +63,9 @@ static const char rcsid[] = static void bakcopy(void); -char *in_name = "Standard Input"; /* will always point to name of input +const char *in_name = "Standard Input"; /* will always point to name of input * file */ -char *out_name = "Standard Output"; /* will always point to name +const char *out_name = "Standard Output"; /* will always point to name * of output file */ char bakfile[MAXPATHLEN] = ""; @@ -89,7 +89,7 @@ main(int argc, char **argv) int squest; /* when this is positive, we have seen a ? * without the matching : in a <c>?<s>:<s> * construct */ - register char *t_ptr; /* used for copying tokens */ + const char *t_ptr; /* used for copying tokens */ int type_code; /* the type of token, returned by lexi */ int last_else = 0; /* true iff last keyword was an else */ @@ -267,7 +267,7 @@ main(int argc, char **argv) ps.ind_level = ps.i_l_follow = col / ps.ind_size; } if (troff) { - register char *p = in_name, + const char *p = in_name, *beg = in_name; while (*p) @@ -574,7 +574,7 @@ check_type: e_code += strlen(e_code); } else { - char *res = token; + const char *res = token; if (ps.in_decl && !ps.block_init) { /* if this is a unary op * in a declaration, we @@ -600,7 +600,7 @@ check_type: if (ps.want_blank) *e_code++ = ' '; { - char *res = token; + const char *res = token; if (troff) switch (token[0]) { @@ -1077,7 +1077,7 @@ check_type: while ((c = getc(input)) == '\n'); ungetc(c, input); } - if (ifdef_level < sizeof state_stack / sizeof state_stack[0]) { + if ((size_t)ifdef_level < sizeof(state_stack)/sizeof(state_stack[0])) { match_state[ifdef_level].tos = -1; state_stack[ifdef_level++] = ps; } @@ -1143,7 +1143,7 @@ bakcopy(void) int n, bakchn; char buff[8 * 1024]; - register char *p; + const char *p; /* construct file name .Bfile */ for (p = in_name; *p; p++); /* skip to end of string */ |