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.
cfg_parser.c
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 */ 00004 00005 #include <string.h> 00006 #include "cfg_parser.h" 00007 00008 const char *cfg_string(conf_t *conf, const char *key, const char *default_value) 00009 { 00010 for (; (conf && conf->name); conf++) { 00011 if (0 == strcmp(conf->name, key)) { 00012 return conf->svalue; 00013 } 00014 } 00015 return default_value; 00016 } 00017 00018 int cfg_int(conf_t *conf, const char *key, int default_value) 00019 { 00020 for (; (conf && conf->name); conf++) { 00021 if (0 == strcmp(conf->name, key)) { 00022 return conf->ivalue; 00023 } 00024 } 00025 return default_value; 00026 }
Generated on Tue Jul 12 2022 20:25:37 by
1.7.2