… | |
… | |
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.16 2020/12/12 00:44:18 root Exp $"; |
67 | char * fptools_id = "$Id: fptools.c,v 1.17 2020/12/12 03:54:59 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) |
… | |
… | |
486 | |
486 | |
487 | *ptr = 0; |
487 | *ptr = 0; |
488 | return buf; |
488 | return buf; |
489 | } |
489 | } |
490 | |
490 | |
491 | /* |
|
|
492 | * A replacement strerror function that just returns the error code |
|
|
493 | */ |
|
|
494 | |
|
|
495 | char * TOOLEXPORT |
|
|
496 | FP_strerror (int errcode) |
|
|
497 | { |
|
|
498 | static char number[8]; |
|
|
499 | |
|
|
500 | sprintf (number, "%03d", errcode); |
|
|
501 | |
|
|
502 | return number; |
|
|
503 | } |
|
|
504 | #ifndef HAVE_MKSTEMP |
|
|
505 | /* |
|
|
506 | * tempnam is not ANSI, but tmpnam is. Ignore the prefix here. |
|
|
507 | */ |
|
|
508 | |
|
|
509 | char * TOOLEXPORT |
|
|
510 | FP_tempnam (char *dir, char *pfx) |
|
|
511 | { |
|
|
512 | return FP_strdup (tmpnam (NULL)); |
|
|
513 | } |
|
|
514 | #endif /* HAVE_MKSTEMP */ |
|
|