1: /* 2: * Return the ptr in sp at which the character c last 3: * appears; NULL if not found 4: */ 5: 6: #define NULL 0 7: 8: char * 9: rindex(sp, c) 10: register char *sp, c; 11: { 12: register char *r; 13: 14: r = NULL; 15: do { 16: if (*sp == c) 17: r = sp; 18: } while (*sp++); 19: return(r); 20: }