Author: hbelusca
Date: Fri Oct 7 21:57:12 2016
New Revision: 72930
URL:
http://svn.reactos.org/svn/reactos?rev=72930&view=rev
Log:
[CACLS][CLIP][COMP][EVENTCREATE][HELP][LOGOFF][SHUTDOWN][CHKDSK][FORMAT][SUBST]
- Use Puts functions where needed;
- Fix a __stdcall that needs to be read __cdecl for a variadic function.
[CACLS]
Fix some resources so that the strings can hold on the width of a standard console screen
(80 chars).
Modified:
trunk/reactos/base/applications/cacls/cacls.c
trunk/reactos/base/applications/cacls/lang/el-GR.rc
trunk/reactos/base/applications/cacls/lang/es-ES.rc
trunk/reactos/base/applications/cacls/lang/fr-FR.rc
trunk/reactos/base/applications/cacls/lang/nl-NL.rc
trunk/reactos/base/applications/cacls/lang/pl-PL.rc
trunk/reactos/base/applications/cmdutils/clip/clip.c
trunk/reactos/base/applications/cmdutils/comp/comp.c
trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c
trunk/reactos/base/applications/cmdutils/help/help.c
trunk/reactos/base/applications/logoff/logoff.c
trunk/reactos/base/applications/shutdown/misc.c
trunk/reactos/base/applications/shutdown/shutdown.c
trunk/reactos/base/system/chkdsk/chkdsk.c
trunk/reactos/base/system/format/format.c
trunk/reactos/base/system/subst/subst.c
Modified: trunk/reactos/base/applications/cacls/cacls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/ca…
==============================================================================
--- trunk/reactos/base/applications/cacls/cacls.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/cacls.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -33,19 +33,17 @@
};
-static
-VOID PrintError(DWORD dwError)
+static VOID
+PrintError(DWORD dwError)
{
if (dwError == ERROR_SUCCESS)
return;
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, dwError, LANG_USER_DEFAULT);
-}
-
-static
-BOOL
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, dwError, LANG_USER_DEFAULT);
+}
+
+static BOOL
PrintFileDacl(IN LPTSTR FilePath,
IN LPTSTR FileName)
{
@@ -63,10 +61,8 @@
return FALSE;
}
- _tcscpy(FullFileName,
- FilePath);
- _tcscat(FullFileName,
- FileName);
+ _tcscpy(FullFileName, FilePath);
+ _tcscat(FullFileName, FileName);
/* find out how much memory we need */
if (!GetFileSecurity(FullFileName,
@@ -182,8 +178,7 @@
}
/* print the file name or space */
- _tprintf(_T("%s "),
- FullFileName);
+ ConPrintf(StdOut, L"%s ", FullFileName);
/* attempt to map the SID to a user name */
if (AceIndex == 0)
@@ -199,32 +194,29 @@
/* print the domain and/or user if possible, or the SID string
*/
if (Name != NULL && Domain[0] != _T('\0'))
{
- _tprintf(_T("%s\\%s:"),
- Domain,
- Name);
+ ConPrintf(StdOut, L"%s\\%s:", Domain, Name);
IndentAccess = (DWORD)_tcslen(Domain) + _tcslen(Name);
}
else
{
LPTSTR DisplayString = (Name != NULL ? Name : SidString);
- _tprintf(_T("%s:"),
- DisplayString);
+ ConPrintf(StdOut, L"%s:", DisplayString);
IndentAccess = (DWORD)_tcslen(DisplayString);
}
/* print the ACE Flags */
if (Ace->Header.AceFlags & CONTAINER_INHERIT_ACE)
{
- IndentAccess += PrintResourceString(IDS_ABBR_CI);
+ IndentAccess += ConResPuts(StdOut, IDS_ABBR_CI);
}
if (Ace->Header.AceFlags & OBJECT_INHERIT_ACE)
{
- IndentAccess += PrintResourceString(IDS_ABBR_OI);
+ IndentAccess += ConResPuts(StdOut, IDS_ABBR_OI);
}
if (Ace->Header.AceFlags & INHERIT_ONLY_ACE)
{
- IndentAccess += PrintResourceString(IDS_ABBR_IO);
+ IndentAccess += ConResPuts(StdOut, IDS_ABBR_IO);
}
IndentAccess += 2;
@@ -236,11 +228,11 @@
{
if (AccessMask == FILE_ALL_ACCESS)
{
- PrintResourceString(IDS_ABBR_NONE);
+ ConResPuts(StdOut, IDS_ABBR_NONE);
}
else
{
- PrintResourceString(IDS_DENY);
+ ConResPuts(StdOut, IDS_DENY);
goto PrintSpecialAccess;
}
}
@@ -248,20 +240,20 @@
{
if (AccessMask == FILE_ALL_ACCESS)
{
- PrintResourceString(IDS_ABBR_FULL);
+ ConResPuts(StdOut, IDS_ABBR_FULL);
}
else if (!(Ace->Mask & (GENERIC_READ |
GENERIC_EXECUTE)) &&
AccessMask == (FILE_GENERIC_READ | FILE_EXECUTE))
{
- PrintResourceString(IDS_ABBR_READ);
+ ConResPuts(StdOut, IDS_ABBR_READ);
}
else if (AccessMask == (FILE_GENERIC_READ |
FILE_GENERIC_WRITE | FILE_EXECUTE | DELETE))
{
- PrintResourceString(IDS_ABBR_CHANGE);
+ ConResPuts(StdOut, IDS_ABBR_CHANGE);
}
else if (AccessMask == FILE_GENERIC_WRITE)
{
- PrintResourceString(IDS_ABBR_WRITE);
+ ConResPuts(StdOut, IDS_ABBR_WRITE);
}
else
{
@@ -301,10 +293,10 @@
{STANDARD_RIGHTS_ALL, IDS_STANDARD_RIGHTS_ALL},
};
- PrintResourceString(IDS_ALLOW);
+ ConResPuts(StdOut, IDS_ALLOW);
PrintSpecialAccess:
- PrintResourceString(IDS_SPECIAL_ACCESS);
+ ConResPuts(StdOut, IDS_SPECIAL_ACCESS);
/* print the special access rights */
x = ARRAYSIZE(AccessRights);
@@ -312,24 +304,21 @@
{
if ((Ace->Mask & AccessRights[x].Access) ==
AccessRights[x].Access)
{
- _tprintf(_T("\n%s "),
- FullFileName);
- for (x2 = 0;
- x2 < IndentAccess;
- x2++)
+ ConPrintf(StdOut, L"\n%s ",
FullFileName);
+ for (x2 = 0; x2 < IndentAccess; x2++)
{
- _tprintf(_T(" "));
+ ConPuts(StdOut, L" ");
}
- PrintResourceString(AccessRights[x].uID);
+ ConResPuts(StdOut, AccessRights[x].uID);
}
}
- _tprintf(_T("\n"));
- }
- }
-
- _tprintf(_T("\n"));
+ ConPuts(StdOut, L"\n");
+ }
+ }
+
+ ConPuts(StdOut, L"\n");
/* free up all resources */
if (Name != NULL)
@@ -451,10 +440,14 @@
}
}
else
+ {
break;
+ }
}
else
- _tprintf(_T("\n"));
+ {
+ ConPuts(StdOut, L"\n");
+ }
} while(FindNextFile(hFind, &FindData));
LastError = GetLastError();
FindClose(hFind);
@@ -758,9 +751,11 @@
if (argc <= 1)
{
- PrintResourceString(IDS_HELP);
+ ConResPuts(StdOut, IDS_HELP);
return 0;
}
+
+ // FIXME: Convert to proper parsing, with support for /?
/*
* parse command line options
@@ -845,7 +840,7 @@
if (InvalidParameter)
{
PrintError(ERROR_INVALID_PARAMETER);
- PrintResourceString(IDS_HELP);
+ ConResPuts(StdOut, IDS_HELP);
return 1;
}
Modified: trunk/reactos/base/applications/cacls/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/la…
==============================================================================
--- trunk/reactos/base/applications/cacls/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/lang/el-GR.rc [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -23,7 +23,8 @@
C Îλλαγή (εγγÏαÏή)\n\
F ΠλήÏÎ·Ï ÎλεγÏοÏ\n\
/D user ÎÏοÏÏοÏή ÏÏήÏÏη αÏÏ ÏÏοÏÏÎλαÏη.\n\
-Τα Wildcards μÏοÏοÏν να ÏÏηÏιμοÏοιηθοÏν για να
ÏÏοÏδιοÏίÏοÏ
ν ÏαÏαÏαÏÎ¬Î½Ï Î±ÏÏ Îνα αÏÏεία ÏÏην ενÏολή.\n\
+Τα Wildcards μÏοÏοÏν να ÏÏηÏιμοÏοιηθοÏν για να
ÏÏοÏδιοÏίÏοÏ
ν ÏαÏαÏαÏÎ¬Î½Ï Î±ÏÏ\n\
+Îνα αÏÏεία ÏÏην ενÏολή.\n\
ÎÏοÏείÏε να ÏÏοÏδιοÏίÏεÏε ÏαÏÏÎ±Î¬Î½Ï Î±ÏÏ Îναν
ÏÏήÏÏη ÏÏην ενÏολή.\n\n\
Abbreviations:\n\
CI - Container Inherit.\n\
Modified: trunk/reactos/base/applications/cacls/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/la…
==============================================================================
--- trunk/reactos/base/applications/cacls/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/lang/es-ES.rc [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -18,7 +18,8 @@
W Escribir\n\
C Cambiar (escribir)\n\
F Control total\n\
- /R usuario Revoca los derechos de acceso al usuario especificado (unicamente
válido con /E).\n\
+ /R usuario Revoca los derechos de acceso al usuario especificado\n\
+ (unicamente válido con /E).\n\
/P user:perm Reemplaza los derechos de acceso del usuario especificado.\n\
Perm puede ser: N Ninguno\n\
R Leer\n\
Modified: trunk/reactos/base/applications/cacls/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/la…
==============================================================================
--- trunk/reactos/base/applications/cacls/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/lang/fr-FR.rc [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -15,7 +15,8 @@
W Ãcriture\n\
C Modification (Ãcriture)\n\
F Contrôle total\n\
- /R user Supprime les droits d'accès de l'utilisateur spécifié (valide
uniquement avec /E).\n\
+ /R user Supprime les droits d'accès de l'utilisateur spécifié\n\
+ (valide uniquement avec /E).\n\
/P user:perm Remplace les droits d'accès de l'utilisateur spécifié.\n\
Perm peut valoir : N Aucun \n\
R Lecture\n\
@@ -23,7 +24,8 @@
C Modification (Ãcriture)\n\
F Contrôle total\n\
/D user Interdit l'accès à l'utilisateur spécifié.\n\
-Il est possible d'utiliser des caractères joker pour sélectionner plus d'un
fichier avec une commande.\n\
+Il est possible d'utiliser des caractères joker pour sélectionner plus d'un\n\
+fichier avec une commande.\n\
Il est possible de spécifier plus d'un utilisateur dans une commande.\n\n\
Abréviations:\n\
CI - Héritage du conteneur.\n\
Modified: trunk/reactos/base/applications/cacls/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/la…
==============================================================================
--- trunk/reactos/base/applications/cacls/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/lang/nl-NL.rc [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -2,7 +2,9 @@
STRINGTABLE
BEGIN
- IDS_HELP "ACL's (Access Control Lists, toegangslijsten) van bestanden
weergeven\nof bewerken\n\nCACLS bestandsnaam [/T] [/E] [/C] [/G gebr:toeg] [/R gebruiker
[...]]\n\
+ IDS_HELP "ACL's (Access Control Lists, toegangslijsten) van bestanden
weergeven\n\
+of bewerken\n\n\
+CACLS bestandsnaam [/T] [/E] [/C] [/G gebr:toeg] [/R gebruiker [...]]\n\
[/P gebr:toeg [...]] [/D gebruiker [...]]\n\
bestandsnaam ACL's weergeven.\n\
/T ACL's wijzigen van opgegeven bestanden in\n\
Modified: trunk/reactos/base/applications/cacls/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/la…
==============================================================================
--- trunk/reactos/base/applications/cacls/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/lang/pl-PL.rc [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -24,7 +24,8 @@
W Zapis\n\
C Zmiana (zapis)\n\
F PeÅny dostÄp\n\
- /R użytkownik OdwoÅuje prawa dostÄpu okreÅlonemu użytkownikowi (dziaÅa
tylko z opcjÄ
/E).\n\
+ /R użytkownik OdwoÅuje prawa dostÄpu okreÅlonemu użytkownikowi\n\
+ (dziaÅa tylko z opcjÄ
/E).\n\
/P użytkownik:dostÄp Edytuje prawa dostÄpu okreÅlonego użytkownika.\n\
Poziom dostÄpu:\n\
N Brak\n\
@@ -33,7 +34,8 @@
C Zmiana (zapis)\n\
F PeÅny dostÄp\n\
/D użytkownik Odbiera prawa dostÄpu okreÅlonemu użytkownikowi.\n\
-W jednym poleceniu można edytowaÄ prawa dostÄpu do wielu plików, używajÄ
c symboli wieloznacznych.\n\
+W jednym poleceniu można edytowaÄ prawa dostÄpu do wielu plików, używajÄ
c\n\
+symboli wieloznacznych.\n\
W jednym poleceniu można edytowaÄ prawa dostÄpu wielu użytkowników.\n\n\
Skróty:\n\
CI - Dziedziczenie kontenera.\n\
Modified: trunk/reactos/base/applications/cmdutils/clip/clip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/clip/clip.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/clip/clip.c [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -21,9 +21,8 @@
if (dwError == ERROR_SUCCESS)
return;
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, dwError, LANG_USER_DEFAULT);
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, dwError, LANG_USER_DEFAULT);
}
static BOOL IsDataUnicode(HGLOBAL hGlobal)
@@ -55,13 +54,13 @@
/* Check for usage */
if (argc > 1 && wcsncmp(argv[1], L"/?", 2) == 0)
{
- ConResPrintf(StdOut, IDS_HELP);
+ ConResPuts(StdOut, IDS_HELP);
return 0;
}
if (GetFileType(hInput) == FILE_TYPE_CHAR)
{
- ConResPrintf(StdOut, IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return 0;
}
Modified: trunk/reactos/base/applications/cmdutils/comp/comp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/comp/comp.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/comp/comp.c [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -26,8 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
-// #include <string.h>
-// #include <wchar.h>
#include <assert.h>
#define WIN32_NO_STATUS
@@ -102,12 +100,12 @@
break;
case L'?':
- PrintResourceString(IDS_HELP);
+ ConResPuts(StdOut, IDS_HELP);
return EXIT_SUCCESS;
default:
- PrintResourceString(IDS_INVALIDSWITCH, argv[i][1]);
- PrintResourceString(IDS_HELP);
+ ConResPrintf(StdErr, IDS_INVALIDSWITCH, argv[i][1]);
+ ConResPuts(StdOut, IDS_HELP);
return EXIT_FAILURE;
}
}
@@ -120,14 +118,14 @@
}
else
{
- PrintResourceString(IDS_BADSYNTAX);
+ ConResPuts(StdErr, IDS_BADSYNTAX);
return EXIT_FAILURE;
}
Buff1 = (PBYTE)malloc(STRBUF);
if (Buff1 == NULL)
{
- ConPrintf(StdErr, L"Can't get free memory for Buff1\n");
+ ConPuts(StdErr, L"Can't get free memory for Buff1\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
@@ -135,30 +133,30 @@
Buff2 = (PBYTE)malloc(STRBUF);
if (Buff2 == NULL)
{
- ConPrintf(StdErr, L"Can't get free memory for Buff2\n");
+ ConPuts(StdErr, L"Can't get free memory for Buff2\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp1 = _wfopen(File1, L"rb")) == NULL)
{
- PrintResourceString(IDS_FILEERROR, File1);
+ ConResPrintf(StdErr, IDS_FILEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp2 = _wfopen(File2, L"rb")) == NULL)
{
- PrintResourceString(IDS_FILEERROR, File2);
- Status = EXIT_FAILURE;
- goto Cleanup;
- }
-
- PrintResourceString(IDS_COMPARING, File1, File2);
+ ConResPrintf(StdErr, IDS_FILEERROR, File2);
+ Status = EXIT_FAILURE;
+ goto Cleanup;
+ }
+
+ ConResPrintf(StdOut, IDS_COMPARING, File1, File2);
FileSizeFile1 = FileSize(fp1);
if (FileSizeFile1 == -1)
{
- PrintResourceString(IDS_FILESIZEERROR, File1);
+ ConResPrintf(StdErr, IDS_FILESIZEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
@@ -166,14 +164,14 @@
FileSizeFile2 = FileSize(fp2);
if (FileSizeFile2 == -1)
{
- PrintResourceString(IDS_FILESIZEERROR, File2);
+ ConResPrintf(StdErr, IDS_FILESIZEERROR, File2);
Status = EXIT_FAILURE;
goto Cleanup;
}
if (FileSizeFile1 != FileSizeFile2)
{
- PrintResourceString(IDS_SIZEDIFFERS);
+ ConResPuts(StdOut, IDS_SIZEDIFFERS);
Status = EXIT_FAILURE;
goto Cleanup;
}
@@ -187,7 +185,7 @@
if (ferror(fp1) || ferror(fp2))
{
- PrintResourceString(IDS_READERROR);
+ ConResPuts(StdErr, IDS_READERROR);
Status = EXIT_FAILURE;
goto Cleanup;
}
@@ -205,22 +203,22 @@
/* Reporting here a mismatch */
if (bLineNos)
{
- PrintResourceString(IDS_MISMATCHLINE, LineNumber);
+ ConResPrintf(StdOut, IDS_MISMATCHLINE, LineNumber);
}
else
{
- PrintResourceString(IDS_MISMATCHOFFSET, Offset);
+ ConResPrintf(StdOut, IDS_MISMATCHOFFSET, Offset);
}
if (bAscii)
{
- PrintResourceString(IDS_ASCIIDIFF, 1, Buff1[i]);
- PrintResourceString(IDS_ASCIIDIFF, 2, Buff2[i]);
+ ConResPrintf(StdOut, IDS_ASCIIDIFF, 1, Buff1[i]);
+ ConResPrintf(StdOut, IDS_ASCIIDIFF, 2, Buff2[i]);
}
else
{
- PrintResourceString(IDS_HEXADECIMALDIFF, 1, Buff1[i]);
- PrintResourceString(IDS_HEXADECIMALDIFF, 2, Buff2[i]);
+ ConResPrintf(StdOut, IDS_HEXADECIMALDIFF, 1, Buff1[i]);
+ ConResPrintf(StdOut, IDS_HEXADECIMALDIFF, 2, Buff2[i]);
}
}
@@ -232,7 +230,7 @@
}
if (FilesOK)
- PrintResourceString(IDS_MATCH);
+ ConResPuts(StdOut, IDS_MATCH);
Cleanup:
if (fp2)
Modified: trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c [iso-8859-1] Fri
Oct 7 21:57:12 2016
@@ -113,10 +113,9 @@
if (dwError == ERROR_SUCCESS)
return;
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, dwError, LANG_USER_DEFAULT);
- ConPrintf(StdErr, L"\n");
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, dwError, LANG_USER_DEFAULT);
+ ConPuts(StdErr, L"\n");
}
@@ -594,7 +593,7 @@
else
{
/* This is NOT a custom source, we must return an error! */
- ConResPrintf(StdErr, IDS_SOURCE_NOT_CUSTOM);
+ ConResPuts(StdErr, IDS_SOURCE_NOT_CUSTOM);
goto Quit;
}
}
@@ -605,7 +604,7 @@
if (!LogNameValid /* && !FoundLog */)
{
/* The log name is not specified, we cannot create the source */
- ConResPrintf(StdErr, IDS_SOURCE_NOCREATE);
+ ConResPuts(StdErr, IDS_SOURCE_NOCREATE);
goto Quit;
}
else // LogNameValid && FoundLog
@@ -721,7 +720,7 @@
MandatoryOptionAbsent,
} PARSER_ERROR;
-typedef VOID (__stdcall *PRINT_ERROR_FUNC)(IN PARSER_ERROR, ...);
+typedef VOID (__cdecl *PRINT_ERROR_FUNC)(IN PARSER_ERROR, ...);
BOOL
DoParse(
@@ -982,7 +981,7 @@
static VOID
-__stdcall
+__cdecl
PrintParserError(PARSER_ERROR Error, ...)
{
/* WARNING: Please keep this lookup table in sync with the resources! */
@@ -1008,7 +1007,7 @@
va_end(args);
if (Error != Success)
- ConResPrintf(StdErr, IDS_USAGE);
+ ConResPuts(StdErr, IDS_USAGE);
}
else
{
@@ -1121,7 +1120,7 @@
return EXIT_FAILURE;
}
- ConResPrintf(StdOut, IDS_HELP);
+ ConResPuts(StdOut, IDS_HELP);
return EXIT_SUCCESS;
}
@@ -1141,7 +1140,7 @@
{
/* Invalid event identifier */
ConResPrintf(StdErr, IDS_BADSYNTAX_7, OPT_EVTID.OptionStr, EVENT_ID_MIN,
EVENT_ID_MAX);
- ConResPrintf(StdErr, IDS_USAGE);
+ ConResPuts(StdErr, IDS_USAGE);
return EXIT_FAILURE;
}
@@ -1238,12 +1237,12 @@
if (!Success)
{
PrintError(GetLastError());
- ConPrintf(StdErr, L"Failed to report event!\n");
+ ConPuts(StdErr, L"Failed to report event!\n");
}
else
{
/* Show success */
- ConPrintf(StdOut, L"\n");
+ ConPuts(StdOut, L"\n");
if (!szEventSource)
ConResPrintf(StdOut, IDS_SUCCESS_1, szEventType, szLogName);
else if (!szLogName)
@@ -1257,7 +1256,7 @@
else
{
PrintError(GetLastError());
- ConPrintf(StdErr, L"GetUserToken() failed!\n");
+ ConPuts(StdErr, L"GetUserToken() failed!\n");
}
/* Close the event log */
Modified: trunk/reactos/base/applications/cmdutils/help/help.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -66,8 +66,8 @@
*/
if (argc <= 1)
{
- PrintResourceString(IDS_HELP1);
- PrintResourceString(IDS_HELP2);
+ ConResPuts(StdOut, IDS_HELP1);
+ ConResPuts(StdOut, IDS_HELP2);
return 0;
}
@@ -77,7 +77,7 @@
*/
if ((argc > 2) || (wcscmp(argv[1], L"/?") == 0))
{
- PrintResourceString(IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return 0;
}
@@ -87,7 +87,7 @@
*/
if (!IsInternalCommand(argv[1]))
{
- PrintResourceString(IDS_NO_ENTRY, argv[1]);
+ ConResPrintf(StdOut, IDS_NO_ENTRY, argv[1]);
return 0;
}
Modified: trunk/reactos/base/applications/logoff/logoff.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/logoff/l…
==============================================================================
--- trunk/reactos/base/applications/logoff/logoff.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/logoff/logoff.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -32,9 +32,8 @@
//----------------------------------------------------------------------
VOID DisplayError(DWORD dwError)
{
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, dwError, LANG_USER_DEFAULT);
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, dwError, LANG_USER_DEFAULT);
ConPrintf(StdErr, L"Error code: %lu\n", dwError);
}
@@ -65,7 +64,7 @@
}
default:
//Invalid parameter detected
- ConResPrintf(StdErr, IDS_ILLEGAL_PARAM);
+ ConResPuts(StdErr, IDS_ILLEGAL_PARAM);
return FALSE;
}
}
@@ -87,7 +86,7 @@
// Parse command line
//
if (!ParseCommandLine(argc, argv)) {
- ConResPrintf(StdOut, IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return 1;
}
@@ -96,11 +95,11 @@
//
if (szRemoteServerName) {
if (bVerbose) {
- ConResPrintf(StdOut, IDS_LOGOFF_REMOTE);
+ ConResPuts(StdOut, IDS_LOGOFF_REMOTE);
}
// FIXME: Add Remote Procedure Call to logoff user on a remote machine
- ConPrintf(StdErr, L"Remote Procedure Call in logoff.exe has not been
implemented");
+ ConPuts(StdErr, L"Remote Procedure Call in logoff.exe has not been
implemented");
}
//
// Perform logoff of current session on local machine instead
@@ -108,7 +107,7 @@
else {
if (bVerbose) {
// Get resource string, and print it.
- ConResPrintf(StdOut, IDS_LOGOFF_LOCAL);
+ ConResPuts(StdOut, IDS_LOGOFF_LOCAL);
}
// Actual logoff
Modified: trunk/reactos/base/applications/shutdown/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
==============================================================================
--- trunk/reactos/base/applications/shutdown/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/shutdown/misc.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -162,9 +162,8 @@
/* Writes the last error as both text and error code to the console */
VOID DisplayError(DWORD dwError)
{
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, dwError, LANG_USER_DEFAULT);
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, dwError, LANG_USER_DEFAULT);
ConPrintf(StdErr, L"Error code: %lu\n", dwError);
}
Modified: trunk/reactos/base/applications/shutdown/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
==============================================================================
--- trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] Fri Oct 7 21:57:12
2016
@@ -48,7 +48,7 @@
switch (towlower(argv[index][1]))
{
case L'?': /* Help */
- PrintResourceString(IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return ERROR_SUCCESS;
case L'a': /* Cancel delayed shutdown */
@@ -66,7 +66,7 @@
}
else
{
- PrintResourceString(IDS_ERROR_MAX_COMMENT_LENGTH);
+ ConResPuts(StdErr, IDS_ERROR_MAX_COMMENT_LENGTH);
return ERROR_BAD_LENGTH;
}
break;
@@ -125,7 +125,7 @@
default:
/* Unknown arguments will exit the program. */
- PrintResourceString(IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return ERROR_SUCCESS;
}
}
@@ -192,7 +192,7 @@
if (argc == 1) /* i.e. no commandline arguments given */
{
- PrintResourceString(IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return EXIT_SUCCESS;
}
@@ -216,7 +216,7 @@
/* Abort the delayed system shutdown specified. */
if (!AbortSystemShutdownW(opts.remote_system))
{
- PrintResourceString(IDS_ERROR_ABORT);
+ ConResPuts(StdErr, IDS_ERROR_ABORT);
DisplayError(GetLastError());
return EXIT_FAILURE;
}
@@ -245,13 +245,13 @@
if (!SetSuspendState(TRUE, FALSE, FALSE))
{
- PrintResourceString(IDS_ERROR_HIBERNATE);
+ ConResPuts(StdErr, IDS_ERROR_HIBERNATE);
DisplayError(GetLastError());
return EXIT_FAILURE;
}
else
{
- PrintResourceString(IDS_ERROR_HIBERNATE_ENABLED);
+ ConResPuts(StdOut, IDS_ERROR_HIBERNATE_ENABLED);
return EXIT_SUCCESS;
}
}
@@ -264,14 +264,14 @@
/* Both shutdown and restart flags cannot both be true */
if (opts.shutdown && opts.restart)
{
- PrintResourceString(IDS_ERROR_SHUTDOWN_REBOOT);
+ ConResPuts(StdErr, IDS_ERROR_SHUTDOWN_REBOOT);
return EXIT_FAILURE;
}
/* Ensure that the timout amount is not too high or a negative number */
if (opts.shutdown_delay > MAX_SHUTDOWN_TIMEOUT)
{
- PrintResourceString(IDS_ERROR_TIMEOUT, opts.shutdown_delay);
+ ConResPrintf(StdErr, IDS_ERROR_TIMEOUT, opts.shutdown_delay);
return EXIT_FAILURE;
}
@@ -302,7 +302,7 @@
}
else
{
- PrintResourceString(IDS_ERROR_LOGOFF);
+ ConResPuts(StdErr, IDS_ERROR_LOGOFF);
DisplayError(GetLastError());
return EXIT_FAILURE;
}
@@ -343,9 +343,9 @@
* on whether the user wanted to shutdown or restart.
*/
if (opts.restart)
- PrintResourceString(IDS_ERROR_RESTART);
+ ConResPuts(StdErr, IDS_ERROR_RESTART);
else
- PrintResourceString(IDS_ERROR_SHUTDOWN);
+ ConResPuts(StdErr, IDS_ERROR_SHUTDOWN);
DisplayError(GetLastError());
return EXIT_FAILURE;
Modified: trunk/reactos/base/system/chkdsk/chkdsk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/chkdsk/chkdsk.…
==============================================================================
--- trunk/reactos/base/system/chkdsk/chkdsk.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/chkdsk/chkdsk.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -88,10 +88,9 @@
static VOID PrintWin32Error(LPWSTR Message, DWORD ErrorCode)
{
ConPrintf(StdErr, L"%s: ", Message);
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, ErrorCode, LANG_USER_DEFAULT);
- ConPrintf(StdErr, L"\n");
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, ErrorCode, LANG_USER_DEFAULT);
+ ConPuts(StdErr, L"\n");
}
@@ -240,59 +239,59 @@
switch (Command)
{
case UNKNOWN2:
- ConPrintf(StdOut, L"UNKNOWN2\r");
+ ConPuts(StdOut, L"UNKNOWN2\r");
break;
case UNKNOWN3:
- ConPrintf(StdOut, L"UNKNOWN3\n");
+ ConPuts(StdOut, L"UNKNOWN3\n");
break;
case UNKNOWN4:
- ConPrintf(StdOut, L"UNKNOWN4\n");
+ ConPuts(StdOut, L"UNKNOWN4\n");
break;
case UNKNOWN5:
- ConPrintf(StdOut, L"UNKNOWN5\n");
+ ConPuts(StdOut, L"UNKNOWN5\n");
break;
case FSNOTSUPPORTED:
- ConPrintf(StdOut, L"FSNOTSUPPORTED\n");
+ ConPuts(StdOut, L"FSNOTSUPPORTED\n");
break;
case VOLUMEINUSE:
- ConPrintf(StdOut, L"VOLUMEINUSE\n");
+ ConPuts(StdOut, L"VOLUMEINUSE\n");
break;
case UNKNOWN9:
- ConPrintf(StdOut, L"UNKNOWN9\n");
+ ConPuts(StdOut, L"UNKNOWN9\n");
break;
case UNKNOWNA:
- ConPrintf(StdOut, L"UNKNOWNA\n");
+ ConPuts(StdOut, L"UNKNOWNA\n");
break;
case UNKNOWNC:
- ConPrintf(StdOut, L"UNKNOWNC\n");
+ ConPuts(StdOut, L"UNKNOWNC\n");
break;
case UNKNOWND:
- ConPrintf(StdOut, L"UNKNOWND\n");
+ ConPuts(StdOut, L"UNKNOWND\n");
break;
case INSUFFICIENTRIGHTS:
- ConPrintf(StdOut, L"INSUFFICIENTRIGHTS\n");
+ ConPuts(StdOut, L"INSUFFICIENTRIGHTS\n");
break;
case STRUCTUREPROGRESS:
- ConPrintf(StdOut, L"STRUCTUREPROGRESS\n");
+ ConPuts(StdOut, L"STRUCTUREPROGRESS\n");
break;
case DONEWITHSTRUCTURE:
- ConPrintf(StdOut, L"DONEWITHSTRUCTURE\n");
+ ConPuts(StdOut, L"DONEWITHSTRUCTURE\n");
break;
case CLUSTERSIZETOOSMALL:
- ConPrintf(StdOut, L"CLUSTERSIZETOOSMALL\n");
+ ConPuts(StdOut, L"CLUSTERSIZETOOSMALL\n");
break;
case PROGRESS:
@@ -309,7 +308,7 @@
status = (PBOOLEAN)Argument;
if (*status == FALSE)
{
- ConPrintf(StdOut, L"Chkdsk was unable to complete
successfully.\n\n");
+ ConPuts(StdOut, L"Chkdsk was unable to complete
successfully.\n\n");
Error = TRUE;
}
break;
@@ -369,7 +368,7 @@
/* Initialize the Console Standard Streams */
ConInitStdStreams();
- ConPrintf(StdOut,
+ ConPuts(StdOut,
L"\n"
L"Chkdskx v1.0.1 by Mark Russinovich\n"
L"Systems Internals -
http://www.sysinternals.com\n"
@@ -381,7 +380,7 @@
//
if (!LoadFMIFSEntryPoints())
{
- ConPrintf(StdErr, L"Could not located FMIFS entry points.\n\n");
+ ConPuts(StdErr, L"Could not located FMIFS entry points.\n\n");
return -1;
}
#endif
@@ -448,7 +447,7 @@
0);
if (volumeHandle == INVALID_HANDLE_VALUE)
{
- ConPrintf(StdErr, L"Chkdsk cannot run because the volume is in use by
another process.\n\n");
+ ConPuts(StdErr, L"Chkdsk cannot run because the volume is in use by
another process.\n\n");
return -1;
}
CloseHandle(volumeHandle);
Modified: trunk/reactos/base/system/format/format.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/format.…
==============================================================================
--- trunk/reactos/base/system/format/format.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/format/format.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -117,10 +117,9 @@
static VOID PrintWin32Error(LPWSTR Message, DWORD ErrorCode)
{
ConPrintf(StdErr, L"%s: ", Message);
- ConMsgPrintf(StdErr,
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, ErrorCode, LANG_USER_DEFAULT);
- ConPrintf(StdErr, L"\n");
+ ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, ErrorCode, LANG_USER_DEFAULT);
+ ConPuts(StdErr, L"\n");
}
@@ -241,7 +240,7 @@
status = (PBOOLEAN)Argument;
if (*status == FALSE)
{
- ConResPrintf(StdOut, STRING_FORMAT_FAIL);
+ ConResPuts(StdOut, STRING_FORMAT_FAIL);
Error = TRUE;
}
break;
@@ -260,7 +259,7 @@
case UNKNOWND:
case STRUCTUREPROGRESS:
case CLUSTERSIZETOOSMALL:
- ConResPrintf(StdOut, STRING_NO_SUPPORT);
+ ConResPuts(StdOut, STRING_NO_SUPPORT);
return FALSE;
}
return TRUE;
@@ -374,7 +373,7 @@
/* Initialize the Console Standard Streams */
ConInitStdStreams();
- ConPrintf(StdOut,
+ ConPuts(StdOut,
L"\n"
L"Formatx v1.0 by Mark Russinovich\n"
L"Systems Internals -
http://www.sysinternals.com\n"
@@ -386,7 +385,7 @@
//
if (!LoadFMIFSEntryPoints())
{
- ConResPrintf(StdErr, STRING_FMIFS_FAIL);
+ ConResPuts(StdErr, STRING_FMIFS_FAIL);
return -1;
}
#endif
@@ -397,7 +396,7 @@
badArg = ParseCommandLine(argc, argv);
if (badArg)
{
- ConResPrintf(StdOut, STRING_UNKNOW_ARG, argv[badArg]);
+ ConResPrintf(StdErr, STRING_UNKNOW_ARG, argv[badArg]);
Usage(argv[0]);
return -1;
}
@@ -407,7 +406,7 @@
//
if (!Drive)
{
- ConResPrintf(StdOut, STRING_DRIVE_PARM);
+ ConResPuts(StdErr, STRING_DRIVE_PARM);
Usage(argv[0]);
return -1;
}
@@ -431,7 +430,7 @@
case DRIVE_REMOTE:
case DRIVE_CDROM:
- ConResPrintf(StdOut, STRING_NO_SUPPORT);
+ ConResPuts(StdOut, STRING_NO_SUPPORT);
return -1;
case DRIVE_NO_ROOT_DIR:
@@ -462,7 +461,7 @@
if (towlower(path[0]) == towlower(Drive[0]))
{
// todo: report "Cannot format system drive"
- ConResPrintf(StdOut, STRING_NO_SUPPORT);
+ ConResPuts(StdOut, STRING_NO_SUPPORT);
return -1;
}
}
@@ -507,7 +506,7 @@
if (!wcsicmp(input, volumeName))
break;
- ConResPrintf(StdOut, STRING_ERROR_LABEL);
+ ConResPuts(StdOut, STRING_ERROR_LABEL);
}
}
@@ -520,7 +519,7 @@
if (_wcsnicmp(&input[0], &szMsg[0], 1) == 0) break;
if (_wcsnicmp(&input[0], &szMsg[1], 1) == 0)
{
- ConPrintf(StdOut, L"\n");
+ ConPuts(StdOut, L"\n");
return 0;
}
}
@@ -554,7 +553,7 @@
ConPrintf(StdOut, L"%s %.2fM\n", szMsg,
((float)(LONGLONG)totalNumberOfBytes.QuadPart)/(float)(1024.0*1024.0));
}
- ConResPrintf(StdOut, STRING_CREATE_FSYS);
+ ConResPuts(StdOut, STRING_CREATE_FSYS);
}
//
@@ -563,7 +562,7 @@
FormatEx(RootDirectory, media, FileSystem, Label, QuickFormat,
ClusterSize, FormatExCallback);
if (Error) return -1;
- ConResPrintf(StdOut, STRING_FMT_COMPLETE);
+ ConResPuts(StdOut, STRING_FMT_COMPLETE);
//
// Enable compression if desired
@@ -571,7 +570,7 @@
if (CompressDrive)
{
if (!EnableVolumeCompression(RootDirectory, TRUE))
- ConResPrintf(StdOut, STRING_VOL_COMPRESS);
+ ConResPuts(StdOut, STRING_VOL_COMPRESS);
}
//
@@ -579,7 +578,7 @@
//
if (!GotALabel)
{
- ConResPrintf(StdOut, STRING_ENTER_LABEL);
+ ConResPuts(StdOut, STRING_ENTER_LABEL);
fgetws(input, ARRAYSIZE(LabelString), stdin);
input[wcslen(input) - 1] = 0;
Modified: trunk/reactos/base/system/subst/subst.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/subst.c?…
==============================================================================
--- trunk/reactos/base/system/subst/subst.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/subst/subst.c [iso-8859-1] Fri Oct 7 21:57:12 2016
@@ -267,7 +267,7 @@
case ERROR_IS_SUBSTED:
{
- ConResPrintf(StdErr, IDS_DRIVE_ALREADY_SUBSTED);
+ ConResPuts(StdErr, IDS_DRIVE_ALREADY_SUBSTED);
return 1;
}
@@ -305,7 +305,7 @@
{
if (!_wcsicmp(argv[i], L"/?"))
{
- ConResPrintf(StdOut, IDS_USAGE);
+ ConResPuts(StdOut, IDS_USAGE);
return 0;
}
}