diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2008-12-04 14:23:42 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2008-12-04 14:23:42 +0000 |
commit | b2394c4ae6c41d6f7a7dfbf7b2c2c3200c3c4992 (patch) | |
tree | be0e9995576a695fb0eead5f4bc5aa9718f2e9a7 /gfsm/gfsm/src/libgfsm/tests/module/mod1test.c | |
parent | 6b81740cda47da83fe3dc8f1dbf53558fcd80d7c (diff) |
+ added ./autogen.sh-generated stuff to SVN, for pd-extended auto-builds
- pkg-config autoconf macros e.g. PKG_CHECK_MODULES are missing on darwin
+ removed extraneous (non-library) gfsm/ subdirectories doc/, src/programs, tests/
+ added a lot of UNUSED attributes to lighten the pd-extended autobuild logs a bit
svn path=/trunk/externals/moocow/; revision=10421
Diffstat (limited to 'gfsm/gfsm/src/libgfsm/tests/module/mod1test.c')
-rw-r--r-- | gfsm/gfsm/src/libgfsm/tests/module/mod1test.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/gfsm/gfsm/src/libgfsm/tests/module/mod1test.c b/gfsm/gfsm/src/libgfsm/tests/module/mod1test.c deleted file mode 100644 index 6389972..0000000 --- a/gfsm/gfsm/src/libgfsm/tests/module/mod1test.c +++ /dev/null @@ -1,52 +0,0 @@ -#include <stdio.h> -#include <glib.h> -#include <gmodule.h> - -typedef void (*fooFunc) (void); - -int main(int argc, char **argv) { - int i; - const gchar *prog = argv[0]; - //const gchar *moddir = g_getenv("PWD"); //-- get module directory (hack) - const gchar *moddir = "."; - gchar *modpath; - GModule *mod; - fooFunc foofunc; - - g_assert(g_module_supported()); - - for (i=1; i < argc; i++) { - //-- build full module pathname - modpath = g_module_build_path(moddir,argv[i]); - printf("%s: argv[%d]='%s': moddir='%s', modpath='%s'\n", prog, i, moddir, argv[i], modpath); - //-- - //modpath = argv[i]; - //printf("%s: argv[%d]='%s': modfile='%s'\n", prog, i, argv[i], modpath); - - //-- open module - if ( !(mod = g_module_open(modpath,G_MODULE_BIND_LOCAL)) ) { - g_printerr("%s: could not load module '%s': %s - skipping\n", prog, modpath, g_module_error()); - if (modpath != argv[i]) g_free(modpath); - continue; - } - printf("-> open(): %p\n", mod); - - //-- get symbol 'foo' from module - if (!g_module_symbol(mod,"foo",(gpointer *)&foofunc)) { - g_printerr("%s: could not load symbol 'foo' from module '%s': %s\n", prog, modpath, g_module_error()); - g_module_close(mod); - if (modpath != argv[i]) g_free(modpath); - continue; - } - printf("-> symbol('foo'): %p\n", foofunc); - - //-- call 'foo' as a foofunc - printf("-> calling foo(): "); - foofunc(); - - //-- cleanup - if (modpath != argv[i]) g_free(modpath); - g_module_close(mod); - } - return 0; -} |