if you can do this very easy in c++ then it should be no problem for you to rewrite it in plain c.
look up file_open_read, file_str_readto, file_var_read. this should give you the input. and instead of using the new[] and delete[] operators for arrays (or a std::list), have a look at one of the dynamic array implementations in the lite-c contributions forum (e.g. i have written one some time ago). you can allocate strings with str_create and (single) vars with
var* newvar = (var*)malloc(sizeof(var));
joey.