8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / tnf / prex / spec.h
blob5972b351e1d780577f09c04ccd61957d58f11b00
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #ifndef _SPEC_H
27 #define _SPEC_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * Includes
35 #include <stdio.h>
36 #include <libgen.h>
37 #include <sys/types.h>
39 #include "queue.h"
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
46 * Typedefs
49 typedef enum spec_type {
50 SPEC_EXACT,
51 SPEC_REGEXP
54 } spec_type_t;
57 typedef struct spec {
58 queue_node_t qn;
59 char *str;
60 spec_type_t type;
61 char *regexp_p;
63 } spec_t;
65 typedef void
66 (*spec_attr_fun_t) (spec_t * spec, char *attr, char *value, void *calldatap);
67 typedef void
68 (*spec_val_fun_t) (spec_t * spec, char *value, void *calldatap);
72 * Globals
77 * Declarations
80 spec_t * spec(char *str_p, spec_type_t type);
81 void spec_destroy(spec_t * list_p);
82 void spec_print(FILE * stream, spec_t * list_p);
83 spec_t * spec_list(spec_t * list_p, spec_t * item_p);
84 void spec_attrtrav(spec_t * spec_p, char *attrs,
85 spec_attr_fun_t fun, void *calldata_p);
86 void spec_valtrav(spec_t * spec_p, char *valstr,
87 spec_val_fun_t fun, void *calldata_p);
88 spec_t *spec_dup(spec_t * spec_p);
90 #ifdef __cplusplus
92 #endif
94 #endif /* _SPEC_H */