xref: /titanic_41/usr/src/cmd/tnf/prex/expr.h (revision cde2885fdf538266ee2a3b08dee2d5075ce8fa2b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1994, by Sun Microsytems, Inc.
24  */
25 
26 #ifndef _EXPR_H
27 #define	_EXPR_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * Includes
33  */
34 
35 #include <stdio.h>
36 
37 #include "queue.h"
38 #include "spec.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * Typedefs
46  */
47 
48 typedef struct expr {
49 	queue_node_t	qn;
50 	spec_t		 *left_p;
51 	spec_t		 *right_p;
52 
53 } expr_t;
54 
55 
56 /*
57  * Declarations
58  */
59 
60 expr_t * expr(spec_t * left_p, spec_t * right_p);
61 void expr_destroy(expr_t * list_p);
62 expr_t * expr_list(expr_t * list_p, expr_t * item_p);
63 void expr_print(FILE * stream, expr_t * list_p);
64 boolean_t expr_match(expr_t * expr_p, const char *attrs);
65 expr_t * expr_dup(expr_t * list_p);
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* _EXPR_H */
72