diff options
Diffstat (limited to 'ckaliases.h')
-rw-r--r-- | ckaliases.h | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/ckaliases.h b/ckaliases.h index 8d6546d..d3e053c 100644 --- a/ckaliases.h +++ b/ckaliases.h | |||
@@ -14,36 +14,58 @@ | |||
14 | You should have received a copy of the GNU General Public License along | 14 | You should have received a copy of the GNU General Public License along |
15 | with this program. If not, see <http://www.gnu.org/licenses/>. */ | 15 | with this program. If not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | ||
17 | #ifdef HAVE_CONFIG_H | ||
18 | # include <config.h> | ||
19 | #endif | ||
20 | #include <stdio.h> | ||
21 | #include <stdlib.h> | ||
22 | #define obstack_chunk_alloc malloc | ||
23 | #define obstack_chunk_free free | ||
24 | #include <obstack.h> | ||
25 | #include <stdio.h> | ||
26 | #include <stdlib.h> | ||
27 | #include <stdarg.h> | ||
28 | #include <unistd.h> | ||
29 | #include <sys/file.h> | ||
30 | #include <sys/stat.h> | ||
31 | #include <errno.h> | ||
32 | #include <string.h> | ||
33 | #include "getopt.h" | ||
34 | #include "progname.h" | ||
35 | #include "error.h" | ||
36 | #include "xalloc.h" | ||
37 | |||
17 | extern char *file_name; | 38 | extern char *file_name; |
18 | extern int line_num; | 39 | extern int line_num; |
40 | extern int error_count; | ||
19 | 41 | ||
20 | void init_lex(); | 42 | void init_lex (); |
21 | void lex_debug(int n); | 43 | void lex_debug (int n); |
22 | void openaliases(char *name); | 44 | void openaliases (char *name); |
23 | void openaliases_prefix(char *prefix, char *name); | 45 | void openaliases_prefix (char *prefix, char *name); |
24 | 46 | ||
25 | struct string_list { | 47 | struct string_list |
26 | struct string_list *next; | 48 | { |
27 | char *str; | 49 | struct string_list *next; |
50 | char *str; | ||
28 | }; | 51 | }; |
29 | 52 | ||
30 | typedef struct slist { | 53 | typedef struct slist |
31 | struct string_list *head, *tail; | 54 | { |
32 | int count; | 55 | struct string_list *head, *tail; |
56 | int count; | ||
33 | } SLIST; | 57 | } SLIST; |
34 | 58 | ||
35 | void slist_add(SLIST **plist, char *str); | 59 | void slist_add (SLIST ** plist, char *str); |
36 | void slist_append(SLIST **pdst, SLIST *src); | 60 | void slist_append (SLIST ** pdst, SLIST * src); |
37 | char *slist_member(SLIST *plist, char *name); | 61 | char *slist_member (SLIST * plist, char *name); |
38 | void slist_destroy(SLIST **plist); | 62 | void slist_destroy (SLIST ** plist); |
39 | |||
40 | void read_include(SLIST **plist, char *name); | ||
41 | 63 | ||
42 | void regalias(char *name, SLIST *exp); | 64 | void read_include (SLIST ** plist, char *name); |
43 | void begin_aliases(void); | ||
44 | void end_aliases(void); | ||
45 | 65 | ||
46 | void error(char *fmt, ...); | 66 | void regalias (char *name, SLIST * exp); |
67 | void begin_aliases (void); | ||
68 | void end_aliases (void); | ||
47 | 69 | ||
48 | extern SLIST *cw_list; | 70 | extern SLIST *cw_list; |
49 | extern int verbose; | 71 | extern int verbose; |