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:
authorMartin Poirier <theeth@yahoo.com>2007-11-02 00:44:41 +0300
committerMartin Poirier <theeth@yahoo.com>2007-11-02 00:44:41 +0300
commitc3cc13e71b1d833ba40af4b290e995893c0163d4 (patch)
tree6bb6a8cb16717d03559df9ac6e937206a0efae79 /source/blender/blenlib/BLI_blenlib.h
parent0ca5c98f2383b38bb3aa49e37be3f76074b0ca34 (diff)
== utils ==
New listbase functions: void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink); - corrolary to insertlinkbefore BLI_sortlist(struct ListBase *listbase, int (*cmp)(void *, void *)); - simple in place sorting method. NOT optimized, so use for small lists only. Uses a variant of insertion sort (I was lazy, people should feel free to rewrite).
Diffstat (limited to 'source/blender/blenlib/BLI_blenlib.h')
-rw-r--r--source/blender/blenlib/BLI_blenlib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h
index 3306be76c47..57248fb1d68 100644
--- a/source/blender/blenlib/BLI_blenlib.h
+++ b/source/blender/blenlib/BLI_blenlib.h
@@ -112,6 +112,8 @@ int BLI_stringdec(char *string, char *kop, char *start, unsigned short *numlen);
void BLI_stringenc(char *string, char *kop, char *start, unsigned short numlen, int pic);
void BLI_addhead(struct ListBase *listbase, void *vlink);
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink);
+void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink);
+void BLI_sortlist(struct ListBase *listbase, int (*cmp)(void *, void *));
void BLI_freelist(struct ListBase *listbase);
int BLI_countlist(struct ListBase *listbase);
void BLI_freelinkN(ListBase *listbase, void *vlink);