# 2.11BSD#431 - /usr/src/local/cxref/basename.c

##### Functions

    basename          X

       1: /*
       2: ** basename.c
       3: **
       4: ** return the last portion of a path name.
       5: ** included by all the cxref component programs.
       6: **
       7: ** Arnold Robbins, Information and Computer Science, Georgia Tech
       8: **	gatech!arnold
       9: ** Copyright (c) 1984 by Arnold Robbins.
      10: ** All rights reserved.
      11: ** This program may not be sold, but may be distributed
      12: ** provided this header is included.
      13: */
      14:
      15: char *basename(str) /* return last portion of a path name */
      16: char *str;
      17: {
      18:     char *cp, *rindex();    /* change to strrchr() for USG systems */
      19:
      20:     if((cp = rindex(str, '/')) == NULL)
      21:         return(str);
      22:     else
      23:         return(++cp);
      24: }

#### Defined functions

basename defined in line 15; used 12 times

- in /usr/src/local/cxref/cxref.c line 605-607(2)
- in /usr/src/local/cxref/cxrfilt.c line 35, 45
- in /usr/src/local/cxref/docxref.c line 28, 39, 90-92(2)
- in /usr/src/local/cxref/fmtxref.c line 44, 54, 222-224(2)

#### Usage of this include

basename.c used 4 times

- in /usr/src/local/cxref/cxref.c line 622
- in /usr/src/local/cxref/cxrfilt.c line 298
- in /usr/src/local/cxref/docxref.c line 102
- in /usr/src/local/cxref/fmtxref.c line 228

Last modified: 1991-11-05 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 915 |