Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed plaintcp bug.
[ashd.git]
/
lib
/
utils.h
diff --git
a/lib/utils.h
b/lib/utils.h
index
e359d6c
..
be94c24
100644
(file)
--- a/
lib/utils.h
+++ b/
lib/utils.h
@@
-2,6
+2,7
@@
#define _UTILS_H
#include <stdarg.h>
#define _UTILS_H
#include <stdarg.h>
+#include <sys/types.h>
#define max(a, b) (((b) > (a))?(b):(a))
#define min(a, b) (((b) < (a))?(b):(a))
#define max(a, b) (((b) > (a))?(b):(a))
#define min(a, b) (((b) < (a))?(b):(a))
@@
-13,7
+14,7
@@
#define omalloc(o) ((o) = szmalloc(sizeof(*(o))))
#define bufinit(buf) memset(&(buf), 0, sizeof(buf))
#define omalloc(o) ((o) = szmalloc(sizeof(*(o))))
#define bufinit(buf) memset(&(buf), 0, sizeof(buf))
-#define buffree(buf) do { if((buf).b != NULL) {free((buf).b);} } while(0)
+#define buffree(buf) do { if((buf).b != NULL) {free((buf).b);}
bufinit(buf);
} while(0)
#define sizebuf(buf, wanted) (_sizebuf((struct buffer *)&(buf), (wanted), sizeof(*((buf).b))))
#define bufadd(buf, new) \
do { \
#define sizebuf(buf, wanted) (_sizebuf((struct buffer *)&(buf), (wanted), sizeof(*((buf).b))))
#define bufadd(buf, new) \
do { \
@@
-68,5
+69,8
@@
off_t atoo(char *n);
char **tokenize(char *src);
void freeca(char **ca);
int calen(char **a);
char **tokenize(char *src);
void freeca(char **ca);
int calen(char **a);
+void bvprintf(struct charbuf *buf, char *format, va_list al);
+void bprintf(struct charbuf *buf, char *format, ...);
+void replstr(char **p, char *n);
#endif
#endif