de-__P(), ansify, use {g,s}etprogname.
This commit is contained in:
parent
b775b6932a
commit
05da4551bd
@ -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
|
* Copyright (c) 1983, 1993
|
||||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
|
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
|
||||||
#endif
|
#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 */
|
#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 <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static int decode __P((void));
|
static int decode(void);
|
||||||
static void usage __P((void));
|
static void usage(void);
|
||||||
int main __P((int, char **));
|
int main(int, char *[]);
|
||||||
|
|
||||||
int pflag;
|
int pflag;
|
||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(int argc, char *argv[])
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
{
|
||||||
int ch, rval;
|
int ch, rval;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
setprogname(argv[0]);
|
||||||
|
|
||||||
pflag = 0;
|
pflag = 0;
|
||||||
while ((ch = getopt(argc, argv, "p")) != -1)
|
while ((ch = getopt(argc, argv, "p")) != -1)
|
||||||
@ -108,7 +107,7 @@ main(argc, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decode()
|
decode(void)
|
||||||
{
|
{
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
int n;
|
int n;
|
||||||
@ -221,6 +220,7 @@ decode()
|
|||||||
static void
|
static void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
(void)fprintf(stderr, "usage: uudecode [-p] [file ...]\n");
|
(void)fprintf(stderr, "usage: %s [-p] [file ...]\n",
|
||||||
|
getprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -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
|
* Copyright (c) 1983, 1993
|
||||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)uuencode.c 8.2 (Berkeley) 4/2/94";
|
static char sccsid[] = "@(#)uuencode.c 8.2 (Berkeley) 4/2/94";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#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 <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main __P((int, char **));
|
int main(int, char *[]);
|
||||||
static void encode __P((void));
|
static void encode(void);
|
||||||
static void usage __P((void));
|
static void usage(void);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(int argc, char *argv[])
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
int mode;
|
int mode;
|
||||||
@ -110,7 +108,7 @@ main(argc, argv)
|
|||||||
* copy from in to out, encoding as you go along.
|
* copy from in to out, encoding as you go along.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
encode()
|
encode(void)
|
||||||
{
|
{
|
||||||
int ch, n;
|
int ch, n;
|
||||||
char *p;
|
char *p;
|
||||||
@ -149,8 +147,9 @@ encode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage()
|
usage(void)
|
||||||
{
|
{
|
||||||
(void)fprintf(stderr,"usage: uuencode [infile] remotefile\n");
|
(void)fprintf(stderr, "usage: %s [infile] remotefile\n",
|
||||||
|
getprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user