Go to the source code of this file.
|
TCHAR | cgetchar (VOID) |
|
VOID | GetPathCase (IN LPCTSTR Path, OUT LPTSTR OutPath) |
|
BOOL | CheckCtrlBreak (INT mode) |
|
BOOL | add_entry (LPINT ac, LPTSTR **arg, LPCTSTR entry) |
|
static BOOL | expand (LPINT ac, LPTSTR **arg, LPCTSTR pattern) |
|
LPTSTR * | split (LPTSTR s, LPINT args, BOOL expand_wildcards, BOOL handle_plus) |
|
LPTSTR * | splitspace (LPTSTR s, LPINT args) |
|
VOID | freep (LPTSTR *p) |
|
LPTSTR | _stpcpy (LPTSTR dest, LPCTSTR src) |
|
VOID | StripQuotes (TCHAR *in) |
|
BOOL | IsValidPathName (IN LPCTSTR pszPath) |
|
BOOL | IsExistingFile (IN LPCTSTR pszPath) |
|
BOOL | IsExistingDirectory (IN LPCTSTR pszPath) |
|
BOOL __stdcall | PagePrompt (PCON_PAGER Pager, DWORD Done, DWORD Total) |
|
INT | FilePromptYN (UINT resID) |
|
INT | FilePromptYNA (UINT resID) |
|
◆ _stpcpy()
◆ add_entry()
Definition at line 198 of file misc.c.
199{
202
205 {
206 WARN(
"Cannot allocate memory for q!\n");
208 }
209
214 {
215 WARN(
"Cannot reallocate memory for arg!\n");
219 }
220
221
223 (*arg)[++(*ac)] =
NULL;
224
226}
#define cmd_realloc(ptr, size)
GLdouble GLdouble GLdouble GLdouble q
Referenced by expand(), split(), and splitspace().
◆ cgetchar()
Definition at line 41 of file misc.c.
42{
46
47 do
48 {
52 {
55 {
57 {
59 break;
60 }
61 }
65 {
66
67 }
68 else
69 {
70 break;
71 }
72 }
73 }
75
76#ifndef _UNICODE
78#else
80#endif
81}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
union _KEY_EVENT_RECORD::@3281 uChar
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
Referenced by CheckCtrlBreak(), cmd_pause(), and cmd_replace().
◆ CheckCtrlBreak()
Definition at line 146 of file misc.c.
147{
151
153 {
157
159 {
160 if (bLeaveAll)
162
165
167
169 do
170 {
173
175
177 {
180 }
181
182
183 bLeaveAll = ((
c ==
options[2]) || (
c ==
_T(
'\3')));
184 break;
185 }
186
190 break;
191 }
192
193
195}
#define STRING_COPY_OPTION
#define STRING_CANCEL_BATCH_FILE
#define ConOutResPuts(uID)
Referenced by cmd_copy(), CommandDir(), copy(), DirList(), DirPrintBareList(), DirPrintNewList(), DirPrintOldList(), DirPrintWideList(), ExitBatch(), ReadBatchLine(), ReadLine(), and RemoveFile().
◆ expand()
◆ FilePromptYN()
Definition at line 573 of file misc.c.
574{
576
577
578
581
582 if (resID != 0)
584
585
587
590 ;
591
593
598#if 0
599 else if (*
p ==
_T(
'\03'))
601#endif
602
604
605
606#if 0
609
610 do
611 {
613 cKey =
_totlower (ir.Event.KeyEvent.uChar.AsciiChar);
615 cKey = 0;
616
617
618 }
619 while ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_SHIFT) ||
620 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_MENU) ||
621 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_CONTROL));
622
625
626 if ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE) ||
627 ((ir.Event.KeyEvent.wVirtualKeyCode == 'C') &&
630
632#endif
633}
#define RC_STRING_MAX_SIZE
VOID AddBreakHandler(VOID)
VOID RemoveBreakHandler(VOID)
VOID ConInKey(PINPUT_RECORD lpBuffer)
#define STRING_CHOICE_OPTION
static VOID ConInString(LPWSTR lpInput, DWORD dwLength)
#define ConOutResPrintf(uID,...)
Referenced by DeleteFiles().
◆ FilePromptYNA()
Definition at line 636 of file misc.c.
637{
639
640
641
644
645 if (resID != 0)
647
648
650
653 ;
654
656
663#if 0
664 else if (*
p ==
_T(
'\03'))
666#endif
667
669
670
671#if 0
674
675 do
676 {
678 cKey =
_totlower (ir.Event.KeyEvent.uChar.AsciiChar);
680 cKey = 0;
681 }
682 while ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_SHIFT) ||
683 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_MENU) ||
684 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_CONTROL));
685
688
689 if ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE) ||
690 ((ir.Event.KeyEvent.wVirtualKeyCode ==
_T(
'C')) &&
693
695#endif
696}
Referenced by cmd_rmdir(), CopyOverwrite(), DeleteFiles(), MoveOverwrite(), and replace().
◆ freep()
◆ GetPathCase()
Definition at line 86 of file misc.c.
87{
95
96 *pchTemp = OutPath[0] = 0;
97
98 for (
i = 0;
i < cchPath; ++
i)
99 {
100 if (pchTemp + 1 >= pchTempEnd)
101 {
102
104 return;
105 }
106
108 {
109 *pchTemp++ =
Path[
i];
110 *pchTemp = 0;
111 if (
i != cchPath - 1)
112 continue;
113 }
114
115
116
117
118 if (TempPath[0] && TempPath[1] ==
_T(
':') && !TempPath[2])
119 {
123 }
124 else
125 {
128 {
130 return;
131 }
137 }
138 pchTemp = TempPath +
_tcslen(TempPath);
139 }
140}
PRTL_UNICODE_STRING_BUFFER Path
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
◆ IsExistingDirectory()
◆ IsExistingFile()
Definition at line 512 of file misc.c.
Referenced by Cleanup(), cmd_copy(), cmd_move(), cmd_replace(), copy(), DoCommand(), Initialize(), recFindSubDirs(), recReplace(), replace(), and SearchForExecutableSingle().
◆ IsValidPathName()
Definition at line 496 of file misc.c.
497{
500
503
505
506 return bResult;
507}
#define SetCurrentDirectory
#define GetCurrentDirectory
◆ PagePrompt()
Definition at line 526 of file misc.c.
527{
528 SHORT iScreenWidth, iCursorY;
530
532
535
536 do
537 {
539 }
543
546
547
548
549
550
554 while (iScreenWidth-- > 0)
557
561 {
562
564
567 }
568
570}
VOID SetCursorXY(SHORT x, SHORT y)
VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
#define STRING_MISC_HELP1
◆ split()
Definition at line 296 of file misc.c.
297{
303
306 {
307 WARN(
"Cannot allocate memory for arg!\n");
309 }
311
312 ac = 0;
314 {
316
317
320
322
323
326
327
329 {
330
331 bQuoted ^= (*
s ==
_T(
'\"'));
332
333
334 if (!bQuoted)
335 {
336
339 (handle_plus && (*
s ==
_T(
'+'))))
340 {
341
343 break;
344 }
345 }
346
348 }
349
350
352 {
355 {
356 WARN(
"Cannot allocate memory for q!\n");
358 }
362 if (expand_wildcards && (
_T(
'/') != *
start) &&
364 {
366 {
370 }
371 }
372 else
373 {
375 {
379 }
380 }
382 }
383 }
384
386
388}
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
VOID StripQuotes(TCHAR *in)
◆ splitspace()
Definition at line 395 of file misc.c.
396{
402
405 {
406 WARN(
"Cannot allocate memory for arg!\n");
408 }
410
411 ac = 0;
413 {
415
416
419
421
422
424 {
425
426 bQuoted ^= (*
s ==
_T(
'\"'));
428 }
429
430
432 {
435 {
436 WARN(
"Cannot allocate memory for q!\n");
438 }
443 {
447 }
449 }
450 }
451
453
455}
Referenced by cmd_move(), and cmd_setlocal().
◆ StripQuotes()