mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
db219e45c0
ConInString() should display a newline when it encounters the terminating carriage-return pressed by the user for ending string output. + Remove the extra \n hacks in FilePromptYN[A]. Improve outputted strings from DATE and TIME commands. + Rename some STRING_***_ERROR defines. CORE-18489
106 lines
2.4 KiB
C
106 lines
2.4 KiB
C
|
|
#pragma once
|
|
|
|
/* Cache codepage for text streams */
|
|
extern UINT InputCodePage;
|
|
extern UINT OutputCodePage;
|
|
|
|
/* Global console Screen and Pager */
|
|
extern CON_SCREEN StdOutScreen;
|
|
extern CON_PAGER StdOutPager;
|
|
|
|
// /* Global variables */
|
|
// extern BOOL bCtrlBreak;
|
|
// extern BOOL bIgnoreEcho;
|
|
// extern BOOL bExit;
|
|
|
|
VOID ConInDisable (VOID);
|
|
VOID ConInEnable (VOID);
|
|
VOID ConInFlush (VOID);
|
|
VOID ConInKey (PINPUT_RECORD);
|
|
VOID ConInString (LPTSTR, DWORD);
|
|
|
|
|
|
VOID ConOutChar(TCHAR);
|
|
VOID ConErrChar(TCHAR);
|
|
|
|
VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...);
|
|
|
|
#define ConOutPuts(szStr) \
|
|
ConPuts(StdOut, (szStr))
|
|
|
|
#define ConErrPuts(szStr) \
|
|
ConPuts(StdErr, (szStr))
|
|
|
|
#define ConOutResPuts(uID) \
|
|
ConResPuts(StdOut, (uID))
|
|
|
|
#define ConErrResPuts(uID) \
|
|
ConResPuts(StdErr, (uID))
|
|
|
|
#define ConOutPrintf(szStr, ...) \
|
|
ConPrintf(StdOut, (szStr), ##__VA_ARGS__)
|
|
|
|
#define ConErrPrintf(szStr, ...) \
|
|
ConPrintf(StdErr, (szStr), ##__VA_ARGS__)
|
|
|
|
#define ConOutResPrintf(uID, ...) \
|
|
ConResPrintf(StdOut, (uID), ##__VA_ARGS__)
|
|
|
|
#define ConErrResPrintf(uID, ...) \
|
|
ConResPrintf(StdErr, (uID), ##__VA_ARGS__)
|
|
|
|
#define ConOutFormatMessage(MessageId, ...) \
|
|
ConFormatMessage(StdOut, (MessageId), ##__VA_ARGS__)
|
|
|
|
#define ConErrFormatMessage(MessageId, ...) \
|
|
ConFormatMessage(StdErr, (MessageId), ##__VA_ARGS__)
|
|
|
|
|
|
BOOL ConPrintfVPaging(PCON_PAGER Pager, BOOL StartPaging, LPTSTR szFormat, va_list arg_ptr);
|
|
BOOL __cdecl ConOutPrintfPaging(BOOL StartPaging, LPTSTR szFormat, ...);
|
|
VOID ConOutResPaging(BOOL StartPaging, UINT resID);
|
|
|
|
SHORT GetCursorX (VOID);
|
|
SHORT GetCursorY (VOID);
|
|
VOID GetCursorXY (PSHORT, PSHORT);
|
|
VOID SetCursorXY (SHORT, SHORT);
|
|
|
|
VOID GetScreenSize (PSHORT, PSHORT);
|
|
VOID SetCursorType (BOOL, BOOL);
|
|
|
|
|
|
#ifdef INCLUDE_CMD_COLOR
|
|
BOOL ConGetDefaultAttributes(PWORD pwDefAttr);
|
|
#endif
|
|
|
|
|
|
BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
|
|
|
|
#ifdef INCLUDE_CMD_BEEP
|
|
VOID ConRingBell(HANDLE hOutput);
|
|
#endif
|
|
|
|
#ifdef INCLUDE_CMD_COLOR
|
|
BOOL ConSetScreenColor(HANDLE hOutput, WORD wColor, BOOL bFill);
|
|
#endif
|
|
|
|
// TCHAR cgetchar (VOID);
|
|
// BOOL CheckCtrlBreak (INT);
|
|
|
|
// #define PROMPT_NO 0
|
|
// #define PROMPT_YES 1
|
|
// #define PROMPT_ALL 2
|
|
// #define PROMPT_BREAK 3
|
|
|
|
// INT FilePromptYN (UINT);
|
|
// INT FilePromptYNA (UINT);
|
|
|
|
SIZE_T ConGetTextWidthA(PCSTR pszText);
|
|
SIZE_T ConGetTextWidthW(PCWSTR pszText);
|
|
|
|
#ifdef UNICODE
|
|
#define ConGetTextWidth ConGetTextWidthW
|
|
#else
|
|
#define ConGetTextWidth ConGetTextWidthA
|
|
#endif
|