summaryrefslogtreecommitdiff
path: root/other/burneye/src/conf/tmp/branch.h
blob: 8fdf9a4d38a9802155875fdc3b74509b904d30f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* fornax - distributed network
 *
 * by team teso
 *
 * scripting branching includes
 */

#ifndef	FNX_BRANCH_H
#define	FNX_BRANCH_H

#include "condition.h"
#include "element.h"


typedef struct {
	condition *	cond;
	element **	b_true;
	element **	b_false;
} branch;


/* br_create
 *
 * branch constructor. create a new branch structure
 *
 * return a pointer to the new structure
 */

branch *	br_create (void);


/* br_free
 *
 * free the whole branch pointed to by `br'
 *
 * return in any case
 */

void	br_free (branch *br);


/* br_set_condition
 *
 * set condition `cond' for branch `br'
 *
 * return pointer to structure
 */

branch *	br_set_condition (branch *br, condition *cond);


/* br_set_block_if
 *
 * set block `bl' for branch `br' on true case
 *
 * return pointer to structure
 */

branch *	br_set_block_if (branch *br, element **bl);


/* br_set_block_else
 *
 * set block `bl' for branch `br' on false case
 *
 * return pointer to structure
 */

branch *	br_set_block_else (branch *br, element **bl);


#endif