Mercurial > flash_v2
comparison packages/redboot/current/include/redboot.h @ 117:bd1a71e3e476 ecos-sw-2000-08-25
Merge from eCos master repository on 2000-08-25-19:22:58-BST
| author | jlarmour |
|---|---|
| date | Fri, 25 Aug 2000 19:17:22 +0000 |
| parents | 6ed91473a1cd |
| children | 6bd9d475ed4b |
comparison
equal
deleted
inserted
replaced
| 116:a0f9581a3a09 | 117:bd1a71e3e476 |
|---|---|
| 121 extern struct cmd *cmd_search(struct cmd *tab, struct cmd *tabend, char *arg); | 121 extern struct cmd *cmd_search(struct cmd *tab, struct cmd *tabend, char *arg); |
| 122 extern void cmd_usage(struct cmd *tab, struct cmd *tabend, char *prefix); | 122 extern void cmd_usage(struct cmd *tab, struct cmd *tabend, char *prefix); |
| 123 #define RedBoot_cmd(_s_,_h_,_u_,_f_) cmd_entry(_s_,_h_,_u_,_f_,RedBoot_commands) | 123 #define RedBoot_cmd(_s_,_h_,_u_,_f_) cmd_entry(_s_,_h_,_u_,_f_,RedBoot_commands) |
| 124 #define _cmd_entry(_s_,_h_,_u_,_f_,_n_) \ | 124 #define _cmd_entry(_s_,_h_,_u_,_f_,_n_) \ |
| 125 cmd_fun _f_; \ | 125 cmd_fun _f_; \ |
| 126 struct cmd _cmd_tab_##_f_ CYG_HAL_TABLE_ENTRY(_n_) = {_s_, _h_, _u_, _f_}; | 126 struct cmd _cmd_tab_##_f_ CYG_HAL_TABLE_QUALIFIED_ENTRY(_n_,_f_) = {_s_, _h_, _u_, _f_}; |
| 127 #define cmd_entry(_s_,_h_,_u_,_f_,_n_) \ | 127 #define cmd_entry(_s_,_h_,_u_,_f_,_n_) \ |
| 128 extern _cmd_entry(_s_,_h_,_u_,_f_,_n_) | 128 extern _cmd_entry(_s_,_h_,_u_,_f_,_n_) |
| 129 #define local_cmd_entry(_s_,_h_,_u_,_f_,_n_) \ | 129 #define local_cmd_entry(_s_,_h_,_u_,_f_,_n_) \ |
| 130 static _cmd_entry(_s_,_h_,_u_,_f_,_n_) | 130 static _cmd_entry(_s_,_h_,_u_,_f_,_n_) |
| 131 | 131 |
| 134 #define RedBoot_INIT_PRIO(_n_) 1000+_n_ | 134 #define RedBoot_INIT_PRIO(_n_) 1000+_n_ |
| 135 #define RedBoot_INIT_LAST 9999 | 135 #define RedBoot_INIT_LAST 9999 |
| 136 typedef void void_fun(void); | 136 typedef void void_fun(void); |
| 137 typedef void_fun *void_fun_ptr; | 137 typedef void_fun *void_fun_ptr; |
| 138 #define _RedBoot_init(_f_,_p_) \ | 138 #define _RedBoot_init(_f_,_p_) \ |
| 139 void_fun_ptr _init_tab_##_p_##_f_ CYG_HAL_TABLE_ENTRY(RedBoot_inits) = _f_; | 139 void_fun_ptr _init_tab_##_p_##_f_ CYG_HAL_TABLE_QUALIFIED_ENTRY(RedBoot_inits,_f_) = _f_; |
| 140 #define RedBoot_init(_f_,_p_) _RedBoot_init(_f_,_p_) | 140 #define RedBoot_init(_f_,_p_) _RedBoot_init(_f_,_p_) |
| 141 | 141 |
| 142 | 142 |
| 143 // Option processing support | 143 // Option processing support |
| 144 | 144 |
| 149 void **arg; | 149 void **arg; |
| 150 bool *arg_set; | 150 bool *arg_set; |
| 151 char *name; | 151 char *name; |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 #define OPTION_ARG_TYPE_NUM 0 | 154 #define OPTION_ARG_TYPE_NUM 0 // Numeric data |
| 155 #define OPTION_ARG_TYPE_STR 1 | 155 #define OPTION_ARG_TYPE_STR 1 // Generic string |
| 156 #define OPTION_ARG_TYPE_FLG 2 // Flag only | |
| 156 | 157 |
| 157 extern void init_opts(struct option_info *opts, char flag, bool takes_arg, | 158 extern void init_opts(struct option_info *opts, char flag, bool takes_arg, |
| 158 int arg_type, void **arg, bool *arg_set, char *name); | 159 int arg_type, void **arg, bool *arg_set, char *name); |
| 159 extern bool scan_opts(int argc, char *argv[], int first, | 160 extern bool scan_opts(int argc, char *argv[], int first, |
| 160 struct option_info *opts, int num_opts, | 161 struct option_info *opts, int num_opts, |
