New functions sk_set, sk_value and sk_num to replace existing macros: this is

to minimise the effects on existing code.
This commit is contained in:
Dr. Stephen Henson
1999-05-19 12:45:16 +00:00
parent 054810ec0e
commit e84240d422
11 changed files with 61 additions and 18 deletions

View File

@@ -73,11 +73,17 @@ typedef struct stack_st
int (*comp)();
} STACK;
#define sk_num(sk) ((sk)->num)
#define sk_value(sk,n) ((sk)->data[n])
#define sk_new_null() sk_new(NULL)
#define M_sk_num(sk) ((sk)->num)
#define M_sk_value(sk,n) ((sk)->data[n])
int sk_num(STACK *);
char *sk_value(STACK *, int);
char *sk_set(STACK *, int, char *);
STACK *sk_new(int (*cmp)());
void sk_free(STACK *);
void sk_pop_free(STACK *st, void (*func)());