| 91 | } |
| 92 | |
| 93 | void gmt_chop (char *string) { |
| 94 | /* Chops off any CR or LF and terminates string */ |
| 95 | char *p; |
| 96 | assert (string != NULL); /* NULL pointer */ |
| 97 | /* if (string == NULL) return; / NULL pointer */ |
| 98 | if ((p = strpbrk (string, "\r\n"))) |
| 99 | /* Overwrite 1st CR or LF with terminate string */ |
| 100 | *p = '\0'; |
| 101 | } |
| 102 | |
| 103 | char *gmt_get_ext (const char *string) { |
| 104 | /* Returns a pointer to the filename extension (e.g., .ps) or NULL if not found. */ |
no outgoing calls
no test coverage detected