diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/oldrdist/main.c | 33 | ||||
-rw-r--r-- | usr.bin/oldrdist/server.c | 9 |
2 files changed, 9 insertions, 33 deletions
diff --git a/usr.bin/oldrdist/main.c b/usr.bin/oldrdist/main.c index a360802a507..21eb70f0b52 100644 --- a/usr.bin/oldrdist/main.c +++ b/usr.bin/oldrdist/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.12 2002/02/19 19:39:38 millert Exp $ */ +/* $OpenBSD: main.c,v 1.13 2002/06/09 21:11:22 hin Exp $ */ /* * Copyright (c) 1983, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/9/93"; */ -static char *rcsid = "$OpenBSD: main.c,v 1.12 2002/02/19 19:39:38 millert Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.13 2002/06/09 21:11:22 hin Exp $"; #endif /* not lint */ #include <stdarg.h> @@ -99,7 +99,7 @@ main(argc, argv) gethostname(host, sizeof(host)); strcpy(tempfile, _PATH_TMP); strcat(tempfile, _RDIST_TMP); - tempname = xbasename(tempfile); + tempname = basename(tempfile); while (--argc > 0) { if ((arg = *++argv)[0] != '-') @@ -307,30 +307,3 @@ prnames(nl) } printf(")\n"); } - -void -warn(const char *fmt, ...) -{ - extern int yylineno; - va_list ap; - - va_start(ap, fmt); - (void)fprintf(stderr, "rdist: line %d: Warning: ", yylineno); - (void)vfprintf(stderr, fmt, ap); - (void)fprintf(stderr, "\n"); - va_end(ap); -} - -/* - * Private version of basename() - */ -char *xbasename(path) - char *path; -{ - char *cp; - - if (cp = strrchr(path, '/')) - return(cp+1); - else - return(path); -} diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c index a7b878e60c2..04173e34edc 100644 --- a/usr.bin/oldrdist/server.c +++ b/usr.bin/oldrdist/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.17 2002/02/19 19:39:38 millert Exp $ */ +/* $OpenBSD: server.c,v 1.18 2002/06/09 21:11:22 hin Exp $ */ /* * Copyright (c) 1983, 1993 @@ -35,11 +35,14 @@ #ifndef lint /* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */ -static char *rcsid = "$OpenBSD: server.c,v 1.17 2002/02/19 19:39:38 millert Exp $"; +static char *rcsid = "$OpenBSD: server.c,v 1.18 2002/06/09 21:11:22 hin Exp $"; #endif /* not lint */ #include <sys/wait.h> + #include <stdarg.h> +#include <libgen.h> + #include "defs.h" #define ack() (void) write(rem, "\0\n", 2) @@ -281,7 +284,7 @@ install(src, dest, destdir, opts) rname++; destdir = 1; } else { - rname = xbasename(target); + rname = basename(target); } if (debug) printf("target = %s, rname = %s\n", target, rname); |