Ken Yourek / ucmd

Dependents:   nucleo_ucmd_helloworld

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ucCmdTok.c Source File

ucCmdTok.c

00001 #include "ucmd_internal.h"
00002 
00003 ucArgTok *ucCmdTok_get_arg(ucCmdTok *p) {
00004     return ucArgTokOwner_get_arg((ucArgTokOwner*)p);
00005 }
00006 
00007 ucSwitchTok *ucCmdTok_get_switch(ucCmdTok *p) {
00008     ucTok *tok;
00009     if (NULL == p) return NULL;
00010     tok = ucTok_get_next((ucTok*)p);
00011     while (NULL != tok) {
00012         if (ucTok_is_switch(tok)) {
00013             return (ucSwitchTok*)tok;
00014         }
00015         tok = ucTok_get_next(tok);
00016     }
00017     return NULL;
00018 }
00019