some C99 changes

Instead of using index() macro defined to strchr, use C99 strchr.
Instead of using rindex() macro defined to strrchr, use C99 strrchr.

If you want to try building on a platform that doesn't offer those
two functions, these are available:
    define NOT_C99       /* to make some non-C99 code available */
    define NEED_INDEX    /* to define a macro for index()  */
    define NEED_RINDX    /* to define a macro for rindex() */
This commit is contained in:
nhmall
2022-10-29 10:54:25 -04:00
parent 943c1bc3c3
commit 99a93fe50b
99 changed files with 463 additions and 460 deletions

View File

@@ -335,13 +335,15 @@
#include <memory.h>
#endif
#else /* therefore SYSV */
#ifdef NOT_C99
#ifndef index /* some systems seem to do this for you */
#define index strchr
#endif
#ifndef rindex
#define rindex strrchr
#endif
#endif
#endif /* NOT_C99 */
#endif /* SYSV */
/* Use the high quality random number routines. */
/* the high quality random number routines */