added a debug option to the parse_line function

This commit is contained in:
SJ
2012-07-23 16:51:36 +02:00
parent eb44c74036
commit 97ca851780
5 changed files with 10 additions and 3 deletions

View File

@ -24,12 +24,12 @@ RUNNING_GROUP = `@id_bin@ -gn $(RUNNING_USER)`
INSTALL = @INSTALL@
all: parser view
all: parser debug
parser: parser.c ../src/libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ -lpiler $(LIBS) $(LIBDIR)
view: view.c ../src/libpiler.a
debug: debug.c ../src/libpiler.a
$(CC) $(CFLAGS) $(INCDIR) $(DEFS) -o $@ $^ -lpiler $(LIBS) $(LIBDIR)
install:
@ -38,7 +38,7 @@ test:
./parser
clean:
rm -f parser view
rm -f parser debug
distclean: clean
rm -f Makefile

View File

@ -42,6 +42,8 @@ int main(int argc, char **argv){
snprintf(sdata.filename, SMALLBUFSIZE-1, "%s", argv[1]);
snprintf(sdata.tmpframe, SMALLBUFSIZE-1, "%s.m", argv[1]);
cfg.debug = 1;
state = parse_message(&sdata, 0, &cfg);
post_parse(&sdata, &state, &cfg);