i don't have much knowledge about file handling but i tested it and found that the segmentation fault was being caused because
Code:
str[arr[count-1]] = '\0';
in decleval(). when .config is passed to decleval(), count is zero and str[arr[-1]] causes segmentation fault.
i think there is some problem in
Code:
if (strcmp(".",entry->d_name) == 0 || strcmp(".", entry->d_name) == 0)
you might have missed something here. also you have same statements in both sides of "||"!!
can you please explain to me why you added this "if" condition(don't know much about advanced file handling, so just curious!)?