gcc和mdk都能编译成功
This commit is contained in:
@@ -23,10 +23,17 @@ void *tappend(void *p,void *del);
|
||||
|
||||
static commend_def *cmd_find(char *name)
|
||||
{
|
||||
#if defined (__CC_ARM)
|
||||
extern const int cmdstruct$$Base;
|
||||
extern const int cmdstruct$$Limit;
|
||||
commend_def *start=(commend_def *)&cmdstruct$$Base;
|
||||
commend_def *end=(commend_def *)&cmdstruct$$Limit;
|
||||
#else
|
||||
extern const int __start_cmdstruct;
|
||||
extern const int __stop_cmdstruct;
|
||||
commend_def *start=(commend_def *)&__start_cmdstruct;
|
||||
commend_def *end=(commend_def *)&__stop_cmdstruct;
|
||||
#endif
|
||||
for(commend_def *t=start;t<end;t++)
|
||||
{
|
||||
if(strcmp(t->name,name)==0)
|
||||
@@ -114,10 +121,17 @@ int cmd_printf(const char *fmt,...)
|
||||
|
||||
static int cmd_help(list_def *argv)
|
||||
{
|
||||
#if defined (__CC_ARM)
|
||||
extern const int cmdstruct$$Base;
|
||||
extern const int cmdstruct$$Limit;
|
||||
commend_def *start=(commend_def *)&cmdstruct$$Base;
|
||||
commend_def *end=(commend_def *)&cmdstruct$$Limit;
|
||||
#else
|
||||
extern const int __start_cmdstruct;
|
||||
extern const int __stop_cmdstruct;
|
||||
commend_def *start=(commend_def *)&__start_cmdstruct;
|
||||
commend_def *end=(commend_def *)&__stop_cmdstruct;
|
||||
#endif
|
||||
cmd_print("help ->");
|
||||
for(commend_def *t=start;t<end;t++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user