Author: tfaber
Date: Tue Apr 29 08:51:17 2014
New Revision: 63043
URL:
http://svn.reactos.org/svn/reactos?rev=63043&view=rev
Log:
[FIND]
- Fix missing explicit -A.... by using -W functions instead. Spotted by Christoph and
Timo.
Modified:
trunk/reactos/base/applications/cmdutils/find/find.c
Modified: trunk/reactos/base/applications/cmdutils/find/find.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/find/find.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/find/find.c [iso-8859-1] Tue Apr 29 08:51:17
2014
@@ -125,11 +125,12 @@
void
usage (void)
{
- char szUsage[4096];
-
- LoadStringA (GetModuleHandle (NULL), IDS_USAGE, szUsage, sizeof(szUsage) /
sizeof(szUsage[0]));
- CharToOemA (szUsage, szUsage);
- fputs (szUsage, stdout);
+ WCHAR wszUsage[4096];
+ char oemUsage[4096];
+
+ LoadStringW (GetModuleHandleW (NULL), IDS_USAGE, wszUsage, sizeof(wszUsage) /
sizeof(wszUsage[0]));
+ CharToOemW (wszUsage, oemUsage);
+ fputs (oemUsage, stdout);
}
@@ -139,7 +140,8 @@
{
char *opt, *needle = NULL;
int ret = 0;
- char szMessage[4096];
+ WCHAR wszMessage[4096];
+ char oemMessage[4096];
int invert_search = 0; /* flag to invert the search */
int count_lines = 0; /* flag to whether/not count lines */
@@ -216,9 +218,9 @@
{
/* We were not able to find a file. Display a message and
set the exit status. */
- LoadStringA (GetModuleHandle (NULL), IDS_NO_SUCH_FILE, szMessage, sizeof(szMessage) /
sizeof(szMessage[0]));
- CharToOemA (szMessage, szMessage);
- fprintf (stderr, szMessage, *argv);
+ LoadStringW (GetModuleHandleW (NULL), IDS_NO_SUCH_FILE, wszMessage, sizeof(wszMessage)
/ sizeof(wszMessage[0]));
+ CharToOemW (wszMessage, oemMessage);
+ fprintf (stderr, oemMessage, *argv);
}
else
{
@@ -235,9 +237,9 @@
}
else
{
- LoadString (GetModuleHandle (NULL), IDS_CANNOT_OPEN, szMessage,
sizeof(szMessage) / sizeof(szMessage[0]));
- CharToOemA (szMessage, szMessage);
- fprintf (stderr, szMessage,
+ LoadStringW (GetModuleHandleW (NULL), IDS_CANNOT_OPEN, wszMessage,
sizeof(wszMessage) / sizeof(wszMessage[0]));
+ CharToOemW (wszMessage, oemMessage);
+ fprintf (stderr, oemMessage,
finddata.name);
}
}