|
|
| version 1.131, 2002/06/24 11:59:32 | version 1.139, 2002/09/17 10:58:24 |
|---|---|
| Line 3 | Line 3 |
| Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| $Id$ | |
| */ | */ |
| static const char* IDENT_GLOBALS_C="$Date$"; | |
| #include "pa_config_includes.h" | #include "pa_config_includes.h" |
| #ifdef XML | #ifdef XML |
| Line 70 String *cache_data_name; | Line 70 String *cache_data_name; |
| String *sql_limit_name; | String *sql_limit_name; |
| String *sql_offset_name; | String *sql_offset_name; |
| String *sql_default_name; | String *sql_default_name; |
| String *sql_distinct_name; | |
| String *charset_UTF8_name; | String *charset_UTF8_name; |
| Line 77 String *hash_default_element_name; | Line 78 String *hash_default_element_name; |
| Table *string_match_table_template; | Table *string_match_table_template; |
| Table *date_calendar_table_template; | |
| Hash *untaint_lang_name2enum; | Hash *untaint_lang_name2enum; |
| Charset *utf8_charset; | Charset *utf8_charset; |
| Line 334 void pa_globals_init(Pool& pool) { | Line 337 void pa_globals_init(Pool& pool) { |
| charsets_name=NEW String(pool, CHARSETS_NAME); | charsets_name=NEW String(pool, CHARSETS_NAME); |
| mime_types_name=NEW String(pool, MIME_TYPES_NAME); | mime_types_name=NEW String(pool, MIME_TYPES_NAME); |
| vfile_mime_type_name=NEW String(pool, VFILE_MIME_TYPE_NAME); | |
| origins_mode_name=NEW String(pool, ORIGINS_MODE_NAME); | origins_mode_name=NEW String(pool, ORIGINS_MODE_NAME); |
| class_path_name=NEW String(pool, CLASS_PATH_NAME); | class_path_name=NEW String(pool, CLASS_PATH_NAME); |
| Line 349 void pa_globals_init(Pool& pool) { | Line 351 void pa_globals_init(Pool& pool) { |
| sql_limit_name=NEW String(pool, SQL_LIMIT_NAME); | sql_limit_name=NEW String(pool, SQL_LIMIT_NAME); |
| sql_offset_name=NEW String(pool, SQL_OFFSET_NAME); | sql_offset_name=NEW String(pool, SQL_OFFSET_NAME); |
| sql_default_name=NEW String(pool, SQL_DEFAULT_NAME); | sql_default_name=NEW String(pool, SQL_DEFAULT_NAME); |
| sql_distinct_name=NEW String(pool, SQL_DISTINCT_NAME); | |
| // charsets | // charsets |
| charset_UTF8_name=NEW String(pool, CHARSET_UTF8_NAME); | charset_UTF8_name=NEW String(pool, CHARSET_UTF8_NAME); |
| Line 372 void pa_globals_init(Pool& pool) { | Line 375 void pa_globals_init(Pool& pool) { |
| ULN("html", HTML); | ULN("html", HTML); |
| ULN("optimized-html", HTML|String::UL_OPTIMIZE_BIT); | ULN("optimized-html", HTML|String::UL_OPTIMIZE_BIT); |
| // table | // string_match_table_template |
| { // create table | { |
| Array *string_match_table_columns=NEW Array(pool); | Array *columns=NEW Array(pool); |
| *string_match_table_columns+=NEW String(pool, STRING_PRE_MATCH_NAME); | *columns+=NEW String(pool, STRING_PRE_MATCH_NAME); |
| *string_match_table_columns+=NEW String(pool, STRING_MATCH_NAME); | *columns+=NEW String(pool, STRING_MATCH_NAME); |
| *string_match_table_columns+=NEW String(pool, STRING_POST_MATCH_NAME); | *columns+=NEW String(pool, STRING_POST_MATCH_NAME); |
| for(int i=1; i<=MAX_STRING_MATCH_TABLE_COLUMNS; i++) { | for(int i=1; i<=MAX_STRING_MATCH_TABLE_COLUMNS; i++) { |
| char *column=(char *)pool.malloc(MAX_NUMBER); | char *column=(char *)pool.malloc(MAX_NUMBER); |
| snprintf(column, MAX_NUMBER, "%d", i); | snprintf(column, MAX_NUMBER, "%d", i); |
| *string_match_table_columns+=NEW String(pool, column); // .i column name | *columns+=NEW String(pool, column); // .i column name |
| } | } |
| string_match_table_template=NEW Table(pool, 0, string_match_table_columns); | string_match_table_template=NEW Table(pool, 0, columns); |
| } | |
| // date_calendar_table_template | |
| { | |
| Array *columns=NEW Array(pool); | |
| for(int i=0; i<=6; i++) { | |
| char *column=(char *)pool.malloc(MAX_NUMBER); | |
| snprintf(column, MAX_NUMBER, "%d", i); | |
| *columns+=NEW String(pool, column); // .i column name | |
| } | |
| *columns+=NEW String(pool, DATE_CALENDAR_WEEKNO_NAME); | |
| *columns+=NEW String(pool, DATE_CALENDAR_WEEKYEAR_NAME); | |
| date_calendar_table_template=NEW Table(pool, 0, columns); | |
| } | } |
| // charsets | // charsets |
| Line 435 void pa_globals_init(Pool& pool) { | Line 451 void pa_globals_init(Pool& pool) { |
| xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS; | xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS; |
| // Bit in the loadsubset context field to tell to do complete the elements attributes lists | // Bit in the loadsubset context field to tell to do complete the elements attributes lists |
| // with the ones defaulted from the DTDs | // with the ones defaulted from the DTDs |
| //never added yet xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS; | xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS; |
| // validate each document after load/create (?) | |
| //xmlDoValidityCheckingDefaultValue = 1; | |
| //regretfully this not only replaces entities on parse, but also on generate xmlSubstituteEntitiesDefault(1); | //regretfully this not only replaces entities on parse, but also on generate xmlSubstituteEntitiesDefault(1); |
| // never switched this on xmlIndentTreeOutput=1; | // never switched this on xmlIndentTreeOutput=1; |
| Line 458 void pa_globals_init(Pool& pool) { | Line 477 void pa_globals_init(Pool& pool) { |
| } | } |
| #if defined(XML) && defined(_MSC_VER) | #if defined(XML) && defined(_MSC_VER) |
| # define GNOME_LIBS "/parser3project/win32/gnome" | # define GNOME_LIBS "/parser3project/win32xml/win32/gnome" |
| # pragma comment(lib, GNOME_LIBS "/glib/lib/libglib-1.3-11.lib") | # pragma comment(lib, GNOME_LIBS "/glib/lib/libglib-1.3-11.lib") |
| # ifdef _DEBUG | # ifdef _DEBUG |
| # pragma comment(lib, GNOME_LIBS "/libxml2-x.x.x/win32/dsp/libxml2_so_debug/libxml2.lib") | # pragma comment(lib, GNOME_LIBS "/libxml2-x.x.x/win32/dsp/libxml2_so_debug/libxml2.lib") |