=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/echo.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- src/usr.bin/mg/echo.c 2002/02/16 21:27:49 1.20 +++ src/usr.bin/mg/echo.c 2002/03/11 13:02:56 1.21 @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.20 2002/02/16 21:27:49 millert Exp $ */ +/* $OpenBSD: echo.c,v 1.21 2002/03/11 13:02:56 vincent Exp $ */ /* * Echo line reading and writing. @@ -23,7 +23,7 @@ static void eformat(const char *, va_list); static void eputi(int, int); static void eputl(long, int); -static void eputs(char *); +static void eputs(const char *); static void eputc(char); static LIST *copy_list(LIST *); @@ -33,7 +33,7 @@ * Erase the echo line. */ void -eerase() +eerase(void) { ttcolor(CTEXT); ttmove(nrow - 1, 0); @@ -49,8 +49,7 @@ * required. */ int -eyorn(sp) - char *sp; +eyorn(const char *sp) { int s; @@ -77,8 +76,7 @@ * "yes" or "no" and the trainling newline. */ int -eyesno(sp) - char *sp; +eyesno(const char *sp) { int s; char buf[64]; @@ -307,9 +305,7 @@ * do completion on a list of objects. */ static int -complt(flags, c, buf, cpos) - int flags, c, cpos; - char *buf; +complt(int flags, int c, char *buf, int cpos) { LIST *lh, *lh2; LIST *wholelist = NULL; @@ -403,11 +399,7 @@ * do completion on a list of objects, listing instead of completing */ static int -complt_list(flags, c, buf, cpos) - int flags; - int c; - char *buf; - int cpos; +complt_list(int flags, int c, char *buf, int cpos) { LIST *lh, *lh2, *lh3; LIST *wholelist = NULL; @@ -418,7 +410,7 @@ int oldcol = ttcol; int oldhue = tthue; char *linebuf; - char *cp; + const char *cp; lh = NULL; @@ -562,10 +554,7 @@ * this is normal. */ int -getxtra(lp1, lp2, cpos, wflag) - LIST *lp1, *lp2; - int cpos; - int wflag; +getxtra(LIST *lp1, LIST *lp2, int cpos, int wflag) { int i; @@ -679,8 +668,7 @@ * Put integer, in radix "r". */ static void -eputi(i, r) - int i, r; +eputi(int i, int r) { int q; @@ -697,9 +685,7 @@ * Put long, in radix "r". */ static void -eputl(l, r) - long l; - int r; +eputl(long l, int r) { long q; @@ -716,8 +702,7 @@ * Put string. */ static void -eputs(s) - char *s; +eputs(const char *s) { int c; @@ -730,8 +715,7 @@ * too long. */ static void -eputc(c) - char c; +eputc(char c) { if (ttcol + 2 < ncol) { if (ISCTRL(c)) { @@ -744,8 +728,7 @@ } void -free_file_list(lp) - LIST *lp; +free_file_list(LIST *lp) { LIST *next; @@ -757,8 +740,7 @@ } static LIST * -copy_list(lp) - LIST *lp; +copy_list(LIST *lp) { LIST *current, *last;