|
|
| version 1.322, 2016/09/08 16:31:35 | version 1.326, 2016/09/08 20:41:47 |
|---|---|
| Line 111 struct TableControlChars { | Line 111 struct TableControlChars { |
| if(Value* vseparator=options.get(PA_COLUMN_SEPARATOR_NAME)) { | if(Value* vseparator=options.get(PA_COLUMN_SEPARATOR_NAME)) { |
| sseparator=&vseparator->as_string(); | sseparator=&vseparator->as_string(); |
| if(sseparator->length()!=1) | if(sseparator->length()!=1) |
| throw Exception(PARSER_RUNTIME, sseparator, "separator must be one character long"); | throw Exception(PARSER_RUNTIME, sseparator, "separator must be one byte character"); |
| separator=sseparator->first_char(); | separator=sseparator->first_char(); |
| separators[0]=separator; | separators[0]=separator; |
| result++; | result++; |
| Line 121 struct TableControlChars { | Line 121 struct TableControlChars { |
| if(sencloser->is_empty()){ | if(sencloser->is_empty()){ |
| encloser=0; | encloser=0; |
| } else { | } else { |
| if(sencloser->length()!=1) | if(sencloser->length()!=1) |
| throw Exception(PARSER_RUNTIME, sencloser, "encloser must be one character long"); | throw Exception(PARSER_RUNTIME, sencloser, "encloser must be empty or one byte character"); |
| encloser=sencloser->first_char(); | encloser=sencloser->first_char(); |
| } | } |
| result++; | result++; |
| } | } |
| Line 271 static void _create(Request& r, MethodPa | Line 271 static void _create(Request& r, MethodPa |
| size_t options_param_index=data_param_index+1; | size_t options_param_index=data_param_index+1; |
| if( options_param_index<params.count() && (options=params.as_hash(options_param_index)) ) { | if( options_param_index<params.count() && (options=params.as_hash(options_param_index)) ) { |
| // cloning, so that we could change | if(control_chars.load(*options)!=options->count()) |
| options=new HashStringValue(*options); | throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION); |
| control_chars.load(*options); | |
| } | } |
| // data | // data |
| Line 1221 inline Table::element_type row_from_stri | Line 1220 inline Table::element_type row_from_stri |
| // parse cells | // parse cells |
| Table::element_type row=new ArrayString; | Table::element_type row=new ArrayString; |
| size_t pos_after=0; | string.split(*row, 0, "\t", String::L_AS_IS); |
| string.split(*row, pos_after, "\t", String::L_AS_IS); | |
| return row; | return row; |
| } | } |