|
|
| version 1.46, 2001/04/03 05:32:02 | version 1.48, 2001/04/03 17:01:01 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: table parser class. | Parser: @b table parser class. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) |
| Line 72 static void _load(Request& r, const Stri | Line 72 static void _load(Request& r, const Stri |
| r.fail_if_junction_(true, *vfilename, | r.fail_if_junction_(true, *vfilename, |
| method_name, "file name must not be junction"); | method_name, "file name must not be junction"); |
| // forcing untaint language | |
| String lfilename(pool); | |
| lfilename.append(vfilename->as_string(), String::UL_FILE_NAME, true); | |
| // loading text | // loading text |
| char *data=file_read_text(pool, r.absolute(lfilename)); | char *data=file_read_text(pool, r.absolute(vfilename->as_string())); |
| // parse columns | // parse columns |
| Array *columns; | Array *columns; |
| Line 125 static void _save(Request& r, const Stri | Line 122 static void _save(Request& r, const Stri |
| r.fail_if_junction_(true, *vtable_name, | r.fail_if_junction_(true, *vtable_name, |
| method_name, "file name must not be junction"); | method_name, "file name must not be junction"); |
| // forcing untaint language | |
| String ltable_name(pool); | |
| ltable_name.append(vtable_name->as_string(), | |
| String::UL_FILE_NAME, true); | |
| Table& table=static_cast<VTable *>(r.self)->table(); | Table& table=static_cast<VTable *>(r.self)->table(); |
| String sdata(pool); | String sdata(pool); |
| Line 168 static void _save(Request& r, const Stri | Line 160 static void _save(Request& r, const Stri |
| } | } |
| // write | // write |
| file_write(pool, r.absolute(ltable_name), sdata.cstr(), sdata.size(), true); | file_write(pool, r.absolute(vtable_name->as_string()), |
| sdata.cstr(), sdata.size(), true); | |
| } | } |
| static void _count(Request& r, const String&method_name, Array *) { | static void _count(Request& r, const String&method_name, Array *) { |