summaryrefslogtreecommitdiff
path: root/usr.bin/tip/remote.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-16 19:32:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-16 19:32:47 +0000
commita397a40b7c93265cb2ed617a6612f3db999b591c (patch)
tree496d239526cc99d20c475362d2152ebe207d005c /usr.bin/tip/remote.c
parente50a27ad82d19d68cc60eda00477acb2b2b7a5f3 (diff)
first pass of cleanup of this mess; ok dhill
Diffstat (limited to 'usr.bin/tip/remote.c')
-rw-r--r--usr.bin/tip/remote.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/usr.bin/tip/remote.c b/usr.bin/tip/remote.c
index e02e0feeaad..1dd89425647 100644
--- a/usr.bin/tip/remote.c
+++ b/usr.bin/tip/remote.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remote.c,v 1.13 2003/09/20 18:15:32 millert Exp $ */
+/* $OpenBSD: remote.c,v 1.14 2006/03/16 19:32:46 deraadt Exp $ */
/* $NetBSD: remote.c,v 1.5 1997/04/20 00:02:45 mellon Exp $ */
/*
@@ -41,7 +41,7 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)remote.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: remote.c,v 1.13 2003/09/20 18:15:32 millert Exp $";
+static const char rcsid[] = "$OpenBSD: remote.c,v 1.14 2006/03/16 19:32:46 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -69,12 +69,9 @@ static char *db_array[3] = { _PATH_REMOTE, 0, 0 };
#define cgetflag(f) (cgetcap(bp, f, ':') != NULL)
static void
-getremcap(host)
- char *host;
+getremcap(char *host)
{
- char **p, ***q;
- char *bp;
- char *rempath;
+ char **p, ***q, *bp, *rempath;
int stat;
rempath = getenv("REMOTE");
@@ -100,18 +97,18 @@ getremcap(host)
FS = DEFFS;
return;
}
- switch(stat) {
+ switch (stat) {
case -1:
fprintf(stderr, "%s: unknown host %s\n", __progname,
host);
break;
case -2:
- fprintf(stderr,
+ fprintf(stderr,
"%s: can't open host description file\n",
__progname);
break;
case -3:
- fprintf(stderr,
+ fprintf(stderr,
"%s: possible reference loop in host description file\n", __progname);
break;
}
@@ -205,8 +202,7 @@ getremcap(host)
}
char *
-getremote(host)
- char *host;
+getremote(char *host)
{
char *cp;
static char *next;