diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-26 18:25:04 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-26 18:25:53 +0530 |
commit | 9376c06ded47c4b77b94cb4d1e628537d9d69fce (patch) | |
tree | 25297ed59e75133ff6ee410716606a103f88644b /src/list.c | |
parent | a3b18ea4019f44185a495afd4be66350f217c144 (diff) |
config,main,list: get resources from config.cfg instead of a compiled config.h
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -55,3 +55,18 @@ list_delete(list_t *list) free(list->elements); free(list); } + +void * +list_find_corresponding_value_from_ptr_wrapper(list_t *keys, + list_t *values, + char *key) +{ + for (size_t i = 0; i < keys->size; i++) { + ptr_wrapper_t *wrapper = list_get(keys, i); + if (strcmp(wrapper->ptr, key) == 0) { + return list_get(values, i); + } + } + + return NULL; +} |