|
|
| version 1.67, 2001/04/28 13:49:14 | version 1.71, 2001/05/07 13:29:47 |
|---|---|
| Line 12 | Line 12 |
| #include "pcre.h" | #include "pcre.h" |
| #include "pa_methoded.h" | #include "classes.h" |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_request.h" | #include "pa_request.h" |
| #include "pa_vtable.h" | #include "pa_vtable.h" |
| Line 28 | Line 28 |
| class MTable : public Methoded { | class MTable : public Methoded { |
| public: // VStateless_class | public: // VStateless_class |
| Value *create_new_value(Pool& pool) { return new(pool) VTable(pool); } | Value *create_new_value(Pool& pool) { return new(pool) VTable(pool); } |
| public: | public: |
| MTable(Pool& pool); | MTable(Pool& pool); |
| bool used_directly() { return true; } | |
| public: // Methoded | |
| bool used_directly() { return true; } | |
| }; | }; |
| // methods | // methods |
| Line 411 static void _join(Request& r, const Stri | Line 411 static void _join(Request& r, const Stri |
| } | } |
| } | } |
| /// ^table:sql{query}[(count[;offset])] | |
| static void _sql(Request& r, const String& method_name, MethodParams *params) { | static void _sql(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Line 487 static void _sql(Request& r, const Strin | Line 486 static void _sql(Request& r, const Strin |
| static_cast<VTable *>(r.self)->set_table(table); | static_cast<VTable *>(r.self)->set_table(table); |
| } | } |
| /// ^table:dir[path] | |
| /// ^table:dir[path][regexp] | |
| static void _dir(Request& r, const String& method_name, MethodParams *params) { | static void _dir(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Line 548 static void _dir(Request& r, const Strin | Line 545 static void _dir(Request& r, const Strin |
| char *file_name_cstr=(char *)r.malloc(file_name_size); | char *file_name_cstr=(char *)r.malloc(file_name_size); |
| memcpy(file_name_cstr, ffblk.ff_name, file_name_size); | memcpy(file_name_cstr, ffblk.ff_name, file_name_size); |
| String &file_name=*new(pool) String(pool); | String &file_name=*new(pool) String(pool); |
| file_name.APPEND_TAINTED(file_name_cstr, file_name_size, | file_name.APPEND(file_name_cstr, file_name_size, String::UL_FILE_NAME, |
| method_name.origin().file, method_name.origin().line); | method_name.origin().file, method_name.origin().line); |
| Array& row=*new(pool) Array(pool); | Array& row=*new(pool) Array(pool); |