Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | /**************************************************************************** |
2 | * Copyright (c) 1998 Free Software Foundation, Inc. * |
||
3 | * * |
||
4 | * Permission is hereby granted, free of charge, to any person obtaining a * |
||
5 | * copy of this software and associated documentation files (the * |
||
6 | * "Software"), to deal in the Software without restriction, including * |
||
7 | * without limitation the rights to use, copy, modify, merge, publish, * |
||
8 | * distribute, distribute with modifications, sublicense, and/or sell * |
||
9 | * copies of the Software, and to permit persons to whom the Software is * |
||
10 | * furnished to do so, subject to the following conditions: * |
||
11 | * * |
||
12 | * The above copyright notice and this permission notice shall be included * |
||
13 | * in all copies or substantial portions of the Software. * |
||
14 | * * |
||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
||
16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
||
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
||
18 | * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
||
19 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
||
20 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
||
21 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
||
22 | * * |
||
23 | * Except as contained in this notice, the name(s) of the above copyright * |
||
24 | * holders shall not be used in advertising or otherwise to promote the * |
||
25 | * sale, use or other dealings in this Software without prior written * |
||
26 | * authorization. * |
||
27 | ****************************************************************************/ |
||
28 | |||
29 | /**************************************************************************** |
||
30 | * Author: Zeyd M. Ben-Halim |
||
31 | * and: Eric S. Raymond |
||
32 | ****************************************************************************/ |
||
33 | |||
34 | |||
35 | /* |
||
36 | * term_entry.h -- interface to entry-manipulation code |
||
37 | */ |
||
38 | |||
39 | #ifndef _TERM_ENTRY_H |
||
40 | #define _TERM_ENTRY_H |
||
41 | |||
42 | #define MAX_USES 32 |
||
43 | |||
44 | typedef struct entry { |
||
45 | TERMTYPE tterm; |
||
46 | int nuses; |
||
47 | struct |
||
48 | { |
||
49 | void *parent; /* (char *) or (ENTRY *) */ |
||
50 | long line; |
||
51 | } |
||
52 | uses[MAX_USES]; |
||
53 | long cstart, cend; |
||
54 | long startline; |
||
55 | struct entry *next; |
||
56 | struct entry *last; |
||
57 | } |
||
58 | ENTRY; |
||
59 | |||
60 | extern ENTRY *_nc_head, *_nc_tail; |
||
61 | #define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next) |
||
62 | |||
63 | #define MAX_LINE 132 |
||
64 | |||
65 | #define NULLHOOK (bool(*)(ENTRY *))0 |
||
66 | |||
67 | /* alloc_entry.c: elementary allocation code */ |
||
68 | extern void _nc_init_entry(TERMTYPE *const); |
||
69 | extern char *_nc_save_str(const char *const); |
||
70 | extern void _nc_merge_entry(TERMTYPE *const, TERMTYPE *const); |
||
71 | extern void _nc_wrap_entry(ENTRY *const); |
||
72 | |||
73 | /* parse_entry.c: entry-parsing code */ |
||
74 | extern int _nc_parse_entry(ENTRY *, int, bool); |
||
75 | extern int _nc_capcmp(const char *, const char *); |
||
76 | |||
77 | /* write_entry.c: writing an entry to the file system */ |
||
78 | extern void _nc_set_writedir(char *); |
||
79 | extern void _nc_write_entry(TERMTYPE *const); |
||
80 | |||
81 | /* comp_parse.c: entry list handling */ |
||
82 | extern void _nc_read_entry_source(FILE*, char*, int, bool, bool (*)(ENTRY*)); |
||
83 | extern bool _nc_entry_match(char *, char *); |
||
84 | extern int _nc_resolve_uses(void); |
||
85 | extern void _nc_free_entries(ENTRY *); |
||
86 | |||
87 | #endif /* _TERM_ENTRY_H */ |
||
88 | |||
89 | /* term_entry.h ends here */ |