Remove all hardcode string to En.rc

svn path=/trunk/; revision=14869
This commit is contained in:
Magnus Olsen 2005-04-30 12:36:36 +00:00
parent 39458d7a85
commit 04dd142850
6 changed files with 60 additions and 22 deletions

View file

@ -350,12 +350,28 @@ STRING_PROMPT_HELP2, " $+ Displays the current depth of the directory stack"
STRING_PROMPT_HELP3, "\nType PROMPT without parameters to reset the prompt to the default setting."
STRING_REM_HELP, "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_RMDIR_HELP, "Removes a directory.\n\n \
RMDIR [drive:]path\nRD [drive:]path"
STRING_REM_HELP, "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_SHIFT_HELP, "Changes the position of replaceable parameters in a batch file.\n\n \
SHIFT [DOWN]"
STRING_SCREEN_HELP, "move cursor and optionally print text\n\n \
SCREEN row col [text]\n\n \
row row to wich move the cursor\n \
col column to wich move the cursor"
STRING_SET_HELP, "Displays, sets, or removes environment variables.\n\n \
SET [variable[=][string]]\n\n \
variable Specifies the environment-variable name.\n \
string Specifies a series of characters to assign to the variable.\n\n \
Type SET without parameters to display the current environment variables.\n"
STRING_TITLE_HELP, "Sets the window title for the command prompt window.\n\n \
TITLE [string]\n\n \
string Specifies the title for the command prompt window."

View file

@ -156,9 +156,17 @@
#define STRING_PROMPT_HELP2 668
#define STRING_PROMPT_HELP3 669
#define STRING_RMDIR_HELP 670
#define STRING_REM_HELP 670
#define STRING_REM_HELP 671
#define STRING_RMDIR_HELP 671
#define STRING_SCREEN_HELP 672
#define STRING_SHIFT_HELP 673
#define STRING_SET_HELP 674
#define STRING_TITLE_HELP 675

View file

@ -6,10 +6,13 @@
* 30 Aug 1999
* started - Paolo Pantaleo <paolopan@freemail.it>
*
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
* Remove all hardcode string to En.rc
*
*/
#include "precomp.h"
#include "resource.h"
#ifdef INCLUDE_CMD_SCREEN
@ -18,16 +21,13 @@ INT CommandScreen (LPTSTR cmd, LPTSTR param)
{
SHORT x,y;
BOOL bSkipText = FALSE;
WCHAR szMsg[RC_STRING_MAX_SIZE];
if (_tcsncmp (param, _T("/?"), 2) == 0)
{
ConOutPuts(_T(
"move cursor and optionally print text\n"
"\n"
"SCREEN row col [text]\n"
"\n"
" row row to wich move the cursor\n"
" col column to wich move the cursor"));
LoadString( GetModuleHandle(NULL), STRING_SCREEN_HELP, (LPTSTR) szMsg,sizeof(szMsg));
ConOutPuts((LPTSTR)szMsg);
return 0;
}

View file

@ -29,9 +29,13 @@
*
* 25-Feb-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed little bug.
*
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
* Remove all hardcode string to En.rc
*/
#include "precomp.h"
#include "resource.h"
#ifdef INCLUDE_CMD_SET
@ -43,14 +47,13 @@
INT cmd_set (LPTSTR cmd, LPTSTR param)
{
LPTSTR p;
WCHAR szMsg[RC_STRING_MAX_SIZE];
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutPuts (_T("Displays, sets, or removes environment variables.\n\n"
"SET [variable[=][string]]\n\n"
" variable Specifies the environment-variable name.\n"
" string Specifies a series of characters to assign to the variable.\n\n"
"Type SET without parameters to display the current environment variables.\n"));
LoadString( GetModuleHandle(NULL), STRING_SET_HELP, (LPTSTR) szMsg,sizeof(szMsg));
ConOutPuts ((LPTSTR)szMsg);
return 0;
}

View file

@ -18,9 +18,13 @@
*
* 20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Unicode and redirection safe!
*
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
* Remove all hardcode string to En.rc
*/
#include "precomp.h"
#include "resource.h"
/*
@ -30,18 +34,22 @@
*
* FREEDOS extension : optional parameter DOWN to allow shifting
* parameters backwards.
*
*/
INT cmd_shift (LPTSTR cmd, LPTSTR param)
{
WCHAR szMsg[RC_STRING_MAX_SIZE];
#ifdef _DEBUG
DebugPrintf (_T("cmd_shift: (\'%s\', \'%s\')\n"), cmd, param);
#endif
if (!_tcsncmp (param, _T("/?"), 2))
{
ConOutPuts (_T("Changes the position of replaceable parameters in a batch file.\n\n"
"SHIFT [DOWN]"));
LoadString( GetModuleHandle(NULL), STRING_SHIFT_HELP, (LPTSTR) szMsg,sizeof(szMsg));
ConOutPuts((LPTSTR)szMsg);
return 0;
}

View file

@ -4,15 +4,21 @@
*
* History:
* 1999-02-11 Emanuele Aliberti
*
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
* Remove all hardcode string to En.rc
*/
#include "precomp.h"
#include "resource.h"
#ifdef INCLUDE_CMD_TITLE
INT cmd_title (LPTSTR cmd, LPTSTR param)
{
WCHAR szMsg[RC_STRING_MAX_SIZE];
/* Do nothing if no args */
if (*param == _T('\0'))
return 0;
@ -20,11 +26,8 @@ INT cmd_title (LPTSTR cmd, LPTSTR param)
/* Asking help? */
if (!_tcsncmp(param, _T("/?"), 2))
{
ConOutPuts (_T("Sets the window title for the command prompt window.\n"
"\n"
"TITLE [string]\n"
"\n"
" string Specifies the title for the command prompt window."));
LoadString( GetModuleHandle(NULL), STRING_TITLE_HELP, (LPTSTR) szMsg,sizeof(szMsg));
ConOutPuts((LPTSTR)szMsg);
return 0;
}