#ifdef __ATARI__
#define UPPERCASE /* define (e.g. for Atari) to convert filenames etc. to upper case */
-#endif
-
#define CHECK_SP
+#define HAVE_SUBDIRS
+#endif
#define KEYB_BUFSZ 80
#define PROMPT ">>> "
#ifndef __CC65__
#include <sys/stat.h>
#include <sys/param.h>
+#define HAVE_SUBDIRS
#else
#define MAXPATHLEN 64
#endif
{ "ls", CMD_LS },
{ "dir", CMD_LS },
{ "md", CMD_MKDIR },
+#ifdef HAVE_SUBDIRS
{ "mkdir", CMD_MKDIR },
{ "rd", CMD_RMDIR },
{ "rmdir", CMD_RMDIR },
{ "cd", CMD_CHDIR },
{ "chdir", CMD_CHDIR },
+#endif
{ "rm", CMD_RM },
{ "del", CMD_RM },
{ "cp", CMD_COPY },
{ "mv", CMD_RENAME },
{ "ren", CMD_RENAME },
{ "pwd", CMD_PWD },
-#ifdef __CC65__
+#ifdef __ATARI__
{ "cls", CMD_CLS },
#endif
{ "verbose", CMD_VERBOSE },
puts("cd, chdir - change directory or drive");
puts("md, mkdir - make directory or drive");
puts("rd, rmdir - remove directory or drive");
-#ifdef __CC65__
+#ifdef __ATARI__
puts("cls - clear screen");
#endif
puts("verbose - set verbosity level");
printf("remove failed: %s\n", strerror(errno));
}
+#ifdef HAVE_SUBDIRS
+
static void cmd_mkdir(void)
{
if (!arg1 || arg2) {
free(buf);
}
+#endif /* #ifdef HAVE_SUBDIRS */
+
static void cmd_rename(void)
{
if (!arg2 || arg3) {
if (dstfd >= 0) close(dstfd);
}
-#ifdef __CC65__
+#ifdef __ATARI__
static void cmd_cls(void)
{
printf("\f");
case CMD_QUIT: terminate = 1; return;
case CMD_LS: cmd_ls(); return;
case CMD_RM: cmd_rm(); return;
+#ifdef HAVE_SUBDIRS
case CMD_CHDIR: cmd_chdir(); return;
case CMD_MKDIR: cmd_mkdir(); return;
case CMD_RMDIR: cmd_rmdir(); return;
case CMD_PWD: cmd_pwd(); return;
+#endif
case CMD_RENAME: cmd_rename(); return;
case CMD_COPY: cmd_copy(); return;
-#ifdef __CC65__
+#ifdef __ATARI__
case CMD_CLS: cmd_cls(); return;
#endif
case CMD_VERBOSE: cmd_verbose(); return;