diff --git a/exec.c b/exec.c index a437523..f9a4995 100644 --- a/exec.c +++ b/exec.c @@ -241,12 +241,12 @@ int macarg(char *tok) * nextarg: * get the next argument * - * char *prompt; prompt to use if we must be interactive + * const char *prompt; prompt to use if we must be interactive * char *buffer; buffer to put token into * int size; size of the buffer * int terminator; terminating char to be used on interactive fetch */ -int nextarg(char *prompt, char *buffer, int size, int terminator) +int nextarg(const char *prompt, char *buffer, int size, int terminator) { /* if we are interactive, go get it! */ if (clexec == FALSE) diff --git a/exec.h b/exec.h index e0b8082..27f6b11 100644 --- a/exec.h +++ b/exec.h @@ -8,7 +8,7 @@ int execcmd( int f, int n) ; int docmd( char *cline) ; char *token( char *src, char *tok, int size) ; int macarg( char *tok) ; -int nextarg( char *prompt, char *buffer, int size, int terminator) ; +int nextarg( const char *prompt, char *buffer, int size, int terminator) ; int storemac( int f, int n) ; int storeproc( int f, int n) ; int execproc( int f, int n) ; diff --git a/input.c b/input.c index 1bd797d..0cc3b72 100644 --- a/input.c +++ b/input.c @@ -37,7 +37,7 @@ * ABORT. The ABORT status is returned if the user bumps out of the question * with a ^G. Used any time a confirmation is required. */ -int mlyesno(char *prompt) +int mlyesno( const char *prompt) { char c; /* input character */ char buf[NPAT]; /* prompt to user */ @@ -70,12 +70,12 @@ int mlyesno(char *prompt) * return. Handle erase, kill, and abort keys. */ -int mlreply(char *prompt, char *buf, int nbuf) +int mlreply( const char *prompt, char *buf, int nbuf) { return nextarg(prompt, buf, nbuf, ctoec('\n')); } -int mlreplyt(char *prompt, char *buf, int nbuf, int eolchar) +int mlreplyt(const char *prompt, char *buf, int nbuf, int eolchar) { return nextarg(prompt, buf, nbuf, eolchar); } @@ -444,11 +444,11 @@ handle_CSI: to specify the proper terminator. If the terminator is not a return ('\n') it will echo as "" */ -int getstring(char *prompt, char *buf, int nbuf, int eolchar) +int getstring( const char *prompt, char *buf, int nbuf, int eolchar) { int cpos; /* current character position in string */ int c; - int quotef; /* are we quoting the next char? */ + boolean quotef ; /* are we quoting the next char? */ #if COMPLC int ffile, ocpos, nskip = 0, didtry = 0; #if MSDOS diff --git a/input.h b/input.h index a1da651..99ee8db 100644 --- a/input.h +++ b/input.h @@ -3,16 +3,16 @@ #include "edef.h" -int mlyesno( char *prompt) ; -int mlreply( char *prompt, char *buf, int nbuf) ; -int mlreplyt( char *prompt, char *buf, int nbuf, int eolchar) ; +int mlyesno( const char *prompt) ; +int mlreply( const char *prompt, char *buf, int nbuf) ; +int mlreplyt( const char *prompt, char *buf, int nbuf, int eolchar) ; int ectoc( int c) ; int ctoec( int c) ; fn_t getname( void) ; int tgetc( void) ; int get1key( void) ; int getcmd( void) ; -int getstring( char *prompt, char *buf, int nbuf, int eolchar) ; +int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ; void outstring( char *s) ; void ostring( char *s) ;