From 9680b47879dfc58f884208f7abf2f945b3b41d25 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 24 Sep 2003 10:46:19 +0000 Subject: adding toxy project svn path=/trunk/externals/miXed/; revision=1024 --- toxy/tow.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 toxy/tow.c (limited to 'toxy/tow.c') 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)."); + } +} -- cgit v1.2.1