#include <windows.h>
#include <tchar.h>
#include <stdlib.h>
#include <conutils.h>
#include "resource.h"
Go to the source code of this file.
◆ BUFF_SIZE
◆ ConOutFormatMessage
◆ ConOutResPrintf
◆ ConOutResPuts
◆ PROMPT_ALL
◆ PROMPT_BREAK
◆ PROMPT_NO
◆ PROMPT_YES
◆ RC_STRING_MAX_SIZE
#define RC_STRING_MAX_SIZE 3072 |
◆ WIN32_LEAN_AND_MEAN
◆ cgetchar()
Definition at line 242 of file util.c.
243{
247
248 do
249 {
253 {
256 {
258 {
260 break;
261 }
262 }
266 {
267
268 }
269 else
270 {
271 break;
272 }
273 }
274 }
276
277#ifndef _UNICODE
279#else
281#endif
282}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
union _KEY_EVENT_RECORD::@3295 uChar
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
Referenced by cmd_pause(), and cmd_replace().
◆ ConFormatMessage()
Definition at line 215 of file util.c.
216{
219
224 MessageId,
226 &arg_ptr);
228
231}
#define STRING_CONSOLE_ERROR
void ConResPrintf(FILE *fp, UINT nID,...)
INT ConMsgPrintfV(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, IN va_list *Arguments OPTIONAL)
#define LANG_USER_DEFAULT
#define FORMAT_MESSAGE_FROM_SYSTEM
◆ ConInString()
Definition at line 172 of file util.c.
173{
177
180
181#ifdef _UNICODE
183#else
184 pBuf = lpInput;
185#endif
189
191
193
194#ifdef _UNICODE
197#endif
198 for (
p = lpInput; *
p;
p++)
199 {
201 {
203 break;
204 }
205 }
206
208}
#define ReadFile(a, b, c, d, e)
#define MultiByteToWideChar
static DWORD DWORD * dwLength
BOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle, LPDWORD lpMode)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleMode(HANDLE hConsoleHandle, DWORD dwMode)
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleCP(VOID)
#define ENABLE_ECHO_INPUT
#define ENABLE_LINE_INPUT
#define ENABLE_PROCESSED_INPUT
◆ ConOutChar()
Definition at line 233 of file util.c.
234{
236}
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
Referenced by Batch(), CheckCtrlBreak(), ClearCommandLine(), cmd_pause(), cmd_set(), cmd_ver(), CommandEcho(), DumpCommand(), EchoCommand(), ExecuteCommandWithEcho(), Initialize(), PagePrompt(), PrintCommandList(), PrintPrompt(), ReadCommand(), and ReadLine().
◆ FilePromptYNA()
Definition at line 110 of file util.c.
111{
113
114
115
118
119 if (resID != 0)
121
122
124
127 ;
128
130
137#if 0
138 else if (*
p ==
_T(
'\03'))
140#endif
141
143
144
145#if 0
148
149 do
150 {
152 cKey =
_totlower (ir.Event.KeyEvent.uChar.AsciiChar);
154 cKey = 0;
155 }
156 while ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_SHIFT) ||
157 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_MENU) ||
158 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_CONTROL));
159
162
163 if ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE) ||
164 ((ir.Event.KeyEvent.wVirtualKeyCode ==
_T(
'C')) &&
167
169#endif
170}
#define RC_STRING_MAX_SIZE
#define STRING_COPY_OPTION
VOID ConInString(LPTSTR lpInput, DWORD dwLength)
VOID AddBreakHandler(VOID)
VOID RemoveBreakHandler(VOID)
VOID ConInKey(PINPUT_RECORD lpBuffer)
#define ConOutResPrintf(uID,...)
Referenced by cmd_rmdir(), CopyOverwrite(), DeleteFiles(), MoveOverwrite(), and replace().
◆ GetPathCase()
Definition at line 53 of file util.c.
54{
61
63 {
65 {
68 continue;
69 }
70
71
72
73 if (
_tcslen(TempPath) == 2 && TempPath[1] ==
_T(
':'))
74 {
78 }
79 else
80 {
83 {
85 return;
86 }
88 _tcscat(OutPath, FindFileData.cFileName);
91 }
92 }
93}
PRTL_UNICODE_STRING_BUFFER Path
#define INVALID_HANDLE_VALUE
BOOL WINAPI FindClose(HANDLE hFindFile)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by replace(), and SetRootPath().
◆ GetRootPath()
Definition at line 21 of file util.c.
25{
26 if (InPath[0] && InPath[1] ==
_T(
':'))
27 {
29
30 if ((InPath[0] >=
_T(
'0')) && (InPath[0] <=
_T(
'9')))
31 {
32 t = (InPath[0] -
_T(
'0')) + 28;
33 }
34 else if ((InPath[0] >=
_T(
'a')) && (InPath[0] <=
_T(
'z')))
35 {
36 t = (InPath[0] -
_T(
'a')) + 1;
37 }
38 else if ((InPath[0] >=
_T(
'A')) && (InPath[0] <=
_T(
'Z')))
39 {
40 t = (InPath[0] -
_T(
'A')) + 1;
41 }
42
44 }
45
46
48}
#define GetCurrentDirectory
Referenced by cmd_copy(), cmd_replace(), CommandDelete(), GetDirectory(), and getPath().
◆ IsExistingDirectory()
◆ IsExistingFile()
Definition at line 98 of file util.c.
Referenced by Cleanup(), cmd_copy(), cmd_move(), cmd_replace(), copy(), DoCommand(), Initialize(), recFindSubDirs(), recReplace(), replace(), and SearchForExecutableSingle().
◆ msg_pause()
◆ bCtrlBreak