summaryrefslogtreecommitdiffstats
path: root/src/ocaml-flexdll-test.c
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2012-12-05 07:18:54 (GMT)
committerTony Theodore <tonyt@logyst.com>2012-12-05 07:18:54 (GMT)
commit7337ea85eebbba1bb34851fc7cefeaf47a98a003 (patch)
tree414e1c3cf8b97fe49538cfbf0adf7364016e9744 /src/ocaml-flexdll-test.c
parent8daf0f40955bd2f46bff9ab7e9b0f468d66fa97a (diff)
downloadmxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.zip
mxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.tar.gz
mxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.tar.bz2
run make cleanup-style
Diffstat (limited to 'src/ocaml-flexdll-test.c')
-rwxr-xr-xsrc/ocaml-flexdll-test.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/ocaml-flexdll-test.c b/src/ocaml-flexdll-test.c
index 3e231ca..79ed21a 100755
--- a/src/ocaml-flexdll-test.c
+++ b/src/ocaml-flexdll-test.c
@@ -1,44 +1,44 @@
-/*****************************************************************
- FlexDLL
- Alain Frisch
-
- Copyright 2007 Institut National de Recherche en Informatique et
- en Automatique.
-
-******************************************************************/
-
-/* An example (main program) */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "flexdll.h"
-
-typedef void torun();
-
-void api(char *msg){ printf("API: %s\n", msg); }
-
-int main(int argc, char **argv)
-{
- void *sym;
- void *handle;
- int i;
- torun *torun;
-
- printf("INIT\n"); fflush(stdout);
- flexdll_dump_exports(NULL);
- printf("OK\n"); fflush(stdout);
- for (i = 1; i < argc; i++) {
- printf("** Loading %s\n", argv[i]);
- handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);
- if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
- printf("** handle = %p\n", handle);
- flexdll_dump_exports(handle);
- flexdll_dump_relocations(handle);
-
- if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
-
- torun = flexdll_dlsym(handle, "torun");
- if (torun) torun();
- }
- exit(0);
-}
+/*****************************************************************
+ FlexDLL
+ Alain Frisch
+
+ Copyright 2007 Institut National de Recherche en Informatique et
+ en Automatique.
+
+******************************************************************/
+
+/* An example (main program) */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "flexdll.h"
+
+typedef void torun();
+
+void api(char *msg){ printf("API: %s\n", msg); }
+
+int main(int argc, char **argv)
+{
+ void *sym;
+ void *handle;
+ int i;
+ torun *torun;
+
+ printf("INIT\n"); fflush(stdout);
+ flexdll_dump_exports(NULL);
+ printf("OK\n"); fflush(stdout);
+ for (i = 1; i < argc; i++) {
+ printf("** Loading %s\n", argv[i]);
+ handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);
+ if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
+ printf("** handle = %p\n", handle);
+ flexdll_dump_exports(handle);
+ flexdll_dump_relocations(handle);
+
+ if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
+
+ torun = flexdll_dlsym(handle, "torun");
+ if (torun) torun();
+ }
+ exit(0);
+}