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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-24 03:01:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-24 03:01:50 +0400
commit394537715d1988056fe47a1c3a0dace6d39499e5 (patch)
treea08cfc13b69fa59d2bcd84cf4393729e8d7edc3d /source/blender/imbuf/intern
parentedc56fae1830047218d2d1d6538765ae02806d7e (diff)
string number decoding didnt check for win32 slash & minor adjustments to some other path funcs (no functional change).
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/anim.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index a13f426e302..188f3580170 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -225,7 +225,13 @@ static void free_anim_movie(struct anim * anim) { ; }
#endif
-static int an_stringdec(char *string, char* kop, char *staart,unsigned short *numlen) {
+#if defined(_WIN32)
+# define PATHSEPERATOR '\\'
+#else
+# define PATHSEPERATOR '/'
+#endif
+
+static int an_stringdec(const char *string, char* head, char *tail, unsigned short *numlen) {
unsigned short len,nume,nums=0;
short i,found=FALSE;
@@ -233,7 +239,7 @@ static int an_stringdec(char *string, char* kop, char *staart,unsigned short *nu
nume = len;
for(i=len-1;i>=0;i--){
- if (string[i]=='/') break;
+ if (string[i]==PATHSEPERATOR) break;
if (isdigit(string[i])) {
if (found){
nums=i;
@@ -247,21 +253,21 @@ static int an_stringdec(char *string, char* kop, char *staart,unsigned short *nu
}
}
if (found){
- strcpy(staart,&string[nume+1]);
- strcpy(kop,string);
- kop[nums]=0;
+ strcpy(tail ,&string[nume+1]);
+ strcpy(head, string);
+ head[nums]= '\0';
*numlen=nume-nums+1;
return ((int)atoi(&(string[nums])));
}
- staart[0]=0;
- strcpy(kop,string);
+ tail[0]= '\0';
+ strcpy(head, string);
*numlen=0;
- return (1);
+ return TRUE;
}
-static void an_stringenc(char *string, char *head, char *start, unsigned short numlen, int pic) {
- BLI_stringenc(string, head, start, numlen, pic);
+static void an_stringenc(char *string, const char *head, const char *tail, unsigned short numlen, int pic) {
+ BLI_stringenc(string, head, tail, numlen, pic);
}
static void free_anim_avi (struct anim *anim) {