Go to the source code of this file.
◆ cmd_chdir()
Definition at line 240 of file internal.c.
241{
245
246
247
248
250 {
252 return 0;
253 }
254
255
256
257
258
259
260
261
262
263
264
265
267
269 {
270
273 --tmp;
274 *(tmp + 1) =
_T(
'\0');
275 }
276
277
279
280
282 {
284 {
286 return 1;
287 }
289 return 0;
290 }
291
292
295 {
297 return 0;
298 }
299
300
302 {
307 }
308
310 {
312 return 1;
313 }
314
315 return 0;
316}
VOID error_invalid_drive(VOID)
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
#define ConOutPrintf(szStr,...)
INT GetRootPath(IN LPCTSTR InPath, OUT LPTSTR OutPath, IN INT size)
BOOL SetRootPath(TCHAR *oldpath, TCHAR *InPath)
static VOID StripQuotes(LPSTR in)
#define GetCurrentDirectory
◆ cmd_mkdir()
Definition at line 360 of file internal.c.
361{
365
367 {
369 return 0;
370 }
371
374 {
378 return 1;
379 }
380
383 {
385 {
387 switch (dwLastError)
388 {
391 break;
392
396 break;
397
398 default:
400 }
402 }
403 }
404
407}
static VOID ErrorMessage(_In_ DWORD dwErrorCode, _In_opt_ PCWSTR pszMsg,...)
#define ConErrResPuts(uID)
#define ConErrResPrintf(uID,...)
BOOL MakeFullPath(TCHAR *DirPath)
#define STRING_MKDIR_HELP
#define STRING_ERROR_REQ_PARAM_MISSING
static VOID freep(LPSTR *p)
static LPSTR * split(LPSTR s, LPINT args)
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
#define ERROR_ALREADY_EXISTS
DWORD WINAPI GetLastError(void)
#define ERROR_PATH_NOT_FOUND
#define ERROR_FILE_EXISTS
◆ cmd_rmdir()
Definition at line 521 of file internal.c.
522{
532
534 {
536 return 0;
537 }
538
540 dirCount = 0;
541
542
544 {
546 {
547
549 {
551
554 else if (ch ==
_T(
'Q'))
556 }
557 }
558 else
559 {
560 dirCount++;
561 }
562 }
563
564 if (dirCount == 0)
565 {
566
569 return 1;
570 }
571
573 {
575 continue;
576
577 if (bRecurseDir)
578 {
579
580 if (!bQuiet)
581 {
584 {
585 nError = 1;
586 continue;
587 }
590 }
591
593 }
594 else
595 {
596
598 }
599
601 {
602
605 }
606 }
607
609 return nError;
610}
VOID error_req_param_missing(VOID)
BOOL DeleteFolder(LPTSTR Directory)
#define STRING_RMDIR_HELP
◆ CommandExit()
Definition at line 621 of file internal.c.
622{
624 {
626
627
629 return 0;
630 }
631
633 {
635
636
637
638
639
641 {
642
644
645#ifdef SUPPORT_EXIT_B_NO_EXTENSIONS
646
647
648
649
650
651
652
653
654
657#endif
658
660
661#ifdef SUPPORT_EXIT_B_NO_EXTENSIONS
662
664#endif
665 }
666 else
667 {
669 }
670 }
671 else
672 {
673
675 }
676
677
680
681
683 {
685
686 }
687
689}
◆ CommandRem()
Definition at line 695 of file internal.c.
696{
698 {
700 }
701
702 return 0;
703}
◆ CommandShowCommands()
Definition at line 707 of file internal.c.
708{
710 return 0;
711}
VOID PrintCommandList(VOID)
◆ DeleteFolder()
Definition at line 414 of file internal.c.
415{
421
423 pFileName = &szFullPath[
_tcslen(szFullPath)];
424
425
426
427
428 if (*szFullPath && *(pFileName - 1) !=
_T(
':') && *(pFileName - 1) !=
_T(
'\\'))
429 *pFileName++ =
_T(
'\\');
431
434 {
435 do
436 {
437
439 break;
440
443 {
444 continue;
445 }
446
448
449 dwAttribs =
f.dwFileAttributes;
450
452 {
454 {
455
457
458
459 }
460 }
461 else
462 {
463
466
468 {
469
471
472
474
475
476 }
477 }
478
481 }
482
483
486
487
488
489
490
491
493 szFullPath[1] ==
_T(
':') && szFullPath[2] ==
_T(
'\\'))
494 {
496 }
497
498
501
502
503
504
505
506
508 {
509
512 {
515 }
516 }
517
519}
#define INVALID_HANDLE_VALUE
#define ERROR_ACCESS_DENIED
BOOL WINAPI FindClose(HANDLE hFindFile)
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_DIRECTORY
base for all directory entries
#define GetFileAttributes
#define SetFileAttributes
Referenced by cmd_rmdir(), DECLARE_INTERFACE_(), and DeleteFolder().
◆ GetRootPath()
Definition at line 152 of file internal.c.
156{
157 if (InPath[0] && InPath[1] ==
_T(
':'))
158 {
160
161 if ((InPath[0] >=
_T(
'0')) && (InPath[0] <=
_T(
'9')))
162 {
163 t = (InPath[0] -
_T(
'0')) + 28;
164 }
165 else if ((InPath[0] >=
_T(
'a')) && (InPath[0] <=
_T(
'z')))
166 {
167 t = (InPath[0] -
_T(
'a')) + 1;
168 }
169 else if ((InPath[0] >=
_T(
'A')) && (InPath[0] <=
_T(
'Z')))
170 {
171 t = (InPath[0] -
_T(
'A')) + 1;
172 }
173
175 }
176
177
179}
Referenced by cmd_chdir(), cmd_copy(), cmd_replace(), CommandDelete(), GetDirectory(), and getPath().
◆ MakeFullPath()
Definition at line 325 of file internal.c.
326{
330
335
336
337 if (
p[0] &&
p[1] ==
_T(
':'))
339 while (*
p ==
_T(
'\\'))
341 do
342 {
349 {
351 }
353
355}
Referenced by cmd_mkdir().
◆ SetRootPath()
Definition at line 182 of file internal.c.
183{
187
189
190
192 {
195 }
196
198 {
199
200
201
202
203
204
205
206
208 }
209 else
210 {
212 }
213
214
215
217 {
222 }
223
224
227
229
234}
VOID GetPathCase(TCHAR *, TCHAR *)
#define ConErrFormatMessage(MessageId,...)
#define ERROR_FILE_NOT_FOUND
#define SetCurrentDirectory
Referenced by cmd_chdir(), and CommandPushd().