I have a program that extracts data records and strings from a data file and some that are in the actual program (mutable and non mutable). I have a function that will work on the incoming string and clean it up (removing whitespace etc).
int cleanup(char * a).
Now I want to do this because I've been getting seg faults within the function for acting on a non mutable strings.
Is there a condition I can place either before the call or within the function in order to let the function to quit or resume duty?
Thanks in advance.