… | |
… | |
62 | return TRUE; |
62 | return TRUE; |
63 | } |
63 | } |
64 | #endif |
64 | #endif |
65 | #endif |
65 | #endif |
66 | |
66 | |
67 | char * fptools_id = "$Id: fptools.c,v 1.6 2002/08/19 23:25:36 root Exp $"; |
67 | char * fptools_id = "$Id: fptools.c,v 1.7 2003/11/06 13:33:41 root Exp $"; |
68 | |
68 | |
69 | /* |
69 | /* |
70 | * some versions of free can't handle a NULL pointer properly |
70 | * some versions of free can't handle a NULL pointer properly |
71 | * (ANSI says, free ignores a NULL pointer, but some machines |
71 | * (ANSI says, free ignores a NULL pointer, but some machines |
72 | * prefer to SIGSEGV on it) |
72 | * prefer to SIGSEGV on it) |
… | |
… | |
390 | char * TOOLEXPORT |
390 | char * TOOLEXPORT |
391 | _FP_strrchr (char *string, int tc) |
391 | _FP_strrchr (char *string, int tc) |
392 | { |
392 | { |
393 | char *ptr; |
393 | char *ptr; |
394 | |
394 | |
395 | if (string == NULL) |
395 | if (string == NULL || !*string) |
396 | return NULL; |
396 | return NULL; |
397 | |
397 | |
398 | ptr = string + strlen (string) - 1; |
398 | ptr = string + strlen (string) - 1; |
399 | |
399 | |
400 | while (ptr != string && *ptr != tc) |
400 | while (ptr != string && *ptr != tc) |