Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c45
1 files changed, 6 insertions, 39 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 3503164ea56..7a24d9b36b1 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -29,7 +29,6 @@
#include <string.h>
#include <stdio.h>
-#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -49,9 +48,6 @@
#include "BLI_blenlib.h"
-#include "BLI_storage.h"
-#include "BLI_fileops.h"
-#include "BLI_callbacks.h"
#include "BKE_utildefines.h"
@@ -84,31 +80,6 @@ char *BLI_last_slash(const char *string) {
else return lfslash;
}
-static const char *last_slash_len(const char *string, int len) {
- int a;
-
- for(a=len-1; a>=0; a--)
- if(string[a] == '/' || string[a] == '\\')
- return &string[a];
-
- return NULL;
-}
-
-const char *BLI_short_filename(const char *string) {
- const char *ls, *lls;
-
- ls= last_slash_len(string, strlen(string));
- if(!ls)
- return string;
-
- lls= last_slash_len(string, ls-string);
-
- if(lls)
- return lls+1;
- else
- return ls+1;
-}
-
/* adds a slash if there isnt one there alredy */
int BLI_add_slash(char *string) {
int len = strlen(string);
@@ -234,6 +205,10 @@ int BLI_touch(const char *file)
return 0;
}
+int BLI_exists(char *file) {
+ return BLI_exist(file);
+}
+
#ifdef WIN32
static char str[MAXPATHLEN+12];
@@ -311,10 +286,6 @@ int BLI_link(char *file, char *to) {
return 1;
}
-int BLI_exists(char *file) {
- return (GetFileAttributes(file) != 0xFFFFFFFF);
-}
-
void BLI_recurdir_fileops(char *dirname) {
char *lslash;
char tmp[MAXPATHLEN];
@@ -355,10 +326,10 @@ int BLI_rename(char *from, char *to) {
return rename(from, to);
}
-#else /* The sane UNIX world */
+#else /* The weirdo UNIX world */
/*
- * but the sane UNIX world is tied to the interface, and the system
+ * but the UNIX world is tied to the interface, and the system
* timer, and... We implement a callback mechanism. The system will
* have to initialise the callback before the functions will work!
* */
@@ -403,10 +374,6 @@ int BLI_link(char *file, char *to) {
return system(str);
}
-int BLI_exists(char *file) {
- return BLI_exist(file);
-}
-
void BLI_recurdir_fileops(char *dirname) {
char *lslash;
char tmp[MAXPATHLEN];