Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: nucleo_ucmd_helloworld
ucArgTok.c
00001 #include "ucmd_internal.h" 00002 00003 ucArgTok *ucArgTok_get_next(ucArgTok* p) { 00004 ucTok *tok; 00005 if (NULL == p) return NULL; 00006 tok = ucTok_get_next((ucTok*)p); 00007 if (NULL == tok) return NULL; 00008 if (ucTok_is_switch(tok)) return NULL; 00009 return (ucArgTok*)tok; 00010 } 00011 00012 int ucArgTok_count(ucArgTok* p) { 00013 int count = 0; 00014 while (NULL != p) { 00015 count++; 00016 p = ucArgTok_get_next(p); 00017 } 00018 return count; 00019 } 00020 00021 ucArgTok *ucArgTok_find(ucArgTok *p, const char *arg_value) { 00022 while (NULL != p) { 00023 if (ucTok_equals((ucTok*)p, arg_value)) { 00024 return p; 00025 } 00026 p = ucArgTok_get_next(p); 00027 } 00028 return NULL; 00029 } 00030 00031 ucBool ucArgTok_contains(ucArgTok* p, const char *arg_value) { 00032 return NULL == ucArgTok_find(p, arg_value) ? ucBool_FALSE : ucBool_TRUE; 00033 } 00034
Generated on Thu Jul 14 2022 20:04:57 by
1.7.2