]> ncurses.scripts.mit.edu Git - ncurses.git/blob - include/term_entry.h
ncurses 4.1
[ncurses.git] / include / term_entry.h
1
2 /***************************************************************************
3 *                            COPYRIGHT NOTICE                              *
4 ****************************************************************************
5 *                ncurses is copyright (C) 1992-1995                        *
6 *                          Zeyd M. Ben-Halim                               *
7 *                          zmbenhal@netcom.com                             *
8 *                          Eric S. Raymond                                 *
9 *                          esr@snark.thyrsus.com                           *
10 *                                                                          *
11 *        Permission is hereby granted to reproduce and distribute ncurses  *
12 *        by any means and for any fee, whether alone or as part of a       *
13 *        larger distribution, in source or in binary form, PROVIDED        *
14 *        this notice is included with any such distribution, and is not    *
15 *        removed from any of its header files. Mention of ncurses in any   *
16 *        applications linked with it is highly appreciated.                *
17 *                                                                          *
18 *        ncurses comes AS IS with no warranty, implied or expressed.       *
19 *                                                                          *
20 ***************************************************************************/
21
22
23 /*
24  *      term_entry.h -- interface to entry-manipulation code
25  */
26
27 #ifndef _TERM_ENTRY_H
28 #define _TERM_ENTRY_H
29
30 #define MAX_USES        32
31
32 typedef struct entry {
33         TERMTYPE        tterm;
34         int             nuses;
35         struct
36         {
37             void        *parent;        /* (char *) or (ENTRY *) */
38             long        line;
39         }
40         uses[MAX_USES];
41         long            cstart, cend;
42         long            startline;
43         struct entry    *next;
44         struct entry    *last;
45 }
46 ENTRY;
47
48 extern ENTRY    *_nc_head, *_nc_tail;
49 #define for_entry_list(qp)      for (qp = _nc_head; qp; qp = qp->next)
50
51 #define MAX_LINE        132
52
53 #define NULLHOOK        (bool(*)(ENTRY *))0
54
55 /* alloc_entry.c: elementary allocation code */
56 extern void _nc_init_entry(TERMTYPE *const);
57 extern char *_nc_save_str(const char *const);
58 extern void _nc_merge_entry(TERMTYPE *const, TERMTYPE *const);
59 extern void _nc_wrap_entry(ENTRY *const);
60
61 /* parse_entry.c: entry-parsing code */
62 extern int _nc_parse_entry(ENTRY *, int, bool);
63 extern int _nc_capcmp(const char *, const char *);
64
65 /* write_entry.c: writing an entry to the file system */
66 extern void _nc_set_writedir(char *);
67 extern void _nc_write_entry(TERMTYPE *const);
68
69 /* comp_parse.c: entry list handling */
70 extern void _nc_read_entry_source(FILE*, char*, int, bool, bool (*)(ENTRY*));
71 extern bool _nc_entry_match(char *, char *);
72 extern int _nc_resolve_uses(void);
73 extern void _nc_free_entries(ENTRY *);
74
75 #endif /* _TERM_ENTRY_H */
76
77 /* term_entry.h ends here */