printf("%s\n", line);
}
free(line);
- char* newbuf = malloc(strlen(linebuf) - i);
- newbuf[strlen(linebuf) - i - 1] = 0;
- memcpy(newbuf, linebuf + i + 1, strlen(linebuf) - i - 1);
- free(linebuf);
- linebuf = newbuf;
+ if(strlen(linebuf) > 0){
+ char* newbuf = malloc(strlen(linebuf) - i);
+ newbuf[strlen(linebuf) - i - 1] = 0;
+ memcpy(newbuf, linebuf + i + 1, strlen(linebuf) - i - 1);
+ free(linebuf);
+ linebuf = newbuf;
+ }
continue;
}
}
} else {
printf("%s:%s\n", buf, br);
__dw_parser_parse(buf, br);
+ free(br);
+ br = malloc(1);
+ br[0] = 0;
+ free(buf);
+ buf = malloc(1);
+ buf[0] = 0;
}
} else if(dq) {
char* tmp = buf;
AR = ar
AR_ARGS = rcs \$$@
RANLIB = ranlib
-CFLAGS = -std=c99 -D_DEFAULT_SOURCE
+CFLAGS = -g -std=c99 -D_DEFAULT_SOURCE
LDFLAGS = -L`pwd`/Library
LIBS =
LIB_PREFIX = lib