Go to the source code of this file.
|
TCHAR | cgetchar (VOID) |
|
VOID | GetPathCase (TCHAR *Path, TCHAR *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 184 of file misc.c.
185{
188
191 {
192 WARN(
"Cannot allocate memory for q!\n");
194 }
195
200 {
201 WARN(
"Cannot reallocate memory for arg!\n");
205 }
206
207
209 (*arg)[++(*ac)] =
NULL;
210
212}
#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::@3276 uChar
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
Referenced by CheckCtrlBreak(), cmd_pause(), and cmd_replace().
◆ CheckCtrlBreak()
Definition at line 132 of file misc.c.
133{
137
139 {
143
145 {
146 if (bLeaveAll)
148
151
153
155 do
156 {
159
161
163 {
166 }
167
168
169 bLeaveAll = ((
c ==
options[2]) || (
c ==
_T(
'\3')));
170 break;
171 }
172
176 break;
177 }
178
179
181}
#define ConOutResPuts(uID)
#define STRING_COPY_OPTION
#define STRING_CANCEL_BATCH_FILE
Referenced by cmd_copy(), CommandDir(), copy(), DirList(), DirPrintBareList(), DirPrintNewList(), DirPrintOldList(), DirPrintWideList(), ExitBatch(), ReadBatchLine(), ReadLine(), recReplace(), RemoveFile(), and replace().
◆ expand()
◆ FilePromptYN()
Definition at line 559 of file misc.c.
560{
562
563
564
567
568 if (resID != 0)
570
571
573
576 ;
577
579
584#if 0
585 else if (*
p ==
_T(
'\03'))
587#endif
588
590
591
592#if 0
595
596 do
597 {
599 cKey =
_totlower (ir.Event.KeyEvent.uChar.AsciiChar);
601 cKey = 0;
602
603
604 }
605 while ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_SHIFT) ||
606 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_MENU) ||
607 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_CONTROL));
608
611
612 if ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE) ||
613 ((ir.Event.KeyEvent.wVirtualKeyCode == 'C') &&
616
618#endif
619}
#define RC_STRING_MAX_SIZE
VOID AddBreakHandler(VOID)
VOID RemoveBreakHandler(VOID)
VOID ConInKey(PINPUT_RECORD lpBuffer)
#define ConOutResPrintf(uID,...)
#define STRING_CHOICE_OPTION
static VOID ConInString(LPWSTR lpInput, DWORD dwLength)
Referenced by DeleteFiles().
◆ FilePromptYNA()
Definition at line 622 of file misc.c.
623{
625
626
627
630
631 if (resID != 0)
633
634
636
639 ;
640
642
649#if 0
650 else if (*
p ==
_T(
'\03'))
652#endif
653
655
656
657#if 0
660
661 do
662 {
664 cKey =
_totlower (ir.Event.KeyEvent.uChar.AsciiChar);
666 cKey = 0;
667 }
668 while ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_SHIFT) ||
669 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_MENU) ||
670 (ir.Event.KeyEvent.wVirtualKeyCode ==
VK_CONTROL));
671
674
675 if ((ir.Event.KeyEvent.wVirtualKeyCode ==
VK_ESCAPE) ||
676 ((ir.Event.KeyEvent.wVirtualKeyCode ==
_T(
'C')) &&
679
681#endif
682}
Referenced by cmd_rmdir(), CopyOverwrite(), DeleteFiles(), MoveOverwrite(), and replace().
◆ freep()
◆ GetPathCase()
Definition at line 86 of file misc.c.
87{
94
96 {
98 {
101 continue;
102 }
103
104
105
106 if (
_tcslen(TempPath) == 2 && TempPath[1] ==
_T(
':'))
107 {
111 }
112 else
113 {
116 {
118 return;
119 }
121 _tcscat(OutPath, FindFileData.cFileName);
124 }
125 }
126}
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
Referenced by replace(), and SetRootPath().
◆ IsExistingDirectory()
◆ IsExistingFile()
Definition at line 498 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 482 of file misc.c.
483{
486
489
491
492 return bResult;
493}
#define SetCurrentDirectory
#define GetCurrentDirectory
◆ PagePrompt()
Definition at line 512 of file misc.c.
513{
514 SHORT iScreenWidth, iCursorY;
516
518
521
522 do
523 {
525 }
529
532
533
534
535
536
540 while (iScreenWidth-- > 0)
543
547 {
548
550
553 }
554
556}
VOID SetCursorXY(SHORT x, SHORT y)
VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
#define STRING_MISC_HELP1
◆ split()
Definition at line 282 of file misc.c.
283{
289
292 {
293 WARN(
"Cannot allocate memory for arg!\n");
295 }
297
298 ac = 0;
300 {
302
303
306
308
309
312
313
315 {
316
317 bQuoted ^= (*
s ==
_T(
'\"'));
318
319
320 if (!bQuoted)
321 {
322
325 (handle_plus && (*
s ==
_T(
'+'))))
326 {
327
329 break;
330 }
331 }
332
334 }
335
336
338 {
341 {
342 WARN(
"Cannot allocate memory for q!\n");
344 }
348 if (expand_wildcards && (
_T(
'/') != *
start) &&
350 {
352 {
356 }
357 }
358 else
359 {
361 {
365 }
366 }
368 }
369 }
370
372
374}
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
VOID StripQuotes(TCHAR *in)
◆ splitspace()
Definition at line 381 of file misc.c.
382{
388
391 {
392 WARN(
"Cannot allocate memory for arg!\n");
394 }
396
397 ac = 0;
399 {
401
402
405
407
408
410 {
411
412 bQuoted ^= (*
s ==
_T(
'\"'));
414 }
415
416
418 {
421 {
422 WARN(
"Cannot allocate memory for q!\n");
424 }
429 {
433 }
435 }
436 }
437
439
441}
Referenced by cmd_move(), and cmd_setlocal().
◆ StripQuotes()