res.c: In function ‘get_cmdline_name’:
res.c:213: warning: return makes pointer from integer without a cast
char get_cmdline_name(int proc_id)
The name of an array is a pointer to the first element. As shown above in get_cmdline_name you are returning a char pointer, this can be fixed by changing the return type to "char*".
In get_stat_name you a have similar problem although this time you have two return paths one which returns a char pointer and one which returns a char(eof which shows a failure). You may fix this using the same mathod as the first but on failure return a 0/NULL.
Also in get_stat_name you have a typo
and a logic and typo error above that
if ((ch='(') && (ch=')'))
You are checking one char and wanting it to be two values?Well actually you are assigning the values(thats the typo).