mirror of
https://github.com/nasa/trick.git
synced 2025-02-02 17:21:08 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
43 lines
679 B
C
43 lines
679 B
C
/************** stack functions *****************/
|
|
|
|
#ifndef LSTACK_H
|
|
#define LSTACK_H
|
|
|
|
|
|
#include "dllist.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct _LSTACK
|
|
{
|
|
DLLIST list; /* implementing the stack using a list */
|
|
}LSTACK;
|
|
|
|
|
|
LSTACK* LS_Create(void); /* creates and initializes a LSTACK */
|
|
|
|
|
|
void LS_Init(LSTACK*); /* initializes a LSTACK */
|
|
|
|
|
|
void* LS_Pop(LSTACK*); /* pop an item off the stack */
|
|
|
|
|
|
void* LS_Peek(LSTACK*); /* get item at top of stack without poping */
|
|
|
|
|
|
void LS_Push(void* pData,LSTACK*); /* push an item on the stack */
|
|
|
|
|
|
int LS_GetCount(LSTACK*); /* get number of items on the stack */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|