aboutsummaryrefslogtreecommitdiff
path: root/sdk-modifications/libsrc/fs
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-04 23:45:44 -0500
committerNebuleon Fumika2013-02-04 23:45:44 -0500
commitd1a7bf5eb558e7db4a1a27e15ebedb02e6b7f804 (patch)
treed951252d393b9d7defb508483aba29e0daad764c /sdk-modifications/libsrc/fs
parentb1c298ab5066c2e37a69c7c30bd499dd11ed6eb3 (diff)
downloadsnesemu-d1a7bf5eb558e7db4a1a27e15ebedb02e6b7f804.tar.gz
snesemu-d1a7bf5eb558e7db4a1a27e15ebedb02e6b7f804.tar.bz2
snesemu-d1a7bf5eb558e7db4a1a27e15ebedb02e6b7f804.zip
Fully integrate BassAceGold's libraries, finally. The README still states that 1.2 is required to overwrite 0.13's stuff; really, 0.13 is needed only for `gcc`. So the sequence goes 0.13's `gcc` -> 1.2 -> BassAceGold's libraries -> make `libds2a.a`.
DMA function names changed to match BassAceGold's.
Diffstat (limited to 'sdk-modifications/libsrc/fs')
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/bit_ops.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/cache.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/directory.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/directory.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/disc_io/disc.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/disc_io/disc.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/disc_io/disc_io.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/ds2_fcntl.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/ds2_fcntl.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/ds2_unistd.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/ds2_unistd.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fat.h0
-rw-r--r--sdk-modifications/libsrc/fs/fat_misc.c52
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fat_misc.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatdir.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatdir_ex.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatdir_ex.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatfile.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatfile.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatfile_ex.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fatfile_ex.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/file_allocation_table.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/filetime.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/filetime.h0
-rw-r--r--sdk-modifications/libsrc/fs/fs.mk2
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_api.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_api.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_cache.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_common.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_unicode.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/fs_unicode.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/libfat.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/mem_allocate.h0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/partition.c0
-rwxr-xr-x[-rw-r--r--]sdk-modifications/libsrc/fs/partition.h0
37 files changed, 28 insertions, 26 deletions
diff --git a/sdk-modifications/libsrc/fs/bit_ops.h b/sdk-modifications/libsrc/fs/bit_ops.h
index f823db7..f823db7 100644..100755
--- a/sdk-modifications/libsrc/fs/bit_ops.h
+++ b/sdk-modifications/libsrc/fs/bit_ops.h
diff --git a/sdk-modifications/libsrc/fs/cache.c b/sdk-modifications/libsrc/fs/cache.c
index 2c66e1f..2c66e1f 100644..100755
--- a/sdk-modifications/libsrc/fs/cache.c
+++ b/sdk-modifications/libsrc/fs/cache.c
diff --git a/sdk-modifications/libsrc/fs/directory.c b/sdk-modifications/libsrc/fs/directory.c
index b30cccc..b30cccc 100644..100755
--- a/sdk-modifications/libsrc/fs/directory.c
+++ b/sdk-modifications/libsrc/fs/directory.c
diff --git a/sdk-modifications/libsrc/fs/directory.h b/sdk-modifications/libsrc/fs/directory.h
index 654c5d2..654c5d2 100644..100755
--- a/sdk-modifications/libsrc/fs/directory.h
+++ b/sdk-modifications/libsrc/fs/directory.h
diff --git a/sdk-modifications/libsrc/fs/disc_io/disc.c b/sdk-modifications/libsrc/fs/disc_io/disc.c
index 8b50953..8b50953 100644..100755
--- a/sdk-modifications/libsrc/fs/disc_io/disc.c
+++ b/sdk-modifications/libsrc/fs/disc_io/disc.c
diff --git a/sdk-modifications/libsrc/fs/disc_io/disc.h b/sdk-modifications/libsrc/fs/disc_io/disc.h
index 2129359..2129359 100644..100755
--- a/sdk-modifications/libsrc/fs/disc_io/disc.h
+++ b/sdk-modifications/libsrc/fs/disc_io/disc.h
diff --git a/sdk-modifications/libsrc/fs/disc_io/disc_io.h b/sdk-modifications/libsrc/fs/disc_io/disc_io.h
index 6ac0c31..6ac0c31 100644..100755
--- a/sdk-modifications/libsrc/fs/disc_io/disc_io.h
+++ b/sdk-modifications/libsrc/fs/disc_io/disc_io.h
diff --git a/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.c b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.c
index c432d84..c432d84 100644..100755
--- a/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.c
+++ b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.c
diff --git a/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h
index 334a9bc..334a9bc 100644..100755
--- a/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h
+++ b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h
diff --git a/sdk-modifications/libsrc/fs/ds2_fcntl.c b/sdk-modifications/libsrc/fs/ds2_fcntl.c
index 0fc00d7..0fc00d7 100644..100755
--- a/sdk-modifications/libsrc/fs/ds2_fcntl.c
+++ b/sdk-modifications/libsrc/fs/ds2_fcntl.c
diff --git a/sdk-modifications/libsrc/fs/ds2_fcntl.h b/sdk-modifications/libsrc/fs/ds2_fcntl.h
index 2c69221..2c69221 100644..100755
--- a/sdk-modifications/libsrc/fs/ds2_fcntl.h
+++ b/sdk-modifications/libsrc/fs/ds2_fcntl.h
diff --git a/sdk-modifications/libsrc/fs/ds2_unistd.c b/sdk-modifications/libsrc/fs/ds2_unistd.c
index 8625eba..8625eba 100644..100755
--- a/sdk-modifications/libsrc/fs/ds2_unistd.c
+++ b/sdk-modifications/libsrc/fs/ds2_unistd.c
diff --git a/sdk-modifications/libsrc/fs/ds2_unistd.h b/sdk-modifications/libsrc/fs/ds2_unistd.h
index f5efdb1..f5efdb1 100644..100755
--- a/sdk-modifications/libsrc/fs/ds2_unistd.h
+++ b/sdk-modifications/libsrc/fs/ds2_unistd.h
diff --git a/sdk-modifications/libsrc/fs/fat.h b/sdk-modifications/libsrc/fs/fat.h
index 3ddbac3..3ddbac3 100644..100755
--- a/sdk-modifications/libsrc/fs/fat.h
+++ b/sdk-modifications/libsrc/fs/fat.h
diff --git a/sdk-modifications/libsrc/fs/fat_misc.c b/sdk-modifications/libsrc/fs/fat_misc.c
index c0f62ac..335ab59 100644
--- a/sdk-modifications/libsrc/fs/fat_misc.c
+++ b/sdk-modifications/libsrc/fs/fat_misc.c
@@ -1,9 +1,9 @@
-//fat_misc.c
-//v1.0
-
+//fat_misc.c
+//v1.0
+
#include "fat_misc.h"
-#include "fs_api.h"
-
+#include "fs_api.h"
+
static unsigned int _usedSecNums;
static int strFindFromEnd( char *str,char strValue )
@@ -40,11 +40,11 @@ static int strFindFromEnd( char *str,char strValue )
int getDirSize( const char * path, int includeSubdirs, unsigned int * dirSize )
{
- char dirPath[MAX_FILENAME_LENGTH];
+ char dirPath[MAX_FILENAME_LENGTH];
unsigned int size = 0;
if( "" == path ){
return false;
- }
+ }
memset( dirPath,0,MAX_FILENAME_LENGTH );
strcpy( dirPath,path );
@@ -54,29 +54,31 @@ int getDirSize( const char * path, int includeSubdirs, unsigned int * dirSize )
if( strlen(dirPath) > MAX_FILENAME_LENGTH )
return false;
- DIR_STATE_STRUCT *dir; dir = fat_opendir((const char*)dirPath);
+ DIR_STATE_STRUCT *dir;
+ dir = fat_opendir((const char*)dirPath);
if (dir == NULL)
- return false;
- struct stat stat_buf;
- DIR_ENTRY *currentEntry;
- char* filename;
-
- while(fat_readdir_ex(dir, &stat_buf) != NULL)
+ return false;
+
+ struct stat stat_buf;
+ DIR_ENTRY *currentEntry;
+ char* filename;
+
+ while((currentEntry = fat_readdir_ex(dir, &stat_buf)) != NULL)
{
- filename = currentEntry->d_name;
-
+ filename = currentEntry->d_name;
+
if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
continue;
if (!(stat_buf.st_mode & S_IFDIR)) {
size += (stat_buf.st_size+511)/512;
_usedSecNums +=(stat_buf.st_size+511)/512;
- }
- else if (includeSubdirs)
+ }
+ else if (includeSubdirs)
{
// calculate the size recursively
- unsigned int subDirSize = 0;
- char dirPathBuffer[MAX_FILENAME_LENGTH];
+ unsigned int subDirSize = 0;
+ char dirPathBuffer[MAX_FILENAME_LENGTH];
memset( dirPathBuffer,0,MAX_FILENAME_LENGTH );
strcpy( dirPathBuffer,dirPath );
@@ -90,8 +92,8 @@ int getDirSize( const char * path, int includeSubdirs, unsigned int * dirSize )
memset( dirPath,0,MAX_FILENAME_LENGTH );
strcpy( dirPath,dirPathBuffer );
}
- }
-
+ }
+
fat_closedir(dir);
*dirSize = size;
@@ -102,7 +104,7 @@ int fat_getDiskTotalSpace( char * diskName, unsigned int * diskSpace )
{
if( !strcmp("",diskName) )
return false;
-
+
unsigned int len = strlen(diskName);
if( *(diskName+len-1) != '/' ){
*(diskName+len) = '/';
@@ -116,10 +118,10 @@ int fat_getDiskTotalSpace( char * diskName, unsigned int * diskSpace )
return true;
}
-int fat_getDiskSpaceInfo( char * diskName, unsigned int * total, unsigned int * used, unsigned int * freeSpace )
+int fat_getDiskSpaceInfo( char * diskName, unsigned int * total, unsigned int * used, unsigned int * freeSpace )
{
_usedSecNums = 0;
-
+
if( !strcmp("",diskName) )
return -1;
if( !fat_getDiskTotalSpace(diskName, total) )
diff --git a/sdk-modifications/libsrc/fs/fat_misc.h b/sdk-modifications/libsrc/fs/fat_misc.h
index 05db0bb..05db0bb 100644..100755
--- a/sdk-modifications/libsrc/fs/fat_misc.h
+++ b/sdk-modifications/libsrc/fs/fat_misc.h
diff --git a/sdk-modifications/libsrc/fs/fatdir.h b/sdk-modifications/libsrc/fs/fatdir.h
index 7c419ee..7c419ee 100644..100755
--- a/sdk-modifications/libsrc/fs/fatdir.h
+++ b/sdk-modifications/libsrc/fs/fatdir.h
diff --git a/sdk-modifications/libsrc/fs/fatdir_ex.c b/sdk-modifications/libsrc/fs/fatdir_ex.c
index b773255..b773255 100644..100755
--- a/sdk-modifications/libsrc/fs/fatdir_ex.c
+++ b/sdk-modifications/libsrc/fs/fatdir_ex.c
diff --git a/sdk-modifications/libsrc/fs/fatdir_ex.h b/sdk-modifications/libsrc/fs/fatdir_ex.h
index fbac46f..fbac46f 100644..100755
--- a/sdk-modifications/libsrc/fs/fatdir_ex.h
+++ b/sdk-modifications/libsrc/fs/fatdir_ex.h
diff --git a/sdk-modifications/libsrc/fs/fatfile.c b/sdk-modifications/libsrc/fs/fatfile.c
index 304da34..304da34 100644..100755
--- a/sdk-modifications/libsrc/fs/fatfile.c
+++ b/sdk-modifications/libsrc/fs/fatfile.c
diff --git a/sdk-modifications/libsrc/fs/fatfile.h b/sdk-modifications/libsrc/fs/fatfile.h
index 4869562..4869562 100644..100755
--- a/sdk-modifications/libsrc/fs/fatfile.h
+++ b/sdk-modifications/libsrc/fs/fatfile.h
diff --git a/sdk-modifications/libsrc/fs/fatfile_ex.c b/sdk-modifications/libsrc/fs/fatfile_ex.c
index aa23fb3..aa23fb3 100644..100755
--- a/sdk-modifications/libsrc/fs/fatfile_ex.c
+++ b/sdk-modifications/libsrc/fs/fatfile_ex.c
diff --git a/sdk-modifications/libsrc/fs/fatfile_ex.h b/sdk-modifications/libsrc/fs/fatfile_ex.h
index c434b63..c434b63 100644..100755
--- a/sdk-modifications/libsrc/fs/fatfile_ex.h
+++ b/sdk-modifications/libsrc/fs/fatfile_ex.h
diff --git a/sdk-modifications/libsrc/fs/file_allocation_table.h b/sdk-modifications/libsrc/fs/file_allocation_table.h
index 4fb4149..4fb4149 100644..100755
--- a/sdk-modifications/libsrc/fs/file_allocation_table.h
+++ b/sdk-modifications/libsrc/fs/file_allocation_table.h
diff --git a/sdk-modifications/libsrc/fs/filetime.c b/sdk-modifications/libsrc/fs/filetime.c
index f2de6ef..f2de6ef 100644..100755
--- a/sdk-modifications/libsrc/fs/filetime.c
+++ b/sdk-modifications/libsrc/fs/filetime.c
diff --git a/sdk-modifications/libsrc/fs/filetime.h b/sdk-modifications/libsrc/fs/filetime.h
index fa651a7..fa651a7 100644..100755
--- a/sdk-modifications/libsrc/fs/filetime.h
+++ b/sdk-modifications/libsrc/fs/filetime.h
diff --git a/sdk-modifications/libsrc/fs/fs.mk b/sdk-modifications/libsrc/fs/fs.mk
index 9b17c48..3fee249 100644
--- a/sdk-modifications/libsrc/fs/fs.mk
+++ b/sdk-modifications/libsrc/fs/fs.mk
@@ -14,7 +14,7 @@ SRC += $(FS_DIR)/cache.c \
$(FS_DIR)/disc_io/disc.c \
$(FS_DIR)/disc_io/io_ds2_mmcf.c \
$(FS_DIR)/ds2_fcntl.c \
- $(FS_DIR)/ds2_unistd.c \
+ $(FS_DIR)/ds2_unistd.c
SSRC +=
diff --git a/sdk-modifications/libsrc/fs/fs_api.c b/sdk-modifications/libsrc/fs/fs_api.c
index b23a450..b23a450 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_api.c
+++ b/sdk-modifications/libsrc/fs/fs_api.c
diff --git a/sdk-modifications/libsrc/fs/fs_api.h b/sdk-modifications/libsrc/fs/fs_api.h
index fa4ae07..fa4ae07 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_api.h
+++ b/sdk-modifications/libsrc/fs/fs_api.h
diff --git a/sdk-modifications/libsrc/fs/fs_cache.h b/sdk-modifications/libsrc/fs/fs_cache.h
index 1abae66..1abae66 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_cache.h
+++ b/sdk-modifications/libsrc/fs/fs_cache.h
diff --git a/sdk-modifications/libsrc/fs/fs_common.h b/sdk-modifications/libsrc/fs/fs_common.h
index ce1cfff..ce1cfff 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_common.h
+++ b/sdk-modifications/libsrc/fs/fs_common.h
diff --git a/sdk-modifications/libsrc/fs/fs_unicode.c b/sdk-modifications/libsrc/fs/fs_unicode.c
index 2f1c1ed..2f1c1ed 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_unicode.c
+++ b/sdk-modifications/libsrc/fs/fs_unicode.c
diff --git a/sdk-modifications/libsrc/fs/fs_unicode.h b/sdk-modifications/libsrc/fs/fs_unicode.h
index 45e9d0a..45e9d0a 100644..100755
--- a/sdk-modifications/libsrc/fs/fs_unicode.h
+++ b/sdk-modifications/libsrc/fs/fs_unicode.h
diff --git a/sdk-modifications/libsrc/fs/libfat.c b/sdk-modifications/libsrc/fs/libfat.c
index 1956d13..1956d13 100644..100755
--- a/sdk-modifications/libsrc/fs/libfat.c
+++ b/sdk-modifications/libsrc/fs/libfat.c
diff --git a/sdk-modifications/libsrc/fs/mem_allocate.h b/sdk-modifications/libsrc/fs/mem_allocate.h
index 7bbe8de..7bbe8de 100644..100755
--- a/sdk-modifications/libsrc/fs/mem_allocate.h
+++ b/sdk-modifications/libsrc/fs/mem_allocate.h
diff --git a/sdk-modifications/libsrc/fs/partition.c b/sdk-modifications/libsrc/fs/partition.c
index 1791b40..1791b40 100644..100755
--- a/sdk-modifications/libsrc/fs/partition.c
+++ b/sdk-modifications/libsrc/fs/partition.c
diff --git a/sdk-modifications/libsrc/fs/partition.h b/sdk-modifications/libsrc/fs/partition.h
index 0777b54..0777b54 100644..100755
--- a/sdk-modifications/libsrc/fs/partition.h
+++ b/sdk-modifications/libsrc/fs/partition.h