home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc-src / vms / gcclib / index.c < prev    next >
Encoding:
Text File  |  1991-02-27  |  353 b   |  22 lines

  1. /*
  2.  *
  3.  *    This function was not included in the VAX-11 "C" runtime system.
  4.  *
  5.  */
  6. char *index(cp, character)
  7. register char *cp;
  8. register char character;
  9. {
  10.     do {
  11.         /*
  12.          *    If we have found the index character, return the
  13.          *    pointer to it.
  14.          */
  15.         if (*cp == character) return(cp);
  16.         } while (*cp++);
  17.     /*
  18.      *    Index character not found
  19.      */
  20.     return(0);
  21. }
  22.