summaryrefslogtreecommitdiff
path: root/src/setforward.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setforward.c')
-rw-r--r--src/setforward.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/setforward.c b/src/setforward.c
index ec282ba..22f3d75 100644
--- a/src/setforward.c
+++ b/src/setforward.c
@@ -12,37 +12,37 @@
#define WHO "setforward"
-void usage()
+static void usage()
{
logmsg(WHO, 100, USAGE, "setforward data.cdb data.tmp");
}
-void nomem()
+static void nomem()
{
logmsg(WHO, 111, FATAL, "out of memory");
}
-void missingsemicolon()
+static void missingsemicolon()
{
logmsg(WHO, 100, FATAL, "final instruction must end with semicolon");
}
-void extracolon()
+static void extracolon()
{
logmsg(WHO, 100, FATAL, "double colons are not permitted");
}
-void extracomma()
+static void extracomma()
{
logmsg(WHO, 100, FATAL, "commas are not permitted before colons");
}
-void nulbyte()
+static void nulbyte()
{
logmsg(WHO, 100, FATAL, "NUL bytes are not permitted");
}
-void longaddress()
+static void longaddress()
{
logmsg(WHO, 100, FATAL, "addresses over 800 bytes are not permitted");
}
@@ -61,14 +61,12 @@ int flagtarget = 0;
/* 0: reading target; command is empty; instr is empty */
/* 1: target is complete; instr still has to be written; reading command */
-void writeerr()
+static void writeerr()
{
logmsg(WHO, 111, FATAL, B("unable to write to: ", fntmp));
}
-void doit(prepend, data, datalen) char *prepend;
-char *data;
-int datalen;
+static void doit(char *prepend, char *data, int datalen)
{
if (!stralloc_copys(&key, prepend)) nomem();
if (!stralloc_cat(&key, &target)) nomem();
@@ -76,8 +74,7 @@ int datalen;
if (cdb_make_add(&cdb, key.s, key.len, data, datalen) == -1) writeerr();
}
-int getch(ch)
-char *ch;
+static int getch(char *ch)
{
int r;