summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-03-23 20:10:23 +0000
committerSimon Tatham <anakin@pobox.com>2004-03-23 20:10:23 +0000
commit6cba4fa3f6c02db9994d6b6234f2ae5007839a5d (patch)
treea713c55ba681e428d4770a8c5172982d25a89208 /misc.c
parent6576379028db35e575cb6c855396706bad363521 (diff)
downloadhalibut-6cba4fa3f6c02db9994d6b6234f2ae5007839a5d.zip
halibut-6cba4fa3f6c02db9994d6b6234f2ae5007839a5d.tar.gz
halibut-6cba4fa3f6c02db9994d6b6234f2ae5007839a5d.tar.bz2
halibut-6cba4fa3f6c02db9994d6b6234f2ae5007839a5d.tar.xz
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]
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c7
1 files changed, 7 insertions, 0 deletions
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.
*/