equal
deleted
inserted
replaced
150 // BEGIN|BEGINFILE|END|ENDFILE|adump|and|asort|asorti|atan2|bindtextdomain|break|case|close|compl|continue|cos|dcgettext|dcngettext|default|delete|do|else|eval|exit|exp|fflush|for|func|function|gensub|getline|gsub|if|in|include|index|int|intdiv0|isarray|length|load|log|lshift|match|mktime|namespace|next|nextfile|or|patsplit|print|printf|rand|return|rshift|sin|split|sprintf|sqrt|srand|stopme|strftime|strtonum|sub|substr|switch|system|systime|tolower|toupper|typeof|while|xor |
150 // BEGIN|BEGINFILE|END|ENDFILE|adump|and|asort|asorti|atan2|bindtextdomain|break|case|close|compl|continue|cos|dcgettext|dcngettext|default|delete|do|else|eval|exit|exp|fflush|for|func|function|gensub|getline|gsub|if|in|include|index|int|intdiv0|isarray|length|load|log|lshift|match|mktime|namespace|next|nextfile|or|patsplit|print|printf|rand|return|rshift|sin|split|sprintf|sqrt|srand|stopme|strftime|strtonum|sub|substr|switch|system|systime|tolower|toupper|typeof|while|xor |
151 return attributeName; |
151 return attributeName; |
152 } |
152 } |
153 |
153 |
154 string_t escapeAwkValue(const string_t& value) { |
154 string_t escapeAwkValue(const string_t& value) { |
155 // FIXME: escape field and record separators |
155 std::wstringstream escaped; |
156 return value; |
156 for (wchar_t ch : value) { |
|
157 if (ch == '\t') escaped << L"\\t"; |
|
158 else if (ch == '\n') escaped << L"\\n"; |
|
159 else if (ch == '\\') escaped << L"\\\\"; |
|
160 else escaped << ch; |
|
161 } |
|
162 return escaped.str(); |
157 } |
163 } |
158 |
164 |
159 void processAwkOutput(int awkOutputReaderFD) { |
165 void processAwkOutput(int awkOutputReaderFD) { |
160 locale::global(locale("")); // needed for processing unicode texts, otherwise getline() stopped working on first line with non-ascii characters; TODO: move somewhere else? |
166 locale::global(locale("")); // needed for processing unicode texts, otherwise getline() stopped working on first line with non-ascii characters; TODO: move somewhere else? |
161 |
167 |