[hackers] [sbase] staticize some functions || Hiltjo Posthuma
commit 6accd1a3c4dac9a6df3ab05792411f3202573e80
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Mar 7 13:33:39 2015 +0100
staticize some functions
diff --git a/chmod.c b/chmod.c
index 2436721..f7ab866 100644
--- a/chmod.c
+++ b/chmod.c
_AT_@ -8,7 +8,7 @@ static char *modestr = "";
static mode_t mask = 0;
static int ret = 0;
-void
+static void
chmodr(const char *path, int depth)
{
struct stat st;
diff --git a/nl.c b/nl.c
index 7323859..1ea72ed 100644
--- a/nl.c
+++ b/nl.c
_AT_@ -20,7 +20,7 @@ static size_t startnum = 1;
static size_t incr = 1;
static regex_t preg;
-void
+static void
nl(const char *name, FILE *fp)
{
char *buf = NULL;
diff --git a/split.c b/split.c
index a5250c7..1401bfd 100644
--- a/split.c
+++ b/split.c
_AT_@ -9,7 +9,7 @@
static int base = 26, start = 'a';
-int
+static int
itostr(char *str, int x, int n)
{
str[n] = '\0';
_AT_@ -22,7 +22,7 @@ itostr(char *str, int x, int n)
return 0;
}
-FILE *
+static FILE *
nextfile(FILE *f, char *buf, int plen, int slen)
{
static int filecount = 0;
diff --git a/touch.c b/touch.c
index dc76cfb..ed87253 100644
--- a/touch.c
+++ b/touch.c
_AT_@ -44,7 +44,7 @@ touch(const char *file)
touch(file);
}
-time_t
+static time_t
parsetime(char *str, time_t current)
{
struct tm *cur, t;
diff --git a/wc.c b/wc.c
index ae6c1be..f3064a9 100644
--- a/wc.c
+++ b/wc.c
_AT_@ -7,7 +7,7 @@ static int wflag = 0;
static char cmode = 0;
static size_t tc = 0, tl = 0, tw = 0;
-void
+static void
output(const char *str, size_t nc, size_t nl, size_t nw)
{
int noflags = !cmode && !lflag && !wflag;
_AT_@ -24,7 +24,7 @@ output(const char *str, size_t nc, size_t nl, size_t nw)
putchar('\n');
}
-void
+static void
wc(FILE *fp, const char *str)
{
int word = 0, rlen;
Received on Sun Mar 08 2015 - 12:50:38 CET
This archive was generated by hypermail 2.3.0
: Sun Mar 08 2015 - 13:00:12 CET