diff options
Diffstat (limited to 'libmpio/src')
-rw-r--r-- | libmpio/src/directory.c | 8 | ||||
-rw-r--r-- | libmpio/src/mpio.c | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/libmpio/src/directory.c b/libmpio/src/directory.c index 200d1e9..394e193 100644 --- a/libmpio/src/directory.c +++ b/libmpio/src/directory.c @@ -1,5 +1,5 @@ /* - * $Id: directory.c,v 1.5 2003/06/16 10:25:03 germeier Exp $ + * $Id: directory.c,v 1.6 2003/06/26 19:53:58 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -519,8 +519,10 @@ mpio_dentry_filename_write(mpio_t *m, mpio_mem_t mem, BYTE *p, j++; } - f_8_3[6]='~'; - f_8_3[7]='0'; + while(mpio_dentry_find_name_8_3(m, mem, f_8_3)) { + f_8_3[6]='~'; + f_8_3[7]='0'; + } while(mpio_dentry_find_name_8_3(m, mem, f_8_3)) f_8_3[7]++; diff --git a/libmpio/src/mpio.c b/libmpio/src/mpio.c index 133ac9c..1dfa192 100644 --- a/libmpio/src/mpio.c +++ b/libmpio/src/mpio.c @@ -1,5 +1,5 @@ /* - * $Id: mpio.c,v 1.4 2003/05/19 17:30:58 germeier Exp $ + * $Id: mpio.c,v 1.5 2003/06/26 19:53:58 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -1160,6 +1160,18 @@ mpio_file_del(mpio_t *m, mpio_mem_t mem, mpio_filename_t filename, return MPIO_OK; } +BYTE * +mpio_file_exists(mpio_t *m, mpio_mem_t mem, mpio_filename_t filename) { + BYTE *p; + /* find file */ + p = mpio_dentry_find_name(m, mem, filename); + if (!p) + p = mpio_dentry_find_name_8_3(m, mem, filename); + + return p; +} + + int mpio_sync(mpio_t *m, mpio_mem_t mem) { |