[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59584] trunk/blender/source: remove callback BLI_localErrorCallBack from scanfill, was here for years and only ever wrapped printf.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 28 04:14:25 CEST 2013
Revision: 59584
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59584
Author: campbellbarton
Date: 2013-08-28 02:14:24 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
remove callback BLI_localErrorCallBack from scanfill, was here for years and only ever wrapped printf.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_callbacks.h
trunk/blender/source/blender/blenlib/intern/fileops.c
trunk/blender/source/blender/blenlib/intern/scanfill.c
trunk/blender/source/creator/creator.c
Modified: trunk/blender/source/blender/blenlib/BLI_callbacks.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_callbacks.h 2013-08-28 02:07:54 UTC (rev 59583)
+++ trunk/blender/source/blender/blenlib/BLI_callbacks.h 2013-08-28 02:14:24 UTC (rev 59584)
@@ -63,8 +63,4 @@
void BLI_callback_global_init(void);
void BLI_callback_global_finalize(void);
-
-/* This is blenlib internal only, unrelated to above */
-void callLocalErrorCallBack(const char *msg);
-
#endif /* __BLI_CALLBACKS_H__ */
Modified: trunk/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/fileops.c 2013-08-28 02:07:54 UTC (rev 59583)
+++ trunk/blender/source/blender/blenlib/intern/fileops.c 2013-08-28 02:14:24 UTC (rev 59584)
@@ -215,6 +215,11 @@
#ifdef WIN32
+static void callLocalErrorCallBack(const char *err)
+{
+ printf("%s\n", err);
+}
+
static char str[MAXPATHLEN + 12];
FILE *BLI_fopen(const char *filename, const char *mode)
Modified: trunk/blender/source/blender/blenlib/intern/scanfill.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/scanfill.c 2013-08-28 02:07:54 UTC (rev 59583)
+++ trunk/blender/source/blender/blenlib/intern/scanfill.c 2013-08-28 02:14:24 UTC (rev 59584)
@@ -44,41 +44,6 @@
#include "BLI_scanfill.h"
#include "BLI_utildefines.h"
-/* callbacks for errors and interrupts and some goo */
-static void (*BLI_localErrorCallBack)(const char *) = NULL;
-
-/**
- * Set a function taking a (char *) as argument to flag errors. If the
- * callback is not set, the error is discarded.
- * \param f The function to use as callback
- * \attention used in creator.c
- */
-void BLI_setErrorCallBack(void (*f)(const char *))
-{
- BLI_localErrorCallBack = f;
-}
-
-/* just flush the error to /dev/null if the error handler is missing */
-void callLocalErrorCallBack(const char *msg)
-{
- if (BLI_localErrorCallBack) {
- BLI_localErrorCallBack(msg);
- }
-}
-
-#if 0
-/* ignore if the interrupt wasn't set */
-static int callLocalInterruptCallBack(void)
-{
- if (BLI_localInterruptCallBack) {
- return BLI_localInterruptCallBack();
- }
- else {
- return 0;
- }
-}
-#endif
-
/* local types */
typedef struct PolyFill {
int edges, verts;
@@ -989,7 +954,9 @@
}
if (eed) {
/* otherwise it's impossible to be sure you can clear vertices */
- callLocalErrorCallBack("No vertices with 250 edges allowed!");
+#ifdef DEBUG
+ printf("No vertices with 250 edges allowed!\n");
+#endif
return 0;
}
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2013-08-28 02:07:54 UTC (rev 59583)
+++ trunk/blender/source/creator/creator.c 2013-08-28 02:14:24 UTC (rev 59584)
@@ -118,8 +118,6 @@
#include "GPU_draw.h"
#include "GPU_extensions.h"
-#include "BLI_scanfill.h" /* for BLI_setErrorCallBack, TODO, move elsewhere */
-
#ifdef WITH_FREESTYLE
# include "FRS_freestyle.h"
#endif
@@ -1685,12 +1683,6 @@
}
#endif
-static void error_cb(const char *err)
-{
-
- printf("%s\n", err); /* XXX do this in WM too */
-}
-
static void mem_error_cb(const char *errorStr)
{
fputs(errorStr, stderr);
@@ -1701,9 +1693,4 @@
{
/* Error output from the alloc routines: */
MEM_set_error_callback(mem_error_cb);
-
-
- /* BLI_blenlib: */
-
- BLI_setErrorCallBack(error_cb); /* */
}
More information about the Bf-blender-cvs
mailing list