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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-06 19:17:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-06 19:17:42 +0400
commit4eb1b5256e0159f747c055e10bd091a40fc834b7 (patch)
tree9acaafab326857e96e7294be60914399b4b7076c /source/blender/blenkernel
parente26b0c68a4c6e284e2d5690588fc7dad6e7a8112 (diff)
Code cleanup: PIL_dynlib, renamed to BLI_dynlib, and other tweaks.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c24
-rw-r--r--source/blender/blenkernel/intern/texture.c19
2 files changed, 21 insertions, 22 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index aa91cff03b9..6f49155c0fd 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -37,7 +37,7 @@
#include <stdlib.h>
#include "MEM_guardedalloc.h"
-#include "PIL_dynlib.h"
+#include "BLI_dynlib.h"
#include "BLI_math.h" /* windows needs for M_PI */
#include "BLI_utildefines.h"
@@ -138,18 +138,18 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
pis->instance_private_data = NULL;
/* clear the error list */
- PIL_dynlib_get_error_as_string(NULL);
+ BLI_dynlib_get_error_as_string(NULL);
- /* if(pis->handle) PIL_dynlib_close(pis->handle); */
+ /* if(pis->handle) BLI_dynlib_close(pis->handle); */
/* pis->handle= 0; */
/* open the needed object */
- pis->handle= PIL_dynlib_open(pis->name);
+ pis->handle= BLI_dynlib_open(pis->name);
if(test_dlerr(pis->name, pis->name)) return;
if (pis->handle != NULL) {
/* find the address of the version function */
- version= (int (*)(void))PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
+ version= (int (*)(void))BLI_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
if (version != NULL) {
@@ -158,7 +158,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
int (*info_func)(PluginInfo *);
PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
- info_func= (int (*)(PluginInfo *))PIL_dynlib_find_symbol(pis->handle, "plugin_getinfo");
+ info_func= (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pis->handle, "plugin_getinfo");
if(info_func == NULL) error("No info func");
else {
@@ -176,21 +176,21 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
}
MEM_freeN(info);
- cp= PIL_dynlib_find_symbol(pis->handle, "seqname");
+ cp= BLI_dynlib_find_symbol(pis->handle, "seqname");
if(cp) strncpy(cp, seqname, 21);
} else {
printf ("Plugin returned unrecognized version number\n");
return;
}
}
- alloc_private = (void* (*)(void))PIL_dynlib_find_symbol(
+ alloc_private = (void* (*)(void))BLI_dynlib_find_symbol(
pis->handle, "plugin_seq_alloc_private_data");
if (alloc_private) {
pis->instance_private_data = alloc_private();
}
pis->current_private_data = (void**)
- PIL_dynlib_find_symbol(
+ BLI_dynlib_find_symbol(
pis->handle, "plugin_private_data");
}
}
@@ -229,12 +229,12 @@ static void free_plugin_seq(PluginSeq *pis)
{
if(pis==NULL) return;
- /* no PIL_dynlib_close: same plugin can be opened multiple times with 1 handle */
+ /* no BLI_dynlib_close: same plugin can be opened multiple times with 1 handle */
if (pis->instance_private_data) {
void (*free_private)(void *);
- free_private = (void (*)(void *))PIL_dynlib_find_symbol(
+ free_private = (void (*)(void *))BLI_dynlib_find_symbol(
pis->handle, "plugin_seq_free_private_data");
if (free_private) {
free_private(pis->instance_private_data);
@@ -301,7 +301,7 @@ static struct ImBuf * do_plugin_effect(
if(seq->plugin->cfra)
*(seq->plugin->cfra)= cfra;
- cp = PIL_dynlib_find_symbol(
+ cp = BLI_dynlib_find_symbol(
seq->plugin->handle, "seqname");
if(cp) strncpy(cp, seq->name+2, 22);
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 866874ee5c8..9cd07de31dc 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -41,9 +41,8 @@
#include "MEM_guardedalloc.h"
-#include "PIL_dynlib.h"
-
#include "BLI_blenlib.h"
+#include "BLI_dynlib.h"
#include "BLI_math.h"
#include "BLI_kdopbvh.h"
#include "BLI_utildefines.h"
@@ -82,7 +81,7 @@ int test_dlerr(const char *name, const char *symbol)
{
char *err;
- err= PIL_dynlib_get_error_as_string(NULL);
+ err= BLI_dynlib_get_error_as_string(NULL);
if(err) {
printf("var1: %s, var2: %s, var3: %s\n", name, symbol, err);
return 1;
@@ -108,19 +107,19 @@ void open_plugin_tex(PluginTex *pit)
pit->instance_init= NULL;
/* clear the error list */
- PIL_dynlib_get_error_as_string(NULL);
+ BLI_dynlib_get_error_as_string(NULL);
- /* no PIL_dynlib_close! multiple opened plugins... */
- /* if(pit->handle) PIL_dynlib_close(pit->handle); */
+ /* no BLI_dynlib_close! multiple opened plugins... */
+ /* if(pit->handle) BLI_dynlib_close(pit->handle); */
/* pit->handle= 0; */
/* open the needed object */
- pit->handle= PIL_dynlib_open(pit->name);
+ pit->handle= BLI_dynlib_open(pit->name);
if(test_dlerr(pit->name, pit->name)) return;
if (pit->handle != NULL) {
/* find the address of the version function */
- version= (int (*)(void)) PIL_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
+ version= (int (*)(void)) BLI_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
if (test_dlerr(pit->name, "plugin_tex_getversion")) return;
if (version != NULL) {
@@ -129,7 +128,7 @@ void open_plugin_tex(PluginTex *pit)
int (*info_func)(PluginInfo *);
PluginInfo *info= (PluginInfo*) MEM_mallocN(sizeof(PluginInfo), "plugin_info");
- info_func= (int (*)(PluginInfo *))PIL_dynlib_find_symbol(pit->handle, "plugin_getinfo");
+ info_func= (int (*)(PluginInfo *))BLI_dynlib_find_symbol(pit->handle, "plugin_getinfo");
if (!test_dlerr(pit->name, "plugin_getinfo")) {
info->instance_init = NULL;
@@ -200,7 +199,7 @@ void free_plugin_tex(PluginTex *pit)
{
if(pit==NULL) return;
- /* no PIL_dynlib_close: same plugin can be opened multiple times, 1 handle */
+ /* no BLI_dynlib_close: same plugin can be opened multiple times, 1 handle */
MEM_freeN(pit);
}