de-__P(), ansify, use {g,s}etprogname.

This commit is contained in:
wiz 2005-06-29 20:34:48 +00:00
parent b775b6932a
commit 05da4551bd
2 changed files with 20 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uudecode.c,v 1.19 2004/11/04 07:43:38 dsl Exp $ */
/* $NetBSD: uudecode.c,v 1.20 2005/06/29 20:35:32 wiz Exp $ */
/*-
* Copyright (c) 1983, 1993
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
#endif
__RCSID("$NetBSD: uudecode.c,v 1.19 2004/11/04 07:43:38 dsl Exp $");
__RCSID("$NetBSD: uudecode.c,v 1.20 2005/06/29 20:35:32 wiz Exp $");
#endif /* not lint */
/*
@ -62,21 +62,20 @@ __RCSID("$NetBSD: uudecode.c,v 1.19 2004/11/04 07:43:38 dsl Exp $");
#include <string.h>
#include <unistd.h>
static int decode __P((void));
static void usage __P((void));
int main __P((int, char **));
static int decode(void);
static void usage(void);
int main(int, char *[]);
int pflag;
char *filename;
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int ch, rval;
setlocale(LC_ALL, "");
setprogname(argv[0]);
pflag = 0;
while ((ch = getopt(argc, argv, "p")) != -1)
@ -108,7 +107,7 @@ main(argc, argv)
}
static int
decode()
decode(void)
{
struct passwd *pw;
int n;
@ -221,6 +220,7 @@ decode()
static void
usage()
{
(void)fprintf(stderr, "usage: uudecode [-p] [file ...]\n");
(void)fprintf(stderr, "usage: %s [-p] [file ...]\n",
getprogname());
exit(1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: uuencode.c,v 1.9 2003/08/07 11:16:59 agc Exp $ */
/* $NetBSD: uuencode.c,v 1.10 2005/06/29 20:34:48 wiz Exp $ */
/*-
* Copyright (c) 1983, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "@(#)uuencode.c 8.2 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: uuencode.c,v 1.9 2003/08/07 11:16:59 agc Exp $");
__RCSID("$NetBSD: uuencode.c,v 1.10 2005/06/29 20:34:48 wiz Exp $");
#endif
#endif /* not lint */
@ -58,14 +58,12 @@ __RCSID("$NetBSD: uuencode.c,v 1.9 2003/08/07 11:16:59 agc Exp $");
#include <string.h>
#include <unistd.h>
int main __P((int, char **));
static void encode __P((void));
static void usage __P((void));
int main(int, char *[]);
static void encode(void);
static void usage(void);
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
struct stat sb;
int mode;
@ -110,7 +108,7 @@ main(argc, argv)
* copy from in to out, encoding as you go along.
*/
static void
encode()
encode(void)
{
int ch, n;
char *p;
@ -149,8 +147,9 @@ encode()
}
static void
usage()
usage(void)
{
(void)fprintf(stderr,"usage: uuencode [infile] remotefile\n");
(void)fprintf(stderr, "usage: %s [infile] remotefile\n",
getprogname());
exit(1);
}