--- parser3/src/classes/op.C 2003/11/19 11:00:32 1.136 +++ parser3/src/classes/op.C 2003/12/11 09:36:51 1.143 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_OP_C="$Date: 2003/11/19 11:00:32 $"; +static const char * const IDENT_OP_C="$Date: 2003/12/11 09:36:51 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -83,7 +83,6 @@ static void _if(Request& r, MethodParams Value& condition_code=params.as_junction(0, "condition must be expression"); bool condition=r.process_to_value(condition_code, - /*0/*no name* /,*/ false/*don't intercept string*/).as_bool(); if(condition) r.write_pass_lang(r.process(params.as_junction(1, "'then' parameter must be code"))); @@ -193,7 +192,7 @@ static void _process(Request& r, MethodP } } -static void _rem(Request& r, MethodParams& params) { +static void _rem(Request&, MethodParams& params) { params.as_junction(0, "body must be code"); } @@ -210,7 +209,6 @@ static void _while(Request& r, MethodPar "endless loop detected"); bool condition=r.process_to_value(vcondition, - /*0/*no name* /,*/ false/*don't intercept string*/).as_bool(); if(!condition) // ...condition is true break; @@ -258,7 +256,6 @@ static void _eval(Request& r, MethodPara Value& expr=params.as_junction(0, "need expression"); // evaluate expresion Value& value_result=r.process_to_value(expr, - /*0/*no name YET* /,*/ true/*don't intercept string*/).as_expr_result(); if(params.count()>1) { Value& fmt=params.as_no_junction(1, "fmt must not be code"); @@ -286,7 +283,7 @@ struct timeval mt[2]; gettimeofday(&mt[0],NULL); #endif // connect - SQL_Connection* connection=SQL_driver_manager.get_connection(url.as_string(), + SQL_Connection* connection=SQL_driver_manager->get_connection(url.as_string(), protocol2driver_and_client); #ifdef RESOURCES_DEBUG @@ -526,7 +523,7 @@ const String* locked_process_and_cache_p Cache_scope& scope, const String& file_spec) { - Locked_process_and_cache_put_action_info info={&r, &scope, &body_code, catch_code}; + Locked_process_and_cache_put_action_info info={&r, &scope, &body_code, catch_code, 0}; const String* result=file_write_action_under_lock( file_spec, @@ -540,11 +537,14 @@ const String* locked_process_and_cache_p cache_delete(file_spec); return result; } +#ifndef DOXYGEN struct Cache_get_result { const String* body; bool expired; -} cache_get(Request_charsets& charsets, const String& file_spec, time_t now) { - Cache_get_result result={0}; +}; +#endif +static Cache_get_result cache_get(Request_charsets& charsets, const String& file_spec, time_t now) { + Cache_get_result result={0, false}; File_read_result file=file_read(charsets, file_spec, false/*as_text*/, @@ -609,7 +609,7 @@ static void _cache(Request& r, MethodPar // file_spec, expires, body code const String& file_spec=r.absolute(params.as_string(0, "filespec must be string")); - Cache_scope scope={as_expires(r, params, 1, now)}; + Cache_scope scope={as_expires(r, params, 1, now), 0}; Temp_hash_value cache_scope_setter(r.classes_conf, cache_data_name, &scope); @@ -697,7 +697,7 @@ static void _try_operator(Request& r, Me r.write_pass_lang(result.processed_code); } -static void _throw_operator(Request& r, MethodParams& params) { +static void _throw_operator(Request&, MethodParams& params) { if(params.count()==1) { if(HashStringValue *hash=params[0].get_hash()) { const char* type=0; @@ -706,7 +706,7 @@ static void _throw_operator(Request& r, const String* source=0; if(Value* value=hash->get(exception_source_part_name)) source=&value->as_string(); - const char* comment; + const char* comment=0; if(Value* value=hash->get(exception_comment_part_name)) comment=value->as_string().cstr(); @@ -728,7 +728,7 @@ static void _throw_operator(Request& r, #if defined(WIN32) && defined(_DEBUG) # define PA_BPT -static void _bpt(Request& r, MethodParams& params) { +static void _bpt(Request&, MethodParams&) { _asm int 3; } #endif