summaryrefslogtreecommitdiff
path: root/src/modules/langpack
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
commit46a53191c1ad11a41c948594e972568e62d155b4 (patch)
tree7e57e6f7093fb0de766fe13a933d2f9231433e4d /src/modules/langpack
parent1fe5acae909ea64a1de9ac9f58cae5a3c2d3ad1f (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/langpack')
-rw-r--r--src/modules/langpack/langpack.cpp20
-rw-r--r--src/modules/langpack/lpservices.cpp4
2 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp
index 96e2d44c02..bffe6898f7 100644
--- a/src/modules/langpack/langpack.cpp
+++ b/src/modules/langpack/langpack.cpp
@@ -82,7 +82,7 @@ void ConvertBackslashes(char *str, UINT fileCp)
{
char *pstr;
for ( pstr = str; *pstr; pstr = CharNextExA( fileCp, pstr, 0 )) {
- if( *pstr == '\\' ) {
+ if ( *pstr == '\\' ) {
switch( pstr[1] ) {
case 'n': *pstr = '\n'; break;
case 't': *pstr = '\t'; break;
@@ -237,7 +237,7 @@ static void LoadLangPackFile( FILE* fp, char* line, UINT fileCp )
fgets( line, SIZEOF(line), p );
UINT fileCp = CP_ACP;
- if (strlen(line) >= 3 && line[0]=='\xef' && line[1]=='\xbb' && line[2]=='\xbf')
+ if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf')
{
fileCp = CP_UTF8;
fseek(p, 3, SEEK_SET);
@@ -342,7 +342,7 @@ static int LoadLangPack(const TCHAR *szLangPack)
UINT fileCp = CP_ACP;
size_t lineLen = strlen(line);
- if (lineLen >= 3 && line[0]=='\xef' && line[1]=='\xbb' && line[2]=='\xbf')
+ if (lineLen >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf')
{
fileCp = CP_UTF8;
memmove(line, line + 3, lineLen - 2);
@@ -361,7 +361,7 @@ static int LoadLangPack(const TCHAR *szLangPack)
break;
lrtrim( line );
- if( IsEmpty( line ) || line[0]==';' || line[0]==0)
+ if ( IsEmpty( line ) || line[0] == ';' || line[0]==0)
continue;
if ( line[0] == '[' || line[0] == '#' )
@@ -374,11 +374,11 @@ static int LoadLangPack(const TCHAR *szLangPack)
}
*pszColon++ = 0;
- if(!lstrcmpA(line,"Language")) {mir_snprintf(langPack.language,sizeof(langPack.language),"%s",pszColon); lrtrim(langPack.language);}
- else if(!lstrcmpA(line,"Last-Modified-Using")) {mir_snprintf(langPack.lastModifiedUsing,sizeof(langPack.lastModifiedUsing),"%s",pszColon); lrtrim(langPack.lastModifiedUsing);}
- else if(!lstrcmpA(line,"Authors")) {mir_snprintf(langPack.authors,sizeof(langPack.authors),"%s",pszColon); lrtrim(langPack.authors);}
- else if(!lstrcmpA(line,"Author-email")) {mir_snprintf(langPack.authorEmail,sizeof(langPack.authorEmail),"%s",pszColon); lrtrim(langPack.authorEmail);}
- else if(!lstrcmpA(line, "Locale")) {
+ if (!lstrcmpA(line,"Language")) {mir_snprintf(langPack.language,sizeof(langPack.language),"%s",pszColon); lrtrim(langPack.language);}
+ else if (!lstrcmpA(line,"Last-Modified-Using")) {mir_snprintf(langPack.lastModifiedUsing,sizeof(langPack.lastModifiedUsing),"%s",pszColon); lrtrim(langPack.lastModifiedUsing);}
+ else if (!lstrcmpA(line,"Authors")) {mir_snprintf(langPack.authors,sizeof(langPack.authors),"%s",pszColon); lrtrim(langPack.authors);}
+ else if (!lstrcmpA(line,"Author-email")) {mir_snprintf(langPack.authorEmail,sizeof(langPack.authorEmail),"%s",pszColon); lrtrim(langPack.authorEmail);}
+ else if (!lstrcmpA(line, "Locale")) {
char szBuf[20], *stopped;
lrtrim(pszColon + 1);
@@ -529,7 +529,7 @@ int LoadLangPackModule(void)
LoadLangPackServices();
pathToAbsoluteT(_T("langpack_*.txt"), szSearch, NULL);
hFind = FindFirstFile( szSearch, &fd );
- if( hFind != INVALID_HANDLE_VALUE ) {
+ if ( hFind != INVALID_HANDLE_VALUE ) {
pathToAbsoluteT(fd.cFileName, szSearch, NULL);
FindClose(hFind);
LoadLangPack(szSearch);
diff --git a/src/modules/langpack/lpservices.cpp b/src/modules/langpack/lpservices.cpp
index 48c0aea155..69d416330b 100644
--- a/src/modules/langpack/lpservices.cpp
+++ b/src/modules/langpack/lpservices.cpp
@@ -94,10 +94,10 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd,LPARAM lParam)
LangPackMuuid* uuid = LangPackLookupUuid( lptd->flags );
GetClassName( hwnd, szClass, SIZEOF(szClass));
- if(!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")) || !lstrcmpi(szClass,_T("MHeaderbarCtrl")))
+ if (!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")) || !lstrcmpi(szClass,_T("MHeaderbarCtrl")))
TranslateWindow( uuid, hwnd );
else if ( !lstrcmpi( szClass,_T("edit"))) {
- if( lptd->flags & LPTDF_NOIGNOREEDIT || GetWindowLongPtr(hwnd,GWL_STYLE) & ES_READONLY )
+ if ( lptd->flags & LPTDF_NOIGNOREEDIT || GetWindowLongPtr(hwnd,GWL_STYLE) & ES_READONLY )
TranslateWindow( uuid, hwnd );
}
return TRUE;