source: PSPA/madxPSPA/src/mad_cmdin.h @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.8 KB
Line 
1#ifndef MAD_CMDIN_H
2#define MAD_CMDIN_H
3
4// types
5
6struct command;
7struct name_list;
8struct char_p_array;
9
10struct in_cmd          /* contains information about classified command */
11{
12  char name[NAME_L];
13  char* label;         /* pointer to label: if != NULL then buffer this */
14  int type;            /*    0 command from list;
15                             1 element definiton outside sequence;
16                             2 variable definition;
17                             3 start or end of sequence;
18                             4 element definition; */
19  int sub_type;        /* position in cmd_match_base */
20  int stamp;
21  int decl_start;      /* start of declarative part in tok_list */
22  int clone_flag;      /* if zero, clone can be dropped after decoding */
23  struct char_p_array* tok_list; /* contains pointers to tokens */
24  struct command* cmd_def;       /* points to command definition */
25  struct command* clone;         /* points to clone of command definition */
26};
27
28struct in_cmd_list /* contains list of in_cmd pointers sorted by label */
29{
30  int stamp;
31  char name[NAME_L];
32  int  max,                     /* max. pointer array size */
33       curr;                    /* current occupation */
34  struct name_list* labels;     /* index list of labels */
35  struct in_cmd** in_cmds;      /* in_cmd pointer list */
36};
37
38// interface
39
40struct in_cmd* new_in_cmd(int length);            // many uses
41struct in_cmd* delete_in_cmd(struct in_cmd*);     // many uses
42struct in_cmd* buffered_cmd (struct in_cmd*);     // used by mad_cmd.c
43
44struct in_cmd_list* new_in_cmd_list(int length);  // used by mad_core.c
45void                grow_in_cmd_list(struct in_cmd_list*);
46// missing delete?
47
48void  buffer_in_cmd (struct in_cmd*);
49void  scan_in_cmd   (struct in_cmd*);
50void  dump_in_cmd   (struct in_cmd*); // for debugging
51
52#endif // MAD_CMDIN_H
Note: See TracBrowser for help on using the repository browser.