From: Mark Calderbank Date: Mon, 10 Dec 2007 15:07:11 +0000 (+0000) Subject: tabs -> spaces in source X-Git-Tag: r0-3-0~22 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=a767177744881cf441616d300eede1c2f2623850;p=vompserver.git tabs -> spaces in source --- diff --git a/i18n.c b/i18n.c index 7621b40..2382f35 100644 --- a/i18n.c +++ b/i18n.c @@ -91,7 +91,7 @@ I18n::trans_table I18n::getLanguageContent(const string code) while (fgets(line, 1000, f)) { int linetype = 0; - string::size_type offset = 0; + string::size_type offset = 0; string fileline = line; if (fileline.compare(0, 2, "x:") == 0) { // New key to be translated @@ -105,19 +105,19 @@ I18n::trans_table I18n::getLanguageContent(const string code) if (linetype != 0) { string::size_type start, end; - start = fileline.find_first_not_of(" \t\r\n",offset); + start = fileline.find_first_not_of(" \t\r\n",offset); if (start == string::npos) - { - if (linetype == 2) Translations[key].clear(); - continue; - } + { + if (linetype == 2) Translations[key].clear(); + continue; + } end = fileline.find_last_not_of(" \t\r\n"); string text = fileline.substr(start, end + 1 - start); - if (text.length() > 1) // Strip quotes if at both ends - { - if (text[0] == '"' && text[text.length()-1] == '"') - text = text.substr(1, text.length()-2); - } + if (text.length() > 1) // Strip quotes if at both ends + { + if (text[0] == '"' && text[text.length()-1] == '"') + text = text.substr(1, text.length()-2); + } if (linetype == 1) key = text; if (linetype == 2) Translations[key] = text; }