home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / libsrc~1.z / libsrc~1 / index.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  225 b   |  15 lines

  1. #include "lib.h"
  2.  
  3. asm(".text; .even; .globl _strchr; _strchr:"); /* dept of dirty tricks */
  4.  
  5. char *index(s, c)
  6. _CONST register char *s;
  7. int c;
  8. {
  9.   do {
  10.     if (*s == c)
  11.         return((char *)s);
  12.   } while (*s++ != 0);
  13.   return(0);
  14. }
  15.