|
|
| version 1.75, 2002/04/10 09:53:13 | version 1.78, 2002/04/15 13:17:03 |
|---|---|
| Line 85 static void _find(Request& r, const Stri | Line 85 static void _find(Request& r, const Stri |
| // passed file name simply exists in current dir | // passed file name simply exists in current dir |
| if(file_readable(r.absolute(lfile_name))) { | if(file_readable(r.absolute(lfile_name))) { |
| r.write_no_lang(*new(pool) VString(lfile_name)); | r.write_no_lang(lfile_name); |
| return; | return; |
| } | } |
| // scan .. dirs for result | // scan .. dirs for result |
| for(int i=0; i<FIND_MONKEY_MAX_HOPS; i++) { | for(int i=0; i<FIND_MONKEY_MAX_HOPS; i++) { |
| String test_name(pool); | String local_test_name(pool); |
| for(int j=0; j<i; j++) | for(int j=0; j<i; j++) |
| test_name.APPEND_CONST("../"); | local_test_name.APPEND_CONST("../"); |
| test_name.append(lfile_name, String::UL_CLEAN); | local_test_name.append(lfile_name, String::UL_CLEAN); |
| if(file_readable(r.absolute(test_name))) { | if(file_readable(r.absolute(local_test_name))) { |
| r.write_no_lang(*new(pool) VString(*new(pool) String(test_name))); | r.write_no_lang(*new(pool) String(local_test_name)); |
| return; | return; |
| } | } |
| } | } |
| Line 104 static void _find(Request& r, const Stri | Line 104 static void _find(Request& r, const Stri |
| // not found | // not found |
| if(params->size()==2) { | if(params->size()==2) { |
| Value& not_found_code=params->as_junction(1, "not-found param must be code"); | Value& not_found_code=params->as_junction(1, "not-found param must be code"); |
| r.write_pass_lang(r.process_to_value(not_found_code)); | r.write_pass_lang(r.process(not_found_code)); |
| } | } |
| } | } |
| Line 381 static void lock_execute_body(int , void | Line 381 static void lock_execute_body(int , void |
| Lock_execute_body_info& info=*static_cast<Lock_execute_body_info *>(context); | Lock_execute_body_info& info=*static_cast<Lock_execute_body_info *>(context); |
| // execute body | // execute body |
| info.r->write_assign_lang(info.r->process_to_string(*info.body_code)); | info.r->write_assign_lang(info.r->process(*info.body_code)); |
| }; | }; |
| static void _lock(Request& r, const String& method_name, MethodParams *params) { | static void _lock(Request& r, const String& method_name, MethodParams *params) { |
| const String& file_spec=r.absolute(params->as_string(0, "file name must be string")); | const String& file_spec=r.absolute(params->as_string(0, "file name must be string")); |