diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-16 19:20:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-16 19:20:03 +0000 |
commit | 70f9d0aedf4ca5118e179d710d28784002eeda6f (patch) | |
tree | aad40abf38d60da6f113eed519ae57e7eb715279 /bin | |
parent | 095c2ee89237305b5ddf4176c567978054b9f40f (diff) |
sprinkle const; mostly from NetBSD
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pax/ar_io.c | 14 | ||||
-rw-r--r-- | bin/pax/ar_subs.c | 6 | ||||
-rw-r--r-- | bin/pax/buf_subs.c | 6 | ||||
-rw-r--r-- | bin/pax/cache.c | 6 | ||||
-rw-r--r-- | bin/pax/cpio.c | 6 | ||||
-rw-r--r-- | bin/pax/extern.h | 18 | ||||
-rw-r--r-- | bin/pax/file_subs.c | 6 | ||||
-rw-r--r-- | bin/pax/ftree.c | 6 | ||||
-rw-r--r-- | bin/pax/gen_subs.c | 14 | ||||
-rw-r--r-- | bin/pax/getoldopt.c | 6 | ||||
-rw-r--r-- | bin/pax/options.c | 17 | ||||
-rw-r--r-- | bin/pax/pat_rep.c | 6 | ||||
-rw-r--r-- | bin/pax/pax.c | 8 | ||||
-rw-r--r-- | bin/pax/sel_subs.c | 24 | ||||
-rw-r--r-- | bin/pax/tables.c | 6 | ||||
-rw-r--r-- | bin/pax/tar.c | 6 | ||||
-rw-r--r-- | bin/pax/tty_subs.c | 12 |
17 files changed, 86 insertions, 81 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index bbd39360434..d334c6b619c 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_io.c,v 1.28 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: ar_io.c,v 1.29 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: ar_io.c,v 1.5 1996/03/26 23:54:13 mrg Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_io.c,v 1.28 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: ar_io.c,v 1.29 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ @@ -86,7 +86,7 @@ static struct stat arsb; /* stat of archive device at open */ static int invld_rec; /* tape has out of spec record size */ static int wr_trail = 1; /* trailer was rewritten in append */ static int can_unlnk = 0; /* do we unlink null archives? */ -char *arcname; /* printable name of archive */ +const char *arcname; /* printable name of archive */ const char *gzip_program; /* name of gzip program */ static pid_t zpid = -1; /* pid of child process */ @@ -104,7 +104,7 @@ static void ar_start_gzip(int, const char *, int); */ int -ar_open(char *name) +ar_open(const char *name) { struct mtget mb; @@ -1227,7 +1227,7 @@ ar_next(void) */ if (ar_open(buf) >= 0) { if (freeit) { - (void)free(arcname); + (void)free((char *)arcname); freeit = 0; } if ((arcname = strdup(buf)) == NULL) { @@ -1254,7 +1254,7 @@ void ar_start_gzip(int fd, const char *gzip_program, int wr) { int fds[2]; - char *gzip_flags; + const char *gzip_flags; if (pipe(fds) < 0) err(1, "could not pipe"); diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c index 594c3db7953..0e5159c6e5b 100644 --- a/bin/pax/ar_subs.c +++ b/bin/pax/ar_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_subs.c,v 1.20 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: ar_subs.c,v 1.21 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_subs.c,v 1.20 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: ar_subs.c,v 1.21 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index caa5253f6b9..46487e205c8 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf_subs.c,v 1.13 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: buf_subs.c,v 1.14 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.13 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: buf_subs.c,v 1.14 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/cache.c b/bin/pax/cache.c index ffa882eb6be..f347a251862 100644 --- a/bin/pax/cache.c +++ b/bin/pax/cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cache.c,v 1.11 2002/10/16 17:43:10 millert Exp $ */ +/* $OpenBSD: cache.c,v 1.12 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: cache.c,v 1.4 1995/03/21 09:07:10 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: cache.c,v 1.11 2002/10/16 17:43:10 millert Exp $"; +static const char rcsid[] = "$OpenBSD: cache.c,v 1.12 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c index 616852d2372..09dafaaae9f 100644 --- a/bin/pax/cpio.c +++ b/bin/pax/cpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpio.c,v 1.12 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: cpio.c,v 1.13 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)cpio.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)cpio.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: cpio.c,v 1.12 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: cpio.c,v 1.13 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/extern.h b/bin/pax/extern.h index f660394f2a8..d65e55a62d3 100644 --- a/bin/pax/extern.h +++ b/bin/pax/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.22 2002/10/16 17:43:10 millert Exp $ */ +/* $OpenBSD: extern.h,v 1.23 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: extern.h,v 1.5 1996/03/26 23:54:16 mrg Exp $ */ /*- @@ -49,9 +49,9 @@ /* * ar_io.c */ -extern char *arcname; +extern const char *arcname; extern const char *gzip_program; -int ar_open(char *); +int ar_open(const char *); void ar_close(void); void ar_drain(void); int ar_set_wr(void); @@ -169,7 +169,7 @@ int next_file(ARCHD *); */ void ls_list(ARCHD *, time_t, FILE *); void ls_tty(ARCHD *); -void safe_print(char *, FILE *); +void safe_print(const char *, FILE *); u_long asc_ul(char *, int, int); int ul_asc(u_long, char *, int, int); #ifndef LONG_OFF_T @@ -180,7 +180,7 @@ int uqd_asc(u_quad_t, char *, int, int); /* * getoldopt.c */ -int getoldopt(int, char **, char *); +int getoldopt(int, char **, const char *); /* * options.c @@ -189,7 +189,7 @@ extern FSUB fsub[]; extern int ford[]; void options(int, char **); OPLIST * opt_next(void); -int opt_add(char *); +int opt_add(const char *); int bad_opt(void); char *chdname; @@ -296,7 +296,7 @@ int ustar_wr(ARCHD *); * tty_subs.c */ int tty_init(void); -void tty_prnt(char *, ...); +void tty_prnt(const char *, ...); int tty_read(char *, int); -void paxwarn(int, char *, ...); -void syswarn(int, int, char *, ...); +void paxwarn(int, const char *, ...); +void syswarn(int, int, const char *, ...); diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index c09ad47dadc..6167e4b2efc 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_subs.c,v 1.19 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: file_subs.c,v 1.20 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: file_subs.c,v 1.19 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: file_subs.c,v 1.20 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/ftree.c b/bin/pax/ftree.c index dfd317a56fd..eb76057571c 100644 --- a/bin/pax/ftree.c +++ b/bin/pax/ftree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftree.c,v 1.20 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: ftree.c,v 1.21 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: ftree.c,v 1.4 1995/03/21 09:07:21 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ftree.c,v 1.20 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: ftree.c,v 1.21 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index beba2c8040c..c37cc63e893 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gen_subs.c,v 1.14 2002/10/16 17:43:10 millert Exp $ */ +/* $OpenBSD: gen_subs.c,v 1.15 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: gen_subs.c,v 1.5 1995/03/21 09:07:26 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.14 2002/10/16 17:43:10 millert Exp $"; +static const char rcsid[] = "$OpenBSD: gen_subs.c,v 1.15 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ @@ -85,7 +85,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp) struct stat *sbp; char f_mode[MODELEN]; char f_date[DATELEN]; - char *timefrmt; + const char *timefrmt; /* * if not verbose, just print the file name @@ -170,7 +170,7 @@ ls_tty(ARCHD *arcn) { char f_date[DATELEN]; char f_mode[MODELEN]; - char *timefrmt; + const char *timefrmt; if (ltmfrmt == NULL) { /* @@ -195,10 +195,10 @@ ls_tty(ARCHD *arcn) } void -safe_print(char *str, FILE *fp) +safe_print(const char *str, FILE *fp) { char visbuf[5]; - char *cp; + const char *cp; /* * if printing to a tty, use vis(3) to print special characters. diff --git a/bin/pax/getoldopt.c b/bin/pax/getoldopt.c index 728969337df..4de13cd0d82 100644 --- a/bin/pax/getoldopt.c +++ b/bin/pax/getoldopt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.6 2002/10/16 18:44:19 millert Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.7 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /* @@ -11,7 +11,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.6 2002/10/16 18:44:19 millert Exp $"; +static const char rcsid[] = "$OpenBSD: getoldopt.c,v 1.7 2002/10/16 19:20:02 millert Exp $"; #endif /* not lint */ #include <stdio.h> @@ -19,7 +19,7 @@ static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.6 2002/10/16 18:44:19 millert E #include <unistd.h> int -getoldopt(int argc, char **argv, char *optstring) +getoldopt(int argc, char **argv, const char *optstring) { static char *key; /* Points to next keyletter */ static char use_getopt; /* !=0 if argv[1][0] was '-' */ diff --git a/bin/pax/options.c b/bin/pax/options.c index 47c11597dbc..30fe4bbfecb 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.53 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: options.c,v 1.54 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.53 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: options.c,v 1.54 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ @@ -1346,22 +1346,23 @@ bad_opt(void) */ int -opt_add(char *str) +opt_add(const char *str) { OPLIST *opt; char *frpt; char *pt; char *endpt; + char *dstr; if ((str == NULL) || (*str == '\0')) { paxwarn(0, "Invalid option name"); return(-1); } - if ((str = strdup(str)) == NULL) { + if ((dstr = strdup(str)) == NULL) { paxwarn(0, "Unable to allocate space for option list"); return(-1); } - frpt = endpt = str; + frpt = endpt = dstr; /* * break into name and values pieces and stuff each one into a @@ -1373,12 +1374,12 @@ opt_add(char *str) *endpt = '\0'; if ((pt = strchr(frpt, '=')) == NULL) { paxwarn(0, "Invalid options format"); - free(str); + free(dstr); return(-1); } if ((opt = (OPLIST *)malloc(sizeof(OPLIST))) == NULL) { paxwarn(0, "Unable to allocate space for option list"); - free(str); + free(dstr); return(-1); } *pt++ = '\0'; diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c index c388729cf26..e32812d73bb 100644 --- a/bin/pax/pat_rep.c +++ b/bin/pax/pat_rep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pat_rep.c,v 1.21 2002/10/16 17:43:10 millert Exp $ */ +/* $OpenBSD: pat_rep.c,v 1.22 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.21 2002/10/16 17:43:10 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pat_rep.c,v 1.22 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/pax.c b/bin/pax/pax.c index cab0b17726d..d1a36914926 100644 --- a/bin/pax/pax.c +++ b/bin/pax/pax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.c,v 1.21 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: pax.c,v 1.22 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $ */ /*- @@ -39,16 +39,16 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint #if 0 -static char sccsid[] = "@(#)pax.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)pax.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pax.c,v 1.21 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: pax.c,v 1.22 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/sel_subs.c b/bin/pax/sel_subs.c index 1f58725a32a..1669d2ee37c 100644 --- a/bin/pax/sel_subs.c +++ b/bin/pax/sel_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sel_subs.c,v 1.14 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: sel_subs.c,v 1.15 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: sel_subs.c,v 1.5 1995/03/21 09:07:42 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)sel_subs.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)sel_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: sel_subs.c,v 1.14 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: sel_subs.c,v 1.15 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ @@ -62,7 +62,7 @@ static char rcsid[] = "$OpenBSD: sel_subs.c,v 1.14 2002/10/16 18:40:30 millert E #include "sel_subs.h" #include "extern.h" -static int str_sec(char *, time_t *); +static int str_sec(const char *, time_t *); static int usr_match(ARCHD *); static int grp_match(ARCHD *); static int trng_match(ARCHD *); @@ -534,12 +534,16 @@ trng_match(ARCHD *arcn) */ static int -str_sec(char *p, time_t *tval) +str_sec(const char *p, time_t *tval) { struct tm *lt; - char *dot, *t; + const char *dot, *t; + size_t len; int bigyear; - int yearset = 0; + int yearset; + + yearset = 0; + len = strlen(p); for (t = p, dot = NULL; *t; ++t) { if (isdigit(*t)) @@ -554,16 +558,16 @@ str_sec(char *p, time_t *tval) lt = localtime(tval); if (dot != NULL) { /* .SS */ - *dot++ = '\0'; - if (strlen(dot) != 2) + if (strlen(++dot) != 2) return(-1); lt->tm_sec = ATOI2(dot); if (lt->tm_sec > 61) return(-1); + len -= 3; } else lt->tm_sec = 0; - switch (strlen(p)) { + switch (len) { case 12: /* cc */ bigyear = ATOI2(p); lt->tm_year = (bigyear * 100) - TM_YEAR_BASE; diff --git a/bin/pax/tables.c b/bin/pax/tables.c index cc529be6596..f6ff451b04e 100644 --- a/bin/pax/tables.c +++ b/bin/pax/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.17 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: tables.c,v 1.18 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93"; +static const char sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: tables.c,v 1.17 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: tables.c,v 1.18 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/tar.c b/bin/pax/tar.c index 3e0dc4e5327..49f69308ef0 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.27 2002/10/16 18:40:30 millert Exp $ */ +/* $OpenBSD: tar.c,v 1.28 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tar.c,v 1.27 2002/10/16 18:40:30 millert Exp $"; +static const char rcsid[] = "$OpenBSD: tar.c,v 1.28 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ diff --git a/bin/pax/tty_subs.c b/bin/pax/tty_subs.c index fe3780c3b03..1d9356bf1a4 100644 --- a/bin/pax/tty_subs.c +++ b/bin/pax/tty_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_subs.c,v 1.9 2002/10/16 17:43:10 millert Exp $ */ +/* $OpenBSD: tty_subs.c,v 1.10 2002/10/16 19:20:02 millert Exp $ */ /* $NetBSD: tty_subs.c,v 1.5 1995/03/21 09:07:52 cgd Exp $ */ /*- @@ -40,9 +40,9 @@ #ifndef lint #if 0 -static char sccsid[] = "@(#)tty_subs.c 8.2 (Berkeley) 4/18/94"; +static const char sccsid[] = "@(#)tty_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tty_subs.c,v 1.9 2002/10/16 17:43:10 millert Exp $"; +static const char rcsid[] = "$OpenBSD: tty_subs.c,v 1.10 2002/10/16 19:20:02 millert Exp $"; #endif #endif /* not lint */ @@ -102,7 +102,7 @@ tty_init(void) */ void -tty_prnt(char *fmt, ...) +tty_prnt(const char *fmt, ...) { va_list ap; @@ -148,7 +148,7 @@ tty_read(char *str, int len) */ void -paxwarn(int set, char *fmt, ...) +paxwarn(int set, const char *fmt, ...) { va_list ap; @@ -177,7 +177,7 @@ paxwarn(int set, char *fmt, ...) */ void -syswarn(int set, int errnum, char *fmt, ...) +syswarn(int set, int errnum, const char *fmt, ...) { va_list ap; |