дошли до 1523-го символа

This commit is contained in:
Kolan Sh 2011-06-27 16:47:43 +04:00
parent 8fd901bc1f
commit 7f06978d09
2 changed files with 6 additions and 2 deletions

View File

@ -237,7 +237,7 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str
} else if (c == '%') { } else if (c == '%') {
where_stack[++tex_level] = IN_COMMENT; where_stack[++tex_level] = IN_COMMENT;
} else if (isgraph(c)) { } else if (isgraph(c) || c < 0) {
} else { } else {
error->code = (int)i; error->code = (int)i;
@ -263,7 +263,7 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str
} else if (c == '}') { } else if (c == '}') {
where_stack[tex_level--] = IN_UNDEF; where_stack[tex_level--] = IN_UNDEF;
} else if (isalnum(c) || c == '#' || c == '|' || c == '>') { } else if (isgraph(c) || c < 0) {
} else { } else {
error->code = (int)i; error->code = (int)i;

View File

@ -3,6 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
//~ #include <locale.h>
#include "tex_table.h" #include "tex_table.h"
#include "zalloc.h" #include "zalloc.h"
@ -32,6 +33,9 @@ int main(int argc, char *argv[])
struct table_s table; struct table_s table;
memset(&table, 0, sizeof(struct table_s)); memset(&table, 0, sizeof(struct table_s));
memset(&error, 0, sizeof(struct xerror_s)); memset(&error, 0, sizeof(struct xerror_s));
//~ setlocale(LC_ALL, "ru_RU.KOI8-R");
/* Коммент по-русски */ /* Коммент по-русски */
int result = parse_table(tex_buf, (size_t)stat_buf.st_size, &table, &error); int result = parse_table(tex_buf, (size_t)stat_buf.st_size, &table, &error);
if (result) { if (result) {