chiark
/
gitweb
/
~ian
/
innduct.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace x[v]asprintf with m[v]asprintf; libinn2 has one now
[innduct.git]
/
innduct.h
diff --git
a/innduct.h
b/innduct.h
index ddd17e69c59050b979bec2e8c131bd4869e11221..08ab9bcde45a93f8b1fd18d2c486bcd35bb4fa3f 100644
(file)
--- a/
innduct.h
+++ b/
innduct.h
@@
-84,8
+84,10
@@
#define DUMPV(fmt,pfx,v) fprintf(f, " " #v "=" fmt, pfx v);
#define DUMPV(fmt,pfx,v) fprintf(f, " " #v "=" fmt, pfx v);
-#define FOR_CONN(conn) \
- for ((conn)=LIST_HEAD(conns); (conn); (conn)=LIST_NEXT((conn)))
+#define FOR_LIST_NODE(nodevar, list) \
+ for ((nodevar)=LIST_HEAD(list); (nodevar); (nodevar)=LIST_NEXT((nodevar)))
+
+#define FOR_CONN(conn) FOR_LIST_NODE(conn, conns)
/*----- doubly linked lists -----*/
/*----- doubly linked lists -----*/
@@
-184,7
+186,7
@@
extern double max_bad_data_ratio;
extern int max_bad_data_initial;
extern int max_bad_data_initial;
-/*----- statistics -----*/
+/*-----
article states, and
statistics -----*/
typedef enum { /* in queue in conn->sent */
art_Unchecked, /* not checked, not sent checking */
typedef enum { /* in queue in conn->sent */
art_Unchecked, /* not checked, not sent checking */
@@
-321,8
+323,8
@@
void dbg(const char *fmt, ...) PRINTF(1,2);
void logv(int sysloglevel, const char *pfx, int errnoval,
const char *fmt, va_list al) PRINTF(5,0);
void logv(int sysloglevel, const char *pfx, int errnoval,
const char *fmt, va_list al) PRINTF(5,0);
-char *
x
vasprintf(const char *fmt, va_list al) PRINTF(1,0);
-char *
x
asprintf(const char *fmt, ...) PRINTF(1,2);
+char *
m
vasprintf(const char *fmt, va_list al) PRINTF(1,0);
+char *
m
asprintf(const char *fmt, ...) PRINTF(1,2);
int close_perhaps(int *fd);
void xclose(int fd, const char *what, const char *what2);
int close_perhaps(int *fd);
void xclose(int fd, const char *what, const char *what2);