summaryrefslogtreecommitdiffstats
path: root/usr.bin/rs
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 08:16:35 +0000
committered <ed@FreeBSD.org>2011-11-06 08:16:35 +0000
commit7d71ef84d7fc03f7c7d93790e3fef44f0a19e340 (patch)
tree753c4bc90df1d80a69ab0ea54377465698b9ccd0 /usr.bin/rs
parent09dd1a0121858fa6a644459a9ab5b47439b4b3fc (diff)
downloadFreeBSD-src-7d71ef84d7fc03f7c7d93790e3fef44f0a19e340.zip
FreeBSD-src-7d71ef84d7fc03f7c7d93790e3fef44f0a19e340.tar.gz
Add missing static keywords to rs(1)
Diffstat (limited to 'usr.bin/rs')
-rw-r--r--usr.bin/rs/rs.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c
index 46de07e..ba29ef2 100644
--- a/usr.bin/rs/rs.c
+++ b/usr.bin/rs/rs.c
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
-long flags;
+static long flags;
#define TRANSPOSE 000001
#define MTRANSPOSE 000002
#define ONEPERLINE 000004
@@ -72,34 +72,34 @@ long flags;
#define ONEPERCHAR 0100000
#define NOARGS 0200000
-short *colwidths;
-short *cord;
-short *icbd;
-short *ocbd;
-int nelem;
-char **elem;
-char **endelem;
-char *curline;
-int allocsize = BUFSIZ;
-int curlen;
-int irows, icols;
-int orows = 0, ocols = 0;
-int maxlen;
-int skip;
-int propgutter;
-char isep = ' ', osep = ' ';
-char blank[] = "";
-int owidth = 80, gutter = 2;
+static short *colwidths;
+static short *cord;
+static short *icbd;
+static short *ocbd;
+static int nelem;
+static char **elem;
+static char **endelem;
+static char *curline;
+static int allocsize = BUFSIZ;
+static int curlen;
+static int irows, icols;
+static int orows = 0, ocols = 0;
+static int maxlen;
+static int skip;
+static int propgutter;
+static char isep = ' ', osep = ' ';
+static char blank[] = "";
+static int owidth = 80, gutter = 2;
-void getargs(int, char *[]);
-void getfile(void);
-int getline(void);
-char *getlist(short **, char *);
-char *getnum(int *, char *, int);
-char **getptrs(char **);
-void prepfile(void);
-void prints(char *, int);
-void putfile(void);
+static void getargs(int, char *[]);
+static void getfile(void);
+static int getline(void);
+static char *getlist(short **, char *);
+static char *getnum(int *, char *, int);
+static char **getptrs(char **);
+static void prepfile(void);
+static void prints(char *, int);
+static void putfile(void);
static void usage(void);
#define INCR(ep) do { \
@@ -121,7 +121,7 @@ main(int argc, char *argv[])
exit(0);
}
-void
+static void
getfile(void)
{
char *p;
@@ -189,7 +189,7 @@ getfile(void)
nelem = ep - elem;
}
-void
+static void
putfile(void)
{
char **ep;
@@ -211,7 +211,7 @@ putfile(void)
}
}
-void
+static void
prints(char *s, int col)
{
int n;
@@ -237,7 +237,7 @@ usage(void)
exit(1);
}
-void
+static void
prepfile(void)
{
char **ep;
@@ -330,9 +330,9 @@ prepfile(void)
}
#define BSIZE (LINE_MAX * 2)
-char ibuf[BSIZE];
+static char ibuf[BSIZE];
-int
+static int
getline(void) /* get line; maintain curline, curlen; manage storage */
{
static int putlength;
@@ -372,7 +372,7 @@ getline(void) /* get line; maintain curline, curlen; manage storage */
return(c);
}
-char **
+static char **
getptrs(char **sp)
{
char **p;
@@ -387,7 +387,7 @@ getptrs(char **sp)
return(sp);
}
-void
+static void
getargs(int ac, char *av[])
{
char *p;
@@ -498,7 +498,7 @@ getargs(int ac, char *av[])
}
}
-char *
+static char *
getlist(short **list, char *p)
{
int count = 1;
@@ -534,7 +534,7 @@ getlist(short **list, char *p)
* num = number p points to; if (strict) complain
* returns pointer to end of num
*/
-char *
+static char *
getnum(int *num, char *p, int strict)
{
char *t = p;
OpenPOWER on IntegriCloud