1 | /* macro.h -- declarations for macro.c. |
---|
2 | $Id: macro.h,v 1.1.1.2 2003-02-28 17:44:04 amb Exp $ |
---|
3 | |
---|
4 | Copyright (C) 1998, 99 Free Software Foundation, Inc. |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | This program is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | GNU General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU General Public License |
---|
17 | along with this program; if not, write to the Free Software |
---|
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef MACRO_H |
---|
22 | #define MACRO_H |
---|
23 | |
---|
24 | extern FILE *macro_expansion_output_stream; |
---|
25 | extern char *macro_expansion_filename; |
---|
26 | extern int me_executing_string; |
---|
27 | extern int only_macro_expansion; |
---|
28 | |
---|
29 | /* Here is a structure used to remember input text strings and offsets |
---|
30 | within them. */ |
---|
31 | typedef struct { |
---|
32 | char *pointer; /* Pointer to the input text. */ |
---|
33 | int offset; /* Offset of the last character output. */ |
---|
34 | } ITEXT; |
---|
35 | |
---|
36 | /* Macro definitions for user-defined commands. */ |
---|
37 | typedef struct { |
---|
38 | char *name; /* Name of the macro. */ |
---|
39 | char **arglist; /* Args to replace when executing. */ |
---|
40 | char *body; /* Macro body. */ |
---|
41 | char *source_file; /* File where this macro is defined. */ |
---|
42 | int source_lineno; /* Line number within FILENAME. */ |
---|
43 | int inhibited; /* Nonzero means make find_macro () fail. */ |
---|
44 | int flags; /* ME_RECURSE, ME_QUOTE_ARG, etc. */ |
---|
45 | } MACRO_DEF; |
---|
46 | |
---|
47 | /* flags for MACRO_DEF */ |
---|
48 | #define ME_RECURSE 0x01 |
---|
49 | #define ME_QUOTE_ARG 0x02 |
---|
50 | |
---|
51 | extern void execute_macro (); |
---|
52 | extern MACRO_DEF *find_macro (); |
---|
53 | extern char *expand_macro (); |
---|
54 | |
---|
55 | extern ITEXT *remember_itext (); |
---|
56 | extern void forget_itext (); |
---|
57 | extern void maybe_write_itext (); |
---|
58 | extern void write_region_to_macro_output (); |
---|
59 | extern void append_to_expansion_output (); |
---|
60 | extern void me_append_before_this_command (); |
---|
61 | extern void me_execute_string (); |
---|
62 | |
---|
63 | extern char *alias_expand (); |
---|
64 | extern int enclosure_command (); |
---|
65 | extern void enclosure_expand (); |
---|
66 | |
---|
67 | /* The @commands. */ |
---|
68 | extern void cm_macro (), cm_rmacro (), cm_unmacro (); |
---|
69 | extern void cm_alias (), cm_definfoenclose (); |
---|
70 | |
---|
71 | #endif /* not MACRO_H */ |
---|