# config.mk is generated by ./configure
include config.mk
-all := citserver setup sendcommand citmail chkpw chkpwd
+all := ctdldump ctdlload citserver setup sendcommand citmail chkpw chkpwd
all: $(all)
SRCDIRS := $(wildcard server server/modules/*)
void *p = realloc(ptr, size);
if (!p) {
fprintf(stderr, "realloc() failed to resize %p to %ld bytes, error: %m\n", ptr, size);
- exit(1);
+ abort();
}
return p;
}
char *b64out(void *data, size_t len) {
static char *outbuf = NULL;
static size_t outlen = 0;
- int i;
- char ch;
if ((outbuf == NULL) || (outlen < (len * 2))) {
outbuf = reallok(outbuf, (len * 2));
void *p = realloc(ptr, size);
if (!p) {
fprintf(stderr, "realloc() failed to resize %p to %ld bytes, error: %m\n", ptr, size);
- exit(1);
+ abort();
}
return p;
}
// msglist|26|32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51|
int convert_msglist(char *line, DBT *out_key, DBT *out_data) {
long roomnum;
- char *token;
+ char *token, *mtoken;
char *p = line;
+ char *q = NULL;
int num_msgs = 0;
long *msglist = NULL;
roomnum = atol(token);
break;
case 2:
- char *q = token;
- char *mtoken;
+ q = token;
for (int j=0; (mtoken = strsep(&q, ",")); ++j) {
msglist = realloc(msglist, (num_msgs+1) * sizeof(long));
msglist[num_msgs++] = atol(mtoken);
static size_t line_alloc = 1;
static char *line;
static size_t line_len = 0;
- char ch;
+ int ch;
fprintf(stderr, "\033[7mtable\033[0m \033[7mgood_rows\033[0m \033[7mbad_rows\033[0m\n");
line = reallok(NULL, line_alloc);