summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/alloc.h6
-rw-r--r--include/base64.h6
-rw-r--r--include/byte.h14
-rw-r--r--include/constmap.h8
-rw-r--r--include/env.h6
-rw-r--r--include/fmt.h2
-rw-r--r--include/sig.h66
-rw-r--r--include/socket_if.h2
-rw-r--r--include/str.h13
-rw-r--r--include/uint_t.h4
10 files changed, 66 insertions, 61 deletions
diff --git a/include/alloc.h b/include/alloc.h
index 4fec2c2..ecfe02a 100644
--- a/include/alloc.h
+++ b/include/alloc.h
@@ -1,9 +1,9 @@
#ifndef ALLOC_H
#define ALLOC_H
-extern /*@null@*/ /*@out@*/ char *alloc();
-extern void alloc_free();
-extern int alloc_re();
+extern void *alloc(unsigned int);
+extern void alloc_free(void *);
+extern int alloc_re(void *, unsigned int, unsigned int);
/* use these names in the future */
#define qfree alloc_free
diff --git a/include/base64.h b/include/base64.h
index a9164c0..0f318c4 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -1,7 +1,9 @@
#ifndef BASE64_H
#define BASE64_H
-extern int b64decode();
-extern int b64encode();
+#include "stralloc.h"
+
+extern int b64decode(const unsigned char *in, int l, stralloc *out);
+extern int b64encode(stralloc *in, stralloc *out);
#endif
diff --git a/include/byte.h b/include/byte.h
index 3886127..836e8ca 100644
--- a/include/byte.h
+++ b/include/byte.h
@@ -8,13 +8,13 @@
@comment no declaration of argument types; too many compiler errors
*/
-extern unsigned int byte_chr();
-extern unsigned int byte_rchr();
-extern void byte_copy();
-extern void byte_copyr();
-extern int byte_diff();
-extern void byte_zero();
-extern void byte_fill();
+extern unsigned int byte_chr(char *, unsigned int, int);
+extern unsigned int byte_rchr(char *, unsigned int, int);
+extern void byte_copy(void *, unsigned int, const void *);
+extern void byte_copyr(void *, unsigned int, const void *);
+extern int byte_diff(const void *, unsigned int, const void *);
+extern void byte_zero(void *, unsigned int);
+extern void byte_fill(void *, unsigned int, int);
#define byte_equal(s, n, t) (!byte_diff((s), (n), (t)))
diff --git a/include/constmap.h b/include/constmap.h
index 0a43e98..4d5e2d3 100644
--- a/include/constmap.h
+++ b/include/constmap.h
@@ -13,9 +13,9 @@ struct constmap {
int *inputlen;
};
-int constmap_init(struct constmap *, char *, int, int);
-int constmap_init_char(struct constmap *, char *, int, int, char);
-void constmap_free();
-char *constmap();
+extern int constmap_init(struct constmap *, char *, int, int);
+extern int constmap_init_char(struct constmap *, char *, int, int, char);
+extern void constmap_free(struct constmap *);
+extern char *constmap(struct constmap *cm, char *s, int len);
#endif
diff --git a/include/env.h b/include/env.h
index 26f44b5..bc379ea 100644
--- a/include/env.h
+++ b/include/env.h
@@ -12,15 +12,15 @@
extern char **environ;
extern int env_isinit;
-extern int env_init();
+extern int env_init(void);
extern /*@null@*/ char *env_get(char *);
extern int env_put(char *, char *);
extern int env_puts(char *);
extern int env_set(char *);
extern int env_unset(char *);
-extern char *env_pick();
-extern void env_clear();
+extern char *env_pick(void);
+extern void env_clear(void);
extern char *env_findeq(char *);
diff --git a/include/fmt.h b/include/fmt.h
index eb8b8b8..41acaa1 100644
--- a/include/fmt.h
+++ b/include/fmt.h
@@ -11,7 +11,7 @@
#define FMT_ULONG 40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */
#define FMT_LEN ((char *)0) /* convenient abbreviation */
-extern unsigned int fmt_str(char *, char *);
+extern unsigned int fmt_str(char *, const char *);
extern unsigned int fmt_strn(char *, char *, unsigned int);
extern unsigned int fmt_uint(char *, unsigned int);
extern unsigned int fmt_uint0(char *, unsigned int, unsigned int);
diff --git a/include/sig.h b/include/sig.h
index 4d1743d..bd3efc5 100644
--- a/include/sig.h
+++ b/include/sig.h
@@ -14,10 +14,10 @@ extern int sig_hangup;
extern int sig_pipe;
extern int sig_term;
-extern void (*sig_defaulthandler)();
-extern void (*sig_ignorehandler)();
+extern void (*sig_defaulthandler)(int);
+extern void (*sig_ignorehandler)(int);
-extern void sig_catch(int, void (*)());
+extern void sig_catch(int, void (*)(int));
#define sig_ignore(s) (sig_catch((s), sig_ignorehandler))
#define sig_uncatch(s) (sig_catch((s), sig_defaulthandler))
@@ -29,35 +29,35 @@ extern void sig_pause(void);
extern void sig_dfl(int);
/* declaration of (net)qmail package (untouched) */
-extern void sig_miscignore();
-extern void sig_bugcatch();
-
-extern void sig_pipeignore();
-extern void sig_pipedefault();
-
-extern void sig_contblock();
-extern void sig_contunblock();
-extern void sig_contcatch();
-extern void sig_contdefault();
-
-extern void sig_termblock();
-extern void sig_termunblock();
-extern void sig_termcatch();
-extern void sig_termdefault();
-
-extern void sig_alarmblock();
-extern void sig_alarmunblock();
-extern void sig_alarmcatch();
-extern void sig_alarmdefault();
-
-extern void sig_childblock();
-extern void sig_childunblock();
-extern void sig_childcatch();
-extern void sig_childdefault();
-
-extern void sig_hangupblock();
-extern void sig_hangupunblock();
-extern void sig_hangupcatch();
-extern void sig_hangupdefault();
+extern void sig_miscignore(void);
+extern void sig_bugcatch(void (*)(int));
+
+extern void sig_pipeignore(void);
+extern void sig_pipedefault(void);
+
+extern void sig_contblock(void);
+extern void sig_contunblock(void);
+extern void sig_contcatch(void (*)(int));
+extern void sig_contdefault(void);
+
+extern void sig_termblock(void);
+extern void sig_termunblock(void);
+extern void sig_termcatch(void (*)(int));
+extern void sig_termdefault(void);
+
+extern void sig_alarmblock(void);
+extern void sig_alarmunblock(void);
+extern void sig_alarmcatch(void (*)(int));
+extern void sig_alarmdefault(void);
+
+extern void sig_childblock(void);
+extern void sig_childunblock(void);
+extern void sig_childcatch(void (*)(int));
+extern void sig_childdefault(void);
+
+extern void sig_hangupblock(void);
+extern void sig_hangupunblock(void);
+extern void sig_hangupcatch(void (*)(int));
+extern void sig_hangupdefault(void);
#endif
diff --git a/include/socket_if.h b/include/socket_if.h
index 3681d29..82d091e 100644
--- a/include/socket_if.h
+++ b/include/socket_if.h
@@ -28,7 +28,7 @@ extern int socket_bind4(int, const char[4], uint16);
extern int socket_bind4_reuse(int, const char[4], uint16);
extern int socket_connect4(int, const char[4], uint16);
extern int socket_send4(int, const char *, unsigned int, const char[4], uint16);
-extern int socket_broadcast(int, const char *, unsigned int, uint16);
+extern int socket_broadcast4(int, const char *, unsigned int, uint16);
/* Backward compatibility */
#define socket_local4 socket_local
diff --git a/include/str.h b/include/str.h
index 0d74812..983b3fc 100644
--- a/include/str.h
+++ b/include/str.h
@@ -2,18 +2,17 @@
#define STR_H
/*
- * Revision 20170918, Kai Peter
- * - added 'str_copyb()', thanks Erwin Hoffmann
- * Revision 20170501, Kai Peter
- * - added '*str_append' and 'str_cat'
-*/
+ * Revision 20170918, Kai Peter
+ * - added 'str_copyb()', thanks Erwin Hoffmann
+ * Revision 20170501, Kai Peter
+ * - added '*str_append' and 'str_cat'
+ */
extern unsigned int str_copy(char *, const char *);
extern unsigned int str_copyb(char *, const char *, unsigned int);
extern int str_diff(const char *, const char *);
extern int str_diffn(const char *, const char *, unsigned int);
-//extern unsigned int str_len(char *); // --> this produces lot of warnings !!!
-extern unsigned int str_len();
+extern unsigned int str_len(const char *);
extern unsigned int str_chr(const char *, int);
extern unsigned int str_rchr(const char *, int);
extern int str_start(const char *, const char *);
diff --git a/include/uint_t.h b/include/uint_t.h
index 7bf32c8..529e7b5 100644
--- a/include/uint_t.h
+++ b/include/uint_t.h
@@ -17,6 +17,10 @@ typedef uint8_t uint8;
typedef unsigned char uint8;
#endif
+extern void uint8_pack(char *, uint8);
+extern void uint8_pack_big(char *, uint8);
+extern void uint8_unpack(char *, uint8 *);
+extern void uint8_unpack_big(char *, uint8 *);
#endif
#ifndef UINT16_H