diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luaprofiler/stack.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luaprofiler/stack.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luaprofiler/stack.c b/Build/source/texk/web2c/luatexdir/luaprofiler/stack.c new file mode 100644 index 00000000000..07754ad95b1 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luaprofiler/stack.c @@ -0,0 +1,33 @@ +/* +** LuaProfiler +** Copyright Kepler Project 2005-2007 (http://www.keplerproject.org/luaprofiler) +** $Id: stack.c,v 1.4 2007/08/22 19:23:53 carregal Exp $ +*/ + +/***************************************************************************** +stack.c: + Simple stack manipulation +*****************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include "stack.h" + +void lprofS_push(lprofS_STACK *p, lprofS_STACK_RECORD r) { +lprofS_STACK q; + q=(lprofS_STACK)malloc(sizeof(lprofS_STACK_RECORD)); + *q=r; + q->next=*p; + *p=q; +} + +lprofS_STACK_RECORD lprofS_pop(lprofS_STACK *p) { +lprofS_STACK_RECORD r; +lprofS_STACK q; + + r=**p; + q=*p; + *p=(*p)->next; + free(q); + return r; +} |