00001 #include <cmdparser.h> 00002 00003 int cmd_mytest(int argc,char **argv) 00004 { 00005 printf("mytest\n"); 00006 return 0; 00007 } 00008 00009 00010 mycmd_init(mytest,cmd_mytest,"cmds","mytest"); 00011 00012 extern void add_cmd(struct mycmd *mycmd); 00013 extern struct mycmd *mycmd_head; 00014 00015 void initcmd(struct mysymbol *head) 00016 { 00017 void (*add_cmd)(struct mycmd *mycmd); 00018 add_cmd = find_mysymbol(head,"add_cmd"); 00019 add_cmd( &__mycmd_mytest); 00020 }
1.5.6