aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/lam
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2001-08-06 23:20:06 +0000
committerMike Barcroft <mike@FreeBSD.org>2001-08-06 23:20:06 +0000
commitb5b9b43078b5ae143eed9c92b1ac995f6c9a73a9 (patch)
tree67dbc72ccd6e1fc18d53157768f052aaef6c334d /usr.bin/lam
parent88f7a9cf86c0f2040d1559763feeea5c73f11cde (diff)
downloadsrc-b5b9b43078b5ae143eed9c92b1ac995f6c9a73a9.tar.gz
src-b5b9b43078b5ae143eed9c92b1ac995f6c9a73a9.zip
Constify, staticize, and set WARNS=2.
MFC after: 3 days
Notes
Notes: svn path=/head/; revision=81222
Diffstat (limited to 'usr.bin/lam')
-rw-r--r--usr.bin/lam/Makefile2
-rw-r--r--usr.bin/lam/lam.c18
2 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/lam/Makefile b/usr.bin/lam/Makefile
index a24fc9219e77..616abb46bc19 100644
--- a/usr.bin/lam/Makefile
+++ b/usr.bin/lam/Makefile
@@ -1,5 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD$
PROG= lam
+WARNS?= 2
.include <bsd.prog.mk>
diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c
index 2c3759b4d748..ddccc7c0ccc2 100644
--- a/usr.bin/lam/lam.c
+++ b/usr.bin/lam/lam.c
@@ -64,8 +64,8 @@ struct openfile { /* open file structure */
short eof; /* eof flag */
short pad; /* pad flag for missing columns */
char eol; /* end of line character */
- char *sepstring; /* string to print before each line */
- char *format; /* printf(3) style string spec. */
+ const char *sepstring; /* string to print before each line */
+ const char *format; /* printf(3) style string spec. */
} input[MAXOFILES];
int morefiles; /* set by getargs(), changed by gatherline() */
@@ -73,13 +73,13 @@ int nofinalnl; /* normally append \n to each output line */
char line[BIGBUFSIZ];
char *linep;
-char *gatherline(struct openfile *);
-void getargs(char *[]);
-char *pad(struct openfile *);
+static char *gatherline(struct openfile *);
+static void getargs(char *[]);
+static char *pad(struct openfile *);
static void usage(void);
int
-main(int argc, char *argv[])
+main(int argc __unused, char *argv[])
{
struct openfile *ip;
@@ -99,7 +99,7 @@ main(int argc, char *argv[])
}
}
-void
+static void
getargs(char *av[])
{
struct openfile *ip = input;
@@ -176,7 +176,7 @@ getargs(char *av[])
ip->sepstring = "";
}
-char *
+static char *
pad(struct openfile *ip)
{
char *lp = linep;
@@ -190,7 +190,7 @@ pad(struct openfile *ip)
return (lp);
}
-char *
+static char *
gatherline(struct openfile *ip)
{
char s[BUFSIZ];