[hackers] [sbase] Staticise globals in col(1) || sin
commit 2766143ecb21f38927327f0b21acda217778cafc
Author: sin <sin_AT_2f30.org>
Date: Tue Mar 3 13:37:15 2015 +0000
Staticise globals in col(1)
diff --git a/col.c b/col.c
index 72d4119..c98969d 100644
--- a/col.c
+++ b/col.c
_AT_@ -10,17 +10,11 @@
#define NLINES 256
#define NCOLS 800
-char **buff;
+static char **buff;
-int obackspace, onotabs, ohalfline, oescape;
-unsigned nline, ncol, nchar, nspaces, maxline, bs;
-size_t pagsize = NLINES;
-
-static void
-usage(void)
-{
- enprintf(2, "usage: %s [-p][-l num][-b][-f][-x]\n", argv0);
-}
+static int obackspace, onotabs, ohalfline, oescape;
+static unsigned nline, ncol, nchar, nspaces, maxline, bs;
+static size_t pagsize = NLINES;
static void
flush(void)
_AT_@ -188,6 +182,12 @@ allocbuf(void)
*bp = emalloc(NCOLS);
}
+static void
+usage(void)
+{
+ enprintf(2, "usage: %s [-p][-l num][-b][-f][-x]\n", argv0);
+}
+
int
main(int argc, char *argv[])
{
Received on Tue Mar 03 2015 - 14:38:21 CET
This archive was generated by hypermail 2.3.0
: Tue Mar 03 2015 - 14:48:17 CET