Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp convert to ANSI KNF
details: https://anonhg.NetBSD.org/src/rev/dc0ebe8642ed
branches: trunk
changeset: 485574:dc0ebe8642ed
user: lukem <lukem%NetBSD.org@localhost>
date: Mon May 01 10:35:16 2000 +0000
description:
convert to ANSI KNF
diffstat:
usr.bin/ftp/cmds.c | 339 ++++++++++++-----------------------------------
usr.bin/ftp/complete.c | 46 ++----
usr.bin/ftp/domacro.c | 8 +-
usr.bin/ftp/extern.h | 304 +++++++++++++++++++++---------------------
usr.bin/ftp/fetch.c | 73 +++------
usr.bin/ftp/ftp.1 | 4 +-
usr.bin/ftp/ftp.c | 93 +++---------
usr.bin/ftp/ftp_var.h | 12 +-
usr.bin/ftp/main.c | 42 ++---
usr.bin/ftp/ruserpass.c | 13 +-
usr.bin/ftp/util.c | 120 +++++-----------
11 files changed, 375 insertions(+), 679 deletions(-)
diffs (truncated from 2455 to 300 lines):
diff -r d47de7a904b3 -r dc0ebe8642ed usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c Mon May 01 09:44:53 2000 +0000
+++ b/usr.bin/ftp/cmds.c Mon May 01 10:35:16 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.84 2000/05/01 09:44:53 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.85 2000/05/01 10:35:16 lukem Exp $ */
/*-
* Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: cmds.c,v 1.84 2000/05/01 09:44:53 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.85 2000/05/01 10:35:16 lukem Exp $");
#endif
#endif /* not lint */
@@ -153,11 +153,10 @@
sigjmp_buf jabort;
char *mname;
-static int confirm __P((const char *, const char *));
+static int confirm(const char *, const char *);
static int
-confirm(cmd, file)
- const char *cmd, *file;
+confirm(const char *cmd, const char *file)
{
char line[BUFSIZ];
@@ -209,9 +208,7 @@
* Set transfer type.
*/
void
-settype(argc, argv)
- int argc;
- char *argv[];
+settype(int argc, char *argv[])
{
struct types *p;
int comret;
@@ -258,8 +255,7 @@
* Used to change to and from ascii for listings.
*/
void
-changetype(newtype, show)
- int newtype, show;
+changetype(int newtype, int show)
{
struct types *p;
int comret, oldverbose = verbose;
@@ -297,9 +293,7 @@
*/
/*VARARGS*/
void
-setbinary(argc, argv)
- int argc;
- char *argv[];
+setbinary(int argc, char *argv[])
{
if (argc == 0 && argv != NULL) {
@@ -316,9 +310,7 @@
*/
/*VARARGS*/
void
-setascii(argc, argv)
- int argc;
- char *argv[];
+setascii(int argc, char *argv[])
{
if (argc == 0 && argv != NULL) {
@@ -335,9 +327,7 @@
*/
/*VARARGS*/
void
-settenex(argc, argv)
- int argc;
- char *argv[];
+settenex(int argc, char *argv[])
{
if (argc == 0 && argv != NULL) {
@@ -354,9 +344,7 @@
*/
/*ARGSUSED*/
void
-setftmode(argc, argv)
- int argc;
- char *argv[];
+setftmode(int argc, char *argv[])
{
if ((argc == 0 && argv != NULL) || argc != 2) {
@@ -373,9 +361,7 @@
*/
/*ARGSUSED*/
void
-setform(argc, argv)
- int argc;
- char *argv[];
+setform(int argc, char *argv[])
{
if ((argc == 0 && argv != NULL) || argc != 2) {
@@ -392,9 +378,7 @@
*/
/*ARGSUSED*/
void
-setstruct(argc, argv)
- int argc;
- char *argv[];
+setstruct(int argc, char *argv[])
{
if ((argc == 0 && argv != NULL) || argc != 2) {
@@ -410,9 +394,7 @@
* Send a single file.
*/
void
-put(argc, argv)
- int argc;
- char *argv[];
+put(int argc, char *argv[])
{
char *cmd;
int loc = 0;
@@ -454,9 +436,7 @@
* Send multiple files.
*/
void
-mput(argc, argv)
- int argc;
- char *argv[];
+mput(int argc, char *argv[])
{
int i;
sigfunc oldintr;
@@ -559,18 +539,14 @@
}
void
-reget(argc, argv)
- int argc;
- char *argv[];
+reget(int argc, char *argv[])
{
(void)getit(argc, argv, 1, "r+w");
}
void
-get(argc, argv)
- int argc;
- char *argv[];
+get(int argc, char *argv[])
{
(void)getit(argc, argv, 0, restart_point ? "r+w" : "w" );
@@ -580,11 +556,7 @@
* Receive one file.
*/
int
-getit(argc, argv, restartit, mode)
- int argc;
- char *argv[];
- int restartit;
- const char *mode;
+getit(int argc, char *argv[], int restartit, const char *mode)
{
int loc = 0;
int rval = 0;
@@ -653,8 +625,7 @@
/* ARGSUSED */
void
-mintr(signo)
- int signo;
+mintr(int signo)
{
alarmtimer(0);
@@ -664,7 +635,7 @@
}
void
-mabort()
+mabort(void)
{
int ointer, oconf;
@@ -688,9 +659,7 @@
* Get multiple files.
*/
void
-mget(argc, argv)
- int argc;
- char *argv[];
+mget(int argc, char *argv[])
{
sigfunc oldintr;
int ch, ointer;
@@ -746,9 +715,7 @@
* Read list of filenames from a local file and get those
*/
void
-fget(argc, argv)
- int argc;
- char *argv[];
+fget(int argc, char *argv[])
{
char *buf, *mode;
FILE *fp;
@@ -781,8 +748,7 @@
}
char *
-onoff(bool)
- int bool;
+onoff(int bool)
{
return (bool ? "on" : "off");
@@ -793,9 +759,7 @@
*/
/*ARGSUSED*/
void
-status(argc, argv)
- int argc;
- char *argv[];
+status(int argc, char *argv[])
{
int i;
@@ -881,11 +845,7 @@
* Toggle a variable
*/
int
-togglevar(argc, argv, var, mesg)
- int argc;
- char *argv[];
- int *var;
- const char *mesg;
+togglevar(int argc, char *argv[], int *var, const char *mesg)
{
if (argc == 1) {
*var = !*var;
@@ -907,9 +867,7 @@
*/
/*VARARGS*/
void
-setbell(argc, argv)
- int argc;
- char *argv[];
+setbell(int argc, char *argv[])
{
code = togglevar(argc, argv, &bell, "Bell mode");
@@ -920,9 +878,7 @@
*/
/*VARARGS*/
void
-setedit(argc, argv)
- int argc;
- char *argv[];
+setedit(int argc, char *argv[])
{
#ifdef NO_EDITCOMPLETE
@@ -945,9 +901,7 @@
*/
/*VARARGS*/
void
-settrace(argc, argv)
- int argc;
- char *argv[];
+settrace(int argc, char *argv[])
{
code = togglevar(argc, argv, &trace, "Packet tracing");
@@ -958,9 +912,7 @@
*/
/*VARARGS*/
void
-sethash(argc, argv)
- int argc;
- char *argv[];
+sethash(int argc, char *argv[])
{
if (argc == 1)
hash = !hash;
@@ -1000,9 +952,7 @@
*/
/*VARARGS*/
void
-setverbose(argc, argv)
- int argc;
Home |
Main Index |
Thread Index |
Old Index