https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e97b412a76d079380e0c1…
commit e97b412a76d079380e0c1e60b050342e018c04ee
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed May 15 08:32:55 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed May 15 08:41:16 2019 +0200
[BASESRV] Strengthen default permissions for DOS devices
This is linked to previous work done on DOS devices creation
in basesrv. If this DWORD is not set (or 0), DOS devices will
be created with an ACL that make the symlink readable by any
and modifiable by any.
With protection mode set, the symlink will be still readable by
any but not modifiable by anyone but the owner.
This should also affect some objects managed by session manager.
By default, on W2K3, that protection mode is set.
---
boot/bootdata/hivesys.inf | 1 +
1 file changed, 1 insertion(+)
diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf
index 68d23cff007..081352fc6dd 100644
--- a/boot/bootdata/hivesys.inf
+++ b/boot/bootdata/hivesys.inf
@@ -1442,6 +1442,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","GlobalFlag", 0x00010003
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","ObjectDirectories",0x00010000, \
"\Windows", \
"\RPC Control"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","ProtectionMode", 0x00010003, 0x00000001
; DOS devices
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","AUX",0x00000002,"\DosDevices\COM1"
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7a133609e774126c7077a…
commit 7a133609e774126c7077a1c055efd44137c6f1c9
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun May 12 01:05:53 2019 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue May 14 20:37:46 2019 +0200
[FIND] Improvements / bug-fixes. (#1553)
- Only include the strictly necessary headers.
- Get rid of the dependency on shell and user DLLs.
- fgetws() gets the string buffer size in number of characters.
- We can use the CRT functions for lengths of the arguments etc.
- The cFileName member of the WIN32_FIND_DATAW structure does not
contain the full PATH to the enumerated file, but only its name.
In order to use _wfopen(), build a full file path out of the
directory part of the file specification and the full file name.
- Simplify a ConPrintf() call to make it "atomic".
- Fix the "confusion" lLineCount vs. lLineNumber vocable in the code.
- Do not emit an extra newline after having displayed the results for
a given file.
- Uppercase the switches for performing the comparisons.
- Send the errors to the StdErr stream.
- Remove trailing whitespace.
---
base/applications/cmdutils/find/CMakeLists.txt | 2 +-
base/applications/cmdutils/find/find.c | 231 +++++++++++++++++--------
2 files changed, 157 insertions(+), 76 deletions(-)
diff --git a/base/applications/cmdutils/find/CMakeLists.txt b/base/applications/cmdutils/find/CMakeLists.txt
index 1df4d1b98df..e39eb506097 100644
--- a/base/applications/cmdutils/find/CMakeLists.txt
+++ b/base/applications/cmdutils/find/CMakeLists.txt
@@ -4,5 +4,5 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(find find.c find.rc)
set_module_type(find win32cui UNICODE)
target_link_libraries(find conutils ${PSEH_LIB})
-add_importlibs(find user32 msvcrt kernel32 shlwapi)
+add_importlibs(find msvcrt kernel32)
add_cd_file(TARGET find DESTINATION reactos/system32 FOR all)
diff --git a/base/applications/cmdutils/find/find.c b/base/applications/cmdutils/find/find.c
index 66cb2ef6245..9dd003fc07f 100644
--- a/base/applications/cmdutils/find/find.c
+++ b/base/applications/cmdutils/find/find.c
@@ -4,12 +4,19 @@
* PURPOSE: Prints all lines of a file that contain a string.
* COPYRIGHT: Copyright 1994-2002 Jim Hall (jhall(a)freedos.org)
* Copyright 2019 Paweł Cholewa (DaMcpg(a)protonmail.com)
+ * Copyright 2019 Hermes Belusca-Maito
*/
-#include <windows.h>
#include <stdio.h>
+#include <stdlib.h>
+
+#include <windef.h>
+#include <winbase.h>
+#include <winnls.h>
+#include <winuser.h>
+
#include <conutils.h>
-#include <shlwapi.h> /* StrStrW and StrStrIW */
+#include <strsafe.h>
#include "resource.h"
@@ -21,65 +28,106 @@ static BOOL bDisplayLineNumbers = FALSE;
static BOOL bIgnoreCase = FALSE;
static BOOL bDoNotSkipOfflineFiles = FALSE;
+/**
+ * @name StrStrCase
+ * @implemented
+ *
+ * Locates a substring inside a NULL-terminated wide string.
+ *
+ * @param[in] pszStr
+ * The NULL-terminated string to be scanned.
+ *
+ * @param[in] pszSearch
+ * The NULL-terminated string to search for.
+ *
+ * @param[in] bIgnoreCase
+ * TRUE if case has to be ignored, FALSE otherwise.
+ *
+ * @return
+ * Returns a pointer to the first occurrence of pszSearch in pszStr,
+ * or NULL if pszSearch does not appear in pszStr. If pszSearch points
+ * to a string of zero length, the function returns pszStr.
+ */
+static PWSTR
+StrStrCase(
+ IN PCWSTR pszStr,
+ IN PCWSTR pszSearch,
+ IN BOOL bIgnoreCase)
+{
+ if (bIgnoreCase)
+ {
+ LCID LocaleId;
+ INT i, cch1, cch2;
+
+ LocaleId = GetThreadLocale();
+
+ cch1 = wcslen(pszStr);
+ cch2 = wcslen(pszSearch);
+
+ if (cch2 == 0)
+ return (PWSTR)pszStr;
+
+ for (i = 0; i <= cch1 - cch2; ++i)
+ {
+ if (CompareStringW(LocaleId /* LOCALE_SYSTEM_DEFAULT */,
+ NORM_IGNORECASE /* | NORM_LINGUISTIC_CASING */,
+ pszStr + i, cch2, pszSearch, cch2) == CSTR_EQUAL)
+ {
+ return (PWSTR)(pszStr + i);
+ }
+ }
+ return NULL;
+ }
+ else
+ {
+ return wcsstr(pszStr, pszSearch);
+ }
+}
+
/**
* @name FindString
* @implemented
- *
+ *
* Prints all lines of the stream that contain a string.
- *
- * @param pStream
- * Stream to read from.
- *
- * @param szFilePath
- * Filename to print in console. Can be NULL.
- *
- * @param szSearchedString
- * String to search for.
- *
- * @return
- * 0 if the string was found at least once, 1 otherwise.
*
+ * @param[in] pStream
+ * The stream to read from.
+ *
+ * @param[in] pszFilePath
+ * The file name to print out. Can be NULL.
+ *
+ * @param[in] pszSearchString
+ * The NULL-terminated string to search for.
+ *
+ * @return
+ * 0 if the string was found at least once, 1 otherwise.
*/
-static int FindString(FILE* pStream, LPWSTR szFilePath, LPWSTR szSearchedString)
+static int
+FindString(
+ IN FILE* pStream,
+ IN PCWSTR pszFilePath OPTIONAL,
+ IN PCWSTR pszSearchString)
{
- WCHAR szLineBuffer[FIND_LINE_BUFFER_SIZE];
LONG lLineCount = 0;
LONG lLineNumber = 0;
BOOL bSubstringFound;
int iReturnValue = 1;
+ WCHAR szLineBuffer[FIND_LINE_BUFFER_SIZE];
- if (szFilePath != NULL)
+ if (pszFilePath != NULL)
{
- /* Convert the filename to uppercase (for formatting) */
- CharUpperW(szFilePath);
-
/* Print the file's header */
- ConPrintf(StdOut, L"\n---------- %s", szFilePath);
-
- if (bCountLines)
- {
- ConPrintf(StdOut, L": ");
- }
- else
- {
- ConPrintf(StdOut, L"\n");
- }
+ ConPrintf(StdOut, L"\n---------- %s%s",
+ pszFilePath, bCountLines ? L": " : L"\n");
}
/* Loop through every line in the file */
- while (fgetws(szLineBuffer, sizeof(szLineBuffer), pStream) != NULL)
+ // FIXME: What if the string we search for crosses the boundary of our szLineBuffer ?
+ while (fgetws(szLineBuffer, _countof(szLineBuffer), pStream) != NULL)
{
- lLineCount++;
+ ++lLineNumber;
- if (bIgnoreCase)
- {
- bSubstringFound = StrStrIW(szLineBuffer, szSearchedString) != NULL;
- }
- else
- {
- bSubstringFound = StrStrW(szLineBuffer, szSearchedString) != NULL;
- }
-
+ bSubstringFound = (StrStrCase(szLineBuffer, pszSearchString, bIgnoreCase) != NULL);
/* Check if this line can be counted */
if (bSubstringFound != bInvertSearch)
@@ -88,14 +136,14 @@ static int FindString(FILE* pStream, LPWSTR szFilePath, LPWSTR szSearchedString)
if (bCountLines)
{
- lLineNumber++;
+ ++lLineCount;
}
else
{
- /* Display the line on the screen */
+ /* Display the line number if needed */
if (bDisplayLineNumbers)
{
- ConPrintf(StdOut, L"[%ld]", lLineCount);
+ ConPrintf(StdOut, L"[%ld]", lLineNumber);
}
ConPrintf(StdOut, L"%s", szLineBuffer);
}
@@ -105,13 +153,15 @@ static int FindString(FILE* pStream, LPWSTR szFilePath, LPWSTR szSearchedString)
if (bCountLines)
{
/* Print the matching line count */
- ConPrintf(StdOut, L"%ld\n", lLineNumber);
+ ConPrintf(StdOut, L"%ld\n", lLineCount);
}
- else if (szFilePath != NULL && iReturnValue == 0)
+#if 0
+ else if (pszFilePath != NULL && iReturnValue == 0)
{
/* Print a newline for formatting */
ConPrintf(StdOut, L"\n");
}
+#endif
return iReturnValue;
}
@@ -121,14 +171,14 @@ int wmain(int argc, WCHAR* argv[])
int i;
int iReturnValue = 2;
int iSearchedStringIndex = -1;
-
BOOL bFoundFileParameter = FALSE;
-
- HANDLE hFindFileHandle;
+ HANDLE hFindFile;
WIN32_FIND_DATAW FindData;
-
FILE* pOpenedFile;
+ PWCHAR ptr;
+ WCHAR szFullFilePath[MAX_PATH];
+ /* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc == 1)
@@ -139,49 +189,45 @@ int wmain(int argc, WCHAR* argv[])
}
/* Parse the command line arguments */
- for (i = 1; i < argc; i++)
+ for (i = 1; i < argc; ++i)
{
/* Check if this argument contains a switch */
- if (lstrlenW(argv[i]) == 2 && argv[i][0] == L'/')
+ if (wcslen(argv[i]) == 2 && argv[i][0] == L'/')
{
- switch (argv[i][1])
+ switch (towupper(argv[i][1]))
{
case L'?':
ConResPuts(StdOut, IDS_USAGE);
return 0;
- case L'v':
case L'V':
bInvertSearch = TRUE;
break;
- case L'c':
case L'C':
bCountLines = TRUE;
break;
- case L'n':
case L'N':
bDisplayLineNumbers = TRUE;
break;
- case L'i':
case L'I':
bIgnoreCase = TRUE;
break;
default:
/* Report invalid switch error */
- ConResPuts(StdOut, IDS_INVALID_SWITCH);
+ ConResPuts(StdErr, IDS_INVALID_SWITCH);
return 2;
}
}
- else if (lstrlenW(argv[i]) > 2 && argv[i][0] == L'/')
+ else if (wcslen(argv[i]) > 2 && argv[i][0] == L'/')
{
/* Check if this parameter is /OFF or /OFFLINE */
- if (lstrcmpiW(argv[i], L"/off") == 0 || lstrcmpiW(argv[i], L"/offline") == 0)
+ if (_wcsicmp(argv[i], L"/off") == 0 || _wcsicmp(argv[i], L"/offline") == 0)
{
bDoNotSkipOfflineFiles = TRUE;
}
else
{
/* Report invalid switch error */
- ConResPuts(StdOut, IDS_INVALID_SWITCH);
+ ConResPuts(StdErr, IDS_INVALID_SWITCH);
return 2;
}
}
@@ -202,28 +248,28 @@ int wmain(int argc, WCHAR* argv[])
if (iSearchedStringIndex == -1)
{
/* User didn't provide the string to search for, display program usage and exit */
- ConResPuts(StdOut, IDS_USAGE);
+ ConResPuts(StdErr, IDS_USAGE);
return 2;
}
if (bFoundFileParameter)
{
/* After the command line arguments were parsed, iterate through them again to get the filenames */
- for (i = 1; i < argc; i++)
+ for (i = 1; i < argc; ++i)
{
/* If the value is a switch or the searched string, continue */
- if ((lstrlenW(argv[i]) > 0 && argv[i][0] == L'/') || i == iSearchedStringIndex)
+ if ((wcslen(argv[i]) > 0 && argv[i][0] == L'/') || i == iSearchedStringIndex)
{
continue;
}
- hFindFileHandle = FindFirstFileW(argv[i], &FindData);
- if (hFindFileHandle == INVALID_HANDLE_VALUE)
+ hFindFile = FindFirstFileW(argv[i], &FindData);
+ if (hFindFile == INVALID_HANDLE_VALUE)
{
- ConResPrintf(StdOut, IDS_NO_SUCH_FILE, argv[i]);
+ ConResPrintf(StdErr, IDS_NO_SUCH_FILE, argv[i]);
continue;
}
-
+
do
{
/* Check if the file contains offline attribute and should be skipped */
@@ -232,14 +278,49 @@ int wmain(int argc, WCHAR* argv[])
continue;
}
- pOpenedFile = _wfopen(FindData.cFileName, L"r");
+ /* Skip directory */
+ // FIXME: Implement recursivity?
+ if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ continue;
+ }
+
+ /*
+ * Build the full file path from the file specification pattern.
+ *
+ * Note that we could use GetFullPathName() instead, however
+ * we want to keep compatibility with Windows' find.exe utility
+ * that does not use this function as it keeps the file name
+ * directly based on the pattern.
+ */
+ ptr = wcsrchr(argv[i], L'\\'); // Check for last directory.
+ if (!ptr)
+ ptr = wcsrchr(argv[i], L':'); // Check for drive.
+ if (ptr)
+ {
+ /* The pattern contains a drive or directory part: keep it and concatenate the full file name */
+ StringCchCopyNW(szFullFilePath, _countof(szFullFilePath),
+ argv[i], ptr + 1 - argv[i]);
+ StringCchCatW(szFullFilePath, _countof(szFullFilePath),
+ FindData.cFileName);
+ }
+ else
+ {
+ /* The pattern does not contain any drive or directory part: just copy the full file name */
+ StringCchCopyW(szFullFilePath, _countof(szFullFilePath),
+ FindData.cFileName);
+ }
+
+ // FIXME: Windows' find.exe supports searching inside binary files.
+ pOpenedFile = _wfopen(szFullFilePath, L"r");
if (pOpenedFile == NULL)
{
- ConResPrintf(StdOut, IDS_CANNOT_OPEN, FindData.cFileName);
+ ConResPrintf(StdErr, IDS_CANNOT_OPEN, szFullFilePath);
continue;
}
- if (FindString(pOpenedFile, FindData.cFileName, argv[iSearchedStringIndex]) == 0)
+ /* NOTE: Convert the file path to uppercase for formatting */
+ if (FindString(pOpenedFile, _wcsupr(szFullFilePath), argv[iSearchedStringIndex]) == 0)
{
iReturnValue = 0;
}
@@ -249,15 +330,15 @@ int wmain(int argc, WCHAR* argv[])
}
fclose(pOpenedFile);
- } while (FindNextFileW(hFindFileHandle, &FindData));
+ } while (FindNextFileW(hFindFile, &FindData));
- FindClose(hFindFileHandle);
+ FindClose(hFindFile);
}
}
else
{
FindString(stdin, NULL, argv[iSearchedStringIndex]);
}
-
+
return iReturnValue;
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1bd330cd8141c8e82febc…
commit 1bd330cd8141c8e82febc797152f65d2519e5599
Author: Paweł Cholewa <DaMcpg(a)protonmail.com>
AuthorDate: Sun May 5 00:39:14 2019 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue May 14 20:37:38 2019 +0200
[FIND] Rewrite of the find utility. (#1553)
This commit contains a complete rewrite of find console utility.
The goal of it was to make the source code easier to maintain
and to add a missing feature (/offline switch).
Additional changes:
* now the program operates on Unicode strings;
* added conutils and shlwapi as program's libraries;
* added IDS_INVALID_SWITCH string into resources;
* modified IDS_USAGE string to include /offline switch
description.
https://ss64.com/nt/find.html was used for reference.
---
base/applications/cmdutils/find/CMakeLists.txt | 7 +-
base/applications/cmdutils/find/find.c | 427 +++++++++++++------------
base/applications/cmdutils/find/find.rc | 8 +-
base/applications/cmdutils/find/lang/bg-BG.rc | 14 +-
base/applications/cmdutils/find/lang/ca-ES.rc | 12 +-
base/applications/cmdutils/find/lang/cs-CZ.rc | 12 +-
base/applications/cmdutils/find/lang/de-DE.rc | 14 +-
base/applications/cmdutils/find/lang/el-GR.rc | 12 +-
base/applications/cmdutils/find/lang/en-US.rc | 12 +-
base/applications/cmdutils/find/lang/es-ES.rc | 12 +-
base/applications/cmdutils/find/lang/et-EE.rc | 12 +-
base/applications/cmdutils/find/lang/fr-FR.rc | 12 +-
base/applications/cmdutils/find/lang/it-IT.rc | 12 +-
base/applications/cmdutils/find/lang/lt-LT.rc | 12 +-
base/applications/cmdutils/find/lang/no-NO.rc | 12 +-
base/applications/cmdutils/find/lang/pl-PL.rc | 12 +-
base/applications/cmdutils/find/lang/pt-BR.rc | 12 +-
base/applications/cmdutils/find/lang/ro-RO.rc | 12 +-
base/applications/cmdutils/find/lang/ru-RU.rc | 4 +-
base/applications/cmdutils/find/lang/sk-SK.rc | 12 +-
base/applications/cmdutils/find/lang/sq-AL.rc | 12 +-
base/applications/cmdutils/find/lang/sv-SE.rc | 12 +-
base/applications/cmdutils/find/lang/tr-TR.rc | 12 +-
base/applications/cmdutils/find/lang/uk-UA.rc | 12 +-
base/applications/cmdutils/find/lang/zh-CN.rc | 12 +-
base/applications/cmdutils/find/lang/zh-TW.rc | 12 +-
base/applications/cmdutils/find/resource.h | 7 +-
27 files changed, 389 insertions(+), 332 deletions(-)
diff --git a/base/applications/cmdutils/find/CMakeLists.txt b/base/applications/cmdutils/find/CMakeLists.txt
index 7431f5e17f6..1df4d1b98df 100644
--- a/base/applications/cmdutils/find/CMakeLists.txt
+++ b/base/applications/cmdutils/find/CMakeLists.txt
@@ -1,5 +1,8 @@
+include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
+
add_executable(find find.c find.rc)
-set_module_type(find win32cui)
-add_importlibs(find user32 msvcrt kernel32)
+set_module_type(find win32cui UNICODE)
+target_link_libraries(find conutils ${PSEH_LIB})
+add_importlibs(find user32 msvcrt kernel32 shlwapi)
add_cd_file(TARGET find DESTINATION reactos/system32 FOR all)
diff --git a/base/applications/cmdutils/find/find.c b/base/applications/cmdutils/find/find.c
index 7121f5f7d61..66cb2ef6245 100644
--- a/base/applications/cmdutils/find/find.c
+++ b/base/applications/cmdutils/find/find.c
@@ -1,256 +1,263 @@
-/* find.c */
-
-/* Copyright (C) 1994-2002, Jim Hall <jhall(a)freedos.org> */
-
-/* Adapted for ReactOS */
-
/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-
-/* This program locates a string in a text file and prints those lines
- * that contain the string. Multiple files are clearly separated.
+ * PROJECT: ReactOS Find Command
+ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
+ * PURPOSE: Prints all lines of a file that contain a string.
+ * COPYRIGHT: Copyright 1994-2002 Jim Hall (jhall(a)freedos.org)
+ * Copyright 2019 Paweł Cholewa (DaMcpg(a)protonmail.com)
*/
+#include <windows.h>
#include <stdio.h>
-#include <stdlib.h>
-//#include <string.h>
-//#include <ctype.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-
-//#include <io.h>
-#include <dos.h>
+#include <conutils.h>
+#include <shlwapi.h> /* StrStrW and StrStrIW */
#include "resource.h"
-/* Symbol definition */
-#define MAX_STR 1024
-
-/* This function prints out all lines containing a substring. There are some
- * conditions that may be passed to the function.
+#define FIND_LINE_BUFFER_SIZE 4096
+
+static BOOL bInvertSearch = FALSE;
+static BOOL bCountLines = FALSE;
+static BOOL bDisplayLineNumbers = FALSE;
+static BOOL bIgnoreCase = FALSE;
+static BOOL bDoNotSkipOfflineFiles = FALSE;
+
+/**
+ * @name FindString
+ * @implemented
+ *
+ * Prints all lines of the stream that contain a string.
+ *
+ * @param pStream
+ * Stream to read from.
+ *
+ * @param szFilePath
+ * Filename to print in console. Can be NULL.
+ *
+ * @param szSearchedString
+ * String to search for.
+ *
+ * @return
+ * 0 if the string was found at least once, 1 otherwise.
*
- * RETURN: If the string was found at least once, returns 1.
- * If the string was not found at all, returns 0.
*/
-int
-find_str (char *sz, FILE *p, int invert_search,
- int count_lines, int number_output, int ignore_case)
+static int FindString(FILE* pStream, LPWSTR szFilePath, LPWSTR szSearchedString)
{
- int i, length;
- long line_number = 0, total_lines = 0;
- char *c, temp_str[MAX_STR], this_line[MAX_STR];
-
- /* Convert to upper if needed */
- if (ignore_case)
- {
- length = strlen (sz);
- for (i = 0; i < length; i++)
- sz[i] = toupper (sz[i]);
- }
+ WCHAR szLineBuffer[FIND_LINE_BUFFER_SIZE];
+ LONG lLineCount = 0;
+ LONG lLineNumber = 0;
+ BOOL bSubstringFound;
+ int iReturnValue = 1;
- /* Scan the file until EOF */
- while (fgets (temp_str, MAX_STR, p) != NULL)
+ if (szFilePath != NULL)
{
- /* Remove the trailing newline */
- length = strlen (temp_str);
- if (temp_str[length-1] == '\n')
- {
- temp_str[length-1] = '\0';
- }
+ /* Convert the filename to uppercase (for formatting) */
+ CharUpperW(szFilePath);
- /* Increment number of lines */
- line_number++;
- strcpy (this_line, temp_str);
+ /* Print the file's header */
+ ConPrintf(StdOut, L"\n---------- %s", szFilePath);
- /* Convert to upper if needed */
- if (ignore_case)
- {
- for (i = 0; i < length; i++)
- {
- temp_str[i] = toupper (temp_str[i]);
- }
- }
-
- /* Locate the substring */
+ if (bCountLines)
+ {
+ ConPrintf(StdOut, L": ");
+ }
+ else
+ {
+ ConPrintf(StdOut, L"\n");
+ }
+ }
- /* strstr() returns a pointer to the first occurrence in the
- string of the substring */
- c = strstr (temp_str, sz);
+ /* Loop through every line in the file */
+ while (fgetws(szLineBuffer, sizeof(szLineBuffer), pStream) != NULL)
+ {
+ lLineCount++;
- if ( ((invert_search) ? (c == NULL) : (c != NULL)) )
- {
- if (!count_lines)
- {
- if (number_output)
- printf ("%ld:", line_number);
+ if (bIgnoreCase)
+ {
+ bSubstringFound = StrStrIW(szLineBuffer, szSearchedString) != NULL;
+ }
+ else
+ {
+ bSubstringFound = StrStrW(szLineBuffer, szSearchedString) != NULL;
+ }
+
- /* Print the line of text */
- puts (this_line);
- }
+ /* Check if this line can be counted */
+ if (bSubstringFound != bInvertSearch)
+ {
+ iReturnValue = 0;
- total_lines++;
- } /* long if */
- } /* while fgets */
+ if (bCountLines)
+ {
+ lLineNumber++;
+ }
+ else
+ {
+ /* Display the line on the screen */
+ if (bDisplayLineNumbers)
+ {
+ ConPrintf(StdOut, L"[%ld]", lLineCount);
+ }
+ ConPrintf(StdOut, L"%s", szLineBuffer);
+ }
+ }
+ }
- if (count_lines)
+ if (bCountLines)
{
- /* Just show num. lines that contain the string */
- printf ("%ld\n", total_lines);
+ /* Print the matching line count */
+ ConPrintf(StdOut, L"%ld\n", lLineNumber);
+ }
+ else if (szFilePath != NULL && iReturnValue == 0)
+ {
+ /* Print a newline for formatting */
+ ConPrintf(StdOut, L"\n");
}
-
- /* RETURN: If the string was found at least once, returns 1.
- * If the string was not found at all, returns 0.
- */
- return (total_lines > 0 ? 1 : 0);
+ return iReturnValue;
}
-/* Show usage */
-void
-usage (void)
+int wmain(int argc, WCHAR* argv[])
{
- WCHAR wszUsage[4096];
- char oemUsage[4096];
+ int i;
+ int iReturnValue = 2;
+ int iSearchedStringIndex = -1;
- LoadStringW (GetModuleHandleW (NULL), IDS_USAGE, wszUsage, sizeof(wszUsage) / sizeof(wszUsage[0]));
- CharToOemW (wszUsage, oemUsage);
- fputs (oemUsage, stdout);
-}
+ BOOL bFoundFileParameter = FALSE;
+ HANDLE hFindFileHandle;
+ WIN32_FIND_DATAW FindData;
-/* Main program */
-int
-main (int argc, char **argv)
-{
- char *opt, *needle = NULL;
- int ret = 0;
- WCHAR wszMessage[4096];
- char oemMessage[4096];
+ FILE* pOpenedFile;
- int invert_search = 0; /* flag to invert the search */
- int count_lines = 0; /* flag to whether/not count lines */
- int number_output = 0; /* flag to print line numbers */
- int ignore_case = 0; /* flag to be case insensitive */
+ ConInitStdStreams();
- FILE *pfile; /* file pointer */
- int hfind; /* search handle */
- struct _finddata_t finddata; /* _findfirst, filenext block */
+ if (argc == 1)
+ {
+ /* If no argument were provided by the user, display program usage and exit */
+ ConResPuts(StdOut, IDS_USAGE);
+ return 0;
+ }
- /* Scan the command line */
- while ((--argc) && (needle == NULL))
+ /* Parse the command line arguments */
+ for (i = 1; i < argc; i++)
{
- if (*(opt = *++argv) == '/')
+ /* Check if this argument contains a switch */
+ if (lstrlenW(argv[i]) == 2 && argv[i][0] == L'/')
{
- switch (opt[1])
- {
- case 'c':
- case 'C': /* Count */
- count_lines = 1;
- break;
-
- case 'i':
- case 'I': /* Ignore */
- ignore_case = 1;
- break;
-
- case 'n':
- case 'N': /* Number */
- number_output = 1;
- break;
-
- case 'v':
- case 'V': /* Not with */
- invert_search = 1;
- break;
-
- default:
- usage ();
- exit (2); /* syntax error .. return error 2 */
- break;
- }
+ switch (argv[i][1])
+ {
+ case L'?':
+ ConResPuts(StdOut, IDS_USAGE);
+ return 0;
+ case L'v':
+ case L'V':
+ bInvertSearch = TRUE;
+ break;
+ case L'c':
+ case L'C':
+ bCountLines = TRUE;
+ break;
+ case L'n':
+ case L'N':
+ bDisplayLineNumbers = TRUE;
+ break;
+ case L'i':
+ case L'I':
+ bIgnoreCase = TRUE;
+ break;
+ default:
+ /* Report invalid switch error */
+ ConResPuts(StdOut, IDS_INVALID_SWITCH);
+ return 2;
+ }
}
- else
+ else if (lstrlenW(argv[i]) > 2 && argv[i][0] == L'/')
{
- /* Get the string */
- if (needle == NULL)
- {
- /* Assign the string to find */
- needle = *argv;
- }
- }
- }
-
- /* Check for search string */
- if (needle == NULL)
- {
- /* No string? */
- usage ();
- exit (1);
+ /* Check if this parameter is /OFF or /OFFLINE */
+ if (lstrcmpiW(argv[i], L"/off") == 0 || lstrcmpiW(argv[i], L"/offline") == 0)
+ {
+ bDoNotSkipOfflineFiles = TRUE;
+ }
+ else
+ {
+ /* Report invalid switch error */
+ ConResPuts(StdOut, IDS_INVALID_SWITCH);
+ return 2;
+ }
+ }
+ else
+ {
+ if (iSearchedStringIndex == -1)
+ {
+ iSearchedStringIndex = i;
+ }
+ else
+ {
+ /* There's a file specified in the parameters, no need to read from stdin */
+ bFoundFileParameter = TRUE;
+ }
+ }
}
- /* Scan the files for the string */
- if (argc == 0)
+ if (iSearchedStringIndex == -1)
{
- ret = find_str (needle, stdin, invert_search, count_lines,
- number_output, ignore_case);
+ /* User didn't provide the string to search for, display program usage and exit */
+ ConResPuts(StdOut, IDS_USAGE);
+ return 2;
}
- while (--argc >= 0)
+ if (bFoundFileParameter)
{
- hfind = _findfirst (*++argv, &finddata);
- if (hfind < 0)
- {
- /* We were not able to find a file. Display a message and
- set the exit status. */
- LoadStringW (GetModuleHandleW (NULL), IDS_NO_SUCH_FILE, wszMessage, sizeof(wszMessage) / sizeof(wszMessage[0]));
- CharToOemW (wszMessage, oemMessage);
- fprintf (stderr, oemMessage, *argv);
- }
- else
+ /* After the command line arguments were parsed, iterate through them again to get the filenames */
+ for (i = 1; i < argc; i++)
{
- /* repeat find next file to match the filemask */
- do
+ /* If the value is a switch or the searched string, continue */
+ if ((lstrlenW(argv[i]) > 0 && argv[i][0] == L'/') || i == iSearchedStringIndex)
+ {
+ continue;
+ }
+
+ hFindFileHandle = FindFirstFileW(argv[i], &FindData);
+ if (hFindFileHandle == INVALID_HANDLE_VALUE)
{
- /* We have found a file, so try to open it */
- if ((pfile = fopen (finddata.name, "r")) != NULL)
- {
- printf ("---------------- %s\n", finddata.name);
- ret = find_str (needle, pfile, invert_search, count_lines,
- number_output, ignore_case);
- fclose (pfile);
- }
- else
- {
- LoadStringW (GetModuleHandleW (NULL), IDS_CANNOT_OPEN, wszMessage, sizeof(wszMessage) / sizeof(wszMessage[0]));
- CharToOemW (wszMessage, oemMessage);
- fprintf (stderr, oemMessage,
- finddata.name);
+ ConResPrintf(StdOut, IDS_NO_SUCH_FILE, argv[i]);
+ continue;
+ }
+
+ do
+ {
+ /* Check if the file contains offline attribute and should be skipped */
+ if ((FindData.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE) && !bDoNotSkipOfflineFiles)
+ {
+ continue;
+ }
+
+ pOpenedFile = _wfopen(FindData.cFileName, L"r");
+ if (pOpenedFile == NULL)
+ {
+ ConResPrintf(StdOut, IDS_CANNOT_OPEN, FindData.cFileName);
+ continue;
}
- }
- while (_findnext(hfind, &finddata) > 0);
- }
- _findclose(hfind);
- } /* for each argv */
- /* RETURN: If the string was found at least once, returns 0.
- * If the string was not found at all, returns 1.
- * (Note that find_str.c returns the exact opposite values.)
- */
- exit ( (ret ? 0 : 1) );
+ if (FindString(pOpenedFile, FindData.cFileName, argv[iSearchedStringIndex]) == 0)
+ {
+ iReturnValue = 0;
+ }
+ else if (iReturnValue != 0)
+ {
+ iReturnValue = 1;
+ }
+
+ fclose(pOpenedFile);
+ } while (FindNextFileW(hFindFileHandle, &FindData));
+
+ FindClose(hFindFileHandle);
+ }
+ }
+ else
+ {
+ FindString(stdin, NULL, argv[iSearchedStringIndex]);
+ }
+
+ return iReturnValue;
}
diff --git a/base/applications/cmdutils/find/find.rc b/base/applications/cmdutils/find/find.rc
index 92b8ae4ab26..71239582b07 100644
--- a/base/applications/cmdutils/find/find.rc
+++ b/base/applications/cmdutils/find/find.rc
@@ -2,9 +2,9 @@
#include "resource.h"
-#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Find Command"
-#define REACTOS_STR_INTERNAL_NAME "find"
-#define REACTOS_STR_ORIGINAL_FILENAME "find.exe"
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Find Command"
+#define REACTOS_STR_INTERNAL_NAME "find"
+#define REACTOS_STR_ORIGINAL_FILENAME "find.exe"
#include <reactos/version.rc>
/* UTF-8 */
@@ -77,4 +77,4 @@
#endif
#ifdef LANGUAGE_ZH_TW
#include "lang/zh-TW.rc"
-#endif
\ No newline at end of file
+#endif
diff --git a/base/applications/cmdutils/find/lang/bg-BG.rc b/base/applications/cmdutils/find/lang/bg-BG.rc
index 7f5950a4e06..f473225df28 100644
--- a/base/applications/cmdutils/find/lang/bg-BG.rc
+++ b/base/applications/cmdutils/find/lang/bg-BG.rc
@@ -2,12 +2,14 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
- IDS_USAGE "FIND: Извежда всички редове във файла, които съдържат указания низ..\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""низ"" [ файл... ]\n\
- /C Брои колко реда съдържат низа\n\
- /I Пренебрегва ГлАвНОсТта\n\
- /N Брой показани редове, като се започва от 1\n\
- /V Извеждане на редовете, НЕсъдържащи низа."
+ IDS_USAGE "FIND: Извежда всички редове във файла, които съдържат указания низ.\n\n\
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""низ"" [файл...]\n\
+ /V Извеждане на редовете, НЕсъдържащи низа.\n\
+ /C Брои колко реда съдържат низа.\n\
+ /N Брой показани редове, като се започва от 1.\n\
+ /I Пренебрегва ГлАвНОсТта.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Няма такъв файл\n"
IDS_CANNOT_OPEN "FIND: %s: Отварянето на файла е невъзможно\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/ca-ES.rc b/base/applications/cmdutils/find/lang/ca-ES.rc
index ef2b62adeec..ddc84debb6d 100644
--- a/base/applications/cmdutils/find/lang/ca-ES.rc
+++ b/base/applications/cmdutils/find/lang/ca-ES.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Mostra totes les linies que continguin una determinada cadena de caràcters.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""Cadena de caràcters"" [ file... ]\n\
- /C Conta el numero de linies que contenen la cadena de caràcters\n\
- /I Ignora majúscules i minúscules\n\
- /N Numero de linies mostrades, començant per la primera\n\
- /V Mostra les linies que no contenen la cadena de caràcters"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""Cadena de caràcters"" [file...]\n\
+ /V Mostra les linies que no contenen la cadena de caràcters.\n\
+ /C Conta el numero de linies que contenen la cadena de caràcters.\n\
+ /N Numero de linies mostrades, començant per la primera.\n\
+ /I Ignora majúscules i minúscules.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: No he trobat el fitxer\n"
IDS_CANNOT_OPEN "FIND: %s: No puc obrir el fitxer\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/cs-CZ.rc b/base/applications/cmdutils/find/lang/cs-CZ.rc
index 97818900852..3553fdb38cb 100644
--- a/base/applications/cmdutils/find/lang/cs-CZ.rc
+++ b/base/applications/cmdutils/find/lang/cs-CZ.rc
@@ -9,11 +9,13 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Zobrazí všechny řádky souboru obsahující hledaný řetězec.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""řetězec"" [ soubor... ]\n\
- /C Zobrazí počet řádků obsahující řetězec.\n\
- /I Ignoruje velikost písmen.\n\
- /N Čísluje zobrazené řádky, začíná od 1.\n\
- /V Zobrazí všechny řádky, které NEobsahují zadaný řetěžec."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""řetězec"" [soubor...]\n\
+ /V Zobrazí všechny řádky, které NEobsahují zadaný řetěžec.\n\
+ /C Zobrazí počet řádků obsahující řetězec.\n\
+ /N Čísluje zobrazené řádky, začíná od 1.\n\
+ /I Ignoruje velikost písmen.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: Soubor %s nebyl nalezen.\n"
IDS_CANNOT_OPEN "FIND: Soubor %s nelze otevřít!\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/de-DE.rc b/base/applications/cmdutils/find/lang/de-DE.rc
index de8d09ea133..44ca8d33008 100644
--- a/base/applications/cmdutils/find/lang/de-DE.rc
+++ b/base/applications/cmdutils/find/lang/de-DE.rc
@@ -3,12 +3,14 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Sucht in einer Datei nach einer Zeichenfolge.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""Zeichenfolge""\n\
- [[Laufwerk:][Pfad]Dateiname]]\n\
- /C Zeigt nur die Anzahl der die Zeichenfolge enthaltenen Zeilen an.\n\
- /I Ignoriert Groß-/Kleinbuchstaben bei der Suche.\n\
- /N Zeigt die Zeilen mit ihren Zeilennummern an.\n\
- /V Zeigt alle Zeilen an, die die Zeichenfolge NICHT enhalten."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""Zeichenfolge""\n\
+ [[Laufwerk:][Pfad]Dateiname[ ...]]\n\
+ /V Zeigt alle Zeilen an, die die Zeichenfolge NICHT enhalten.\n\
+ /C Zeigt nur die Anzahl der die Zeichenfolge enthaltenen Zeilen an.\n\
+ /N Zeigt die Zeilen mit ihren Zeilennummern an.\n\
+ /I Ignoriert Groß-/Kleinbuchstaben bei der Suche.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "Datei %s nicht gefunden\n"
IDS_CANNOT_OPEN "Datei %s kann nicht geöffnet werden.\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/el-GR.rc b/base/applications/cmdutils/find/lang/el-GR.rc
index 9bc2131d79e..8f700b6e3a2 100644
--- a/base/applications/cmdutils/find/lang/el-GR.rc
+++ b/base/applications/cmdutils/find/lang/el-GR.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Εκτυπώνει όλες τις γραμμές ενός αρχείου που περιέχουν ένα αλφαριθμητικό.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""αλφαριθμητικό"" [ αρχείο... ]\n\
- /C Μέτρηση γραμμών που περιέχουν το αλφαριθμητικό\n\
- /I Αγνόηση κεφαλαίων\n\
- /N Εμφάνιση αριθμών στις εμφανιζόμενες γραμμές, ξεκινώντας από το 1\n\
- /V Εκτύπωση γραμμών που δεν περιέχουν το αλφαριθμητικό"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""αλφαριθμητικό"" [αρχείο...]\n\
+ /V Εκτύπωση γραμμών που δεν περιέχουν το αλφαριθμητικό.\n\
+ /C Μέτρηση γραμμών που περιέχουν το αλφαριθμητικό.\n\
+ /N Εμφάνιση αριθμών στις εμφανιζόμενες γραμμές, ξεκινώντας από το 1.\n\
+ /I Αγνόηση κεφαλαίων.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Δεν υπάρχει αυτό το αρχείο\n"
IDS_CANNOT_OPEN "FIND: %s: Δεν ήταν δυνατό το άνοιγμα του αρχείου\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/en-US.rc b/base/applications/cmdutils/find/lang/en-US.rc
index d78b0267f62..06a00da0a82 100644
--- a/base/applications/cmdutils/find/lang/en-US.rc
+++ b/base/applications/cmdutils/find/lang/en-US.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Prints all lines of a file that contain a string.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""string"" [ file... ]\n\
- /C Count the number of lines that contain string\n\
- /I Ignore case\n\
- /N Number the displayed lines, starting at 1\n\
- /V Print lines that do not contain the string"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""string"" [file...]\n\
+ /V Print lines that do not contain the string.\n\
+ /C Count the number of lines that contain the string.\n\
+ /N Number the displayed lines, starting at 1.\n\
+ /I Ignore case.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: No such file\n"
IDS_CANNOT_OPEN "FIND: %s: Cannot open file\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/es-ES.rc b/base/applications/cmdutils/find/lang/es-ES.rc
index ee65978dc45..14b736d5cf7 100644
--- a/base/applications/cmdutils/find/lang/es-ES.rc
+++ b/base/applications/cmdutils/find/lang/es-ES.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Imprime todas las líneas de un fichero que contiene una cadena.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""cadena"" [ fichero... ]\n\
- /C Cuenta el número de líneas que contienen la cadena de caracteres\n\
- /I Ignora mayúsculas y minúsculas\n\
- /N Numero de líneas a mostrar en pantalla, a partir de la primera\n\
- /V Muestra las líneas que no contienen la cadena de caracteres."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""cadena"" [fichero...]\n\
+ /V Muestra las líneas que no contienen la cadena de caracteres.\n\
+ /C Cuenta el número de líneas que contienen la cadena de caracteres.\n\
+ /N Numero de líneas a mostrar en pantalla, a partir de la primera.\n\
+ /I Ignora mayúsculas y minúsculas.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: No se encontró el fichero\n"
IDS_CANNOT_OPEN "FIND: %s: No se pudo abrir el fichero\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/et-EE.rc b/base/applications/cmdutils/find/lang/et-EE.rc
index 6a6b28ed3cf..25cc068d6ef 100644
--- a/base/applications/cmdutils/find/lang/et-EE.rc
+++ b/base/applications/cmdutils/find/lang/et-EE.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Trükib kõik read failist, mis sisaldavad stringi.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""string"" [ file... ]\n\
- /C Loenda arvuna stringi sisaldavaid ridu\n\
- /I Tõstutundetult\n\
- /N Nummerda kuvatud read alustades 1-st\n\
- /V Trüki read, mis ei sisalda stringi"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""string"" [file...]\n\
+ /V Trüki read, mis ei sisalda stringi.\n\
+ /C Loenda arvuna stringi sisaldavaid ridu.\n\
+ /N Nummerda kuvatud read alustades 1-st.\n\
+ /I Tõstutundetult.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Sellist faili ei leitud\n"
IDS_CANNOT_OPEN "FIND: %s: Ei saa faili avada\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/fr-FR.rc b/base/applications/cmdutils/find/lang/fr-FR.rc
index 4a47d1f5540..36329a4ede5 100644
--- a/base/applications/cmdutils/find/lang/fr-FR.rc
+++ b/base/applications/cmdutils/find/lang/fr-FR.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Affiche toutes les lignes d'un fichier qui contiennent un morceau de texte.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""texte"" [ fichier... ]\n\
- /C Compte le nombre de lignes qui contiennent le texte\n\
- /I Insensible à la casse\n\
- /N Numérote les lignes affichées en commençant à 1\n\
- /V Affiche les lignes qui ne contiennent pas le texte"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""texte"" [fichier...]\n\
+ /V Affiche les lignes qui ne contiennent pas le texte.\n\
+ /C Compte le nombre de lignes qui contiennent le texte.\n\
+ /N Numérote les lignes affichées en commençant à 1.\n\
+ /I Insensible à la casse.\n\
+ /OFF[LINE] Ne pas ignorer les fichiers ayant l'attribut hors-ligne."
IDS_NO_SUCH_FILE "FIND: %s : fichier inexistant\n"
IDS_CANNOT_OPEN "FIND: %s : impossible d'ouvrir le fichier\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/it-IT.rc b/base/applications/cmdutils/find/lang/it-IT.rc
index 49d9b9d6e8c..ca1edaa69ff 100644
--- a/base/applications/cmdutils/find/lang/it-IT.rc
+++ b/base/applications/cmdutils/find/lang/it-IT.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Visualizza le linee di un file che contengono un stringa.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""stringa"" [ file... ]\n\
- /C Conta il numero di linee che contengono la stringa\n\
- /I Ignora maiuscole/minuscole\n\
- /N Numera le linee visualizzate a partire da 1\n\
- /V Visualizza le linee che non contengono la stringa"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""stringa"" [file...]\n\
+ /V Visualizza le linee che non contengono la stringa.\n\
+ /C Conta il numero di linee che contengono la stringa.\n\
+ /N Numera le linee visualizzate a partire da 1.\n\
+ /I Ignora maiuscole/minuscole.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: File non trovato\n"
IDS_CANNOT_OPEN "FIND: %s: Impossibile aprire il file\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/lt-LT.rc b/base/applications/cmdutils/find/lang/lt-LT.rc
index 4c9426f5b54..2d95ccb4b8c 100644
--- a/base/applications/cmdutils/find/lang/lt-LT.rc
+++ b/base/applications/cmdutils/find/lang/lt-LT.rc
@@ -12,11 +12,13 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Spausdina visas bylos eilutes, kuriose yra ieškomas tekstas.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""tekstas"" [ byla... ]\n\
- /C Skaičiuoti eilutes, kuriose yra ieškomas tekstas\n\
- /I Ignoruoti raidžių dydį\n\
- /N Numeruoti vaizduojamas eilutes, pradedant nuo 1\n\
- /V Spausdinti eilutes, kuriose nėra ieškomo teksto"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""tekstas"" [byla...]\n\
+ /V Spausdinti eilutes, kuriose nėra ieškomo teksto.\n\
+ /C Skaičiuoti eilutes, kuriose yra ieškomas tekstas.\n\
+ /N Numeruoti vaizduojamas eilutes, pradedant nuo 1.\n\
+ /I Ignoruoti raidžių dydį.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Tokios bylos nėra\n"
IDS_CANNOT_OPEN "FIND: %s: Nepavyko atverti bylos\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/no-NO.rc b/base/applications/cmdutils/find/lang/no-NO.rc
index aabcb2b0d42..8638bf51405 100644
--- a/base/applications/cmdutils/find/lang/no-NO.rc
+++ b/base/applications/cmdutils/find/lang/no-NO.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FINN: Skriv alle linjene for filen som inneholder en streng.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""streng"" [ fil... ]\n\
- /C Teller nummer av linjer som inneholder strenger\n\
- /I Ignorere sak\n\
- /N Nummer viste linjer, start med 1\n\
- /V Skriv linjer som ikke inneholder en streng"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""streng"" [fil...]\n\
+ /V Skriv linjer som ikke inneholder en streng.\n\
+ /C Teller nummer av linjer som inneholder strenger.\n\
+ /N Nummer viste linjer, start med 1.\n\
+ /I Ignorere sak.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FINN: %s: Ingen filer\n"
IDS_CANNOT_OPEN "FINN: %s: Kan ikke åpne filen\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/pl-PL.rc b/base/applications/cmdutils/find/lang/pl-PL.rc
index bf10a5ecbc9..a108973d50e 100644
--- a/base/applications/cmdutils/find/lang/pl-PL.rc
+++ b/base/applications/cmdutils/find/lang/pl-PL.rc
@@ -11,11 +11,13 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Wyświetla wszystkie linie danego pliku, zawierające szukany ciąg znaków.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""ciąg znaków"" [ plik... ]\n\
- /C Oblicza w ilu liniach pojawił się szukany ciąg znaków\n\
- /I Ignoruje wielkość liter\n\
- /N Numeruje wyświetlane linie, zaczynając od 1\n\
- /V Wyświetla te linie, które nie zawierają szukanego ciągu znaków"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""ciąg znaków"" [plik...]\n\
+ /V Wyświetla te linie, które nie zawierają szukanego ciągu znaków.\n\
+ /C Oblicza w ilu liniach pojawił się szukany ciąg znaków.\n\
+ /N Numeruje wyświetlane linie, zaczynając od 1.\n\
+ /I Ignoruje wielkość liter.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Plik nie został znaleziony\n"
IDS_CANNOT_OPEN "FIND: %s: Nie można otworzyć pliku\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/pt-BR.rc b/base/applications/cmdutils/find/lang/pt-BR.rc
index d59bf5ca4e0..5ae45b35b89 100644
--- a/base/applications/cmdutils/find/lang/pt-BR.rc
+++ b/base/applications/cmdutils/find/lang/pt-BR.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Localiza uma seqüência de texto em um ou mais arquivos.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""seqüência"" [ arquivo... ]\n\
- /C Exibe apenas o número de linhas que contêm a seqüência.\n\
- /I Ignora maiúsculas/minúsculas ao localizar uma seqüência.\n\
- /N Exibe o número de cada linha, iniciando no 1.\n\
- /V Exibe todas as linhas que NÃO contêm a seqüência especificada."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""seqüência"" [arquivo...]\n\
+ /V Exibe todas as linhas que NÃO contêm a seqüência especificada.\n\
+ /C Exibe apenas o número de linhas que contêm a seqüência.\n\
+ /N Exibe o número de cada linha, iniciando no 1.\n\
+ /I Ignora maiúsculas/minúsculas ao localizar uma seqüência.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Arquivo não encontrado\n"
IDS_CANNOT_OPEN "FIND: %s: Não foi possível abrir o arquivo\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/ro-RO.rc b/base/applications/cmdutils/find/lang/ro-RO.rc
index 5b35622b1cb..2a953f347dc 100644
--- a/base/applications/cmdutils/find/lang/ro-RO.rc
+++ b/base/applications/cmdutils/find/lang/ro-RO.rc
@@ -11,11 +11,13 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Tipărește toate rândurile unui fișier ce conțin un șir.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""șir"" [ fișier... ]\n\
- /C Numără liniile ce conțin șirul.\n\
- /I Ignoră diferențele între majuscule și minuscule.\n\
- /N Numără rândurile afișate, începând cu 1.\n\
- /V Tipărește rândurile ce nu conțin șirul."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""șir"" [fișier...]\n\
+ /V Tipărește rândurile ce nu conțin șirul.\n\
+ /C Numără liniile ce conțin șirul.\n\
+ /N Numără rândurile afișate, începând cu 1.\n\
+ /I Ignoră diferențele între majuscule și minuscule.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: Fișierul «%s» nu există!\n"
IDS_CANNOT_OPEN "FIND: Fișierul «%s» nu poate fi deschis!\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/ru-RU.rc b/base/applications/cmdutils/find/lang/ru-RU.rc
index 347e3d1387c..83061e886c0 100644
--- a/base/applications/cmdutils/find/lang/ru-RU.rc
+++ b/base/applications/cmdutils/find/lang/ru-RU.rc
@@ -3,14 +3,16 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Поиск текстовой строки в одном или нескольких файлах.\n\n\
-FIND [/V] [/C] [/N] [/I] ""строка"" [[диск:][путь]имя_файла[ ...]]\n\
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""строка"" [[диск:][путь]имя_файла[ ...]]\n\
/V Вывод всех строк, НЕ содержащих заданную строку.\n\
/C Вывод только общего числа строк, содержащих заданную строку.\n\
/N Вывод номеров отображаемых строк.\n\
/I Поиск без учета регистра символов.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set.\n\
""строка"" Искомая строка.\n\
[диск:][путь]имя_файла\n\
Один или несколько файлов, в которых выполняется поиск."
IDS_NO_SUCH_FILE "FIND: %s: Файл не существует.\n"
IDS_CANNOT_OPEN "FIND: %s: Невозможно открыть файл.\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/sk-SK.rc b/base/applications/cmdutils/find/lang/sk-SK.rc
index 4354eac9547..c6825a584fc 100644
--- a/base/applications/cmdutils/find/lang/sk-SK.rc
+++ b/base/applications/cmdutils/find/lang/sk-SK.rc
@@ -7,11 +7,13 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Zobrazí všetky riadky súboru obsahujúce hľadaný reťazec.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""reťazec"" [ súbor... ]\n\
- /C Zobrazí počet riadkov, ktoré obsahujú reťazec.\n\
- /I Ignoruje veľkosť písmen.\n\
- /N Čísluje zobrazené riadky, začína od 1.\n\
- /V Zobrazí všetky riadky, ktoré neobsahujú hľadaný reťazec."
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""reťazec"" [súbor...]\n\
+ /V Zobrazí všetky riadky, ktoré neobsahujú hľadaný reťazec.\n\
+ /C Zobrazí počet riadkov, ktoré obsahujú reťazec.\n\
+ /N Čísluje zobrazené riadky, začína od 1.\n\
+ /I Ignoruje veľkosť písmen.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: Súbor %s sa nenašiel.\n"
IDS_CANNOT_OPEN "FIND: Súbor %s sa nedá otvoriť.\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/sq-AL.rc b/base/applications/cmdutils/find/lang/sq-AL.rc
index 0b1bc1aa645..6a010cccdd6 100644
--- a/base/applications/cmdutils/find/lang/sq-AL.rc
+++ b/base/applications/cmdutils/find/lang/sq-AL.rc
@@ -7,11 +7,13 @@ LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Printon të gjitha linjat e një skedari që përmbajnë një fije.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""fije"" [ file... ]\n\
- /C Numërimi i numerave e linjave që përmbajnë nje fije\n\
- /I Injorojnë çështjen\n\
- /N Shfaq numrin e linjave, duke filluar nga 1\n\
- /V Shfaq linjat e nuk permbajne nje fije"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""fije"" [file...]\n\
+ /V Shfaq linjat e nuk permbajne nje fije.\n\
+ /C Numërimi i numerave e linjave që përmbajnë nje fije.\n\
+ /N Shfaq numrin e linjave, duke filluar nga 1.\n\
+ /I Injorojnë çështjen.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Dokumenti nuk i gjet\n"
IDS_CANNOT_OPEN "FIND: %s: E pamundur te hapet dokumenti\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/sv-SE.rc b/base/applications/cmdutils/find/lang/sv-SE.rc
index 329a597bb6f..94d3c97410b 100644
--- a/base/applications/cmdutils/find/lang/sv-SE.rc
+++ b/base/applications/cmdutils/find/lang/sv-SE.rc
@@ -3,11 +3,13 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Skriver ut alla rader i en fil som innehåller en sträng.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""sträng"" [ fil... ]\n\
- /C Räkna antalet rader som innehåller en strängen\n\
- /I Ignorera skiftläge\n\
- /N Antal visade rader, börjar på 1\n\
- /V Skriver ut rader som inte innehåller strängen"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""sträng"" [fil...]\n\
+ /V Skriver ut rader som inte innehåller strängen.\n\
+ /C Räkna antalet rader som innehåller en strängen.\n\
+ /N Antal visade rader, börjar på 1.\n\
+ /I Ignorera skiftläge.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Ingen sorts fil\n"
IDS_CANNOT_OPEN "FIND: %s: Kan inte öppna filen\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/tr-TR.rc b/base/applications/cmdutils/find/lang/tr-TR.rc
index fd2c8a71e30..a97c4571df5 100644
--- a/base/applications/cmdutils/find/lang/tr-TR.rc
+++ b/base/applications/cmdutils/find/lang/tr-TR.rc
@@ -5,11 +5,13 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Bir dizgi içeren bir kütüğün tüm yataçlarını yazdırır.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""dizgi"" [ kütük... ]\n\
- /C Dizgi içeren yataç sayısını say\n\
- /I Büyük-küçük harfliği yok say\n\
- /N 1'den başlayan, görüntülenen yataç sayısı\n\
- /V Dizgi içermeyen yataçları yazdır"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""dizgi"" [kütük...]\n\
+ /V Dizgi içermeyen yataçları yazdır.\n\
+ /C Dizgi içeren yataç sayısını say.\n\
+ /N 1'den başlayan, görüntülenen yataç sayısı.\n\
+ /I Büyük-küçük harfliği yok say.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Böyle dosya yok\n"
IDS_CANNOT_OPEN "FIND: %s: Kütük açılamıyor\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/uk-UA.rc b/base/applications/cmdutils/find/lang/uk-UA.rc
index 82e57043b76..7e7643d0a24 100644
--- a/base/applications/cmdutils/find/lang/uk-UA.rc
+++ b/base/applications/cmdutils/find/lang/uk-UA.rc
@@ -11,11 +11,13 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FIND: Виведення всіх рядків файлу, які містять рядок.\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""рядок"" [ файл... ]\n\
- /C Порахувати кількість рядків, які містять рядок\n\
- /I Не враховувати регістр символів\n\
- /N Нумерувати рядки, які відображаються (починаючи з 1)\n\
- /V Виведення рядків, які не містять заданий рядок"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""рядок"" [файл...]\n\
+ /V Виведення рядків, які не містять заданий рядок.\n\
+ /C Порахувати кількість рядків, які містять рядок.\n\
+ /N Нумерувати рядки, які відображаються (починаючи з 1).\n\
+ /I Не враховувати регістр символів.\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: Файл не існує\n"
IDS_CANNOT_OPEN "FIND: %s: Неможливо відкрити файл\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/zh-CN.rc b/base/applications/cmdutils/find/lang/zh-CN.rc
index 4e394e8b74b..e3822f89a3d 100644
--- a/base/applications/cmdutils/find/lang/zh-CN.rc
+++ b/base/applications/cmdutils/find/lang/zh-CN.rc
@@ -5,11 +5,13 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
BEGIN
IDS_USAGE "FIND: 输出某文件中包含指定字符串的所有行。\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""字符串"" [ 文件... ]\n\
- /C 计算包含该字符串的行数\n\
- /I 忽略大小写\n\
- /N 从 1 开始为显示的行编号\n\
- /V 输出不包含该指定字符串的行"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""字符串"" [文件...]\n\
+ /V 输出不包含该指定字符串的行。\n\
+ /C 计算包含该字符串的行数。\n\
+ /N 从 1 开始为显示的行编号。\n\
+ /I 忽略大小写。\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: 没有这个文件\n"
IDS_CANNOT_OPEN "FIND: %s: 无法打开文件\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/lang/zh-TW.rc b/base/applications/cmdutils/find/lang/zh-TW.rc
index 55d618bf5c8..cd2c7b859d3 100644
--- a/base/applications/cmdutils/find/lang/zh-TW.rc
+++ b/base/applications/cmdutils/find/lang/zh-TW.rc
@@ -5,11 +5,13 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
BEGIN
IDS_USAGE "FIND: 輸出某檔中包含指定字串的所有行。\n\n\
- FIND [ /C ] [ /I ] [ /N ] [ /V ] ""字串"" [ 文件... ]\n\
- /C 計算包含該字串的行數\n\
- /I 忽略大小寫\n\
- /N 從 1 開始為顯示的行編號\n\
- /V 輸出不包含該指定字串的行"
+FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] ""字串"" [文件...]\n\
+ /V 輸出不包含該指定字串的行。\n\
+ /C 計算包含該字串的行數。\n\
+ /N 從 1 開始為顯示的行編號。\n\
+ /I 忽略大小寫。\n\
+ /OFF[LINE] Do not skip files that have the offline attribute set."
IDS_NO_SUCH_FILE "FIND: %s: 沒有這個檔\n"
IDS_CANNOT_OPEN "FIND: %s: 無法開啟檔\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\n"
END
diff --git a/base/applications/cmdutils/find/resource.h b/base/applications/cmdutils/find/resource.h
index 99e8f2d0472..2dba86fc14e 100644
--- a/base/applications/cmdutils/find/resource.h
+++ b/base/applications/cmdutils/find/resource.h
@@ -1,5 +1,6 @@
#pragma once
-#define IDS_USAGE 1000
-#define IDS_NO_SUCH_FILE 1001
-#define IDS_CANNOT_OPEN 1002
+#define IDS_USAGE 1000
+#define IDS_NO_SUCH_FILE 1001
+#define IDS_CANNOT_OPEN 1002
+#define IDS_INVALID_SWITCH 1003
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0bcf43482b8121cdd31ea…
commit 0bcf43482b8121cdd31ea582c0704c61be0e686f
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Mon May 13 08:33:00 2019 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Mon May 13 08:35:23 2019 +0200
[APPVEYOR] Disable the clang-cl
The compiler hits an assert while building a file
The two "officially" supported compilers are working though
This will bring back green status for our CI on GitHub
---
appveyor.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 9abbb299ff..1c05af1dd2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,8 +2,8 @@ environment:
matrix:
- BuildType: "msvc-x64"
- BuildType: "msvc"
- - BuildType: "clang-cl"
-# - BuildType: vssolution
+# - BuildType: "clang-cl"
+# - BuildType: vssolution
version: reactos.appveyor.{build}
skip_branch_with_pr: true