|
|
| version 1.124, 2001/10/09 13:17:45 | version 1.126, 2001/10/11 10:21:44 |
|---|---|
| Line 80 static void _set(Request& r, const Strin | Line 80 static void _set(Request& r, const Strin |
| static void _load(Request& r, const String& method_name, MethodParams *params) { | static void _load(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| // filename is last parameter | // filename is last parameter |
| Value& vfilename=params->as_no_junction(params->size()-1, | Value& vfile_name=params->as_no_junction(params->size()-1, |
| "file name must not be code"); | "file name must not be code"); |
| // loading text | // loading text |
| char *data=file_read_text(pool, r.absolute(vfilename.as_string())); | char *data=file_read_text(pool, r.absolute(vfile_name.as_string())); |
| // parse columns | // parse columns |
| Array *columns; | Array *columns; |
| Line 131 static void _load(Request& r, const Stri | Line 131 static void _load(Request& r, const Stri |
| static void _save(Request& r, const String& method_name, MethodParams *params) { | static void _save(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Value& vtable_name=params->as_no_junction(params->size()-1, | Value& vfile_name=params->as_no_junction(params->size()-1, |
| "file name must not be code"); | "file name must not be code"); |
| Table& table=static_cast<VTable *>(r.self)->table(); | Table& table=static_cast<VTable *>(r.self)->table(); |
| Line 173 static void _save(Request& r, const Stri | Line 173 static void _save(Request& r, const Stri |
| } | } |
| // write | // write |
| file_write(pool, r.absolute(vtable_name.as_string()), | file_write(pool, r.absolute(vfile_name.as_string()), |
| sdata.cstr(), sdata.size(), true); | sdata.cstr(), sdata.size(), true); |
| } | } |
| Line 390 static void _flip(Request& r, const Stri | Line 390 static void _flip(Request& r, const Stri |
| Array& new_row=*new(pool) Array(pool, old_table.size()); | Array& new_row=*new(pool) Array(pool, old_table.size()); |
| for(int i=0; i<old_table.size(); i++) { | for(int i=0; i<old_table.size(); i++) { |
| const Array& old_row=old_table.at(i); | const Array& old_row=old_table.at(i); |
| new_row+=column<old_row.size()?old_row.get(column):empty_string; | new_row+=column<old_row.size()?old_row.get(column):new(pool) String(pool); |
| } | } |
| new_table+=&new_row; | new_table+=&new_row; |
| } | } |