* kern/boot_script.c (sym, arg): Move struct definitions to kern/boot_script.h.
--- kern/boot_script.c | 41 ----------------------------------------- kern/boot_script.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/kern/boot_script.c b/kern/boot_script.c index b2e9393..92dd55c 100644 --- a/kern/boot_script.c +++ b/kern/boot_script.c @@ -6,47 +6,6 @@ #include <string.h> #include "boot_script.h" - -/* This structure describes a symbol. */ -struct sym -{ - /* Symbol name. */ - const char *name; - - /* Type of value returned by function. */ - int type; - - /* Symbol value. */ - long val; - - /* For function symbols; type of value returned by function. */ - int ret_type; - - /* For function symbols; if set, execute function at the time - of command execution, not during parsing. A function with - this field set must also have `no_arg' set. Also, the function's - `val' argument will always be NULL. */ - int run_on_exec; -}; - -/* Additional values symbols can take. - These are only used internally. */ -#define VAL_SYM 10 /* symbol table entry */ -#define VAL_FUNC 11 /* function pointer */ - -/* This structure describes an argument. */ -struct arg -{ - /* Argument text copied verbatim. 0 if none. */ - char *text; - - /* Type of value assigned. 0 if none. */ - int type; - - /* Argument value. */ - long val; -}; - /* List of commands. */ static struct cmd **cmds = 0; diff --git a/kern/boot_script.h b/kern/boot_script.h index c5ad673..069f5c5 100644 --- a/kern/boot_script.h +++ b/kern/boot_script.h @@ -54,6 +54,45 @@ struct cmd int exec_funcs_index; }; +/* This structure describes a symbol. */ +struct sym +{ + /* Symbol name. */ + const char *name; + + /* Type of value returned by function. */ + int type; + + /* Symbol value. */ + long val; + + /* For function symbols; type of value returned by function. */ + int ret_type; + + /* For function symbols; if set, execute function at the time + of command execution, not during parsing. A function with + this field set must also have `no_arg' set. Also, the function's + `val' argument will always be NULL. */ + int run_on_exec; +}; + +/* Additional values symbols can take. + These are only used internally. */ +#define VAL_SYM 10 /* symbol table entry */ +#define VAL_FUNC 11 /* function pointer */ + +/* This structure describes an argument. */ +struct arg +{ + /* Argument text copied verbatim. 0 if none. */ + char *text; + + /* Type of value assigned. 0 if none. */ + int type; + + /* Argument value. */ + long val; +}; /* The user must define these functions, we work like malloc and free. */ void *boot_script_malloc (unsigned int); -- 1.8.1.4