--- parser3/src/classes/table.C 2009/07/07 05:47:43 1.262 +++ parser3/src/classes/table.C 2009/08/31 08:28:53 1.265 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_TABLE_C="$Date: 2009/07/07 05:47:43 $"; +static const char * const IDENT_TABLE_C="$Date: 2009/08/31 08:28:53 $"; #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) #include @@ -17,6 +17,7 @@ using namespace std; #include "pa_common.h" #include "pa_request.h" +#include "pa_charsets.h" #include "pa_vtable.h" #include "pa_vint.h" #include "pa_sql_connection.h" @@ -26,7 +27,7 @@ using namespace std; class MTable: public Methoded { public: // VStateless_class - Value* create_new_value(Pool&, HashStringValue*) { return new VTable(); } + Value* create_new_value(Pool&) { return new VTable(); } public: MTable(); @@ -39,10 +40,6 @@ public: // Methoded DECLARE_CLASS_VAR(table, new MTable, 0); -// externs - -extern String cycle_data_name; - #define TABLE_REVERSE_NAME "reverse" // globals @@ -611,8 +608,7 @@ static void _offset(Request& r, MethodPa } static void _menu(Request& r, MethodParams& params) { - Temp_hash_value - cycle_data_setter(r.classes_conf, cycle_data_name, /*any not null flag*/&r); + InCycle temp(r); Value& body_code=params.as_junction(0, "body must be code"); @@ -916,7 +912,15 @@ static void _sort(Request& r, MethodPara else seq[i].value.d=value.as_double(); } - // sort keys + + // @todo: handle this elsewhere + if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) { + for(i=0; i