2 * $Id: script.h,v 1.2 2007/07/22 13:35:20 khansen Exp $
4 * Revision 1.2 2007/07/22 13:35:20 khansen
5 * convert tabs to whitespaces
7 * Revision 1.1 2004/06/30 07:56:42 kenth
13 * (C) 2004 Kent Hansen
15 * The XORcyst is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * The XORcyst is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with The XORcyst; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 * The possible kinds of command.
36 enum tag_command_type
{
47 typedef enum tag_command_type command_type
;
50 * A list of command arguments
52 struct tag_command_arg
56 struct tag_command_arg
*next
;
59 typedef struct tag_command_arg command_arg
;
64 struct tag_script_command
{
66 command_arg
*first_arg
;
68 struct tag_script_command
*next
;
71 typedef struct tag_script_command script_command
;
78 script_command
*first_command
;
81 typedef struct tag_script script
;
83 /** Signature for procedure to process a script command */
84 typedef void (*script_commandproc
)(script
*, script_command
*, void *);
87 * Structure that represents a mapping from script command type to processor function.
89 struct tag_script_commandprocmap
{
91 script_commandproc proc
;
94 typedef struct tag_script_commandprocmap script_commandprocmap
;
96 /* Function prototypes */
98 int script_parse(char *, script
*);
99 void script_finalize(script
*);
100 int script_length(script
*);
101 script_command
*script_get_command(script
*, int);
102 void script_walk(script
*, script_commandprocmap
*, void *);
103 char *script_get_command_arg(script_command
*, char *);
104 char *script_command_type_to_string(command_type
);
105 int script_count_command_type(script
*, command_type
);
107 #endif /* !SCRIPT_H */