# 2.11BSD#431 - /usr/src/lib/libc/compat-sys5/strrchr.c

##### Functions

    strrchr           X

##### Macros

    NULL              X

       1: #if defined(LIBC_SCCS) && !defined(lint)
       2: static char sccsid[] = "@(#)strrchr.c	5.2 (berkeley) 86/03/09";
       3: #endif LIBC_SCCS and not lint
       4:
       5: /*
       6:  * Return the ptr in sp at which the character c last
       7:  * appears; NULL if not found
       8:  *
       9:  * This routine is just "rindex" renamed.
      10:  */
      11:
      12: #define NULL 0
      13:
      14: char *
      15: strrchr(sp, c)
      16: register char *sp, c;
      17: {
      18:     register char *r;
      19:
      20:     r = NULL;
      21:     do {
      22:         if (*sp == c)
      23:             r = sp;
      24:     } while (*sp++);
      25:     return(r);
      26: }

#### Defined functions

strrchr defined in line 14; never used

#### Defined variables

sccsid defined in line 2; never used

#### Defined macros

NULL defined in line 12; used 1 times

- in line 20

Last modified: 1986-03-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: ?E00 |