Module Name: src
Committed By: joerg
Date: Sun Sep 4 20:28:09 UTC 2011
Modified Files:
src/usr.bin/lam: lam.c
Log Message:
ANSIfy + static + __dead
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/lam/lam.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/lam/lam.c
diff -u src/usr.bin/lam/lam.c:1.7 src/usr.bin/lam/lam.c:1.8
--- src/usr.bin/lam/lam.c:1.7 Sun Apr 12 13:01:55 2009
+++ src/usr.bin/lam/lam.c Sun Sep 4 20:28:09 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $ */
+/* $NetBSD: lam.c,v 1.8 2011/09/04 20:28:09 joerg Exp $ */
/*-
* Copyright (c) 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)lam.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $");
+__RCSID("$NetBSD: lam.c,v 1.8 2011/09/04 20:28:09 joerg Exp $");
#endif /* not lint */
/*
@@ -65,21 +65,18 @@
const char *format; /* printf(3) style string spec. */
} input[MAXOFILES];
-int morefiles; /* set by getargs(), changed by gatherline() */
-int nofinalnl; /* normally append \n to each output line */
-char line[BIGBUFSIZ];
-char *linep;
-
-void error __P((const char *, const char *));
-char *gatherline __P((struct openfile *));
-void getargs __P((char *[]));
-int main __P((int, char **));
-char *pad __P((struct openfile *));
+static int morefiles; /* set by getargs(), changed by gatherline() */
+static int nofinalnl; /* normally append \n to each output line */
+static char line[BIGBUFSIZ];
+static char *linep;
+
+__dead static void error(const char *, const char *);
+static char *gatherline(struct openfile *);
+static void getargs(char *[]);
+static char *pad(struct openfile *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct openfile *ip;
@@ -99,9 +96,8 @@
}
}
-void
-getargs(av)
- char *av[];
+static void
+getargs(char *av[])
{
struct openfile *ip = input;
char *p, *c;
@@ -177,9 +173,8 @@
ip->sepstring = "";
}
-char *
-pad(ip)
- struct openfile *ip;
+static char *
+pad(struct openfile *ip)
{
char *lp = linep;
@@ -192,9 +187,8 @@
return (lp);
}
-char *
-gatherline(ip)
- struct openfile *ip;
+static char *
+gatherline(struct openfile *ip)
{
char s[BUFSIZ];
int c;
@@ -222,7 +216,7 @@
return (lp);
}
-void
+static void
error(const char *msg, const char *s)
{
warnx(msg, s);