|
|
| version 1.9, 2001/03/12 21:18:00 | version 1.11, 2001/03/13 11:15:03 |
|---|---|
| Line 126 static void _menu(Request& r, const Stri | Line 126 static void _menu(Request& r, const Stri |
| for(int i=0; i<table.size(); i++) { | for(int i=0; i<table.size(); i++) { |
| table.set_current(i); | table.set_current(i); |
| Value& processed_body=r.process(body_code); | RTRY |
| Value& processed_body=r.process(body_code); | |
| RCATCH(e) | |
| if(e.type()==ET_SILENT && e.code()==EC_BREAK) | |
| e.set_handled(); | |
| RFINALLY | |
| REND_TRY | |
| if(delim_code) { // delimiter set? | if(delim_code) { // delimiter set? |
| const String *string=processed_body.get_string(); | const String *string=processed_body.get_string(); |
| if(need_delim && string && string->size()) // need delim & iteration produced string? | if(need_delim && string && string->size()) // need delim & iteration produced string? |
| Line 149 static void _empty(Request& r, const Str | Line 155 static void _empty(Request& r, const Str |
| } | } |
| void initialize_table_class(Pool& pool, VClass& vclass) { | void initialize_table_class(Pool& pool, VClass& vclass) { |
| // ^table.set[data] ^table.set[nameless;data] | // ^table.set[data] |
| // ^table.set[nameless;data] | |
| vclass.add_native_method("set", _set, 1, 2); | vclass.add_native_method("set", _set, 1, 2); |
| // ^table.load[file] ^table.load[nameless;file] | // ^table.load[file] |
| // ^table.load[nameless;file] | |
| vclass.add_native_method("load", _load, 1, 2); | vclass.add_native_method("load", _load, 1, 2); |
| // ^table.count[] | // ^table.count[] |
| Line 161 void initialize_table_class(Pool& pool, | Line 169 void initialize_table_class(Pool& pool, |
| // ^table.line[] | // ^table.line[] |
| vclass.add_native_method("line", _line, 0, 0); | vclass.add_native_method("line", _line, 0, 0); |
| // ^table.offset[] ^table.offset[offset] | // ^table.offset[] |
| // ^table.offset[offset] | |
| vclass.add_native_method("offset", _offset, 0, 1); | vclass.add_native_method("offset", _offset, 0, 1); |
| // ^table.menu{code} ^table.menu{code}[delim] | // ^table.menu{code} |
| // ^table.menu{code}[delim] | |
| vclass.add_native_method("menu", _menu, 1, 2); | vclass.add_native_method("menu", _menu, 1, 2); |
| // ^table.empty{code-when-empty} ^table.empty{code-when-empty}{code-when-not} | // ^table.empty{code-when-empty} |
| // ^table.empty{code-when-empty}{code-when-not} | |
| vclass.add_native_method("empty", _empty, 1, 2); | vclass.add_native_method("empty", _empty, 1, 2); |
| } | } |