/* * Copyright (C) 2013 University of Chicago. * See COPYRIGHT notice in top-level directory. * */ #include "codes_base_config.h" #include #include #include #ifdef HAVE_MALLOC_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "codes/configfile.h" #include "codes/txt_configfile.h" static int cf_equal_helper (ConfigHandle h1, SectionHandle s1, ConfigHandle h2, SectionHandle s2) { unsigned int sectionsize1; unsigned int sectionsize2; size_t count1; size_t count2; unsigned int i; int ret = 1; cf_getSectionSize (h1, s1, §ionsize1); cf_getSectionSize (h2, s2, §ionsize2); count1 = sectionsize1; count2 = sectionsize2; if (count1 != count2) return 0; SectionEntry entries1[sectionsize1]; SectionEntry entries2[sectionsize2]; cf_listSection (h1, s1, &entries1[0], &count1); cf_listSection (h2, s2, &entries2[0], &count2); for (i=0; i