1extern void abort (void); 2extern int inside_main; 3 4char * 5strchr (const char *s, int c) 6{ 7#ifdef __OPTIMIZE__ 8 if (inside_main) 9 abort (); 10#endif 11 12 for (;;) 13 { 14 if (*s == c) 15 return (char *) s; 16 if (*s == 0) 17 return 0; 18 s++; 19 } 20} 21 22char * 23index (const char *s, int c) 24{ 25 return strchr (s, c); 26} 27