|
* gnulib.modules: Remove.
* src/mem.c: New file.
* src/symtab.c: New file.
* src/Makefile.am (libgrecs_a_SOURCES): Add mem.c and symtab.c.
(INCLUDES): Remove -Ignu
* src/grecs-gram.y (grecs_vasprintf, grecs_asprintf): New functions.
(grecs_warning, grecs_error): Use grecs_vasprintf.
(string_to_signed, string_to_unsigned): Remove.
(STRTONUM,STRxTONUM,GETUNUM,GETSNUM): New macros (from Mailutils).
(grecs_string_convert): Use macros for numeric conversions.
(grecs_prop_tab): Remove entries for uintmax_t and intmax_t.
* src/grecs-lex.l: Drop dependency on obstack.
(line_acc, string_list): New statics.
(line_acc_free_entry,line_acc_add_string): new function
(line_acc_add_char,list_acc_unescape_char): new function
(line_add_unescape_last): new function
(grecs_lex_begin,grecs_line_add, multiline_begin)
(grecs_line_finish): Rewrite.
* src/grecs.h (grecs_type_uintmax,grecs_type_intmax): Remove.
(grecs_malloc_fun,grecs_realloc_fun,grecs_alloc_die_fun): New externs.
(grecs_malloc,grecs_realloc,grecs_alloc_die,grecs_strdup)
(grecs_list_clear,grecs_list_free)
(grecs_vasprintf,grecs_asprintf): New protos.
(grecs_symtab,grecs_syment): New structs.
(grecs_symtab_enumerator_t): New type.
(grecs_symtab_strerror,grecs_symtab_lookup_or_install)
(grecs_symtab_clear,grecs_symtab_create)
(grecs_symtab_create_default)
(grecs_symtab_free,grecs_symtab_remove,grecs_symtab_replace)
(grecs_symtab_enumerate,grecs_symtab_count_entries): New protos.
* src/list.c (grecs_list_clear): New function.
(grecs_list_free): Use grecs_list_clear.
* src/preproc.c (linebufbase,linebufsize): New variables.
(pp_getline): New function.
(pp_line_stmt_size): Remove.
(pp_line_stmt): Use grecs_asprintf to format data.
(next_line,grecs_preproc_extrn_start): Use pp_getline.
(source_lookup): Use grecs_symtab instead of hash.
* src/text.c: Rewrite using grecs_symtab.
|