diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-12 06:15:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-12 06:15:33 +0400 |
commit | cc1259178b95d084a7ca9e83c90ef0ab97b7fa86 (patch) | |
tree | fb6b69a28ea45fb30373bdc4e387b0eebde4b3ce /source/blender/blenlib/intern/storage.c | |
parent | 5aaf3ede76c91a062d09360301083b6f75a6a89f (diff) |
code cleanup: utfconv library had some quite confusing formatting, also cleared som warnings.
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 01ebd1dce57..b0c0f106f06 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -224,16 +224,16 @@ static void bli_builddir(const char *dirname, const char *relname) return; } #else - UTF16_ENCODE(dirname) + UTF16_ENCODE(dirname); if (!SetCurrentDirectoryW(dirname_16)) { perror(dirname); free(dirname_16); return; } - UTF16_UN_ENCODE(dirname) + UTF16_UN_ENCODE(dirname); #endif - if ( (dir = (DIR *)opendir(".")) ) { + if ((dir = (DIR *)opendir("."))) { while ((fname = (struct dirent*) readdir(dir)) != NULL) { dlink = (struct dirlink *)malloc(sizeof(struct dirlink)); if (dlink) { @@ -247,13 +247,13 @@ static void bli_builddir(const char *dirname, const char *relname) if (newnum) { if (files) { - void *tmp= realloc(files, (totnum+newnum) * sizeof(struct direntry)); + void *tmp = realloc(files, (totnum+newnum) * sizeof(struct direntry)); if (tmp) { - files= (struct direntry *)tmp; + files = (struct direntry *)tmp; } else { /* realloc fail */ free(files); - files= NULL; + files = NULL; } } @@ -556,17 +556,17 @@ void BLI_file_free_lines(LinkNode *lines) int BLI_file_older(const char *file1, const char *file2) { -#if WIN32 +#ifdef WIN32 struct _stat st1, st2; - UTF16_ENCODE(file1) - UTF16_ENCODE(file2) + UTF16_ENCODE(file1); + UTF16_ENCODE(file2); if (_wstat(file1_16, &st1)) return 0; if (_wstat(file2_16, &st2)) return 0; - UTF16_UN_ENCODE(file2) - UTF16_UN_ENCODE(file1) + UTF16_UN_ENCODE(file2); + UTF16_UN_ENCODE(file1); #else struct stat st1, st2; |