diff options
Diffstat (limited to 'mpiosh')
-rw-r--r-- | mpiosh/callback.c | 72 | ||||
-rw-r--r-- | mpiosh/readline.c | 7 |
2 files changed, 42 insertions, 37 deletions
diff --git a/mpiosh/callback.c b/mpiosh/callback.c index 126199d..e3f86b4 100644 --- a/mpiosh/callback.c +++ b/mpiosh/callback.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching <crunchy@tzi.de> * - * $Id: callback.c,v 1.24 2002/10/13 12:03:51 germeier Exp $ + * $Id: callback.c,v 1.25 2002/10/13 19:46:51 crunchy Exp $ * * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de> * @@ -273,18 +273,18 @@ mpiosh_callback_get(int read, int total) return mpiosh_cancel; // continue } -void -mpiosh_cmd_get(char *args[]) -{ - MPIOSH_CHECK_CONNECTION_CLOSED; - MPIOSH_CHECK_ARG; +/* void */ +/* mpiosh_cmd_get(char *args[]) */ +/* { */ +/* MPIOSH_CHECK_CONNECTION_CLOSED; */ +/* MPIOSH_CHECK_ARG; */ - if (mpio_file_get(mpiosh.dev, mpiosh.card, args[0], - mpiosh_callback_get) == -1) { - mpio_perror("error"); - } - printf("\n"); -} +/* if (mpio_file_get(mpiosh.dev, mpiosh.card, args[0], */ +/* mpiosh_callback_get) == -1) { */ +/* mpio_perror("error"); */ +/* } */ +/* printf("\n"); */ +/* } */ void mpiosh_cmd_mget(char *args[]) @@ -355,22 +355,22 @@ mpiosh_callback_put(int read, int total) return mpiosh_cancel; // continue } -void -mpiosh_cmd_put(char *args[]) -{ - int size; +/* void */ +/* mpiosh_cmd_put(char *args[]) */ +/* { */ +/* int size; */ - MPIOSH_CHECK_CONNECTION_CLOSED; - MPIOSH_CHECK_ARG; +/* MPIOSH_CHECK_CONNECTION_CLOSED; */ +/* MPIOSH_CHECK_ARG; */ - if ((size = mpio_file_put(mpiosh.dev, mpiosh.card, args[0], FTYPE_MUSIC, - mpiosh_callback_put)) == -1) { - mpio_perror("error"); - } else { - mpio_sync(mpiosh.dev, mpiosh.card); - } - printf("\n"); -} +/* if ((size = mpio_file_put(mpiosh.dev, mpiosh.card, args[0], FTYPE_MUSIC, */ +/* mpiosh_callback_put)) == -1) { */ +/* mpio_perror("error"); */ +/* } else { */ +/* mpio_sync(mpiosh.dev, mpiosh.card); */ +/* } */ +/* printf("\n"); */ +/* } */ void mpiosh_cmd_mput(char *args[]) @@ -451,19 +451,19 @@ mpiosh_callback_del(int read, int total) return mpiosh_cancel; // continue } -void -mpiosh_cmd_del(char *args[]) -{ - int size; +/* void */ +/* mpiosh_cmd_del(char *args[]) */ +/* { */ +/* int size; */ - MPIOSH_CHECK_CONNECTION_CLOSED; - MPIOSH_CHECK_ARG; +/* MPIOSH_CHECK_CONNECTION_CLOSED; */ +/* MPIOSH_CHECK_ARG; */ - size = mpio_file_del(mpiosh.dev, mpiosh.card, args[0], mpiosh_callback_del); - mpio_sync(mpiosh.dev, mpiosh.card); +/* size = mpio_file_del(mpiosh.dev, mpiosh.card, args[0], mpiosh_callback_del); */ +/* mpio_sync(mpiosh.dev, mpiosh.card); */ - printf("\n"); -} +/* printf("\n"); */ +/* } */ void mpiosh_cmd_mdel(char *args[]) diff --git a/mpiosh/readline.c b/mpiosh/readline.c index 5427b9f..cbff0a9 100644 --- a/mpiosh/readline.c +++ b/mpiosh/readline.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching <crunchy@tzi.de> * - * $Id: readline.c,v 1.2 2002/10/12 20:06:22 crunchy Exp $ + * $Id: readline.c,v 1.3 2002/10/13 19:46:51 crunchy Exp $ * * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de> * @@ -90,6 +90,11 @@ mpiosh_readline_comp_mpio_file(const char *text, int state) WORD year; DWORD fsize; + if (mpiosh.dev == NULL) { + rl_attempted_completion_over = 1; + return NULL; + } + if (state == 0) p = mpio_directory_open(mpiosh.dev, mpiosh.card); while ((p != NULL) && (arg == NULL)) { |