summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-05-17 14:08:03 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-05-17 14:08:03 -0700
commitbff96f0f863ba98fe5a66110ae0e29ca26336861 (patch)
treec49c3842baa6136ab6c2c26abe92219d5b814842 /process.c
parentc5e43b03ca7176907dd8d0d0964e0fd0460b9ff5 (diff)
Constify some static data constants
Diffstat (limited to 'process.c')
-rw-r--r--process.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/process.c b/process.c
index 75ef753..e721f1e 100644
--- a/process.c
+++ b/process.c
@@ -80,8 +80,8 @@ struct _list_data { /* for iterating */
*/
static char *stdin_filename = "(stdin)"; /* for messages */
static char *stdout_filename = "(stdout)"; /* for messages */
-static char *Yes = "yes"; /* for messages */
-static char *No = "no"; /* for messages */
+static const char *Yes = "yes"; /* for messages */
+static const char *No = "no"; /* for messages */
static int binaryEqual ( const char *a, const char *b, unsigned len );
static void prefix ( const char *fn, int n );
@@ -92,7 +92,7 @@ static char **split_into_words ( char *src, int *argcp );
static FILE *open_file ( char **filenamep, const char *mode, Bool *usedstdp, const char *srcfn, int srcln, const char *cmd );
static int read_auth_entries ( FILE *fp, AuthList **headp, AuthList **tailp );
static int cvthexkey ( char *hexstr, char **ptrp );
-static int dispatch_command ( const char *inputfilename, int lineno, int argc, char **argv, CommandTable *tab, int *statusp );
+static int dispatch_command ( const char *inputfilename, int lineno, int argc, char **argv, const CommandTable *tab, int *statusp );
static void die ( int sig );
static void catchsig ( int sig );
static void register_signals ( void );
@@ -116,7 +116,7 @@ static int do_exit ( const char *inputfilename, int lineno, int argc, char **arg
static int do_quit ( const char *inputfilename, int lineno, int argc, char **argv );
static int do_source ( const char *inputfilename, int lineno, int argc, char **argv );
-static CommandTable command_table[] = { /* table of known commands */
+static const CommandTable command_table[] = { /* table of known commands */
{ "add", 2, 3, do_add,
"\
add add an entry\n\
@@ -185,7 +185,7 @@ source read commands from file\n\
static Bool okay_to_use_stdin = True; /* set to false after using */
-static char *hex_table[] = { /* for printing hex digits */
+static const char * const hex_table[] = { /* for printing hex digits */
"00", "01", "02", "03", "04", "05", "06", "07",
"08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
"10", "11", "12", "13", "14", "15", "16", "17",
@@ -443,10 +443,10 @@ static int dispatch_command (
int lineno,
int argc,
char **argv,
- CommandTable *tab,
+ const CommandTable *tab,
int *statusp)
{
- CommandTable *ct;
+ const CommandTable *ct;
char *cmd;
int n;
/* scan table for command */
@@ -756,7 +756,7 @@ static void fprintfhex (
const unsigned char *ucp = (const unsigned char *) cp;
for (; len > 0; len--, ucp++) {
- register char *s = hex_table[*ucp];
+ register const char *s = hex_table[*ucp];
putc (s[0], fp);
putc (s[1], fp);
}
@@ -1032,7 +1032,7 @@ int print_help (
FILE *fp,
const char *cmd)
{
- CommandTable *ct;
+ const CommandTable *ct;
int n = 0;
fprintf (fp, "\n");
@@ -1094,7 +1094,7 @@ static int do_questionmark (
int argc,
char **argv)
{
- CommandTable *ct;
+ const CommandTable *ct;
int i;
#define WIDEST_COLUMN 72
int col = WIDEST_COLUMN;