summaryrefslogtreecommitdiff
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-10-12 17:13:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-10-12 17:13:31 +0000
commit3944de70ab0b936d1fa629fe3f9556aff50510d4 (patch)
tree1d6f56365c63286225f8c909e3d17f1c5009b657 /usr.bin/rcs
parent268ef5eb42bef93315a9a41bc6850edac1648879 (diff)
various usage cleanup; ok joris
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/ci.c9
-rw-r--r--usr.bin/rcs/co.c10
-rw-r--r--usr.bin/rcs/ident.c6
-rw-r--r--usr.bin/rcs/rcsclean.c6
-rw-r--r--usr.bin/rcs/rcsdiff.c8
-rw-r--r--usr.bin/rcs/rcsprog.c13
-rw-r--r--usr.bin/rcs/rlog.c6
7 files changed, 25 insertions, 33 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 7d37df2949d..e3af30db4ec 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.21 2005/10/11 15:52:13 niallo Exp $ */
+/* $OpenBSD: ci.c,v 1.22 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -36,7 +36,6 @@
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
-#include <signal.h>
#include <string.h>
#include <time.h>
@@ -45,8 +44,6 @@
#include "diff.h"
#include "rcsprog.h"
-extern char *__progname;
-
#define LOCK_LOCK 1
#define LOCK_UNLOCK 2
@@ -57,8 +54,8 @@ void
checkin_usage(void)
{
fprintf(stderr,
- "usage: %s [-jMNqV] [-d date] [-k mode] [-l [rev]] [-m msg]\n"
- " [-r [rev]] [-u [rev]] file ...\n", __progname);
+ "usage: ci [-jMNqV] [-d date] [-k mode] [-l [rev]] [-m msg]\n"
+ " [-r [rev]] [-u [rev]] file ...\n");
}
/*
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index 8c169eda415..d9503ccd9f0 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.10 2005/10/10 17:12:49 xsa Exp $ */
+/* $OpenBSD: co.c,v 1.11 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -36,8 +36,6 @@
#include "rcs.h"
#include "rcsprog.h"
-extern char *__progname;
-
#define LOCK_LOCK 1
#define LOCK_UNLOCK 2
@@ -120,7 +118,7 @@ checkout_main(int argc, char **argv)
(usage)();
exit (1);
}
-
+
for (i = 0; i < argc; i++) {
if (rcs_statfile(argv[i], fpath, sizeof(fpath)) < 0)
continue;
@@ -187,6 +185,6 @@ checkout_main(int argc, char **argv)
void
checkout_usage(void)
{
- fprintf(stderr, "usage %s [-qV] [-l [rev]] [-r [rev]] [-u [rev]]"
- " file ...\n", __progname);
+ fprintf(stderr,
+ "usage: co [-qV] [-l [rev]] [-r [rev]] [-u [rev]] file ...\n");
}
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c
index c82fae628e6..1e79d329e4c 100644
--- a/usr.bin/rcs/ident.c
+++ b/usr.bin/rcs/ident.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ident.c,v 1.3 2005/10/06 19:13:43 joris Exp $ */
+/* $OpenBSD: ident.c,v 1.4 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -39,7 +39,6 @@
#define KEYDELIM '$' /* keywords delimitor */
#define VALDELIM ':' /* values delimitor */
-extern char *__progname;
static int found = 0;
static int ident_file(const char *, FILE *);
@@ -154,5 +153,6 @@ ident_line(FILE *fp)
void
ident_usage(void)
{
- fprintf(stderr, "Usage: %s [-qV] file ...\n", __progname);
+ fprintf(stderr,
+ "usage: ident [-qV] file ...\n");
}
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index ba3c4e2a984..df395398706 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.4 2005/10/07 23:59:56 niallo Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.5 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -38,7 +38,6 @@
#include "diff.h"
#include "rcsprog.h"
-extern char *__progname;
static int rcsclean_file(char *, RCSNUM *);
static int nflag = 0;
static int kflag = RCS_KWEXP_ERR;
@@ -112,7 +111,8 @@ rcsclean_main(int argc, char **argv)
void
rcsclean_usage(void)
{
- fprintf(stderr, "usage %s [-qV] [-r rev] [file] ...\n", __progname);
+ fprintf(stderr,
+ "usage: rcsclean [-qV] [-r rev] [file] ...\n");
}
static int
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 710fe5b2a85..a3484b5aa6e 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.8 2005/10/11 14:27:59 joris Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.9 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -37,8 +37,6 @@
#include "diff.h"
#include "rcsprog.h"
-extern char *__progname;
-
static int rcsdiff_file(RCSFILE *, RCSNUM *, const char *);
static int rcsdiff_rev(RCSFILE *rfp, RCSNUM *rev, RCSNUM *rev2);
@@ -140,8 +138,8 @@ rcsdiff_main(int argc, char **argv)
void
rcsdiff_usage(void)
{
- fprintf(stderr, "usage %s [-cnquV] [-r rev1 [-r rev2]] file ...\n",
- __progname);
+ fprintf(stderr,
+ "usage: rcsdiff [-cnquV] [-r rev1 [-r rev2]] file ...\n");
}
static int
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index ddd970a8919..5f601a64b30 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.25 2005/10/11 00:25:18 joris Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.26 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -32,7 +32,6 @@
#include <err.h>
#include <errno.h>
#include <pwd.h>
-#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -47,9 +46,9 @@ const char rcs_version[] = "OpenCVS RCS version 3.6";
int verbose = 1;
struct rcs_prog {
- char *prog_name;
- int (*prog_hdlr)(int, char **);
- void (*prog_usage)(void);
+ char *prog_name;
+ int (*prog_hdlr)(int, char **);
+ void (*prog_usage)(void);
} programs[] = {
{ "rcs", rcs_main, rcs_usage },
{ "ci", checkin_main, checkin_usage },
@@ -129,8 +128,8 @@ void
rcs_usage(void)
{
fprintf(stderr,
- "usage: %s [-hiLMUV] [-a users] [-b [rev]] [-c string]\n"
- "[-e users] [-k opt] [-m rev:log] file ...\n", __progname);
+ "usage: rcs [-hiLMUV] [-a users] [-b [rev]] [-c string] [-e users]\n"
+ " [-k opt] [-m rev:log] file ...\n");
}
/*
diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c
index 7d9e88fecc0..767ec0871ce 100644
--- a/usr.bin/rcs/rlog.c
+++ b/usr.bin/rcs/rlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlog.c,v 1.3 2005/10/07 23:59:56 niallo Exp $ */
+/* $OpenBSD: rlog.c,v 1.4 2005/10/12 17:13:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -38,7 +38,6 @@
#include "diff.h"
#include "rcsprog.h"
-extern char *__progname;
static int rlog_file(const char *, const char *, RCSFILE *);
#define REVSEP "----------------------------"
@@ -110,7 +109,8 @@ rlog_main(int argc, char **argv)
void
rlog_usage(void)
{
- fprintf(stderr, "usage %s [-hNqRtV] file ...\n", __progname);
+ fprintf(stderr,
+ "usage: rlog [-hNqRtV] file ...\n");
}
static int