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:
@@ -894,10 +894,10 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
||||
}
|
||||
|
||||
if (match) {
|
||||
const char *extended_opt = index(userea, ':');
|
||||
const char *extended_opt = strchr(userea, ':');
|
||||
|
||||
if (!extended_opt)
|
||||
extended_opt = index(userea, '=');
|
||||
extended_opt = strchr(userea, '=');
|
||||
switch(e_arg) {
|
||||
case ARG_DEBUG:
|
||||
if (extended_opt) {
|
||||
@@ -970,7 +970,7 @@ debug_fields(const char *opts)
|
||||
char *op;
|
||||
boolean negated = FALSE;
|
||||
|
||||
while ((op = index(opts, ',')) != 0) {
|
||||
while ((op = strchr(opts, ',')) != 0) {
|
||||
*op++ = 0;
|
||||
/* recurse */
|
||||
debug_fields(op);
|
||||
|
||||
Reference in New Issue
Block a user