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:
authorTon Roosendaal <ton@blender.org>2006-12-20 20:57:56 +0300
committerTon Roosendaal <ton@blender.org>2006-12-20 20:57:56 +0300
commit253432bfc7c2a1dae224a03fb3055de19743ec67 (patch)
tree2cea30606f9f29be51d5366ddf0d3747b9649b90 /source/blender/blenlib
parent0a0753b409221b66f5003d8c257426043ada227e (diff)
The Big Image refactor!
Please read: http://www.blender3d.org/cms/Imaging.834.0.html Or in short: - adding MultiLayer Image support - recoded entire Image API - better integration of movie/sequence Images Was a whole load of work... went down for a week to do this. So, will need a lot of testing! Will be in irc all evening.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_blenlib.h4
-rw-r--r--source/blender/blenlib/intern/gsqueue.c9
-rw-r--r--source/blender/blenlib/intern/util.c4
3 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h
index 1a35cad3a03..58bd3fd6bf6 100644
--- a/source/blender/blenlib/BLI_blenlib.h
+++ b/source/blender/blenlib/BLI_blenlib.h
@@ -96,7 +96,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir,
void BLI_make_exist(char *dir);
void BLI_make_existing_file(char *name);
void BLI_split_dirfile(const char *string, char *dir, char *file);
-int BLI_testextensie(char *str, char *ext);
+int BLI_testextensie(const char *str, const char *ext);
void addlisttolist(ListBase *list1, ListBase *list2);
void BLI_insertlink(struct ListBase *listbase, void *vprevlink, void *vnewlink);
void * BLI_findlink(struct ListBase *listbase, int number);
@@ -193,7 +193,7 @@ char* BLI_strdupn(char *str, int len);
* the size of dst)
* @retval Returns dst
*/
-char* BLI_strncpy(char *dst, char *src, int maxncpy);
+char* BLI_strncpy(char *dst, const char *src, int maxncpy);
/**
* Compare two strings
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c
index fbbc42115d5..e52c573eec7 100644
--- a/source/blender/blenlib/intern/gsqueue.c
+++ b/source/blender/blenlib/intern/gsqueue.c
@@ -81,7 +81,14 @@ void BLI_gsqueue_pop(GSQueue *gq, void *item_r)
}
void BLI_gsqueue_push(GSQueue *gq, void *item)
{
- GSQueueElem *elem= MEM_mallocN(sizeof(*elem)+gq->elem_size, "gqueue_push");
+ GSQueueElem *elem;
+
+ /* compare: prevent events added double in row */
+ if (!BLI_gsqueue_is_empty(gq)) {
+ if(0==memcmp(item, &gq->head[1], gq->elem_size))
+ return;
+ }
+ elem= MEM_mallocN(sizeof(*elem)+gq->elem_size, "gqueue_push");
memcpy(&elem[1], item, gq->elem_size);
elem->next= NULL;
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 9fd5b40878e..29e15068f15 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -638,7 +638,7 @@ char *BLI_strdup(char *str) {
return BLI_strdupn(str, strlen(str));
}
-char *BLI_strncpy(char *dst, char *src, int maxncpy) {
+char *BLI_strncpy(char *dst, const char *src, int maxncpy) {
int srclen= strlen(src);
int cpylen= (srclen>(maxncpy-1))?(maxncpy-1):srclen;
@@ -1117,7 +1117,7 @@ void BLI_make_file_string(const char *relabase, char *string, const char *dir,
BLI_clean(string);
}
-int BLI_testextensie(char *str, char *ext)
+int BLI_testextensie(const char *str, const char *ext)
{
short a, b;
int retval;