/* Strchr and rindex See COPYLEFT.JRD */ #ifdef __GNUC__ asm (".text"); asm (".even\n.globl _rindex\n_rindex:"); #else char * strrchr(); char * rindex(str, chr) char * str; char chr; { return(strchr(str, chr)); } #endif char * strrchr(str, chr) char * str; char chr; { int n = 0; while (*str++) n++; while (--n >= 0) if (*--str == chr) return(str); return((char * )0); }