diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-30 06:59:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-30 06:59:50 +0000 |
commit | 23ed975a6d5eb145159abb55333c86cab3c5ae3a (patch) | |
tree | 9fe964ef17f07826448a5cad129689a9d2a62c17 /usr.bin | |
parent | 69b3602370538d6a76b8ade41a7ae12939613759 (diff) |
Y2K fixes from Andreas.Gunnarsson@emw.ericsson.se; culled from various places
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cal/cal.c | 12 | ||||
-rw-r--r-- | usr.bin/calendar/calendar.h | 6 | ||||
-rw-r--r-- | usr.bin/calendar/day.c | 17 | ||||
-rw-r--r-- | usr.bin/calendar/io.c | 9 | ||||
-rw-r--r-- | usr.bin/chpass/chpass.c | 6 | ||||
-rw-r--r-- | usr.bin/chpass/chpass.h | 4 | ||||
-rw-r--r-- | usr.bin/chpass/edit.c | 11 | ||||
-rw-r--r-- | usr.bin/chpass/pw_yp.c | 9 | ||||
-rw-r--r-- | usr.bin/chpass/util.c | 78 | ||||
-rw-r--r-- | usr.bin/ftp/ruserpass.c | 7 | ||||
-rw-r--r-- | usr.bin/ftp/util.c | 7 | ||||
-rw-r--r-- | usr.bin/make/targ.c | 16 | ||||
-rw-r--r-- | usr.bin/make/var.c | 5 |
13 files changed, 81 insertions, 106 deletions
diff --git a/usr.bin/cal/cal.c b/usr.bin/cal/cal.c index 27234bc8a7b..51d1ef96aef 100644 --- a/usr.bin/cal/cal.c +++ b/usr.bin/cal/cal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cal.c,v 1.4 1997/01/15 23:42:15 millert Exp $ */ +/* $OpenBSD: cal.c,v 1.5 1998/03/30 06:59:23 deraadt Exp $ */ /* $NetBSD: cal.c,v 1.6 1995/03/26 03:10:24 glass Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cal.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: cal.c,v 1.4 1997/01/15 23:42:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: cal.c,v 1.5 1998/03/30 06:59:23 deraadt Exp $"; #endif #endif /* not lint */ @@ -59,6 +59,7 @@ static char rcsid[] = "$OpenBSD: cal.c,v 1.4 1997/01/15 23:42:15 millert Exp $"; #include <stdlib.h> #include <string.h> #include <time.h> +#include <tzfile.h> #include <unistd.h> #define THURSDAY 4 /* for reformation */ @@ -109,7 +110,7 @@ char *j_day_headings = " Su Mo Tu We Th Fr Sa"; /* leap year -- account for gregorian reformation in 1752 */ #define leap_year(yr) \ ((yr) <= 1752 ? !((yr) % 4) : \ - !((yr) % 4) && ((yr) % 100) || !((yr) % 400)) + (!((yr) % 4) && ((yr) % 100)) || !((yr) % 400)) /* number of centuries since 1700, not inclusive */ #define centuries_since_1700(yr) \ @@ -174,7 +175,7 @@ main(argc, argv) case 0: (void)time(&now); local_time = localtime(&now); - year = local_time->tm_year + 1900; + year = local_time->tm_year + TM_YEAR_BASE; if (!yflag) month = local_time->tm_mon + 1; break; @@ -376,7 +377,8 @@ ascii_day(p, day) return; } if (julian) { - if (val = day / 100) { + val = day / 100; + if (val) { day %= 100; *p++ = val + '0'; display = 1; diff --git a/usr.bin/calendar/calendar.h b/usr.bin/calendar/calendar.h index 068275b58ba..02390a093af 100644 --- a/usr.bin/calendar/calendar.h +++ b/usr.bin/calendar/calendar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: calendar.h,v 1.1 1996/12/05 06:04:38 millert Exp $ */ +/* $OpenBSD: calendar.h,v 1.2 1998/03/30 06:59:24 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -63,8 +63,8 @@ void setnnames __P((void)); #define F_ISDAYVAR 0x04 /* variables day of week, like SundayLast */ #define F_EASTER 0x08 /* Easter or easter depending days */ -extern f_dayAfter; /* days after current date */ -extern f_dayBefore; /* days bevore current date */ +extern int f_dayAfter; /* days after current date */ +extern int f_dayBefore; /* days before current date */ struct fixs { char *name; diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c index 87fb7fa6a8a..e6e64ad1606 100644 --- a/usr.bin/calendar/day.c +++ b/usr.bin/calendar/day.c @@ -1,4 +1,4 @@ -/* $OpenBSD: day.c,v 1.3 1998/02/23 05:48:42 millert Exp $ */ +/* $OpenBSD: day.c,v 1.4 1998/03/30 06:59:26 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -43,7 +43,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #else -static char rcsid[] = "$OpenBSD: day.c,v 1.3 1998/02/23 05:48:42 millert Exp $"; +static char rcsid[] = "$OpenBSD: day.c,v 1.4 1998/03/30 06:59:26 deraadt Exp $"; #endif #endif /* not lint */ @@ -147,7 +147,7 @@ settime(now) time_t now; { tp = localtime(&now); - if (isleap(tp->tm_year + 1900)) { + if (isleap(tp->tm_year + TM_YEAR_BASE)) { yrdays = DAYSPERLYEAR; cumdays = daytab[1]; } else { @@ -172,7 +172,6 @@ time_t Mktime (date) char *date; { time_t t; - char save; int len; struct tm tm; @@ -204,9 +203,13 @@ time_t Mktime (date) *(date + len - 4) = '\0'; tm.tm_year = atoi(date); - /* tm_year up 1900 ... */ - if (tm.tm_year > 1900) - tm.tm_year -= 1900; + /* tm_year up TM_YEAR_BASE ... */ + if (tm.tm_year < 70) + tm.tm_year += 2000 - TM_YEAR_BASE; + else if (tm.tm_year < 100) + tm.tm_year += 1900 - TM_YEAR_BASE; + else if (tm.tm_year > TM_YEAR_BASE) + tm.tm_year -= TM_YEAR_BASE; } #if DEBUG diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 3bc6d52b773..22cc9a1a166 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.3 1998/02/14 21:07:21 millert Exp $ */ +/* $OpenBSD: io.c,v 1.4 1998/03/30 06:59:27 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -43,7 +43,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.3 1998/02/14 21:07:21 millert Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.4 1998/03/30 06:59:27 deraadt Exp $"; #endif #endif /* not lint */ @@ -62,6 +62,7 @@ static char rcsid[] = "$OpenBSD: io.c,v 1.3 1998/02/14 21:07:21 millert Exp $"; #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <tzfile.h> #include <unistd.h> #include "pathnames.h" @@ -217,11 +218,11 @@ getfield(p, endp, flags) } /* Easter */ - else if ((val = geteaster(start, tp->tm_year + 1900)) != 0) + else if ((val = geteaster(start, tp->tm_year + TM_YEAR_BASE)) != 0) *flags |= F_EASTER; /* Paskha */ - else if ((val = getpaskha(start, tp->tm_year + 1900)) != 0) + else if ((val = getpaskha(start, tp->tm_year + TM_YEAR_BASE)) != 0) *flags |= F_EASTER; /* undefined rest */ diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 099c805c3c3..8c77a86172c 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chpass.c,v 1.9 1997/06/17 20:49:55 kstailey Exp $ */ +/* $OpenBSD: chpass.c,v 1.10 1998/03/30 06:59:28 deraadt Exp $ */ /* $NetBSD: chpass.c,v 1.8 1996/05/15 21:50:43 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: chpass.c,v 1.9 1997/06/17 20:49:55 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: chpass.c,v 1.10 1998/03/30 06:59:28 deraadt Exp $"; #endif #endif /* not lint */ @@ -75,6 +75,8 @@ uid_t uid; int use_yp; int force_yp = 0; extern struct passwd *ypgetpwnam(), *ypgetpwuid(); +int _yp_check __P((char **)); +int pw_yp __P((struct passwd *, uid_t)); #endif void baduser __P((void)); diff --git a/usr.bin/chpass/chpass.h b/usr.bin/chpass/chpass.h index 1183321034a..7a7027cdb8e 100644 --- a/usr.bin/chpass/chpass.h +++ b/usr.bin/chpass/chpass.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chpass.h,v 1.3 1996/06/26 05:31:55 deraadt Exp $ */ +/* $OpenBSD: chpass.h,v 1.4 1998/03/30 06:59:29 deraadt Exp $ */ /* $NetBSD: chpass.h,v 1.4 1996/05/15 21:50:44 jtc Exp $ */ /* @@ -69,5 +69,5 @@ int p_login __P((char *, struct passwd *, ENTRY *)); int p_passwd __P((char *, struct passwd *, ENTRY *)); int p_shell __P((char *, struct passwd *, ENTRY *)); int p_uid __P((char *, struct passwd *, ENTRY *)); -char *ttoa __P((time_t)); +char *ttoa __P((char *, size_t, time_t)); int verify __P((char *, struct passwd *)); diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index cc658801dea..9f0d3736b96 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.12 1997/06/17 20:49:55 kstailey Exp $ */ +/* $OpenBSD: edit.c,v 1.13 1998/03/30 06:59:31 deraadt Exp $ */ /* $NetBSD: edit.c,v 1.6 1996/05/15 21:50:45 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: edit.c,v 1.12 1997/06/17 20:49:55 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: edit.c,v 1.13 1998/03/30 06:59:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -94,7 +94,8 @@ display(tempname, fd, pw) struct passwd *pw; { FILE *fp; - char *bp, *p, *ttoa(); + char *bp, *p; + char chngstr[256]; if (!(fp = fdopen(fd, "w"))) pw_error(tempname, 1, 1); @@ -107,9 +108,9 @@ display(tempname, fd, pw) (void)fprintf(fp, "Uid [#]: %d\n", pw->pw_uid); (void)fprintf(fp, "Gid [# or name]: %d\n", pw->pw_gid); (void)fprintf(fp, "Change [month day year]: %s\n", - ttoa(pw->pw_change)); + ttoa(chngstr, sizeof(chngstr), pw->pw_change)); (void)fprintf(fp, "Expire [month day year]: %s\n", - ttoa(pw->pw_expire)); + ttoa(chngstr, sizeof(chngstr), pw->pw_expire)); (void)fprintf(fp, "Class: %s\n", pw->pw_class); (void)fprintf(fp, "Home directory: %s\n", pw->pw_dir); (void)fprintf(fp, "Shell: %s\n", diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index 38354b0956e..24f01b29d1e 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pw_yp.c,v 1.7 1997/02/14 11:05:11 niklas Exp $ */ +/* $OpenBSD: pw_yp.c,v 1.8 1998/03/30 06:59:32 deraadt Exp $ */ /* $NetBSD: pw_yp.c,v 1.5 1995/03/26 04:55:33 glass Exp $ */ /* @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93"; #else -static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.7 1997/02/14 11:05:11 niklas Exp $"; +static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.8 1998/03/30 06:59:32 deraadt Exp $"; #endif #endif /* not lint */ @@ -48,6 +48,7 @@ static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.7 1997/02/14 11:05:11 niklas Exp $" #include <netdb.h> #include <time.h> #include <pwd.h> +#include <err.h> #include <errno.h> #include <stdlib.h> #include <rpc/rpc.h> @@ -61,12 +62,13 @@ extern char *progname; static char *domain; +int pw_yp(pw, uid) struct passwd *pw; uid_t uid; { char *master; - char *pp, *p; + char *p; char buf[10]; int r, rpcport, status, alen; struct yppasswd yppasswd; @@ -189,7 +191,6 @@ interpret(pwent, line) char *line; { register char *p = line; - register int c; pwent->pw_passwd = "*"; pwent->pw_uid = 0; diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index 419e266905c..3470c2c7be1 100644 --- a/usr.bin/chpass/util.c +++ b/usr.bin/chpass/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.3 1997/06/17 20:49:56 kstailey Exp $ */ +/* $OpenBSD: util.c,v 1.4 1998/03/30 06:59:34 deraadt Exp $ */ /* $NetBSD: util.c,v 1.4 1995/03/26 04:55:35 glass Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.3 1997/06/17 20:49:56 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.4 1998/03/30 06:59:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -56,28 +56,21 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.3 1997/06/17 20:49:56 kstailey Exp $ #include "chpass.h" #include "pathnames.h" -static int dmsize[] = - { -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -static char *months[] = - { "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", - "December", NULL }; - char * -ttoa(tval) +ttoa(buf, len, tval) + char *buf; + size_t len; time_t tval; { - struct tm *tp; - static char tbuf[50]; - if (tval) { - tp = localtime(&tval); - (void)sprintf(tbuf, "%s %d, %d", months[tp->tm_mon], - tp->tm_mday, tp->tm_year + TM_YEAR_BASE); + struct tm *tp = localtime(&tval); + + (void) strftime(buf, len, "%B %d, %Y", tp); + buf[len - 1] = '\0'; } - else - *tbuf = '\0'; - return (tbuf); + else if (len > 0) + *buf = '\0'; + return (buf); } int @@ -86,9 +79,9 @@ atot(p, store) time_t *store; { static struct tm *lt; - char *t, **mp; + struct tm tm; + char *t; time_t tval; - int day, month, year; if (!*p) { *store = 0; @@ -99,38 +92,15 @@ atot(p, store) (void)time(&tval); lt = localtime(&tval); } - if (!(t = strtok(p, " \t"))) - goto bad; - for (mp = months;; ++mp) { - if (!*mp) - goto bad; - if (!strncasecmp(*mp, t, 3)) { - month = mp - months + 1; - break; - } - } - if (!(t = strtok(NULL, " \t,")) || !isdigit(*t)) - goto bad; - day = atoi(t); - if (!(t = strtok(NULL, " \t,")) || !isdigit(*t)) - goto bad; - year = atoi(t); - if (day < 1 || day > 31 || month < 1 || month > 12 || !year) - goto bad; - if (year < 100) - year += TM_YEAR_BASE; - if (year <= EPOCH_YEAR) -bad: return (1); - tval = isleap(year) && month > 2; - for (--year; year >= EPOCH_YEAR; --year) - tval += isleap(year) ? - DAYSPERLYEAR : DAYSPERNYEAR; - while (--month) - tval += dmsize[month]; - tval += day; - tval = tval * HOURSPERDAY * MINSPERHOUR * SECSPERMIN; - tval -= lt->tm_gmtoff; - *store = tval; + (void) memset(&tm, 0, sizeof(tm)); + for (t = p; (t = strchr(t, ',')) != NULL; t++) + *t = ' '; + t = strptime(p, "%B %d %Y", &tm); + if (t == NULL || (*t != '\0' && *t != '\n')) + return 1; + *store = mktime(&tm); + if (*store == (time_t) -1) + return 1; return (0); } @@ -141,7 +111,7 @@ ok_shell(name) char *p, *sh; setusershell(); - while (sh = getusershell()) { + while ((sh = getusershell()) != NULL) { if (!strcmp(name, sh)) return (name); /* allow just shell name, but use "real" path */ diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c index e7a8130304e..7f51b7f0035 100644 --- a/usr.bin/ftp/ruserpass.c +++ b/usr.bin/ftp/ruserpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruserpass.c,v 1.10 1997/09/05 00:02:30 millert Exp $ */ +/* $OpenBSD: ruserpass.c,v 1.11 1998/03/30 06:59:35 deraadt Exp $ */ /* $NetBSD: ruserpass.c,v 1.14 1997/07/20 09:46:01 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.10 1997/09/05 00:02:30 millert Exp $"; +static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.11 1998/03/30 06:59:35 deraadt Exp $"; #endif #endif /* not lint */ @@ -149,7 +149,7 @@ next: while ((t = token()) && t != MACH && t != DEFAULT) switch(t) { case LOGIN: - if (token()) + if (token()) { if (*aname == 0) { *aname = malloc((unsigned) strlen(tokval) + 1); @@ -158,6 +158,7 @@ next: if (strcmp(*aname, tokval)) goto next; } + } break; case PASSWD: if ((*aname == NULL || strcmp(*aname, "anonymous")) && diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index a6659994a9a..137c18c8a86 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.16 1997/11/25 08:10:34 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.17 1998/03/30 06:59:36 deraadt Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /* @@ -35,7 +35,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: util.c,v 1.16 1997/11/25 08:10:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.17 1998/03/30 06:59:36 deraadt Exp $"; #endif /* not lint */ /* @@ -57,6 +57,7 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.16 1997/11/25 08:10:34 deraadt Exp $ #include <stdlib.h> #include <string.h> #include <time.h> +#include <tzfile.h> #include <unistd.h> #include "ftp_var.h" @@ -564,7 +565,7 @@ remotemodtime(file, noisy) timebuf.tm_hour = hour; timebuf.tm_mday = day; timebuf.tm_mon = mo - 1; - timebuf.tm_year = yy - 1900; + timebuf.tm_year = yy - TM_YEAR_BASE; timebuf.tm_isdst = -1; rtime = mktime(&timebuf); if (rtime == -1 && (noisy || debug != 0)) diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index bf705b9fded..1549927f920 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -1,4 +1,4 @@ -/* $OpenBSD: targ.c,v 1.7 1997/04/28 01:52:42 millert Exp $ */ +/* $OpenBSD: targ.c,v 1.8 1998/03/30 06:59:38 deraadt Exp $ */ /* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -static char *rcsid = "$OpenBSD: targ.c,v 1.7 1997/04/28 01:52:42 millert Exp $"; +static char *rcsid = "$OpenBSD: targ.c,v 1.8 1998/03/30 06:59:38 deraadt Exp $"; #endif #endif /* not lint */ @@ -467,17 +467,11 @@ Targ_FmtTime (time) time_t time; { struct tm *parts; - static char buf[40]; - static char *months[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; + static char buf[128]; parts = localtime(&time); - - sprintf (buf, "%d:%02d:%02d %s %d, %d", - parts->tm_hour, parts->tm_min, parts->tm_sec, - months[parts->tm_mon], parts->tm_mday, 1900 + parts->tm_year); + strftime(buf, sizeof buf, "%k:%M:%S %b %d, %Y", parts); + buf[sizeof(buf) - 1] = '\0'; return(buf); } diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 93ec75192b9..4ab4cd1eda1 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.7 1997/12/18 21:50:45 deraadt Exp $ */ +/* $OpenBSD: var.c,v 1.8 1998/03/30 06:59:39 deraadt Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: var.c,v 1.7 1997/12/18 21:50:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: var.c,v 1.8 1998/03/30 06:59:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -1150,7 +1150,6 @@ VarRESubstitute(word, addSpace, buf, patternp) else if ((*rp == '&') || ((*rp == '\\') && isdigit(rp[1]))) { int n; char *subbuf; - char zsub; int sublen; char errstr[3]; |