--- parser3/src/main/pa_globals.C 2002/12/25 10:48:50 1.147 +++ parser3/src/main/pa_globals.C 2003/01/16 09:07:20 1.151 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_GLOBALS_C="$Date: 2002/12/25 10:48:50 $"; +static const char* IDENT_GLOBALS_C="$Date: 2003/01/16 09:07:20 $"; #include "pa_config_includes.h" @@ -81,6 +81,7 @@ String *hash_default_element_name; String *http_method_name; String *http_timeout_name; String *http_headers_name; +String *http_any_status_name; String *file_status_name; @@ -258,33 +259,18 @@ xmlFileOpenLocalhost (const char *filena * Returns the number of bytes written */ static int -xmlFileRead (void * context, char * buffer, int len) { +pa_xmlFileRead (void * context, char * buffer, int len) { return(fread(&buffer[0], 1, len, (FILE *) context)); } /** - * xmlFileWrite: - * @context: the I/O context - * @buffer: where to drop data - * @len: number of bytes to write - * - * Write @len bytes from @buffer to the I/O channel. - * - * Returns the number of bytes written - */ -static int -xmlFileWrite (void * context, const char * buffer, int len) { - return(fwrite(&buffer[0], 1, len, (FILE *) context)); -} - -/** * xmlFileClose: * @context: the I/O context * * Close an I/O channel */ static int -xmlFileClose (void * context) { +pa_xmlFileClose (void * context) { return ( ( fclose((FILE *) context) == EOF ) ? -1 : 0 ); } @@ -374,6 +360,7 @@ void pa_globals_init(Pool& pool) { http_method_name=NEW String(pool, HTTP_METHOD_NAME); http_timeout_name=NEW String(pool, HTTP_TIMEOUT_NAME); http_headers_name=NEW String(pool, HTTP_HEADERS_NAME); + http_any_status_name=NEW String(pool, HTTP_ANY_STATUS_NAME); file_status_name=NEW String(pool, FILE_STATUS_NAME); @@ -391,6 +378,7 @@ void pa_globals_init(Pool& pool) { ULN("sql", SQL); ULN("js", JS); ULN("xml", XML); + ULN("optimized-xml", XML|String::UL_OPTIMIZE_BIT); ULN("html", HTML); ULN("optimized-html", HTML|String::UL_OPTIMIZE_BIT); @@ -587,7 +575,7 @@ void pa_globals_init(Pool& pool) { // http://localhost/abc -> $ENV{DOCUMENT_ROOT}/abc | ./abc xmlRegisterInputCallbacks( xmlFileMatchLocalhost, xmlFileOpenLocalhost, - xmlFileRead, xmlFileClose); + pa_xmlFileRead, pa_xmlFileClose); // XSLT stylesheet manager cache_managers->put(*NEW String(pool, "stylesheet"),