добавлены tex_parser_table и tex_parser_graphics

This commit is contained in:
Kolan Sh 2011-07-01 17:51:34 +04:00
parent 4e6b2b1885
commit 3bf2247c74
4 changed files with 12 additions and 9 deletions

View File

@ -83,22 +83,22 @@ target_objs = tex_parser_test.o tex_parser.o tex_parser_table.o tex_parser_graph
$(TARGET): $(target_objs) $(TARGET): $(target_objs)
$(CC) $(LDFLAGS) -o $@ $(target_objs) $(CC) $(LDFLAGS) -o $@ $(target_objs)
tex_parser_test.o: tex_parser_test.c tex_parser.c tex_parser.h \ tex_parser_test.o: tex_parser_test.c tex_parser.c tex_parser.h tex_parser_const.h \
tex_parser_table.h tex_parser_graphics.h \ tex_parser_table.h tex_parser_graphics.h \
$(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \ $(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \
$(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h $(KOLAN_INCLUDE)/zalloc_ext.h $(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h $(KOLAN_INCLUDE)/zalloc_ext.h
tex_parser.o: tex_parser.c tex_parser.h \ tex_parser.o: tex_parser.c tex_parser.h tex_parser_const.h \
tex_parser_table.h tex_parser_graphics.h \ tex_parser_table.h tex_parser_graphics.h \
$(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \ $(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \
$(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h $(KOLAN_INCLUDE)/zalloc_ext.h $(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h $(KOLAN_INCLUDE)/zalloc_ext.h
tex_parser_table.o: tex_parser_table.c tex_parser_table.h \ tex_parser_table.o: tex_parser_table.c tex_parser_table.h tex_parser_const.h \
$(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \ $(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \
$(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h \ $(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h \
$(KOLAN_INCLUDE)/zalloc_ext.h $(KOLAN_INCLUDE)/zalloc_ext.h
tex_parser_graphics.o: tex_parser_graphics.c tex_parser_graphics.h \ tex_parser_graphics.o: tex_parser_graphics.c tex_parser_graphics.h tex_parser_const.h \
$(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \ $(KOLAN_INCLUDE)/xerror.h $(KOLAN_INCLUDE)/zerror.h \
$(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h \ $(KOLAN_INCLUDE)/xalloc.h $(KOLAN_INCLUDE)/zalloc.h \
$(KOLAN_INCLUDE)/zalloc_ext.h $(KOLAN_INCLUDE)/zalloc_ext.h

View File

@ -3,6 +3,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "tex_parser_tags.h" #include "tex_parser_tags.h"
#include "tex_parser_const.h"
#include "zalloc_ext.h" #include "zalloc_ext.h"
#include "zalloc.h" #include "zalloc.h"
#include "c_const.h" #include "c_const.h"
@ -14,8 +15,7 @@
int tex_parse(const char *source, size_t len, struct zerror_s *error) int tex_parse(const char *source, size_t len, struct zerror_s *error)
{ {
error->code = 0; memset(error, 0, sizeof(*error));
error->message = NULL;
if (!len) if (!len)
len = strlen(source); len = strlen(source);

View File

@ -4,10 +4,10 @@
#include <sys/types.h> #include <sys/types.h>
#include "zerror.h" #include "zerror.h"
//~ #include "tex_table.h" #include "tex_parser_table.h"
//~ #include "tex_image.h" #include "tex_parser_graphics.h"
#define MAX_TEX_STACK_LEVEL 128
//~ //~
//~ struct node_s { //~ struct node_s {
//~ enum { //~ enum {

View File

@ -11,5 +11,8 @@
#define TEX_TAG_MULTICOLUMN "multicolumn" #define TEX_TAG_MULTICOLUMN "multicolumn"
#define TEX_TAG_MULTIROW "multirow" #define TEX_TAG_MULTIROW "multirow"
#define TEX_TAG_TABULARNEWLINE "tabularnewline" #define TEX_TAG_TABULARNEWLINE "tabularnewline"
#define TEX_TAG_INCLUDEGRAPHICS "includegraphics"
#define TEX_PARAM_LONGTABLE "longtable"
#endif #endif