--- parser3/src/include/pa_globals.h 2001/03/19 20:07:36 1.16 +++ parser3/src/include/pa_globals.h 2001/03/25 08:52:34 1.27 @@ -5,19 +5,24 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_globals.h,v 1.16 2001/03/19 20:07:36 paf Exp $ + $Id: pa_globals.h,v 1.27 2001/03/25 08:52:34 paf Exp $ */ #ifndef PA_GLOBALS_H #define PA_GLOBALS_H -#include "pa_string.h" -#include "pa_hash.h" +#include "pa_pool.h" + +class String; +class Hash; +class Table; //@{ /// constant string. class name, predefined method & co #define AUTO_FILE_NAME "auto.p" +#define HTML_TYPO_NAME "html-typo" + #define CONTENT_TYPE_NAME "content-type" #define BODY_NAME "body" #define VALUE_NAME "value" @@ -50,28 +55,15 @@ #define RESULT_VAR_NAME "result" //@} -/// target-specific service functions -struct Service_funcs { - /// read POST request bytes - int (*read_post)(char *buf, int max_bytes); - /// output response header attribute - void (*output_header_attribute)(const char *key, const char *value); - /// output body bytes - void (*output_body)(const char *buf, size_t size); -}; - - /// core func -void globals_init(Pool& pool); +void pa_globals_init(Pool& pool); /// hex_value[c] = hex value of c extern short hex_value[0x100]; -/// target-specific service functions -extern Service_funcs service_funcs; - //@{ /// global string +extern String *html_typo_name; extern String *content_type_name; extern String *body_name; extern String *value_name; @@ -109,4 +101,7 @@ extern String *result_var_name; /// global hash extern Hash *untaint_lang_name2enum; +/// global table +extern Table *default_typo_table; + #endif