/* $Id: gstack_top.c 712 2006-07-27 22:32:39Z bruce $ */ #include "gstack.h" /** Return the address of first (most recently pushed) element in the * queue. */ void* gstack_top(const struct gstack* s) { return (s->head == 0) ? 0 : s->head->data; }