Man-page back end for Halibut. Also, a couple of additional markup
[sgt/halibut] / misc.c
diff --git a/misc.c b/misc.c
index c4ac72f..0de6c2a 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -41,6 +41,13 @@ void *stk_pop(stack s) {
        return NULL;
 }
 
+void *stk_top(stack s) {
+    if (s->sp > 0)
+       return s->data[s->sp-1];
+    else
+       return NULL;
+}
+
 /*
  * Small routines to amalgamate a string from an input source.
  */