summaryrefslogtreecommitdiff
path: root/src/newinclude.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newinclude.c')
-rw-r--r--src/newinclude.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/newinclude.c b/src/newinclude.c
index ae01482..4bc9f81 100644
--- a/src/newinclude.c
+++ b/src/newinclude.c
@@ -6,7 +6,6 @@
#include "buffer.h"
#include "byte.h"
#include "env.h"
-#include "genalloc.h"
#include "getln.h"
#include "logmsg.h"
#include "open.h"
@@ -23,12 +22,12 @@
#define WHO "newinclude"
-void nomem()
+static void nomem()
{
logmsg(WHO, 111, FATAL, "out of memory");
}
-void usage()
+static void usage()
{
logmsg(WHO, 100, USAGE, "newinclude list");
}
@@ -45,12 +44,12 @@ char tmpbuf[1024];
buffer bt;
-void readerr()
+static void readerr()
{
logmsg(WHO, 111, FATAL, B("unable to read: ", fnlist));
}
-void writeerr()
+static void writeerr()
{
logmsg(WHO, 111, FATAL, B("unable to write to ", fntmp));
}
@@ -60,8 +59,7 @@ static void out(char *s, int len)
if (buffer_put(&bt, s, len) == -1) writeerr();
}
-void doincl(buf, len) char *buf;
-int len;
+static void doincl(char *buf, int len)
{
if (!len) logmsg(WHO, 111, FATAL, "empty :include: filenames not permitted");
if (byte_chr(buf, len, '\n') != len)
@@ -73,8 +71,7 @@ int len;
out("", 1);
}
-void dorecip(buf, len) char *buf;
-int len;
+static void dorecip(char *buf, int len)
{
if (!len) logmsg(WHO, 111, FATAL, "empty recipient addresses not permitted");
if (byte_chr(buf, len, '\n') != len)
@@ -90,7 +87,7 @@ int len;
}
-void die_control()
+static void die_control()
{
logmsg(WHO, 111, FATAL, "unable to read controls");
}
@@ -100,7 +97,7 @@ stralloc defaulthost = {0};
stralloc defaultdomain = {0};
stralloc plusdomain = {0};
-void readcontrols()
+static void readcontrols()
{
int r;
int fddir;
@@ -148,7 +145,7 @@ token822_alloc toks = {0};
token822_alloc tokaddr = {0};
stralloc address = {0};
-void gotincl()
+static void gotincl()
{
token822_reverse(&tokaddr);
if (token822_unquote(&address, &tokaddr) != 1) nomem();
@@ -156,7 +153,7 @@ void gotincl()
doincl(address.s, address.len);
}
-void gotaddr()
+static void gotaddr()
{
int i;
int j;
@@ -209,13 +206,13 @@ void gotaddr()
stralloc line = {0};
int match;
-void parseerr()
+static void parseerr()
{
if (!stralloc_0(&line)) nomem();
logmsg(WHO, 111, FATAL, B("unable to parse this line: ", line.s));
}
-void parseline()
+static void parseline()
{
int wordok;
struct token822 *t;