]> git.mdlowis.com Git - archive/tide-ocaml.git/commitdiff
created x11 module in preparation for creating x11 primitives
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 29 Aug 2017 20:20:40 +0000 (16:20 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 29 Aug 2017 20:20:40 +0000 (16:20 -0400)
Makefile
lib/env.ml [deleted file]
lib/env_prims.c [deleted file]
lib/x11.ml [new file with mode: 0644]
lib/x11_prims.c [new file with mode: 0644]

index 648847234e3a13304fecc03d91493d532ac4697b..24e219abaff14bbdd30fcc6edb3697281aca88cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,8 @@ endif
 BINS = edit
 LIBOBJS = \
     lib/tide.$(OBJEXT) \
-    lib/env.$(OBJEXT) \
-    lib/env_prims.o
+    lib/x11.$(OBJEXT) \
+    lib/x11_prims.o
 
 .PHONY: all clean
 
diff --git a/lib/env.ml b/lib/env.ml
deleted file mode 100644 (file)
index 3e7cb78..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-(* Environment variable management routines *)
-external set : string -> string -> int = "env_set"
-external get : string -> string = "env_get"
-external unset : string -> int = "env_unset"
diff --git a/lib/env_prims.c b/lib/env_prims.c
deleted file mode 100644 (file)
index f08dfae..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <curses.h>
-#include <caml/mlvalues.h>
-#include <caml/memory.h>
-#include <caml/alloc.h>
-#include <caml/custom.h>
-#include <stdlib.h>
-
-CAMLprim value env_get(value var) {
-    CAMLparam1(var);
-    puts("bar");
-    CAMLreturn(caml_copy_string(""));
-}
-
-CAMLprim value env_set(value var, value val) {
-    CAMLparam2(var, val);
-    puts("foo");
-    CAMLreturn(Val_int(0));
-}
-
-CAMLprim value env_unset(value var) {
-    CAMLparam1(var);
-    puts("baz");
-    CAMLreturn(Val_int(0));
-}
diff --git a/lib/x11.ml b/lib/x11.ml
new file mode 100644 (file)
index 0000000..67e6965
--- /dev/null
@@ -0,0 +1 @@
+external get : string -> string = "x11_get"
diff --git a/lib/x11_prims.c b/lib/x11_prims.c
new file mode 100644 (file)
index 0000000..48145ae
--- /dev/null
@@ -0,0 +1,12 @@
+#include <curses.h>
+#include <caml/mlvalues.h>
+#include <caml/memory.h>
+#include <caml/alloc.h>
+#include <caml/custom.h>
+#include <stdlib.h>
+
+CAMLprim value x11_get(value var) {
+    CAMLparam1(var);
+    puts("bar");
+    CAMLreturn(caml_copy_string(""));
+}