--- parser3/src/main/pa_dictionary.C 2003/01/31 12:34:36 1.17.2.4 +++ parser3/src/main/pa_dictionary.C 2003/03/18 15:14:18 1.17.2.6.2.1 @@ -5,15 +5,16 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_DICTIONARY_C="$Date: 2003/01/31 12:34:36 $"; +static const char* IDENT_DICTIONARY_C="$Date: 2003/03/18 15:14:18 $"; #include "pa_dictionary.h" #include "pa_exception.h" -static void add_first(Table::element_type row, Dictionary* self) { +// could not make this static: gcc complains "prev decl was extern" +void pa_dictionary_add_first(Table::element_type row, Dictionary* self) { // get a=>b values - StringPtr a=row->get(0); - StringPtr b=row->get(1); + const String& a=row->get(0); + const String& b=row->get(1); // empty 'a' check if(a->is_empty()) { throw Exception("parser.runtime", @@ -30,14 +31,14 @@ static void add_first(Table::element_typ self->constructor_line++; } -Dictionary::Dictionary(TablePtr atable, double amin_ratio): +Dictionary::Dictionary(Table* atable, double amin_ratio): table(atable), fmax_ratio(amin_ratio) { // clear starting_lines memset(starting_line_of, 0, sizeof(starting_line_of)); // grab first letters of first column of a table - constructor_line=1; table->for_each(add_first, this); + constructor_line=1; table->for_each(pa_dictionary_add_first, this); } #ifndef DOXYGEN