Author: hbelusca
Date: Sun Mar 1 12:28:38 2015
New Revision: 66518
URL:
http://svn.reactos.org/svn/reactos?rev=66518&view=rev
Log:
[CMD]
- Do not hardcode the length of the string arrays in the LoadString calls (use ARRAYSIZE
instead)
- Localize the command prompt info line. CORE-9293 #resolve #comment I placed the string
in the resource files so that you can now localize it!
Modified:
trunk/reactos/base/shell/cmd/console.c
trunk/reactos/base/shell/cmd/copy.c
trunk/reactos/base/shell/cmd/del.c
trunk/reactos/base/shell/cmd/dir.c
trunk/reactos/base/shell/cmd/error.c
trunk/reactos/base/shell/cmd/free.c
trunk/reactos/base/shell/cmd/lang/de-DE.rc
trunk/reactos/base/shell/cmd/lang/el-GR.rc
trunk/reactos/base/shell/cmd/lang/en-US.rc
trunk/reactos/base/shell/cmd/lang/es-ES.rc
trunk/reactos/base/shell/cmd/lang/fr-FR.rc
trunk/reactos/base/shell/cmd/lang/hu-HU.rc
trunk/reactos/base/shell/cmd/lang/id-ID.rc
trunk/reactos/base/shell/cmd/lang/it-IT.rc
trunk/reactos/base/shell/cmd/lang/ja-JP.rc
trunk/reactos/base/shell/cmd/lang/no-NO.rc
trunk/reactos/base/shell/cmd/lang/pl-PL.rc
trunk/reactos/base/shell/cmd/lang/ro-RO.rc
trunk/reactos/base/shell/cmd/lang/ru-RU.rc
trunk/reactos/base/shell/cmd/lang/sk-SK.rc
trunk/reactos/base/shell/cmd/lang/sq-AL.rc
trunk/reactos/base/shell/cmd/lang/sv-SE.rc
trunk/reactos/base/shell/cmd/lang/uk-UA.rc
trunk/reactos/base/shell/cmd/lang/zh-CN.rc
trunk/reactos/base/shell/cmd/misc.c
trunk/reactos/base/shell/cmd/prompt.c
trunk/reactos/base/shell/cmd/resource.h
Modified: trunk/reactos/base/shell/cmd/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -249,14 +249,14 @@
VOID ConOutResPaging(BOOL NewPage, UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
- LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, resID, szMsg, ARRAYSIZE(szMsg));
ConOutPrintfPaging(NewPage, szMsg);
}
VOID ConOutResPuts(UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
- LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, resID, szMsg, ARRAYSIZE(szMsg));
ConPuts(szMsg, STD_OUTPUT_HANDLE);
}
@@ -373,7 +373,7 @@
}
else
{
- LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, ARRAYSIZE(szMsg));
ConErrPrintf(szMsg);
}
}
@@ -402,7 +402,7 @@
}
else
{
- LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, ARRAYSIZE(szMsg));
ConErrPrintf(szMsg);
}
}
@@ -413,7 +413,7 @@
va_list arg_ptr;
va_start(arg_ptr, resID);
- LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, resID, szMsg, ARRAYSIZE(szMsg));
ConPrintf(szMsg, arg_ptr, STD_OUTPUT_HANDLE);
va_end(arg_ptr);
}
@@ -447,7 +447,7 @@
VOID ConErrResPuts(UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
- LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, resID, szMsg, ARRAYSIZE(szMsg));
ConPuts(szMsg, STD_ERROR_HANDLE);
}
@@ -463,7 +463,7 @@
va_list arg_ptr;
va_start(arg_ptr, resID);
- LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, resID, szMsg, ARRAYSIZE(szMsg));
ConPrintf(szMsg, arg_ptr, STD_ERROR_HANDLE);
va_end(arg_ptr);
}
Modified: trunk/reactos/base/shell/cmd/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/copy.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/copy.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/copy.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -852,7 +852,7 @@
if (copy(tmpSrcPath,tmpDestPath, bAppend, dwFlags, bTouch))
{
nFiles++;
- //LoadString(CMD_ModuleHandle, STRING_MOVE_ERROR1, szMsg,
RC_STRING_MAX_SIZE);
+ //LoadString(CMD_ModuleHandle, STRING_MOVE_ERROR1, szMsg,
ARRAYSIZE(szMsg));
}
else
{
Modified: trunk/reactos/base/shell/cmd/del.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/del.c?rev=6…
==============================================================================
--- trunk/reactos/base/shell/cmd/del.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/del.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -83,7 +83,7 @@
static VOID LoadStrings(VOID)
{
- LoadString( CMD_ModuleHandle, STRING_DELETE_WIPE, szDeleteWipe, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DELETE_WIPE, szDeleteWipe,
ARRAYSIZE(szDeleteWipe));
GetModuleFileName(NULL, CMDPath, MAX_PATH);
StringsLoaded = TRUE;
}
Modified: trunk/reactos/base/shell/cmd/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=6…
==============================================================================
--- trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -585,17 +585,17 @@
/* print drive info */
if (szVolName[0] != _T('\0'))
{
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP2, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP2, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, szRootName[0], szVolName);
}
else
{
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP3, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP3, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, szRootName[0]);
}
/* print the volume serial number if the return was successful */
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP4, (LPTSTR) szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP4, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
return TRUE;
@@ -763,7 +763,7 @@
if (TotalSummary && lpFlags->bRecursive)
{
ConvertULargeInteger(u64Bytes, szBuffer, sizeof(szBuffer),
lpFlags->bTSeperator);
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP5, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP5, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, ulFiles, szBuffer);
}
else
@@ -772,7 +772,7 @@
/* Condition to print summary is:
If we are not in bare format and if we have results! */
ConvertULargeInteger(u64Bytes, szBuffer, 20, lpFlags->bTSeperator);
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP8, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP8, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, ulFiles, szBuffer);
}
@@ -781,7 +781,7 @@
{
GetUserDiskFreeSpace(szPath, &uliFree);
ConvertULargeInteger(uliFree.QuadPart, szBuffer, sizeof(szBuffer),
lpFlags->bTSeperator);
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP6, (LPTSTR) szMsg,
RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP6, szMsg, ARRAYSIZE(szMsg));
DirPrintf(lpFlags, szMsg, ulDirs, szBuffer);
}
@@ -1101,7 +1101,7 @@
and if we are in recursive mode... we must have results */
if (!(lpFlags->bBareFormat ) && !((lpFlags->bRecursive) &&
(dwCount <= 0)))
{
- LoadString(CMD_ModuleHandle, STRING_DIR_HELP7, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_DIR_HELP7, szMsg, ARRAYSIZE(szMsg));
if (DirPrintf(lpFlags, szMsg, szTemp))
return;
}
Modified: trunk/reactos/base/shell/cmd/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/error.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/error.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/error.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -98,7 +98,7 @@
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
- LoadString(CMD_ModuleHandle, STRING_ERROR_FILE_NOT_FOUND, szMsg,
RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_ERROR_FILE_NOT_FOUND, szMsg, ARRAYSIZE(szMsg));
ConErrPrintf(_T("%s - %s\n"), szMsg, f);
nErrorLevel = 1;
}
@@ -150,7 +150,7 @@
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
- LoadString(CMD_ModuleHandle, STRING_ERROR_ERROR2, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_ERROR_ERROR2, szMsg, ARRAYSIZE(szMsg));
if (s)
ConErrPrintf(_T("%s - %s\n"), szMsg, s);
Modified: trunk/reactos/base/shell/cmd/free.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/free.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/free.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/free.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -45,7 +45,7 @@
if (!GetVolumeInformation (szRootPath, szVolume, 64, &dwSerial,
NULL, NULL, NULL, 0))
{
- LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, ARRAYSIZE(szMsg));
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
return;
}
@@ -53,7 +53,7 @@
if (szVolume[0] == _T('\0'))
{
- LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, ARRAYSIZE(szMsg));
_tcscpy (szVolume, szMsg);
}
@@ -65,7 +65,7 @@
if (!GetDiskFreeSpace (szRootPath, &dwSecPerCl,
&dwBytPerSec, &dwFreeCl, &dwTotCl))
{
- LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, ARRAYSIZE(szMsg));
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
return;
}
Modified: trunk/reactos/base/shell/cmd/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/de-DE.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -520,6 +520,7 @@
STRING_REPLACE_ERROR5 "Zugriff verweigert - %s\n"
STRING_REPLACE_ERROR6 "Keine Dateien gefunden - %s\n"
STRING_REPLACE_ERROR7 "Erweiterter Fehler 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Betriebssystem [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS-Befehlszeileninterpreter\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Läuft in: "
Modified: trunk/reactos/base/shell/cmd/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/el-GR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -525,6 +525,7 @@
STRING_REPLACE_ERROR5 "Îεν εÏιÏÏÎÏεÏαι η ÏÏÏÏβαÏη -
%s\n"
STRING_REPLACE_ERROR6 "Îε βÏÎθηκαν αÏÏεία - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Command Line Interpreter\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Running on: "
Modified: trunk/reactos/base/shell/cmd/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/en-US.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -521,6 +521,7 @@
STRING_REPLACE_ERROR5 "Access denied - %s\n"
STRING_REPLACE_ERROR6 "No files found - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Command Line Interpreter\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Running on: "
Modified: trunk/reactos/base/shell/cmd/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/es-ES.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -523,6 +523,7 @@
STRING_REPLACE_ERROR5 "Access denied - %s\n"
STRING_REPLACE_ERROR6 "No files found - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nIntérprete de comandos de ReactOS\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Corriendo en: "
Modified: trunk/reactos/base/shell/cmd/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/fr-FR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -535,6 +535,7 @@
STRING_REPLACE_ERROR5 "Accès refusé - %s\n"
STRING_REPLACE_ERROR6 "Aucun fichier trouvé - %s\n"
STRING_REPLACE_ERROR7 "Erreur étendue 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterpréteur de ligne de commandes ReactOS\nVersion %s
%s"
STRING_VERSION_RUNNING_ON "Fonctionnant sous: "
Modified: trunk/reactos/base/shell/cmd/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/hu-HU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -505,6 +505,7 @@
STRING_REPLACE_ERROR5 "Access denied - %s\n"
STRING_REPLACE_ERROR6 "No files found - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Parancssor értelmezõ\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Running on: "
Modified: trunk/reactos/base/shell/cmd/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/id-ID.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -520,6 +520,7 @@
STRING_REPLACE_ERROR5 "Access denied - %s\n"
STRING_REPLACE_ERROR6 "No files found - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterpreter Baris Perintah ReactOS\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Berjalan pada: "
Modified: trunk/reactos/base/shell/cmd/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/it-IT.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -531,6 +531,7 @@
STRING_REPLACE_ERROR5 "Accesso negato - %s\n"
STRING_REPLACE_ERROR6 "Nessun file trovato - %s\n"
STRING_REPLACE_ERROR7 "Errore esteso 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterprete di linea di comando di ReactOS\nVersion %s
%s"
STRING_VERSION_RUNNING_ON "In esecuzione su: "
Modified: trunk/reactos/base/shell/cmd/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ja-JP.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -528,6 +528,7 @@
STRING_REPLACE_ERROR5 "Access denied - %s\n"
STRING_REPLACE_ERROR6 "No files found - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Command Line Interpreter\nVersion %s %s"
STRING_VERSION_RUNNING_ON "Running on: "
Modified: trunk/reactos/base/shell/cmd/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/no-NO.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -519,6 +519,7 @@
STRING_REPLACE_ERROR5 "Tilgang nektet - %s\n"
STRING_REPLACE_ERROR6 "Ingen filer ble funnet - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operativsystem [Versjon %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Kommandotolk\nVersjon %s %s"
STRING_VERSION_RUNNING_ON "Kjører på: "
Modified: trunk/reactos/base/shell/cmd/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/pl-PL.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -525,6 +525,7 @@
STRING_REPLACE_ERROR5 "DostÄp zabroniony - %s\n"
STRING_REPLACE_ERROR6 "Nie znaleziono plików - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32 - BÅÄ
d wspóÅdzielenia\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operating System [Version %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterpreter linii poleceÅ ReactOS\nVersion %s %s"
STRING_VERSION_RUNNING_ON "DziaÅajÄ
cy na: "
Modified: trunk/reactos/base/shell/cmd/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ro-RO.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ro-RO.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -558,6 +558,7 @@
STRING_REPLACE_ERROR5 "Acces nepermis - %s\n"
STRING_REPLACE_ERROR6 "FiÈierele nu au fost gÄsite - %s\n"
STRING_REPLACE_ERROR7 "Eroare ExtinsÄ 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS [Versiunea %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterpretorul de comenzi ReactOS\nVersiunea %s %s"
STRING_VERSION_RUNNING_ON "Operând pe: "
Modified: trunk/reactos/base/shell/cmd/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ru-RU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -530,6 +530,7 @@
STRING_REPLACE_ERROR5 "ÐоÑÑÑп запÑеÑен - %s\n"
STRING_REPLACE_ERROR6 "Ðе найдено Ñайлов - %s\n"
STRING_REPLACE_ERROR7 "РаÑÑиÑÐµÐ½Ð½Ð°Ñ Ð¾Ñибка 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ÐпеÑаÑÐ¸Ð¾Ð½Ð½Ð°Ñ ÑиÑÑема ReactOS
[ÐеÑÑÐ¸Ñ %s-%s]\n"
STRING_CMD_SHELLINFO "\nÐнÑеÑпÑеÑаÑÐ¾Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¾Ð¹
ÑÑÑоки ReactOS\nÐеÑÑÐ¸Ñ %s %s"
STRING_VERSION_RUNNING_ON "ÐапÑÑен на: "
Modified: trunk/reactos/base/shell/cmd/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/sk-SK.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/sk-SK.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -527,6 +527,7 @@
STRING_REPLACE_ERROR5 "PrÃstup zamietnutý - %s\n"
STRING_REPLACE_ERROR6 "Žiadne súbory sa nenašli - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "OperaÄný systém ReactOS [Verzia %s-%s]\n"
STRING_CMD_SHELLINFO "\nInterpréter prÃkazového riadku systému
ReactOS\nVerzia %s %s"
STRING_VERSION_RUNNING_ON "Running on: "
Modified: trunk/reactos/base/shell/cmd/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/sq-AL.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/sq-AL.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -525,6 +525,7 @@
STRING_REPLACE_ERROR5 "Refuzot hyrja - %s\n"
STRING_REPLACE_ERROR6 "Nuk u gjet dokumenti - %s\n"
STRING_REPLACE_ERROR7 "Error i zgjatur 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "Sistemi Operativ ReactOS [Versioni %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Interpretuesi i komandave\nVersioni %s %s"
STRING_VERSION_RUNNING_ON "Funksionon në: "
Modified: trunk/reactos/base/shell/cmd/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/sv-SE.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/sv-SE.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -519,6 +519,7 @@
STRING_REPLACE_ERROR5 "Tilgang nektet - %s\n"
STRING_REPLACE_ERROR6 "Ingen filer ble funnet - %s\n"
STRING_REPLACE_ERROR7 "Extended Error 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS Operativsystem [Versjon %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS Kommandotolk\nVersjon %s %s"
STRING_VERSION_RUNNING_ON "Körs på: "
Modified: trunk/reactos/base/shell/cmd/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/uk-UA.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -531,6 +531,7 @@
STRING_REPLACE_ERROR5 "ÐÐµÐ¼Ð°Ñ Ð´Ð¾ÑÑÑÐ¿Ñ - %s\n"
STRING_REPLACE_ERROR6 "Файли не знайдено - %s\n"
STRING_REPLACE_ERROR7 "РозÑиÑена помилка 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ÐпеÑаÑiйна СиÑÑема ReactOS [ÐеÑÑiÑ
%s-%s]\n"
STRING_CMD_SHELLINFO "\nIнÑеÑпÑеÑаÑÐ¾Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¾Ð³Ð¾
ÑÑдка ReactOS\nVersion %s %s"
STRING_VERSION_RUNNING_ON "ÐапÑÑений на: "
Modified: trunk/reactos/base/shell/cmd/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/zh-CN.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/zh-CN.rc [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -490,6 +490,7 @@
STRING_REPLACE_ERROR5 "ç¦æ¢è®¿é® - %s\n"
STRING_REPLACE_ERROR6 "没ææ件被åç° - %s\n"
STRING_REPLACE_ERROR7 "æ©å±é误 32\n"
+ STRING_CMD_INFOLINE " ReactOS Command Prompt
Type HELP = Help "
STRING_REACTOS_VERSION "ReactOS æä½ç³»ç» [çæ¬ %s-%s]\n"
STRING_CMD_SHELLINFO "\nReactOS å½ä»¤è¡è§£éå¨\nçæ¬ %s %s"
STRING_VERSION_RUNNING_ON "å¨ ä¸è¿è¡"
Modified: trunk/reactos/base/shell/cmd/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/misc.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/misc.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -586,7 +586,7 @@
for (p = szIn; _istspace (*p); p++)
;
- LoadString(CMD_ModuleHandle, STRING_CHOICE_OPTION, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_CHOICE_OPTION, szMsg, ARRAYSIZE(szMsg));
if (_tcsncmp(p, &szMsg[0], 1) == 0)
return PROMPT_YES;
@@ -650,7 +650,7 @@
for (p = szIn; _istspace (*p); p++)
;
- LoadString( CMD_ModuleHandle, STRING_COPY_OPTION, szMsg, RC_STRING_MAX_SIZE);
+ LoadString( CMD_ModuleHandle, STRING_COPY_OPTION, szMsg, ARRAYSIZE(szMsg));
if (_tcsncmp(p, &szMsg[0], 1) == 0)
return PROMPT_YES;
Modified: trunk/reactos/base/shell/cmd/prompt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/prompt.c?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/prompt.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/prompt.c [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -48,12 +48,8 @@
*/
#include "precomp.h"
-// FIXME: Localize the information line.
-static TCHAR InfoLine[] = _T(" ReactOS Command Prompt
Type HELP = Help ");
-
/* The default prompt */
static TCHAR DefaultPrompt[] = _T("$P$G");
-
/*
* Initialize prompt support
@@ -66,7 +62,7 @@
* Set the PROMPT environment variable if it doesn't exist already.
* You can change the PROMPT environment variable before cmd starts.
*/
- if (GetEnvironmentVariable(_T("PROMPT"), Buffer, sizeof(Buffer) /
sizeof(Buffer[0])) == 0)
+ if (GetEnvironmentVariable(_T("PROMPT"), Buffer, ARRAYSIZE(Buffer)) == 0)
SetEnvironmentVariable(_T("PROMPT"), DefaultPrompt);
}
@@ -82,12 +78,16 @@
COORD coPos;
DWORD dwWritten;
+ TCHAR szInfoLine[80 + 1]; // The info line is 80 characters long (without NULL
character)
+ INT iInfoLineLen;
+
+ /* Return directly if the output handle is not a console handle */
if (!GetConsoleScreenBufferInfo(hOutput, &csbi))
- {
- /* No console */
return;
- }
-
+
+ iInfoLineLen = LoadString(CMD_ModuleHandle, STRING_CMD_INFOLINE, szInfoLine,
ARRAYSIZE(szInfoLine));
+
+ /* Display the localized information line */
coPos.X = 0;
coPos.Y = 0;
FillConsoleOutputAttribute(hOutput, BACKGROUND_BLUE | FOREGROUND_WHITE,
@@ -97,8 +97,7 @@
csbi.dwSize.X,
coPos, &dwWritten);
- WriteConsoleOutputCharacter(hOutput, InfoLine,
- sizeof(InfoLine)/sizeof(TCHAR) - 1,
+ WriteConsoleOutputCharacter(hOutput, szInfoLine, iInfoLineLen,
coPos, &dwWritten);
}
Modified: trunk/reactos/base/shell/cmd/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/resource.h?…
==============================================================================
--- trunk/reactos/base/shell/cmd/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/resource.h [iso-8859-1] Sun Mar 1 12:28:38 2015
@@ -89,8 +89,9 @@
#define STRING_ASSOC_HELP 616
#define STRING_MKLINK_HELP 617
-#define STRING_REACTOS_VERSION 623
-#define STRING_CMD_SHELLINFO 624
+#define STRING_CMD_INFOLINE 620
+#define STRING_REACTOS_VERSION 623
+#define STRING_CMD_SHELLINFO 624
#define STRING_COLOR_HELP1 625
#define STRING_COPY_HELP1 626