- In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf.

- Also change FilePromptYN and FilePromptYNA to take a resource ID. Remove varargs code which nobody used (and didn't actually work anyway)

svn path=/trunk/; revision=34816
This commit is contained in:
Jeffrey Morlan 2008-07-26 22:49:49 +00:00
parent 33ab9a11a5
commit 198d88a60b
27 changed files with 127 additions and 234 deletions

View file

@ -24,7 +24,6 @@
INT cmd_label (LPTSTR cmd, LPTSTR param)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
TCHAR szRootPath[] = _T("A:\\");
TCHAR szLabel[80];
TCHAR szOldLabel[80];
@ -74,18 +73,15 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
/* print drive info */
if (szOldLabel[0] != _T('\0'))
{
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP2, szMsg, RC_STRING_MAX_SIZE);
ConOutPrintf(szMsg, _totupper(szRootPath[0]), szOldLabel);
ConOutResPrintf(STRING_LABEL_HELP2, _totupper(szRootPath[0]), szOldLabel);
}
else
{
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP3, szMsg, RC_STRING_MAX_SIZE);
ConOutPrintf(szMsg, _totupper(szRootPath[0]));
ConOutResPrintf(STRING_LABEL_HELP3, _totupper(szRootPath[0]));
}
/* print the volume serial number */
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP4, szMsg, RC_STRING_MAX_SIZE);
ConOutPrintf(szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
ConOutResPrintf(STRING_LABEL_HELP4, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
if (szLabel[0] == _T('\0'))
{