From 6cba4fa3f6c02db9994d6b6234f2ae5007839a5d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 23 Mar 2004 20:10:23 +0000 Subject: Man-page back end for Halibut. Also, a couple of additional markup features commonly used in man pages: (a) the ability to nest paragraph breaks, code paragraphs and other lists inside list items, and (b) description lists as normally used in man pages to describe command-line options. [originally from svn r3954] --- misc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index c4ac72f..0de6c2a 100644 --- 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. */ -- cgit v1.1