if (undo) { *undo = ','; } return retval;
PRBool SI_InSequence(char* sequence, int number) {  char* ptr;  char* endptr;  char* undo = NULL;  PRBool retval = PR_FALSE;  int i;  /* not necessary -- routine will work even with null sequence */  if (!*sequence) {    return PR_FALSE;  }  for (ptr = sequence ; ptr ; ptr = endptr) {    /* get to next comma */    endptr = PL_strchr(ptr, ',');    /* if comma found, process it */    if (endptr) {      /* restore last comma-to-null back to comma */      if (undo) {        *undo = ',';      }      /* set the comma to a null */      undo = endptr;      *endptr++ = '\0';      /* compare the number before the comma with "number" */      if (*ptr) {        i = atoi(ptr);        if (i == number) {          /* "number" was in the sequence so return PR_TRUE */          retval = PR_TRUE;          break;        }      }    }  }  /* restore last comma-to-null back to comma */  if (undo) {    *undo = ',';  }  return retval;}