From 1e9a958e2043a5b9ee702b72ff3a6d0e076cd9d3 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Mon, 19 Sep 2005 01:14:36 +0000 Subject: [PATCH] move hard-coded strings to En.rc before GreatLord shoots me svn path=/trunk/; revision=17925 --- reactos/subsys/system/cmd/En.rc | 6 ++++++ reactos/subsys/system/cmd/resource.h | 5 +++++ reactos/subsys/system/cmd/set.c | 10 +++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/reactos/subsys/system/cmd/En.rc b/reactos/subsys/system/cmd/En.rc index 820f242e837..8f63629c6a8 100644 --- a/reactos/subsys/system/cmd/En.rc +++ b/reactos/subsys/system/cmd/En.rc @@ -635,4 +635,10 @@ STRING_FOR_ERROR, "bad variable specification." STRING_SCREEN_COL, "invalid value for col" STRING_SCREEN_ROW, "invalid value for row" STRING_TIMER_TIME "Timer %d is %s: " + +STRING_INVALID_OPERAND, "Invalid operand.\n" +STRING_EXPECTED_CLOSE_PAREN, "Expected ')'.\n" +STRING_EXPECTED_NUMBER_OR_VARIABLE,"Expected number or variable name.\n" +STRING_SYNTAX_COMMAND_INCORRECT, "The syntax of the command is incorrect.\n" + } diff --git a/reactos/subsys/system/cmd/resource.h b/reactos/subsys/system/cmd/resource.h index d99398d6630..4e505547ab4 100644 --- a/reactos/subsys/system/cmd/resource.h +++ b/reactos/subsys/system/cmd/resource.h @@ -215,6 +215,11 @@ #define STRING_HELP1 718 #define STRING_HELP2 719 +#define STRING_INVALID_OPERAND 720 +#define STRING_EXPECTED_CLOSE_PAREN 721 +#define STRING_EXPECTED_NUMBER_OR_VARIABLE 722 +#define STRING_SYNTAX_COMMAND_INCORRECT 723 + /* These strings are language independent (cmd.rc) */ #define STRING_FREEDOS_DEV 800 #define STRING_REACTOS_DEV 801 diff --git a/reactos/subsys/system/cmd/set.c b/reactos/subsys/system/cmd/set.c index 82c3cadc3a4..43feed6999d 100644 --- a/reactos/subsys/system/cmd/set.c +++ b/reactos/subsys/system/cmd/set.c @@ -225,7 +225,7 @@ calc ( INT* lval, TCHAR op, INT rval ) *lval |= rval; break; default: - ConErrPrintf ( _T("Invalid operand.\n") ); + ConErrResPuts ( STRING_INVALID_OPERAND ); return FALSE; } return TRUE; @@ -246,7 +246,7 @@ seta_unaryTerm ( LPCTSTR* p_, INT* result ) return FALSE; if ( *p != _T(')') ) { - ConErrPrintf ( _T("Expected ')'\n") ); + ConErrResPuts ( STRING_EXPECTED_CLOSE_PAREN ); return FALSE; } *result = rval; @@ -267,7 +267,7 @@ seta_unaryTerm ( LPCTSTR* p_, INT* result ) } else { - ConErrPrintf ( _T("Expected number or variable name\n") ); + ConErrResPuts ( STRING_EXPECTED_NUMBER_OR_VARIABLE ); return FALSE; } *p_ = p; @@ -369,7 +369,7 @@ seta_bitAndTerm ( LPCTSTR* p_, INT* result ) lval >>= rval; break; default: - ConErrPrintf ( _T("Invalid operand.\n") ); + ConErrResPuts ( STRING_INVALID_OPERAND ); return FALSE; } } @@ -487,7 +487,7 @@ seta_eval ( LPCTSTR p ) INT rval; if ( !*p ) { - ConErrPrintf ( _T("The syntax of the command is incorrect.\n") ); + ConErrResPuts ( STRING_SYNTAX_COMMAND_INCORRECT ); return FALSE; } if ( !seta_stmt ( &p, &rval ) ) -- 2.17.1