summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/cat/cat.c8
-rw-r--r--bin/cp/extern.h3
-rw-r--r--bin/cp/utils.c12
-rw-r--r--bin/date/date.c12
-rw-r--r--bin/df/df.c10
-rw-r--r--bin/domainname/domainname.c9
-rw-r--r--bin/hostname/hostname.c9
-rw-r--r--bin/kill/kill.c18
-rw-r--r--bin/ls/extern.h4
-rw-r--r--bin/ls/util.c7
-rw-r--r--bin/md5/md5.c3
-rw-r--r--bin/mkdir/mkdir.c9
-rw-r--r--bin/mv/mv.c12
-rw-r--r--bin/ps/ps.c16
-rw-r--r--bin/pwd/pwd.c9
-rw-r--r--bin/rcp/extern.h3
-rw-r--r--bin/rcp/rcp.c12
-rw-r--r--bin/rm/rm.c9
-rw-r--r--bin/rmail/rmail.c9
-rw-r--r--bin/rmdir/rmdir.c7
-rw-r--r--bin/sleep/sleep.c9
-rw-r--r--bin/stty/extern.h4
-rw-r--r--bin/stty/stty.c5
23 files changed, 118 insertions, 81 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 71439ce4cf3..fca0b73f21c 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cat.c,v 1.9 2000/01/22 20:24:45 deraadt Exp $ */
+/* $OpenBSD: cat.c,v 1.10 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#else
-static char rcsid[] = "$OpenBSD: cat.c,v 1.9 2000/01/22 20:24:45 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: cat.c,v 1.10 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -64,6 +64,8 @@ static char rcsid[] = "$OpenBSD: cat.c,v 1.9 2000/01/22 20:24:45 deraadt Exp $";
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
int bflag, eflag, nflag, sflag, tflag, vflag;
int rval;
char *filename;
@@ -107,7 +109,7 @@ main(argc, argv)
break;
default:
(void)fprintf(stderr,
- "usage: cat [-benstuv] [-] [file ...]\n");
+ "usage: %s [-benstuv] [-] [file ...]\n", __progname);
exit(1);
}
argv += optind;
diff --git a/bin/cp/extern.h b/bin/cp/extern.h
index 64de7e4bd86..4c410aca776 100644
--- a/bin/cp/extern.h
+++ b/bin/cp/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.7 1999/05/06 17:19:46 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.8 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: extern.h,v 1.3 1995/03/21 09:02:16 cgd Exp $ */
/*-
@@ -45,6 +45,7 @@ typedef struct {
extern PATH_T to;
extern uid_t myuid;
extern int fflag, iflag, pflag, myumask;
+extern char *__progname;
#include <sys/cdefs.h>
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 32ee5d4cbac..cf33ef608fc 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.16 2001/06/25 04:35:31 art Exp $ */
+/* $OpenBSD: utils.c,v 1.17 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: utils.c,v 1.6 1997/02/26 14:40:51 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#else
-static char rcsid[] = "$OpenBSD: utils.c,v 1.16 2001/06/25 04:35:31 art Exp $";
+static char rcsid[] = "$OpenBSD: utils.c,v 1.17 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -315,8 +315,10 @@ setlink(fs)
void
usage()
{
- (void)fprintf(stderr, "%s\n%s\n",
- "usage: cp [-R [-H | -L | -P]] [-fip] src target",
- " cp [-R [-H | -L | -P]] [-fip] src1 ... srcN directory");
+ (void)fprintf(stderr,
+ "usage: %s [-R [-H | -L | -P]] [-fip] src target\n", __progname);
+ (void)fprintf(stderr,
+ " %s [-R [-H | -L | -P]] [-fip] src1 ... srcN directory\n",
+ __progname);
exit(1);
}
diff --git a/bin/date/date.c b/bin/date/date.c
index 05525d0c963..8a949caaeac 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: date.c,v 1.17 2001/03/26 15:22:16 millert Exp $ */
+/* $OpenBSD: date.c,v 1.18 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: date.c,v 1.17 2001/03/26 15:22:16 millert Exp $";
+static char rcsid[] = "$OpenBSD: date.c,v 1.18 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -66,6 +66,8 @@ static char rcsid[] = "$OpenBSD: date.c,v 1.17 2001/03/26 15:22:16 millert Exp $
#include "extern.h"
+extern char *__progname;
+
time_t tval;
int retval, nflag;
@@ -254,7 +256,9 @@ static void
usage()
{
(void)fprintf(stderr,
- "usage: date [-nu] [-d dst] [-r seconds] [-t west] [+format]\n");
- (void)fprintf(stderr, " [[[[[[cc]yy]mm]dd]HH]MM[.SS]]\n");
+ "usage: %s [-nu] [-d dst] [-r seconds] [-t west] [+format]\n",
+ __progname);
+ (void)fprintf(stderr,
+ "%-*s[[[[[[cc]yy]mm]dd]HH]MM[.SS]]\n", strlen(__progname) + 8, "");
exit(1);
}
diff --git a/bin/df/df.c b/bin/df/df.c
index 2a34575b417..29c549c7b75 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: df.c,v 1.29 2001/07/09 22:37:56 millert Exp $ */
+/* $OpenBSD: df.c,v 1.30 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */
/*
@@ -49,7 +49,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: df.c,v 1.29 2001/07/09 22:37:56 millert Exp $";
+static char rcsid[] = "$OpenBSD: df.c,v 1.30 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -66,6 +66,8 @@ static char rcsid[] = "$OpenBSD: df.c,v 1.29 2001/07/09 22:37:56 millert Exp $";
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
int bread __P((int, off_t, void *, int));
char *getmntpt __P((char *));
void bsdprint __P((struct statfs *, long, int));
@@ -532,6 +534,8 @@ bread(rfd, off, buf, cnt)
void
usage()
{
- (void)fprintf(stderr, "usage: df [-hiklnP] [-t type] [file | file_system ...]\n");
+ (void)fprintf(stderr,
+ "usage: %s [-hiklnP] [-t type] [file | file_system ...]\n",
+ __progname);
exit(1);
}
diff --git a/bin/domainname/domainname.c b/bin/domainname/domainname.c
index 633db145d59..8ff5bb51421 100644
--- a/bin/domainname/domainname.c
+++ b/bin/domainname/domainname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: domainname.c,v 1.3 1996/08/02 12:40:54 deraadt Exp $ */
+/* $OpenBSD: domainname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: domainname.c,v 1.7 1995/03/21 09:04:22 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)hostname.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: domainname.c,v 1.3 1996/08/02 12:40:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: domainname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,8 @@ static char rcsid[] = "$OpenBSD: domainname.c,v 1.3 1996/08/02 12:40:54 deraadt
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
void usage __P((void));
int
@@ -91,7 +93,6 @@ main(argc, argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: domainname [name-of-domain]\n");
+ (void)fprintf(stderr, "usage: %s [name-of-domain]\n", __progname);
exit(1);
}
diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c
index 85ad5cfae8b..5c7d394db03 100644
--- a/bin/hostname/hostname.c
+++ b/bin/hostname/hostname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Exp $ */
+/* $OpenBSD: hostname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: hostname.c,v 1.10 1995/09/07 06:28:40 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)hostname.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: hostname.c,v 1.4 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,8 @@ static char rcsid[] = "$OpenBSD: hostname.c,v 1.3 1996/08/02 12:40:55 deraadt Ex
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
void usage __P((void));
int
@@ -97,7 +99,6 @@ main(argc, argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: hostname [-s] [name-of-host]\n");
+ (void)fprintf(stderr, "usage: %s [-s] [name-of-host]\n", __progname);
exit(1);
}
diff --git a/bin/kill/kill.c b/bin/kill/kill.c
index e6933e14a51..d1d802569e4 100644
--- a/bin/kill/kill.c
+++ b/bin/kill/kill.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kill.c,v 1.3 1997/02/06 13:29:08 deraadt Exp $ */
+/* $OpenBSD: kill.c,v 1.4 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: kill.c,v 1.11 1995/09/07 06:30:27 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: kill.c,v 1.3 1997/02/06 13:29:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: kill.c,v 1.4 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,8 @@ static char rcsid[] = "$OpenBSD: kill.c,v 1.3 1997/02/06 13:29:08 deraadt Exp $"
#include <stdlib.h>
#include <string.h>
+extern char *__progname;
+
void nosig __P((char *));
void printsignals __P((FILE *));
int signame_to_signum __P((char *));
@@ -184,10 +186,12 @@ printsignals(fp)
void
usage()
{
-
- (void)fprintf(stderr, "usage: kill [-s signal_name] pid ...\n");
- (void)fprintf(stderr, " kill -l [exit_status]\n");
- (void)fprintf(stderr, " kill -signal_name pid ...\n");
- (void)fprintf(stderr, " kill -signal_number pid ...\n");
+ (void)fprintf(stderr, "usage: %s [-s signal_name] pid ...\n",
+ __progname);
+ (void)fprintf(stderr, " %s -l [exit_status]\n", __progname);
+ (void)fprintf(stderr, " %s -signal_name pid ...\n",
+ __progname);
+ (void)fprintf(stderr, " %s -signal_number pid ...\n",
+ __progname);
exit(1);
}
diff --git a/bin/ls/extern.h b/bin/ls/extern.h
index 3e7764be8fe..e11314382f3 100644
--- a/bin/ls/extern.h
+++ b/bin/ls/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.6 2000/07/19 19:27:36 mickey Exp $ */
+/* $OpenBSD: extern.h,v 1.7 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: extern.h,v 1.5 1995/03/21 09:06:24 cgd Exp $ */
/*-
@@ -36,6 +36,8 @@
* @(#)extern.h 8.1 (Berkeley) 5/31/93
*/
+extern char *__progname;
+
int acccmp __P((const FTSENT *, const FTSENT *));
int revacccmp __P((const FTSENT *, const FTSENT *));
int modcmp __P((const FTSENT *, const FTSENT *));
diff --git a/bin/ls/util.c b/bin/ls/util.c
index e31dba906fd..33c7ef15d3d 100644
--- a/bin/ls/util.c
+++ b/bin/ls/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.6 1999/05/05 07:06:01 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.7 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: util.c,v 1.12 1995/09/07 06:43:02 jtc Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.5 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: util.c,v 1.6 1999/05/05 07:06:01 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.7 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -72,6 +72,7 @@ void
usage()
{
(void)fprintf(stderr,
- "usage: ls [-1ACFLRSTWacdfiklmnopqrstux] [file ...]\n");
+ "usage: %s [-1ACFLRSTWacdfiklmnopqrstux] [file ...]\n",
+ __progname);
exit(1);
}
diff --git a/bin/md5/md5.c b/bin/md5/md5.c
index c32980a4c84..4c3dc46c725 100644
--- a/bin/md5/md5.c
+++ b/bin/md5/md5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md5.c,v 1.13 2001/06/03 18:04:16 millert Exp $ */
+/* $OpenBSD: md5.c,v 1.14 2001/09/06 13:29:08 mpech Exp $ */
/*
* Copyright (c) 2001 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -264,7 +264,6 @@ digest_test(struct hash_functions *hf)
static void
usage()
{
-
fprintf(stderr, "usage: %s [-p | -t | -x | -s string | file ...]\n",
__progname);
exit(1);
diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c
index 83c200fdef3..e788be05b74 100644
--- a/bin/mkdir/mkdir.c
+++ b/bin/mkdir/mkdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkdir.c,v 1.9 2000/02/02 05:09:01 ericj Exp $ */
+/* $OpenBSD: mkdir.c,v 1.10 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: mkdir.c,v 1.14 1995/06/25 21:59:21 mycroft Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94";
#else
-static char rcsid[] = "$OpenBSD: mkdir.c,v 1.9 2000/02/02 05:09:01 ericj Exp $";
+static char rcsid[] = "$OpenBSD: mkdir.c,v 1.10 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -59,6 +59,8 @@ static char rcsid[] = "$OpenBSD: mkdir.c,v 1.9 2000/02/02 05:09:01 ericj Exp $";
#include <string.h>
#include <unistd.h>
+extern char *__progname;
+
int mkpath __P((char *, mode_t, mode_t));
void usage __P((void));
@@ -182,7 +184,6 @@ mkpath(path, mode, dir_mode)
void
usage()
{
-
- (void)fprintf(stderr, "usage: mkdir [-p] [-m mode] dirname ...\n");
+ (void)fprintf(stderr, "usage: %s [-p] [-m mode] dirname ...\n", __progname);
exit(1);
}
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 749c528e081..8db29894189 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mv.c,v 1.18 2001/07/09 07:04:26 deraadt Exp $ */
+/* $OpenBSD: mv.c,v 1.19 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: mv.c,v 1.9 1995/03/21 09:06:52 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: mv.c,v 1.18 2001/07/09 07:04:26 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mv.c,v 1.19 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -69,6 +69,8 @@ static char rcsid[] = "$OpenBSD: mv.c,v 1.18 2001/07/09 07:04:26 deraadt Exp $";
#include "pathnames.h"
+extern char *__progname;
+
int fflg, iflg;
int stdin_ok;
@@ -407,8 +409,8 @@ copy(from, to)
void
usage()
{
-
- (void)fprintf(stderr, "usage: mv [-fi] source target\n");
- (void)fprintf(stderr, " mv [-fi] source ... directory\n");
+ (void)fprintf(stderr, "usage: %s [-fi] source target\n", __progname);
+ (void)fprintf(stderr, " %s [-fi] source ... directory\n",
+ __progname);
exit(1);
}
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index eebfa04e8cd..5d8b689e28b 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ps.c,v 1.21 2001/06/03 04:48:15 angelos Exp $ */
+/* $OpenBSD: ps.c,v 1.22 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: ps.c,v 1.21 2001/06/03 04:48:15 angelos Exp $";
+static char rcsid[] = "$OpenBSD: ps.c,v 1.22 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -74,6 +74,8 @@ static char rcsid[] = "$OpenBSD: ps.c,v 1.21 2001/06/03 04:48:15 angelos Exp $";
#include "ps.h"
+extern char *__progname;
+
KINFO *kinfo;
struct varent *vhead, *vtail;
@@ -519,11 +521,11 @@ kludge_oldps_options(s)
static void
usage()
{
-
(void)fprintf(stderr,
- "usage:\t%s\n\t %s\n\t%s\n",
- "ps [-][aChjlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]",
- "[-M core] [-N system] [-W swap]",
- "ps [-L]");
+ "usage: %s [-][aChjlmrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]\n",
+ __progname);
+ (void)fprintf(stderr,
+ "%-*s[-M core] [-N system] [-W swap]\n", strlen(__progname) + 8, "");
+ (void)fprintf(stderr, " %s [-L]\n", __progname);
exit(1);
}
diff --git a/bin/pwd/pwd.c b/bin/pwd/pwd.c
index 3de15a81e2f..444fb02d62d 100644
--- a/bin/pwd/pwd.c
+++ b/bin/pwd/pwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwd.c,v 1.5 1997/01/15 23:40:24 millert Exp $ */
+/* $OpenBSD: pwd.c,v 1.6 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: pwd.c,v 1.7 1995/03/21 09:08:18 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)pwd.c 8.3 (Berkeley) 4/1/94";
#else
-static char rcsid[] = "$OpenBSD: pwd.c,v 1.5 1997/01/15 23:40:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: pwd.c,v 1.6 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -53,6 +53,8 @@ static char rcsid[] = "$OpenBSD: pwd.c,v 1.5 1997/01/15 23:40:24 millert Exp $";
#include <stdlib.h>
#include <unistd.h>
+extern char *__progname;
+
void usage __P((void));
int
@@ -92,7 +94,6 @@ main(argc, argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: pwd\n");
+ (void)fprintf(stderr, "usage: %s\n", __progname);
exit(1);
}
diff --git a/bin/rcp/extern.h b/bin/rcp/extern.h
index 1464a191a07..b909d9524de 100644
--- a/bin/rcp/extern.h
+++ b/bin/rcp/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.2 1996/06/23 14:20:55 deraadt Exp $ */
+/* $OpenBSD: extern.h,v 1.3 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: extern.h,v 1.2 1995/03/21 08:19:01 cgd Exp $ */
/*-
@@ -42,6 +42,7 @@ typedef struct {
} BUF;
extern int iamremote;
+extern char *__progname;
BUF *allocbuf __P((BUF *, int, int));
char *colon __P((char *));
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index e96c3df2f45..5bce22ebeda 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcp.c,v 1.22 2001/06/13 09:03:18 markus Exp $ */
+/* $OpenBSD: rcp.c,v 1.23 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */
/*
@@ -852,12 +852,14 @@ void
usage()
{
#ifdef KERBEROS
- (void)fprintf(stderr, "%s\n%s\n",
- "usage: rcp [-Kpx] [-k realm] f1 f2",
- " or: rcp [-Kprx] [-k realm] f1 ... fn directory");
+ (void)fprintf(stderr, "usage: %s [-Kpx] [-k realm] f1 f2\n",
+ __progname);
+ (void)fprintf(stderr, " %s [-Kprx] [-k realm] f1 ... fn directory\n",
+ __progname);
#else
(void)fprintf(stderr,
- "usage: rcp [-p] f1 f2; or: rcp [-pr] f1 ... fn directory\n");
+ "usage: %s [-p] f1 f2; or: rcp [-pr] f1 ... fn directory\n",
+ __progname);
#endif
exit(1);
}
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 327a29e781a..b5f763c201f 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rm.c,v 1.10 2001/06/08 13:40:20 millert Exp $ */
+/* $OpenBSD: rm.c,v 1.11 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: rm.c,v 1.19 1995/09/07 06:48:50 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rm.c 8.8 (Berkeley) 4/27/95";
#else
-static char rcsid[] = "$OpenBSD: rm.c,v 1.10 2001/06/08 13:40:20 millert Exp $";
+static char rcsid[] = "$OpenBSD: rm.c,v 1.11 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -65,6 +65,8 @@ static char rcsid[] = "$OpenBSD: rm.c,v 1.10 2001/06/08 13:40:20 millert Exp $";
#include <pwd.h>
#include <grp.h>
+extern char *__progname;
+
int dflag, eval, fflag, iflag, Pflag, Wflag, stdin_ok;
int check __P((char *, char *, struct stat *));
@@ -437,7 +439,6 @@ checkdot(argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: rm [-dfiPRrW] file ...\n");
+ (void)fprintf(stderr, "usage: %s [-dfiPRrW] file ...\n", __progname);
exit(1);
}
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index 496f015256f..31badbfee8b 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmail.c,v 1.10 2000/01/22 20:24:53 deraadt Exp $ */
+/* $OpenBSD: rmail.c,v 1.11 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95";
#else
-static char rcsid[] = "$OpenBSD: rmail.c,v 1.10 2000/01/22 20:24:53 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rmail.c,v 1.11 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -87,6 +87,8 @@ static char rcsid[] = "$OpenBSD: rmail.c,v 1.10 2000/01/22 20:24:53 deraadt Exp
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
+extern char *__progname;
+
void err __P((int, const char *, ...));
void usage __P((void));
@@ -358,6 +360,7 @@ main(argc, argv)
void
usage()
{
- (void)fprintf(stderr, "usage: rmail [-T] [-D domain] user ...\n");
+ (void)fprintf(stderr, "usage: %s [-T] [-D domain] user ...\n",
+ __progname);
exit(EX_USAGE);
}
diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c
index 86708cc9325..12e35c5d3b1 100644
--- a/bin/rmdir/rmdir.c
+++ b/bin/rmdir/rmdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmdir.c,v 1.4 2001/05/20 08:51:32 mickey Exp $ */
+/* $OpenBSD: rmdir.c,v 1.5 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: rmdir.c,v 1.13 1995/03/21 09:08:31 cgd Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmdir.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: rmdir.c,v 1.4 2001/05/20 08:51:32 mickey Exp $";
+static char rcsid[] = "$OpenBSD: rmdir.c,v 1.5 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -56,6 +56,8 @@ static char rcsid[] = "$OpenBSD: rmdir.c,v 1.4 2001/05/20 08:51:32 mickey Exp $"
#include <locale.h>
#include <unistd.h>
+extern char *__progname;
+
int rm_path __P((char *));
void usage __P((void));
@@ -127,7 +129,6 @@ rm_path(path)
void
usage()
{
- extern char *__progname;
fprintf(stderr, "usage: %s [-p] directory ...\n", __progname);
exit(1);
}
diff --git a/bin/sleep/sleep.c b/bin/sleep/sleep.c
index 96dffd86303..c61cb9aadc1 100644
--- a/bin/sleep/sleep.c
+++ b/bin/sleep/sleep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sleep.c,v 1.10 2001/05/20 08:04:48 mickey Exp $ */
+/* $OpenBSD: sleep.c,v 1.11 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: sleep.c,v 1.8 1995/03/21 09:11:11 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)sleep.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: sleep.c,v 1.10 2001/05/20 08:04:48 mickey Exp $";
+static char rcsid[] = "$OpenBSD: sleep.c,v 1.11 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -57,6 +57,8 @@ static char rcsid[] = "$OpenBSD: sleep.c,v 1.10 2001/05/20 08:04:48 mickey Exp $
#include <time.h>
#include <unistd.h>
+extern char *__progname;
+
void usage __P((void));
void alarmh __P((int));
@@ -129,8 +131,7 @@ main(argc, argv)
void
usage()
{
-
- (void)fprintf(stderr, "usage: sleep seconds\n");
+ (void)fprintf(stderr, "usage: %s seconds\n", __progname);
exit(1);
}
diff --git a/bin/stty/extern.h b/bin/stty/extern.h
index 939422807ee..8e0611a85a6 100644
--- a/bin/stty/extern.h
+++ b/bin/stty/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.3 1996/06/23 14:21:50 deraadt Exp $ */
+/* $OpenBSD: extern.h,v 1.4 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: extern.h,v 1.8 1996/05/07 18:20:06 jtc Exp $ */
/*-
@@ -36,6 +36,8 @@
* @(#)extern.h 8.1 (Berkeley) 5/31/93
*/
+extern char *__progname;
+
int c_cchars __P((const void *, const void *));
int c_modes __P((const void *, const void *));
int csearch __P((char ***, struct info *));
diff --git a/bin/stty/stty.c b/bin/stty/stty.c
index 55c22250461..a83918ce4dd 100644
--- a/bin/stty/stty.c
+++ b/bin/stty/stty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $ */
+/* $OpenBSD: stty.c,v 1.9 2001/09/06 13:29:08 mpech Exp $ */
/* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $";
+static char rcsid[] = "$OpenBSD: stty.c,v 1.9 2001/09/06 13:29:08 mpech Exp $";
#endif
#endif /* not lint */
@@ -160,7 +160,6 @@ args: argc -= optind;
void
usage()
{
- extern char *__progname;
fprintf(stderr, "usage: %s [-a|-e|-g] [-f file] [operands]\n",
__progname);
exit (1);