4 #define SSTACK_TYPE_PUSH 1
5 #define SSTACK_TYPE_POP 2
6 #define SSTACK_TYPE_EVENT 3
8 //#define SSTACK_PUSH_VAL(i) (()i->data_val)
10 /* An item of a struct sstack, that describes a stack operation */
14 unsigned char finished
;
15 unsigned char processable
;
16 unsigned char deletable
;
18 /* Type of operation: SSTACK_TYPE_PUSH, SSTACK_TYPE_POP or SSTACK_TYPE_EVENT */
20 /* private, application-dependant data */
23 /* Function to call to delete data_val */
24 void (*delete_data_val
)(void *data_val
);
26 /* The index of the corresponding push (for a pop) or pop (for a push) */
29 /* Does this item require that we wait for its pop to process it */
36 /* external debugging function to print the private data of an item */
37 extern void (*print_sstack_item_data
)(struct sstack_item
*);
39 /* An actual sstack */
44 /* Stack of the indexes of the pushes that have been done. An index is popped when the
45 * corresponding pop is added to the sstack. This enables us to find the index of the
50 /* Stack of 0's and 1's. 0: don't wait for pop to process the children
51 * 1: wait for pop to process its children
53 GArray
*wait_pop_stack
;
55 /* Next item we must try to process */
58 void (*process_func
)(void *arg
, struct sstack_item
*item
);
59 void *process_func_arg
; /* the pointer passed as the "arg" argument of process_func */
62 struct sstack_item
*sstack_new_item();
64 void sstack_add_item(struct sstack
*stack
, struct sstack_item
*item
);
66 struct sstack
*sstack_new(void);
67 struct sstack_item
*sstack_item_new(void);
68 struct sstack_item
*sstack_item_new_push(unsigned char finished
);
69 struct sstack_item
*sstack_item_new_pop(void);
70 struct sstack_item
*sstack_item_new_evt(void);
72 extern void print_stack(struct sstack
*stack
);
This page took 0.050064 seconds and 4 git commands to generate.