diff options
Diffstat (limited to 'misc.c')
| -rw-r--r-- | misc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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. */ |