/* This is the specification of the |getline| library. Last modified 24 January 2006 by Arthur O'Dwyer. Public domain. */ #ifndef H_GETLINE #define H_GETLINE #include /* for the |FILE| type */ /* Call as "rc = getline_113(&line);" These two functions trim off the trailing newline (and any other trailing whitespace) for you, so if the user types -H-E-L- L-O--, all you see is -H-E-L-L-O. */ char *getline_113(char **p); char *fgetline_113(char **p, FILE *stream); /* Same as above, but these two don't trim newlines or whitespace. If the user types -H-E-L-L-O--, the resulting string will contain -H-E-L-L-O--. */ char *getline_notrim(char **p); char *fgetline_notrim(char **p, FILE *stream); /* This function is provided for your convenience. "getline_113(&p)" behaves as if "trim_113" were called on the resulting string before returning from the function. */ char *trim_113(char *line); #endif