2 * (C) 2010 by Holger Hans Peter Freyther
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include <osmocom/core/msgfile.h>
26 static void dump_entries(struct osmo_config_list *entries)
28 struct osmo_config_entry *entry;
31 fprintf(stderr, "Failed to parse the file\n");
35 llist_for_each_entry(entry, &entries->entry, list) {
36 printf("Entry '%s:%s:%s:%s'\n",
37 entry->mcc, entry->mnc, entry->option, entry->text);
41 int main(int argc, char **argv)
43 struct osmo_config_list *entries;
45 /* todo use msgfile_test.c.in and replace the path */
46 entries = osmo_config_list_parse(NULL, "msgconfig.cfg");
47 dump_entries(entries);