aboutsummaryrefslogtreecommitdiff
path: root/mpiosh/mpiosh.c
diff options
context:
space:
mode:
authorcrunchy <crunchy>2002-10-12 20:06:21 +0000
committercrunchy <crunchy>2002-10-12 20:06:21 +0000
commit9e631a7513ed34c27a36cacd0b22cfb2fd695dad (patch)
tree8b690de807769cfa00f434eec113a127f2c1f651 /mpiosh/mpiosh.c
parentde0ca5908fbdfdd14d48ae733b39a323336b62df (diff)
downloadmpiosh-9e631a7513ed34c27a36cacd0b22cfb2fd695dad.tar.gz
mpiosh-9e631a7513ed34c27a36cacd0b22cfb2fd695dad.tar.bz2
mpiosh-9e631a7513ed34c27a36cacd0b22cfb2fd695dad.zip
add alias support for commands and extended argument completion
Diffstat (limited to 'mpiosh/mpiosh.c')
-rw-r--r--mpiosh/mpiosh.c95
1 files changed, 1 insertions, 94 deletions
diff --git a/mpiosh/mpiosh.c b/mpiosh/mpiosh.c
index ff6b9d8..f5896a5 100644
--- a/mpiosh/mpiosh.c
+++ b/mpiosh/mpiosh.c
@@ -2,7 +2,7 @@
/*
*
- * $Id: mpiosh.c,v 1.19 2002/10/12 18:31:45 crunchy Exp $
+ * $Id: mpiosh.c,v 1.20 2002/10/12 20:06:22 crunchy Exp $
*
* Author: Andreas Büsching <crunchy@tzi.de>
*
@@ -37,99 +37,6 @@
#include "readline.h"
#include "mpiosh.h"
-/* structure containing current state */
-mpiosh_t mpiosh;
-
-/* flag indicating a user-interrupt of the current command */
-int mpiosh_cancel = 0;
-int mpiosh_cancel_ack = 0;
-
-/* prompt strings */
-const char *PROMPT_INT = "\033[;1mmpio <i>\033[m ";
-const char *PROMPT_EXT = "\033[;1mmpio <e>\033[m ";
-
-mpiosh_cmd_t commands[] = {
- { "debug", "[level|file|on|off] <value>",
- " modify debugging options",
- mpiosh_cmd_debug, NULL },
- { "ver", NULL,
- " version of mpio package",
- mpiosh_cmd_version, NULL },
- { "help", "[<command>]",
- " show information about known commands or just about <command>",
- mpiosh_cmd_help, NULL },
- { "dir", NULL,
- " list content of current memory card",
- mpiosh_cmd_dir, NULL },
- { "info", NULL,
- " show information about MPIO player",
- mpiosh_cmd_info, NULL },
- { "mem", "[i|e]",
- " set current memory card. 'i' selects the internal and 'e'\n"
- " selects the external memory card (smart media card)",
- mpiosh_cmd_mem, NULL },
- { "open", NULL,
- " open connect to MPIO player",
- mpiosh_cmd_open, NULL },
- { "close", NULL,
- " close connect to MPIO player",
- mpiosh_cmd_close, NULL },
- { "quit", " or exit",
- "exit mpiosh and close the device",
- mpiosh_cmd_quit, NULL },
- { "exit", NULL, NULL, mpiosh_cmd_quit },
- { "get", "<filename>",
- "read <filename> from memory card",
- mpiosh_cmd_get, mpiosh_readline_comp_mpio_file },
- { "mget", "<regexp>",
- " read all files matching the regular expression\n"
- " from the selected memory card",
- mpiosh_cmd_mget, mpiosh_readline_comp_mpio_file },
- { "put", "<filename>",
- " write <filename> to memory card",
- mpiosh_cmd_put, mpiosh_readline_comp_mpio_file },
- { "mput", "<regexp>",
- " write all local files matching the regular expression\n"
- " to the selected memory card",
- mpiosh_cmd_mput, mpiosh_readline_comp_mpio_file },
- { "del", "<filename>",
- " deletes <filename> from memory card",
- mpiosh_cmd_del, mpiosh_readline_comp_mpio_file },
- { "mdel", "<regexp>",
- " deletes all files matching the regular expression\n"
- " from the selected memory card",
- mpiosh_cmd_mdel, mpiosh_readline_comp_mpio_file },
- { "dump", NULL,
- " get all files of current memory card",
- mpiosh_cmd_dump, NULL },
- { "free", NULL,
- " display amount of available bytes of current memory card",
- mpiosh_cmd_free, NULL },
- { "format", NULL,
- " format current memory card",
- mpiosh_cmd_format, NULL },
-/* { "switch", "<file1> <file2>", */
-/* "switches the order of two files", */
-/* mpiosh_cmd_switch }, */
- { "ldir", NULL,
- " list local directory",
- mpiosh_cmd_ldir, NULL },
- { "lpwd", NULL,
- " print current working directory",
- mpiosh_cmd_lpwd, NULL },
- { "lcd", NULL,
- " change the current working directory",
- mpiosh_cmd_lcd, NULL },
- { "lmkdir", NULL,
- " create a local directory",
- mpiosh_cmd_lmkdir, NULL },
- { "dump_memory", NULL,
- " dump FAT, directory, spare area and the first 0x100 of the\n"
- " selected memory card",
- mpiosh_cmd_dump_mem, NULL },
- { NULL, NULL, NULL, NULL, NULL }
-};
-
/* mpiosh core functions */
void
mpiosh_init(void)