[CLIP]: Check read status before number of bytes read. Update main resource file.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 22 Oct 2016 21:42:13 +0000 (21:42 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 22 Oct 2016 21:42:13 +0000 (21:42 +0000)
[COMP]: Code style fix; remove an unused define.
[EVENTCREATE]: Remove an unused define.

[HELP]
- Remove unneeded headers; minor code formatting.
- Remove an unused define.
- Add placeholder Czech resource translation.

[MODE]: Update translation (part 2/x); show the keyboard rate before the delay.

svn path=/trunk/; revision=73022

12 files changed:
reactos/base/applications/cmdutils/clip/clip.c
reactos/base/applications/cmdutils/clip/clip.rc
reactos/base/applications/cmdutils/comp/comp.c
reactos/base/applications/cmdutils/comp/resource.h
reactos/base/applications/cmdutils/eventcreate/resource.h
reactos/base/applications/cmdutils/help/help.c
reactos/base/applications/cmdutils/help/help.rc
reactos/base/applications/cmdutils/help/lang/cs-CZ.rc [new file with mode: 0644]
reactos/base/applications/cmdutils/help/resource.h
reactos/base/applications/cmdutils/mode/lang/de-DE.rc
reactos/base/applications/cmdutils/mode/lang/en-US.rc
reactos/base/applications/cmdutils/mode/resource.h

index 5be3401..381f87b 100644 (file)
@@ -89,7 +89,7 @@ int wmain(int argc, wchar_t** argv)
 
         hBuffer = hTemp;
     }
-    while (dwBytesRead > 0 && bStatus);
+    while (bStatus && dwBytesRead > 0);
 
     /*
      * Resize the buffer to the total size of data read.
index 2a5d01d..f919e7e 100644 (file)
@@ -2,9 +2,11 @@
 
 #include "resource.h"
 
-#define REACTOS_STR_FILE_DESCRIPTION  "ReactOS Clip Command"
-#define REACTOS_STR_INTERNAL_NAME     "clip"
-#define REACTOS_STR_ORIGINAL_FILENAME "clip.exe"
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#define REACTOS_STR_FILE_DESCRIPTION    "ReactOS Clip Command"
+#define REACTOS_STR_INTERNAL_NAME       "clip"
+#define REACTOS_STR_ORIGINAL_FILENAME   "clip.exe"
 #include <reactos/version.rc>
 
 /* UTF-8 */
index cef21fb..5e6b4aa 100644 (file)
@@ -38,7 +38,7 @@
 
 #define STRBUF 1024
 
-/* getline:  read a line, return length */
+/* getline: read a line, return length */
 INT GetBuff(PBYTE buff, FILE* in)
 {
     return fread(buff, sizeof(BYTE), STRBUF, in);
@@ -56,7 +56,7 @@ INT FileSize(FILE* fd)
 }
 
 
-int wmain (int argc, WCHAR* argv[])
+int wmain(int argc, WCHAR* argv[])
 {
     INT i;
 
@@ -202,13 +202,9 @@ int wmain (int argc, WCHAR* argv[])
 
                 /* Reporting here a mismatch */
                 if (bLineNos)
-                {
                     ConResPrintf(StdOut, IDS_MISMATCHLINE, LineNumber);
-                }
                 else
-                {
                     ConResPrintf(StdOut, IDS_MISMATCHOFFSET, Offset);
-                }
 
                 if (bAscii)
                 {
index 56fce5b..27732ae 100644 (file)
@@ -1,7 +1,5 @@
 #pragma once
 
-#define RC_STRING_MAX_SIZE 4096
-
 #define IDS_HELP            100
 #define IDS_INVALIDSWITCH   101
 #define IDS_BADSYNTAX       102
index dd7c84b..22a3983 100644 (file)
@@ -1,7 +1,5 @@
 #pragma once
 
-#define RC_STRING_MAX_SIZE 4096
-
 #define IDS_USAGE           100
 #define IDS_HELP            101
 #define IDS_INVALIDSWITCH   102
index 6113766..9e6b38c 100644 (file)
@@ -7,9 +7,7 @@
  *                  Hermes Belusca-Maito (hermes.belusca@sfr.fr)
  */
 
-#include <stdio.h>
 #include <stdlib.h>
-#include <wchar.h>
 
 #define WIN32_NO_STATUS
 #include <windef.h>
@@ -22,7 +20,8 @@
 #include "help.h"
 #include "resource.h"
 
-BOOL IsInternalCommand(LPCWSTR Cmd)
+static BOOL
+IsInternalCommand(PCWSTR Cmd)
 {
     size_t i;
     int res;
@@ -73,7 +72,7 @@ int wmain(int argc, WCHAR* argv[])
 
     /*
      * Bad usage (too much options) or we use the /? switch.
-     * Display help for the help command.
+     * Display help for the HELP command.
      */
     if ((argc > 2) || (wcscmp(argv[1], L"/?") == 0))
     {
index 73b9e3b..e0b2279 100644 (file)
@@ -5,9 +5,9 @@
 
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
-#define REACTOS_STR_FILE_DESCRIPTION  "ReactOS Command Line Help Utility"
-#define REACTOS_STR_INTERNAL_NAME     "help"
-#define REACTOS_STR_ORIGINAL_FILENAME "help.exe"
+#define REACTOS_STR_FILE_DESCRIPTION    "ReactOS Command Line Help Utility"
+#define REACTOS_STR_INTERNAL_NAME       "help"
+#define REACTOS_STR_ORIGINAL_FILENAME   "help.exe"
 #include <reactos/version.rc>
 
 /* UTF-8 */
diff --git a/reactos/base/applications/cmdutils/help/lang/cs-CZ.rc b/reactos/base/applications/cmdutils/help/lang/cs-CZ.rc
new file mode 100644 (file)
index 0000000..5784eb3
--- /dev/null
@@ -0,0 +1,73 @@
+
+LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
+
+STRINGTABLE
+BEGIN
+    IDS_NO_ENTRY "This command is not supported by the help utility.\nTry ""%s /?""\n."
+END
+
+STRINGTABLE
+BEGIN
+    IDS_USAGE "Provides Help information for ReactOS commands.\n\n\
+HELP [command]\n\n\
+  command - Display help information for this command.\n"
+    IDS_HELP1 "List of all available commands (+ description)\n\n\
+  help command\n\
+  command /?     For more information on a specific command\n\n\
+?        List all available commands (without description).\n\
+ALIAS    Sets, removes or shows aliases.\n\
+ATTRIB   Displays or changes file attributes.\n\
+BEEP     Beep the speaker.\n\
+CALL     Calls one batch program from another.\n\
+CD       Displays the name of or changes the current directory.\n\
+CHCP     Displays or sets the active code page number.\n\
+CHOICE   Waits for the user to choose one of a set of choices.\n\
+CLS      Clears the screen.\n\
+CMD      Starts a new instance of the ReactOS command interpreter.\n\
+COLOR    Sets the default console foreground and background colors.\n\
+COPY     Copies one or more files to another location.\n\
+DATE     Displays or sets the date.\n\
+DELETE   Deletes one or more files.\n\
+DIR      Displays a list of files and subdirectories in a directory.\n\
+ECHO     Displays messages, or turns command echoing on or off.\n\
+ERASE    Deletes one or more files.\n\
+EXIT     Quits the CMD.EXE program (command interpreter).\n\
+FOR      Runs a specified command for each file in a set of files.\n\
+FREE     (free) disc space.\n\
+GOTO     Directs the ReactOS command interpreter to a labeled line in\n\
+         a batch program.\n\
+HELP     Provides Help information for ReactOS commands.\n\
+HISTORY  List all commands which has been used\n\
+IF       Performs conditional processing in batch programs.\n\
+LABEL    Creates, changes, or deletes the volume label of a disk.\n\
+MD       Creates a directory.\n\
+MKDIR    Creates a directory.\n\
+MKLINK   Creates a filesystem link object.\n\
+MOVE     Moves one or more files from one directory to another\n\
+         directory.\n\
+PATH     Displays or sets a search path for executable files.\n\
+PAUSE    Suspends processing of a batch file and displays a message.\n\
+POPD     Restores the previous value of the current directory saved by\n\
+         PUSHD.\n\
+PROMPT   Changes the command prompt.\n\
+PUSHD    Saves the current directory then changes it.\n\
+RD       Removes a directory.\n\
+REM      Records comments (remarks) in batch files.\n\
+REN      Renames a file or files.\n\
+RENAME   Renames a file or files.\n\
+REPLACE  Replaces files.\n\
+RMDIR    Removes a directory.\n\
+SCREEN   Move cursor and optionally print text.\n\
+SET      Displays, sets, or removes ReactOS environment variables.\n\
+SHIFT    Shifts the position of replaceable parameters in batch files.\n"
+    IDS_HELP2 "START    Starts a separate window to run a specified program or command.\n\
+         Executes command.\n\
+TIME     Displays or sets the system time.\n\
+TIMER    Allow the use of ten stopwatches.\n\
+TITLE    Sets the window title for a CMD.EXE session.\n\
+TYPE     Displays the contents of a text file.\n\
+VER      Displays the ReactOS version.\n\
+VERIFY   Tells ReactOS whether to verify that your files are written\n\
+         correctly to a disk.\n\
+VOL      Displays a disk volume label and serial number.\n"
+END
index 5a0843f..51d2244 100644 (file)
@@ -1,7 +1,5 @@
 #pragma once
 
-#define RC_STRING_MAX_SIZE 4096
-
 #define IDS_USAGE 100
 #define IDS_HELP1 101
 #define IDS_HELP2 102
index 2327496..48ae8bc 100644 (file)
@@ -42,11 +42,11 @@ BEGIN
     IDS_COM_STATUS_DTR_CIRCUIT      "    DTR circuit:     %s\n"
     IDS_COM_STATUS_RTS_CIRCUIT      "    RTS circuit:     %s\n"
 
-    IDS_CONSOLE_STATUS_LINES    "    Zeilen:          %d\n"
-    IDS_CONSOLE_STATUS_COLS     "    Spalten:         %d\n"
-    IDS_CONSOLE_KBD_DELAY       "    Verzögerungszeit:%ld\n"
-    IDS_CONSOLE_KBD_RATE        "    Wiederholrate:   %ld\n"
-    IDS_CONSOLE_CODEPAGE        "    Codepage:        %d\n"
+    IDS_CONSOLE_STATUS_LINES    "    Zeilen:           %d\n"
+    IDS_CONSOLE_STATUS_COLS     "    Spalten:          %d\n"
+    IDS_CONSOLE_KBD_RATE        "    Wiederholrate:    %ld\n"
+    IDS_CONSOLE_KBD_DELAY       "    Verzögerungszeit: %ld\n"
+    IDS_CONSOLE_CODEPAGE        "    Codepage:         %d\n"
 
     IDS_PRINTER_OUTPUT_NOT_REROUTED     "    Druckausgabe wird nicht umgeleitet.\n"
     IDS_PRINTER_OUTPUT_REROUTED_SERIAL  "    Druckausgabe wird an seriellen Anschluss %s umgeleitet.\n"
@@ -64,4 +64,5 @@ BEGIN
     IDS_ERROR_INVALID_PARITY_BITS "ERROR: Invalid value for Parity Bits %d:\n"
     IDS_ERROR_INVALID_STOP_BITS "ERROR: Invalid value for Stop Bits %d:\n"
     IDS_ERROR_NO_MEMORY "ERROR: Not enough memory.\n"
+    IDS_ERROR_SCREEN_LINES_COL "ERROR: The screen cannot be set to the number of lines and columns specified.\n"
 END
index 8d8a137..36cb76a 100644 (file)
@@ -44,8 +44,8 @@ BEGIN
 
     IDS_CONSOLE_STATUS_LINES    "    Lines:          %d\n"
     IDS_CONSOLE_STATUS_COLS     "    Columns:        %d\n"
-    IDS_CONSOLE_KBD_DELAY       "    Keyboard delay: %ld\n"
     IDS_CONSOLE_KBD_RATE        "    Keyboard rate:  %ld\n"
+    IDS_CONSOLE_KBD_DELAY       "    Keyboard delay: %ld\n"
     IDS_CONSOLE_CODEPAGE        "    Code page:      %d\n"
 
     IDS_PRINTER_OUTPUT_NOT_REROUTED     "    Printer output is not being rerouted.\n"
@@ -64,4 +64,5 @@ BEGIN
     IDS_ERROR_INVALID_PARITY_BITS "ERROR: Invalid value for Parity Bits %d:\n"
     IDS_ERROR_INVALID_STOP_BITS "ERROR: Invalid value for Stop Bits %d:\n"
     IDS_ERROR_NO_MEMORY "ERROR: Not enough memory.\n"
+    IDS_ERROR_SCREEN_LINES_COL "ERROR: The screen cannot be set to the number of lines and columns specified.\n"
 END
index 75a72e4..dac7821 100644 (file)
@@ -27,8 +27,8 @@
 #define IDS_COM_STATUS_RTS_CIRCUIT         16
 #define IDS_CONSOLE_STATUS_LINES           17
 #define IDS_CONSOLE_STATUS_COLS            18
-#define IDS_CONSOLE_KBD_DELAY              19
-#define IDS_CONSOLE_KBD_RATE               20
+#define IDS_CONSOLE_KBD_RATE               19
+#define IDS_CONSOLE_KBD_DELAY              20
 #define IDS_CONSOLE_CODEPAGE               21
 #define IDS_PRINTER_OUTPUT_NOT_REROUTED    22
 #define IDS_PRINTER_OUTPUT_REROUTED_SERIAL 23
@@ -43,5 +43,6 @@
 #define IDS_ERROR_INVALID_PARITY_BITS   31
 #define IDS_ERROR_INVALID_STOP_BITS     32
 #define IDS_ERROR_NO_MEMORY             33
+#define IDS_ERROR_SCREEN_LINES_COL      34
 
 #endif /* RESOURCE_H */