aboutsummaryrefslogtreecommitdiff
path: root/mpiosh
diff options
context:
space:
mode:
authorgermeier <germeier>2003-07-01 09:06:11 +0000
committergermeier <germeier>2003-07-01 09:06:11 +0000
commit53a51993489a4d519fd54a01167f804325661ded (patch)
tree4cbbddf5c3fbf03c47df3deb5c3e90d04a109c59 /mpiosh
parentb5f5847bedf884611a9978236bb66d150016c71e (diff)
downloadmpiosh-53a51993489a4d519fd54a01167f804325661ded.tar.gz
mpiosh-53a51993489a4d519fd54a01167f804325661ded.tar.bz2
mpiosh-53a51993489a4d519fd54a01167f804325661ded.zip
return/display file type/tag for files from internal memory
(as requested by Markus)
Diffstat (limited to 'mpiosh')
-rw-r--r--mpiosh/callback.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/mpiosh/callback.c b/mpiosh/callback.c
index 90eeec7..2404850 100644
--- a/mpiosh/callback.c
+++ b/mpiosh/callback.c
@@ -2,7 +2,7 @@
*
* Author: Andreas Bsching <crunchy@tzi.de>
*
- * $Id: callback.c,v 1.44 2003/06/27 13:40:23 crunchy Exp $
+ * $Id: callback.c,v 1.45 2003/07/01 09:06:11 germeier Exp $
*
* Copyright (C) 2001 Andreas Bsching <crunchy@tzi.de>
*
@@ -37,6 +37,31 @@
#include "libmpio/debug.h"
+/* helper */
+BYTE
+mpiosh_ftype2ascii(BYTE ftype) {
+ switch(ftype)
+ {
+ case FTYPE_CONF:
+ case FTYPE_FONT:
+ case FTYPE_OTHER:
+ case FTYPE_MEMO:
+ case FTYPE_WAV:
+ case FTYPE_ENTRY:
+ case FTYPE_DIR:
+ case FTYPE_PLAIN:
+ return ftype;
+ case FTYPE_CHAN:
+ return 'c';
+ case FTYPE_MUSIC:
+ return '-';
+ default:
+ return '?';
+ }
+ return '?';
+}
+
+
/* commands */
void
mpiosh_cmd_debug(char *args[])
@@ -142,7 +167,8 @@ mpiosh_cmd_dir(char *args[])
&type);
printf ("%02d.%02d.%04d %02d:%02d %9d %c %s\n",
- day, month, year, hour, minute, fsize, type, fname);
+ day, month, year, hour, minute, fsize,
+ mpiosh_ftype2ascii(type), fname);
p = mpio_dentry_next(mpiosh.dev, mpiosh.card, p);
}