1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)printlist.c	5.1 (Berkeley) 6/4/85";
   9: #endif not lint
  10: 
  11: #include "gprof.h"
  12: 
  13:     /*
  14:      *	these are the lists of names:
  15:      *	there is the list head and then the listname
  16:      *	is a pointer to the list head
  17:      *	(for ease of passing to stringlist functions).
  18:      */
  19: struct stringlist   fhead = { 0 , 0 };
  20: struct stringlist   *flist = &fhead;
  21: struct stringlist   Fhead = { 0 , 0 };
  22: struct stringlist   *Flist = &Fhead;
  23: struct stringlist   ehead = { 0 , 0 };
  24: struct stringlist   *elist = &ehead;
  25: struct stringlist   Ehead = { 0 , 0 };
  26: struct stringlist   *Elist = &Ehead;
  27: 
  28: addlist( listp , funcname )
  29:     struct stringlist   *listp;
  30:     char        *funcname;
  31: {
  32:     struct stringlist   *slp;
  33: 
  34:     slp = (struct stringlist *) malloc( sizeof(struct stringlist));
  35:     if ( slp == (struct stringlist *) 0 ) {
  36:     fprintf( stderr, "gprof: ran out room for printlist\n" );
  37:     done();
  38:     }
  39:     slp -> next = listp -> next;
  40:     slp -> string = funcname;
  41:     listp -> next = slp;
  42: }
  43: 
  44: bool
  45: onlist( listp , funcname )
  46:     struct stringlist   *listp;
  47:     char        *funcname;
  48: {
  49:     struct stringlist   *slp;
  50: 
  51:     for ( slp = listp -> next ; slp ; slp = slp -> next ) {
  52:     if ( ! strcmp( slp -> string , funcname ) ) {
  53:         return TRUE;
  54:     }
  55:     if ( funcname[0] == '_' && ! strcmp( slp -> string , &funcname[1] ) ) {
  56:         return TRUE;
  57:     }
  58:     }
  59:     return FALSE;
  60: }

Defined functions

addlist defined in line 28; used 8 times
onlist defined in line 44; used 8 times

Defined variables

Ehead defined in line 25; used 1 times
  • in line 26
Elist defined in line 26; never used
Fhead defined in line 21; used 1 times
  • in line 22
Flist defined in line 22; never used
ehead defined in line 23; used 1 times
  • in line 24
elist defined in line 24; never used
fhead defined in line 19; used 1 times
  • in line 20
flist defined in line 20; never used
sccsid defined in line 8; never used
Last modified: 1985-06-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1149
Valid CSS Valid XHTML 1.0 Strict