Warning, file /include/madX/mad_macro.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef MAD_MACRO_H
0002 #define MAD_MACRO_H
0003
0004
0005
0006 struct char_array;
0007 struct char_p_array;
0008 struct name_list;
0009 struct in_cmd;
0010
0011 struct macro
0012 {
0013 char name[NAME_L];
0014 int n_formal;
0015 int dead;
0016 struct char_p_array* formal;
0017 struct char_p_array* tokens;
0018 struct char_array* body;
0019 int stamp;
0020 struct char_array* original;
0021 };
0022
0023 struct macro_list
0024 {
0025 int stamp;
0026 char name[NAME_L];
0027 int max,
0028 curr;
0029 struct name_list* list;
0030 struct macro** macros;
0031 };
0032
0033
0034
0035 int make_macro(char* statement);
0036 struct macro* new_macro(int n_formal, int length, int p_length);
0037
0038 struct macro_list* new_macro_list(int length);
0039 void add_to_macro_list(struct macro*, struct macro_list*);
0040
0041 void disable_line(char* name, struct macro_list*);
0042 void replace_lines(struct macro*, int replace, char** reps);
0043 void save_macros2file(const char *);
0044 void exec_macro(struct in_cmd* cmd, int pos);
0045 #endif
0046