aboutsummaryrefslogtreecommitdiff
path: root/toxy/tow.c
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2003-09-24 10:46:19 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2003-09-24 10:46:19 +0000
commit9680b47879dfc58f884208f7abf2f945b3b41d25 (patch)
tree93eda19deb61daff60c533a3bbd1efe79e9cdc9b /toxy/tow.c
parentedab184352cd14788a37c76dce147ac19f7464b4 (diff)
adding toxy project
svn path=/trunk/externals/miXed/; revision=1024
Diffstat (limited to 'toxy/tow.c')
-rw-r--r--toxy/tow.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/toxy/tow.c b/toxy/tow.c
new file mode 100644
index 0000000..5e4f902
--- /dev/null
+++ b/toxy/tow.c
@@ -0,0 +1,26 @@
+/* Copyright (c) 2003 krzYszcz and others.
+ * For information on usage and redistribution, and for a DISCLAIMER OF ALL
+ * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
+
+/* The tow extern just loads the 'widget' library.
+ The tow class itself is defined in widget.c. */
+
+#include "m_pd.h"
+#include "common/loud.h"
+#include "unstable/loader.h"
+
+void tow_setup(void)
+{
+ int result = LOADER_OK;
+ if (zgetfn(&pd_objectmaker, gensym("widget")))
+ loud_warning(0, "widget is already loaded");
+ else
+ result = unstable_load_lib("", "widget");
+ if (result == LOADER_NOFILE)
+ loud_error(0, "widget library is missing");
+ else if (!zgetfn(&pd_objectmaker, gensym("widget")))
+ {
+ loud_error(0, "version mismatch");
+ loud_errand(0, "use a more recent Pd release (or recompile toxy).");
+ }
+}