diff --git a/c/tex_parser/Makefile b/c/tex_parser/Makefile index 17def14..b3c5f99 100644 --- a/c/tex_parser/Makefile +++ b/c/tex_parser/Makefile @@ -31,7 +31,7 @@ CFLAGS += -Wall LDFLAGS += -Wall #~ $(shell pkg-config --libs liblist) -lpthread -lexpat -all: tex_table_test +all: tex_parser_test ifneq ($(mode),debug) ifneq ($(mode),profile) @@ -53,13 +53,13 @@ endif %.o : $(CC) -c $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o $@ $< -tex_table_test_obj = tex_table_test.o tex_table.o zalloc_ext.o zalloc.o xalloc.o xerror.o -tex_table_test: $(tex_table_test_obj) - $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o $@ $(tex_table_test_obj) +tex_parser_test_obj = tex_parser_test.o tex_parser.o zalloc_ext.o zalloc.o xalloc.o xerror.o +tex_parser_test: $(tex_parser_test_obj) + $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o $@ $(tex_parser_test_obj) -tex_table_test.o: tex_table_test.c tex_table.o +tex_parser_test.o: tex_parser_test.c tex_parser.o -tex_table.o: tex_table.c tex_table.h zalloc_ext.o zalloc.o xalloc.o +tex_parser.o: tex_parser.c tex_parser.h zalloc_ext.o zalloc.o xalloc.o zalloc_ext.o: $(KOLAN_INCLUDE)/zalloc_ext.c $(KOLAN_INCLUDE)/zalloc_ext.h zalloc.o xerror.o @@ -70,6 +70,6 @@ xalloc.o: $(KOLAN_INCLUDE)/xalloc.c $(KOLAN_INCLUDE)/xalloc.h xerror.o xerror.o: $(KOLAN_INCLUDE)/xerror.c $(KOLAN_INCLUDE)/xerror.h clean: - $(RM) *.o *.out callgrind.out.* *.gcno tex_table_test + $(RM) *.o *.out callgrind.out.* *.gcno tex_parser_test .PHONY: all clean diff --git a/c/tex_parser/tables4.tex b/c/tex_parser/ex1.tex similarity index 100% rename from c/tex_parser/tables4.tex rename to c/tex_parser/ex1.tex diff --git a/c/tex_parser/tables5.tex b/c/tex_parser/ex2.tex similarity index 100% rename from c/tex_parser/tables5.tex rename to c/tex_parser/ex2.tex diff --git a/c/tex_parser/tex_table.c b/c/tex_parser/tex_parser.c similarity index 99% rename from c/tex_parser/tex_table.c rename to c/tex_parser/tex_parser.c index d74d613..d0febfb 100644 --- a/c/tex_parser/tex_table.c +++ b/c/tex_parser/tex_parser.c @@ -1,8 +1,8 @@ -#include "tex_table.h" +#include "tex_parser.h" #include #include -#include "tex_table_tags.h" +#include "tex_parser_tags.h" #include "zalloc_ext.h" #include "zalloc.h" #include "c_const.h" @@ -83,7 +83,6 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str error->message = "unexpected symbol (IN_UDEF)"; return error->code; } - break; case IN_COMMENT: diff --git a/c/tex_parser/tex_table.geany b/c/tex_parser/tex_parser.geany similarity index 58% rename from c/tex_parser/tex_table.geany rename to c/tex_parser/tex_parser.geany index 601c724..071f8fd 100644 --- a/c/tex_parser/tex_table.geany +++ b/c/tex_parser/tex_parser.geany @@ -7,7 +7,7 @@ detect_indent=false indent_mode=2 [project] -name=tex_table_class +name=tex_parser base_path=/home/kolan/dev/c/tex_parser/ description= @@ -16,13 +16,8 @@ long_line_behaviour=1 long_line_column=72 [files] -current_page=1 -FILE_NAME_0=0;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_table_test.c;0 -FILE_NAME_1=1308;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_table.c;0 -FILE_NAME_2=2399;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_table.h;0 -FILE_NAME_3=599;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_table_tags.h;0 -FILE_NAME_4=1762;C;0;16;1;1;1;/home/kolan/projects/include/zalloc_ext.h;0 -FILE_NAME_5=1859;Make;0;16;1;1;1;/home/kolan/dev/c/tex_parser/Makefile;0 +current_page=0 +FILE_NAME_0=1859;Make;0;16;1;1;1;/home/kolan/dev/c/tex_parser/Makefile;0 [build-menu] NF_00_LB=_Сделать @@ -45,5 +40,5 @@ CFT_02_CM= CFT_02_WD=%p filetypes=C; EX_00_LB=_Выполнить -EX_00_CM=./tex_table_test tables4.tex +EX_00_CM=./tex_parser_test ex1.tex EX_00_WD=%p diff --git a/c/tex_parser/tex_table.h b/c/tex_parser/tex_parser.h similarity index 98% rename from c/tex_parser/tex_table.h rename to c/tex_parser/tex_parser.h index 5820dce..fdc9629 100644 --- a/c/tex_parser/tex_table.h +++ b/c/tex_parser/tex_parser.h @@ -1,5 +1,5 @@ -#ifndef _TEX_TABLE_H -#define _TEX_TABLE_H +#ifndef _TEX_PARSER_H +#define _TEX_PARSER_H #include diff --git a/c/tex_parser/tex_table_tags.h b/c/tex_parser/tex_parser_tags.h similarity index 92% rename from c/tex_parser/tex_table_tags.h rename to c/tex_parser/tex_parser_tags.h index 885fdae..814f56c 100644 --- a/c/tex_parser/tex_table_tags.h +++ b/c/tex_parser/tex_parser_tags.h @@ -1,5 +1,5 @@ -#ifndef TEX_TABLE_TAGS_H -#define TEX_TABLE_TAGS_H +#ifndef TEX_PARSER_TAGS_H +#define TEX_PARSER_TAGS_H const char * const TEX_TAG_BEGIN = "begin"; const char * const TEX_TAG_CLINE = "cline"; diff --git a/c/tex_parser/tex_table_test.c b/c/tex_parser/tex_parser_test.c similarity index 98% rename from c/tex_parser/tex_table_test.c rename to c/tex_parser/tex_parser_test.c index ee14191..f5ee0b6 100644 --- a/c/tex_parser/tex_table_test.c +++ b/c/tex_parser/tex_parser_test.c @@ -5,7 +5,7 @@ #include //~ #include -#include "tex_table.h" +#include "tex_parser.h" #include "zalloc.h" #include "xalloc.h" #include "xerror.h"