From 4dfff108067fc0ca04e76ae9e3ef084bd2c1f5a8 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Wed, 29 Jun 2011 11:02:59 +0400 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=82=D0=BE=D1=82=20=D0=BF=D0=B0=D1=80?= =?UTF-8?q?=D1=81=D0=B5=D1=80=20=D0=B1=D1=83=D0=B4=D0=B5=D1=82=20=D0=B1?= =?UTF-8?q?=D0=BE=D0=BB=D0=B2=D0=B0=D0=BD=D0=BA=D0=BE=D0=B9=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=B0=D1=80=D1=81=D0=B5=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86,=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B9,=20=D1=80=D0=B8=D1=81=D1=83=D0=BD=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B8=20=D0=BF=D1=80=D0=BE=D1=87.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- rename : c/tex_parser/tables4.tex => c/tex_parser/ex1.tex rename : c/tex_parser/tables5.tex => c/tex_parser/ex2.tex rename : c/tex_parser/tex_table.c => c/tex_parser/tex_parser.c rename : c/tex_parser/tex_table.geany => c/tex_parser/tex_parser.geany rename : c/tex_parser/tex_table.h => c/tex_parser/tex_parser.h rename : c/tex_parser/tex_table_tags.h => c/tex_parser/tex_parser_tags.h rename : c/tex_parser/tex_table_test.c => c/tex_parser/tex_parser_test.c --- c/tex_parser/Makefile | 14 +++++++------- c/tex_parser/{tables4.tex => ex1.tex} | 0 c/tex_parser/{tables5.tex => ex2.tex} | 0 c/tex_parser/{tex_table.c => tex_parser.c} | 5 ++--- c/tex_parser/{tex_table.geany => tex_parser.geany} | 13 ++++--------- c/tex_parser/{tex_table.h => tex_parser.h} | 4 ++-- .../{tex_table_tags.h => tex_parser_tags.h} | 4 ++-- .../{tex_table_test.c => tex_parser_test.c} | 2 +- 8 files changed, 18 insertions(+), 24 deletions(-) rename c/tex_parser/{tables4.tex => ex1.tex} (100%) rename c/tex_parser/{tables5.tex => ex2.tex} (100%) rename c/tex_parser/{tex_table.c => tex_parser.c} (99%) rename c/tex_parser/{tex_table.geany => tex_parser.geany} (58%) rename c/tex_parser/{tex_table.h => tex_parser.h} (98%) rename c/tex_parser/{tex_table_tags.h => tex_parser_tags.h} (92%) rename c/tex_parser/{tex_table_test.c => tex_parser_test.c} (98%) 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"