@Routine Analyzer Source File Analysis - reports.c6

reports.c Source Code

LGo to: Contents; Previous section; Beginning of section; Next file in section; Previous file in section.

Q

Routines In This File (Alphabetical)



 Line Name
----- ----*  402 fold_string.  547 isfirst_in_file-  572 islast_in_file)  784 needs_tree+  649 next_defined1  495 next_defining_file(  597 next_tree-  701 next_undefined+  675 prev_defined1  521 prev_defining_file(  623 prev_tree-  727 prev_undefined- 1448 report_by_file+  995 report_calls-  849 report_defined1  284 report_end_routine3  283 report_entry_routine+ 1560 report_files,  476 report_filext1  282 report_hdr_routine, 1627 report_source* 1202 report_tree/  922 report_undefined+ 1084 report_xrefs1   88 rpt_byfile_rtf_end3   87 rpt_byfile_rtf_entry1   86 rpt_byfile_rtf_hdr2   85 rpt_byfile_text_end4   84 rpt_byfile_text_entry2   83 rpt_byfile_text_hdr5   94 rpt_byfile_vmshelp_end7   93 rpt_byfile_vmshelp_entry5   92 rpt_byfile_vmshelp_hdr5   91 rpt_byfile_winhelp_end7   90 rpt_byfile_winhelp_entry5   89 rpt_byfile_winhelp_hdr0   55 rpt_calls_rtf_end2   54 rpt_calls_rtf_entry0   53 rpt_calls_rtf_hdr4   61 rpt_calls_vmshelp_end6   60 rpt_calls_vmshelp_entry4   59 rpt_calls_vmshelp_hdr4   58 rpt_calls_winhelp_end6   57 rpt_calls_winhelp_entry4   56 rpt_calls_winhelp_hdr2   35 rpt_defined_rtf_end4   34 rpt_defined_rtf_entry2   33 rpt_defined_rtf_hdr6   41 rpt_defined_vmshelp_end8   40 rpt_defined_vmshelp_entry6   39 rpt_defined_vmshelp_hdr6   38 rpt_defined_winhelp_end8   37 rpt_defined_winhelp_entry6   36 rpt_defined_winhelp_hdr/  101 rpt_file_rtf_end1  100 rpt_file_rtf_entry/   99 rpt_file_rtf_hdr0   98 rpt_file_text_end2   97 rpt_file_text_entry0   96 rpt_file_text_hdr3  107 rpt_file_vmshelp_end5  106 rpt_file_vmshelp_entry3  105 rpt_file_vmshelp_hdr3  104 rpt_file_winhelp_end5  103 rpt_file_winhelp_entry3  102 rpt_file_winhelp_hdr1  114 rpt_source_rtf_end3  113 rpt_source_rtf_entry1  112 rpt_source_rtf_hdr2  111 rpt_source_text_end4  110 rpt_source_text_entry2  109 rpt_source_text_hdr5  120 rpt_source_vmshelp_end7  119 rpt_source_vmshelp_entry5  118 rpt_source_vmshelp_hdr5  117 rpt_source_winhelp_end7  116 rpt_source_winhelp_entry5  115 rpt_source_winhelp_hdr/   75 rpt_tree_rtf_end1   74 rpt_tree_rtf_entry/   73 rpt_tree_rtf_hdr3   81 rpt_tree_vmshelp_end5   80 rpt_tree_vmshelp_entry3   79 rpt_tree_vmshelp_hdr3   78 rpt_tree_winhelp_end5   77 rpt_tree_winhelp_entry3   76 rpt_tree_winhelp_hdr4   45 rpt_undefined_rtf_end6   44 rpt_undefined_rtf_entry4   43 rpt_undefined_rtf_hdr8   51 rpt_undefined_vmshelp_end:   50 rpt_undefined_vmshelp_entry8   49 rpt_undefined_vmshelp_hdr8   48 rpt_undefined_winhelp_end:   47 rpt_undefined_winhelp_entry8   46 rpt_undefined_winhelp_hdr/   65 rpt_xref_rtf_end1   64 rpt_xref_rtf_entry/   63 rpt_xref_rtf_hdr3   71 rpt_xref_vmshelp_end5   70 rpt_xref_vmshelp_entry3   69 rpt_xref_vmshelp_hdr3   68 rpt_xref_winhelp_end5   67 rpt_xref_winhelp_entry3   66 rpt_xref_winhelp_hdr,  753 separate_tree0   28 tree_greater_than(  361 tree_size


BEGINNING OF FILE


V     1: /****************************************************************************/     2: /*									    */1     3: /*  FACILITY:	Routine Analyzer					    */     4: /*									    */0     5: /*  MODULE:	Report Generation					    */     6: /*									    */O     7: /*  AUTHOR:	Steve Branam, Network Product Support Group, Digital	    */>     8: /*		Equipment Corporation, Littleton, MA, USA.		    */     9: /*									    */V    10: /*  DESCRIPTION: This module contains the routines for generating Routine   */?    11: /*  Analyzer reports, for all output formats.				    */    12: /*									    */*    13: /*  REVISION HISTORY:							    */    14: /*									    */7    15: /*  V0.1-00 24-AUG-1994 Steve Branam					    */    16: /*									    */(    17: /*	Original version.						    */    18: /*									    */V    19: /****************************************************************************/    20:      21: #include <stdio.h>     22: #include <ctype.h>    23: #include "ranalyzer.h"    24: #include "reports.h"    25: /    26: extern GLOBAL_DATABASE gGlobalDatabase;    27: 

jROUTINE tree_greater_than. Go to: mNext routine in file; Routines in this file.



6    28: int tree_greater_than(){return 1;} /* dummy */
OEND tree_greater_than. Go to: Beginning of routine.





    29:     30: L    31: /* dummy routines for currently unimplemented report formats		    */    32: 

lROUTINE rpt_defined_rtf_hdr. Go to: mNext routine in file; Routines in this file.

u

a$    33: void rpt_defined_rtf_hdr(){}
QEND rpt_defined_rtf_hdr. Go to: Beginning of routine.

_



b

nROUTINE rpt_defined_rtf_entry. Go to: mNext routine in file; Routines in this file.

s

.&    34: void rpt_defined_rtf_entry(){}
SEND rpt_defined_rtf_entry. Go to: Beginning of routine.





 

lROUTINE rpt_defined_rtf_end. Go to: mNext routine in file; Routines in this file.

_

<$    35: void rpt_defined_rtf_end(){}
QEND rpt_defined_rtf_end. Go to: Beginning of routine.

x



A

pROUTINE rpt_defined_winhelp_hdr. Go to: mNext routine in file; Routines in this file.



 (    36: void rpt_defined_winhelp_hdr(){}
UEND rpt_defined_winhelp_hdr. Go to: Beginning of routine.





E

rROUTINE rpt_defined_winhelp_entry. Go to: mNext routine in file; Routines in this file.

A

#*    37: void rpt_defined_winhelp_entry(){}
WEND rpt_defined_winhelp_entry. Go to: Beginning of routine.

1



b

pROUTINE rpt_defined_winhelp_end. Go to: mNext routine in file; Routines in this file.



=(    38: void rpt_defined_winhelp_end(){}
UEND rpt_defined_winhelp_end. Go to: Beginning of routine.

l





pROUTINE rpt_defined_vmshelp_hdr. Go to: mNext routine in file; Routines in this file.

E

0(    39: void rpt_defined_vmshelp_hdr(){}
UEND rpt_defined_vmshelp_hdr. Go to: Beginning of routine.





0

rROUTINE rpt_defined_vmshelp_entry. Go to: mNext routine in file; Routines in this file.

e

y*    40: void rpt_defined_vmshelp_entry(){}
WEND rpt_defined_vmshelp_entry. Go to: Beginning of routine.

t



e

pROUTINE rpt_defined_vmshelp_end. Go to: mNext routine in file; Routines in this file.



=(    41: void rpt_defined_vmshelp_end(){}
UEND rpt_defined_vmshelp_end. Go to: Beginning of routine.

d



/    42: 

nROUTINE rpt_undefined_rtf_hdr. Go to: mNext routine in file; Routines in this file.

t

/&    43: void rpt_undefined_rtf_hdr(){}
SEND rpt_undefined_rtf_hdr. Go to: Beginning of routine.

"



h

pROUTINE rpt_undefined_rtf_entry. Go to: mNext routine in file; Routines in this file.

1

E(    44: void rpt_undefined_rtf_entry(){}
UEND rpt_undefined_rtf_entry. Go to: Beginning of routine.

d



 

nROUTINE rpt_undefined_rtf_end. Go to: mNext routine in file; Routines in this file.

r

c&    45: void rpt_undefined_rtf_end(){}
SEND rpt_undefined_rtf_end. Go to: Beginning of routine.





=

rROUTINE rpt_undefined_winhelp_hdr. Go to: mNext routine in file; Routines in this file.

t

A*    46: void rpt_undefined_winhelp_hdr(){}
WEND rpt_undefined_winhelp_hdr. Go to: Beginning of routine.

r



l

tROUTINE rpt_undefined_winhelp_entry. Go to: mNext routine in file; Routines in this file.

E

0,    47: void rpt_undefined_winhelp_entry(){}
YEND rpt_undefined_winhelp_entry. Go to: Beginning of routine.

>



E

rROUTINE rpt_undefined_winhelp_end. Go to: mNext routine in file; Routines in this file.

#

8*    48: void rpt_undefined_winhelp_end(){}
WEND rpt_undefined_winhelp_end. Go to: Beginning of routine.





0

rROUTINE rpt_undefined_vmshelp_hdr. Go to: mNext routine in file; Routines in this file.

n

*    49: void rpt_undefined_vmshelp_hdr(){}
WEND rpt_undefined_vmshelp_hdr. Go to: Beginning of routine.

r





tROUTINE rpt_undefined_vmshelp_entry. Go to: mNext routine in file; Routines in this file.



*,    50: void rpt_undefined_vmshelp_entry(){}
YEND rpt_undefined_vmshelp_entry. Go to: Beginning of routine.

/



	

rROUTINE rpt_undefined_vmshelp_end. Go to: mNext routine in file; Routines in this file.



s*    51: void rpt_undefined_vmshelp_end(){}
WEND rpt_undefined_vmshelp_end. Go to: Beginning of routine.

I



	    52: 

jROUTINE rpt_calls_rtf_hdr. Go to: mNext routine in file; Routines in this file.

*

*"    53: void rpt_calls_rtf_hdr(){}
OEND rpt_calls_rtf_hdr. Go to: Beginning of routine.

u



.

lROUTINE rpt_calls_rtf_entry. Go to: mNext routine in file; Routines in this file.

#

8$    54: void rpt_calls_rtf_entry(){}
QEND rpt_calls_rtf_entry. Go to: Beginning of routine.

a



}

jROUTINE rpt_calls_rtf_end. Go to: mNext routine in file; Routines in this file.

>

A"    55: void rpt_calls_rtf_end(){}
OEND rpt_calls_rtf_end. Go to: Beginning of routine.

0



n

nROUTINE rpt_calls_winhelp_hdr. Go to: mNext routine in file; Routines in this file.

R

&    56: void rpt_calls_winhelp_hdr(){}
SEND rpt_calls_winhelp_hdr. Go to: Beginning of routine.

N



n

pROUTINE rpt_calls_winhelp_entry. Go to: mNext routine in file; Routines in this file.

>

A(    57: void rpt_calls_winhelp_entry(){}
UEND rpt_calls_winhelp_entry. Go to: Beginning of routine.

t



A

nROUTINE rpt_calls_winhelp_end. Go to: mNext routine in file; Routines in this file.

N

0&    58: void rpt_calls_winhelp_end(){}
SEND rpt_calls_winhelp_end. Go to: Beginning of routine.

n



;

nROUTINE rpt_calls_vmshelp_hdr. Go to: mNext routine in file; Routines in this file.

>

M&    59: void rpt_calls_vmshelp_hdr(){}
SEND rpt_calls_vmshelp_hdr. Go to: Beginning of routine.

x



f

pROUTINE rpt_calls_vmshelp_entry. Go to: mNext routine in file; Routines in this file.



H(    60: void rpt_calls_vmshelp_entry(){}
UEND rpt_calls_vmshelp_entry. Go to: Beginning of routine.

"



 

nROUTINE rpt_calls_vmshelp_end. Go to: mNext routine in file; Routines in this file.



>&    61: void rpt_calls_vmshelp_end(){}
SEND rpt_calls_vmshelp_end. Go to: Beginning of routine.

0



o    62: 

iROUTINE rpt_xref_rtf_hdr. Go to: )mNext routine in file; Routines in this file.

0

>!    63: void rpt_xref_rtf_hdr(){}A
NEND rpt_xref_rtf_hdr. Go to: Beginning of routine.





9

kROUTINE rpt_xref_rtf_entry. Go to: dmNext routine in file; Routines in this file.

n

P#    64: void rpt_xref_rtf_entry(){}=
PEND rpt_xref_rtf_entry. Go to: Beginning of routine.





 

iROUTINE rpt_xref_rtf_end. Go to: =mNext routine in file; Routines in this file.

g

o!    65: void rpt_xref_rtf_end(){} 
NEND rpt_xref_rtf_end. Go to: Beginning of routine.





n

mROUTINE rpt_xref_winhelp_hdr. Go to: hmNext routine in file; Routines in this file.

H

1%    66: void rpt_xref_winhelp_hdr(){}
REND rpt_xref_winhelp_hdr. Go to: Beginning of routine.





_

oROUTINE rpt_xref_winhelp_entry. Go to: mNext routine in file; Routines in this file.

o

E'    67: void rpt_xref_winhelp_entry(){}P
TEND rpt_xref_winhelp_entry. Go to: Beginning of routine.





p

mROUTINE rpt_xref_winhelp_end. Go to: imNext routine in file; Routines in this file.



=%    68: void rpt_xref_winhelp_end(){}P
REND rpt_xref_winhelp_end. Go to: Beginning of routine.





>

mROUTINE rpt_xref_vmshelp_hdr. Go to: tmNext routine in file; Routines in this file.

l

G%    69: void rpt_xref_vmshelp_hdr(){} 
REND rpt_xref_vmshelp_hdr. Go to: Beginning of routine.





t

oROUTINE rpt_xref_vmshelp_entry. Go to: tmNext routine in file; Routines in this file.

_

e'    70: void rpt_xref_vmshelp_entry(){}0
TEND rpt_xref_vmshelp_entry. Go to: Beginning of routine.





z

mROUTINE rpt_xref_vmshelp_end. Go to: "mNext routine in file; Routines in this file.

R

 %    71: void rpt_xref_vmshelp_end(){}E
REND rpt_xref_vmshelp_end. Go to: Beginning of routine.





A    72: 

iROUTINE rpt_tree_rtf_hdr. Go to: Next routine in file; Routines in this file.

)

R!    73: void rpt_tree_rtf_hdr(){}G
NEND rpt_tree_rtf_hdr. Go to: Beginning of routine.





0

kROUTINE rpt_tree_rtf_entry. Go to: NmNext routine in file; Routines in this file.

r

f#    74: void rpt_tree_rtf_entry(){}p
PEND rpt_tree_rtf_entry. Go to: Beginning of routine.





R

iROUTINE rpt_tree_rtf_end. Go to: omNext routine in file; Routines in this file.

P

E!    75: void rpt_tree_rtf_end(){}e
NEND rpt_tree_rtf_end. Go to: Beginning of routine.





A

mROUTINE rpt_tree_winhelp_hdr. Go to: _mNext routine in file; Routines in this file.

t

 %    76: void rpt_tree_winhelp_hdr(){}d
REND rpt_tree_winhelp_hdr. Go to: Beginning of routine.





A

oROUTINE rpt_tree_winhelp_entry. Go to: nmNext routine in file; Routines in this file.

h

<'    77: void rpt_tree_winhelp_entry(){}r
TEND rpt_tree_winhelp_entry. Go to: Beginning of routine.





H

mROUTINE rpt_tree_winhelp_end. Go to: GmNext routine in file; Routines in this file.

A

%    78: void rpt_tree_winhelp_end(){})
REND rpt_tree_winhelp_end. Go to: Beginning of routine.





n

mROUTINE rpt_tree_vmshelp_hdr. Go to: mNext routine in file; Routines in this file.

R

%    79: void rpt_tree_vmshelp_hdr(){}}
REND rpt_tree_vmshelp_hdr. Go to: Beginning of routine.





E

oROUTINE rpt_tree_vmshelp_entry. Go to: omNext routine in file; Routines in this file.

P

E'    80: void rpt_tree_vmshelp_entry(){})
TEND rpt_tree_vmshelp_entry. Go to: Beginning of routine.





P

mROUTINE rpt_tree_vmshelp_end. Go to: mNext routine in file; Routines in this file.

.

P%    81: void rpt_tree_vmshelp_end(){}d
REND rpt_tree_vmshelp_end. Go to: Beginning of routine.





    82: 

lROUTINE rpt_byfile_text_hdr. Go to: mNext routine in file; Routines in this file.



$    83: void rpt_byfile_text_hdr(){}
QEND rpt_byfile_text_hdr. Go to: Beginning of routine.

P



E

nROUTINE rpt_byfile_text_entry. Go to: mNext routine in file; Routines in this file.

.

P&    84: void rpt_byfile_text_entry(){}
SEND rpt_byfile_text_entry. Go to: Beginning of routine.

<



>

lROUTINE rpt_byfile_text_end. Go to: mNext routine in file; Routines in this file.

l

P$    85: void rpt_byfile_text_end(){}
QEND rpt_byfile_text_end. Go to: Beginning of routine.

o



0

kROUTINE rpt_byfile_rtf_hdr. Go to: fmNext routine in file; Routines in this file.

s

s#    86: void rpt_byfile_rtf_hdr(){}r
PEND rpt_byfile_rtf_hdr. Go to: Beginning of routine.





>

mROUTINE rpt_byfile_rtf_entry. Go to: tmNext routine in file; Routines in this file.

h

<%    87: void rpt_byfile_rtf_entry(){}_
REND rpt_byfile_rtf_entry. Go to: Beginning of routine.







kROUTINE rpt_byfile_rtf_end. Go to: >mNext routine in file; Routines in this file.

l

P#    88: void rpt_byfile_rtf_end(){}_
PEND rpt_byfile_rtf_end. Go to: Beginning of routine.







oROUTINE rpt_byfile_winhelp_hdr. Go to: tmNext routine in file; Routines in this file.

.

P'    89: void rpt_byfile_winhelp_hdr(){}{
TEND rpt_byfile_winhelp_hdr. Go to: Beginning of routine.





_

qROUTINE rpt_byfile_winhelp_entry. Go to: mNext routine in file; Routines in this file.



)    90: void rpt_byfile_winhelp_entry(){}/
VEND rpt_byfile_winhelp_entry. Go to: Beginning of routine.





R

oROUTINE rpt_byfile_winhelp_end. Go to: EmNext routine in file; Routines in this file.

=

8'    91: void rpt_byfile_winhelp_end(){}
TEND rpt_byfile_winhelp_end. Go to: Beginning of routine.





>

oROUTINE rpt_byfile_vmshelp_hdr. Go to: 1mNext routine in file; Routines in this file.



d'    92: void rpt_byfile_vmshelp_hdr(){}p
TEND rpt_byfile_vmshelp_hdr. Go to: Beginning of routine.





N

qROUTINE rpt_byfile_vmshelp_entry. Go to: 0mNext routine in file; Routines in this file.

o

x)    93: void rpt_byfile_vmshelp_entry(){}f
VEND rpt_byfile_vmshelp_entry. Go to: Beginning of routine.





d

oROUTINE rpt_byfile_vmshelp_end. Go to: xmNext routine in file; Routines in this file.

t

m'    94: void rpt_byfile_vmshelp_end(){}e
TEND rpt_byfile_vmshelp_end. Go to: Beginning of routine.





M    95: 

jROUTINE rpt_file_text_hdr. Go to: mNext routine in file; Routines in this file.

e

d"    96: void rpt_file_text_hdr(){}
OEND rpt_file_text_hdr. Go to: Beginning of routine.

N



0

lROUTINE rpt_file_text_entry. Go to: mNext routine in file; Routines in this file.

_

r$    97: void rpt_file_text_entry(){}
QEND rpt_file_text_entry. Go to: Beginning of routine.

M



>

jROUTINE rpt_file_text_end. Go to: mNext routine in file; Routines in this file.

t

{"    98: void rpt_file_text_end(){}
OEND rpt_file_text_end. Go to: Beginning of routine.

=



O

iROUTINE rpt_file_rtf_hdr. Go to: tmNext routine in file; Routines in this file.

_

_!    99: void rpt_file_rtf_hdr(){}e
NEND rpt_file_rtf_hdr. Go to: Beginning of routine.





d

kROUTINE rpt_file_rtf_entry. Go to: 0mNext routine in file; Routines in this file.

o

t#   100: void rpt_file_rtf_entry(){}p
PEND rpt_file_rtf_entry. Go to: Beginning of routine.





>

iROUTINE rpt_file_rtf_end. Go to: EmNext routine in file; Routines in this file.



8!   101: void rpt_file_rtf_end(){}/
NEND rpt_file_rtf_end. Go to: Beginning of routine.





n

mROUTINE rpt_file_winhelp_hdr. Go to: mNext routine in file; Routines in this file.

R

%   102: void rpt_file_winhelp_hdr(){}}
REND rpt_file_winhelp_hdr. Go to: Beginning of routine.





E

oROUTINE rpt_file_winhelp_entry. Go to: omNext routine in file; Routines in this file.

P

E'   103: void rpt_file_winhelp_entry(){})
TEND rpt_file_winhelp_entry. Go to: Beginning of routine.





P

mROUTINE rpt_file_winhelp_end. Go to: mNext routine in file; Routines in this file.

.

P%   104: void rpt_file_winhelp_end(){}d
REND rpt_file_winhelp_end. Go to: Beginning of routine.







mROUTINE rpt_file_vmshelp_hdr. Go to: .mNext routine in file; Routines in this file.

<

%   105: void rpt_file_vmshelp_hdr(){}h
REND rpt_file_vmshelp_hdr. Go to: Beginning of routine.







oROUTINE rpt_file_vmshelp_entry. Go to: mNext routine in file; Routines in this file.

.

P'   106: void rpt_file_vmshelp_entry(){})
TEND rpt_file_vmshelp_entry. Go to: Beginning of routine.





E

mROUTINE rpt_file_vmshelp_end. Go to: mNext routine in file; Routines in this file.

l

P%   107: void rpt_file_vmshelp_end(){}
REND rpt_file_vmshelp_end. Go to: Beginning of routine.





   108: 

lROUTINE rpt_source_text_hdr. Go to: mNext routine in file; Routines in this file.



o$   109: void rpt_source_text_hdr(){}
QEND rpt_source_text_hdr. Go to: Beginning of routine.

>





nROUTINE rpt_source_text_entry. Go to: mNext routine in file; Routines in this file.



d&   110: void rpt_source_text_entry(){}
SEND rpt_source_text_entry. Go to: Beginning of routine.





A

lROUTINE rpt_source_text_end. Go to: mNext routine in file; Routines in this file.

8

r$   111: void rpt_source_text_end(){}
QEND rpt_source_text_end. Go to: Beginning of routine.

/



N

kROUTINE rpt_source_rtf_hdr. Go to: 1mNext routine in file; Routines in this file.



d#   112: void rpt_source_rtf_hdr(){}
PEND rpt_source_rtf_hdr. Go to: Beginning of routine.





R

mROUTINE rpt_source_rtf_entry. Go to: mNext routine in file; Routines in this file.



%   113: void rpt_source_rtf_entry(){}{
REND rpt_source_rtf_entry. Go to: Beginning of routine.







kROUTINE rpt_source_rtf_end. Go to: >mNext routine in file; Routines in this file.

l

P#   114: void rpt_source_rtf_end(){}i
PEND rpt_source_rtf_end. Go to: Beginning of routine.





>

oROUTINE rpt_source_winhelp_hdr. Go to: pmNext routine in file; Routines in this file.



l'   115: void rpt_source_winhelp_hdr(){}l
TEND rpt_source_winhelp_hdr. Go to: Beginning of routine.





>

qROUTINE rpt_source_winhelp_entry. Go to: emNext routine in file; Routines in this file.



l)   116: void rpt_source_winhelp_entry(){}_
VEND rpt_source_winhelp_entry. Go to: Beginning of routine.





>

oROUTINE rpt_source_winhelp_end. Go to: pmNext routine in file; Routines in this file.



l'   117: void rpt_source_winhelp_end(){}l
TEND rpt_source_winhelp_end. Go to: Beginning of routine.





>

oROUTINE rpt_source_vmshelp_hdr. Go to: emNext routine in file; Routines in this file.

s

s'   118: void rpt_source_vmshelp_hdr(){}f
TEND rpt_source_vmshelp_hdr. Go to: Beginning of routine.







qROUTINE rpt_source_vmshelp_entry. Go to: GmNext routine in file; Routines in this file.

A

)   119: void rpt_source_vmshelp_entry(){}}
VEND rpt_source_vmshelp_entry. Go to: Beginning of routine.





/

oROUTINE rpt_source_vmshelp_end. Go to: =mNext routine in file; Routines in this file.



 '   120: void rpt_source_vmshelp_end(){}p
TEND rpt_source_vmshelp_end. Go to: Beginning of routine.





M   121:    122: /*									    */n=   123: /* Formatter routines forward declarations.				    */   124: /*									    */o   125: $   126: void rpt_defined_text_hdr();&   127: void rpt_defined_text_entry();$   128: void rpt_defined_text_end();$   129: void rpt_defined_sdml_hdr();&   130: void rpt_defined_sdml_entry();$   131: void rpt_defined_sdml_end();$   132: void rpt_defined_html_hdr();&   133: void rpt_defined_html_entry();$   134: void rpt_defined_html_end();#   135: void rpt_defined_rtf_hdr();A%   136: void rpt_defined_rtf_entry();t#   137: void rpt_defined_rtf_end(); '   138: void rpt_defined_winhelp_hdr();>)   139: void rpt_defined_winhelp_entry();d'   140: void rpt_defined_winhelp_end();H'   141: void rpt_defined_vmshelp_hdr();0)   142: void rpt_defined_vmshelp_entry();t'   143: void rpt_defined_vmshelp_end();:   144: &   145: void rpt_undefined_text_hdr();(   146: void rpt_undefined_text_entry();&   147: void rpt_undefined_text_end();&   148: void rpt_undefined_sdml_hdr();(   149: void rpt_undefined_sdml_entry();&   150: void rpt_undefined_sdml_end();&   151: void rpt_undefined_html_hdr();(   152: void rpt_undefined_html_entry();&   153: void rpt_undefined_html_end();%   154: void rpt_undefined_rtf_hdr();t'   155: void rpt_undefined_rtf_entry();i%   156: void rpt_undefined_rtf_end();)   157: void rpt_undefined_winhelp_hdr();{+   158: void rpt_undefined_winhelp_entry();<)   159: void rpt_undefined_winhelp_end();>)   160: void rpt_undefined_vmshelp_hdr();0+   161: void rpt_undefined_vmshelp_entry();2)   162: void rpt_undefined_vmshelp_end();>   163: "   164: void rpt_calls_text_hdr();$   165: void rpt_calls_text_entry();"   166: void rpt_calls_text_end();"   167: void rpt_calls_sdml_hdr();$   168: void rpt_calls_sdml_entry();"   169: void rpt_calls_sdml_end();"   170: void rpt_calls_html_hdr();$   171: void rpt_calls_html_entry();"   172: void rpt_calls_html_end();!   173: void rpt_calls_rtf_hdr();i#   174: void rpt_calls_rtf_entry();=!   175: void rpt_calls_rtf_end();A%   176: void rpt_calls_winhelp_hdr();t'   177: void rpt_calls_winhelp_entry();4%   178: void rpt_calls_winhelp_end();>%   179: void rpt_calls_vmshelp_hdr();R'   180: void rpt_calls_vmshelp_entry();<%   181: void rpt_calls_vmshelp_end();d   182: !   183: void rpt_xref_text_hdr();0#   184: void rpt_xref_text_entry();h!   185: void rpt_xref_text_end();0!   186: void rpt_xref_sdml_hdr();F#   187: void rpt_xref_sdml_entry(); !   188: void rpt_xref_sdml_end(); !   189: void rpt_xref_html_hdr();R#   190: void rpt_xref_html_entry();!   205: void rpt_tree_sdml_hdr();0#   206: void rpt_tree_sdml_entry();e!   207: void rpt_tree_sdml_end();0!   208: void rpt_tree_html_hdr();F#   209: void rpt_tree_html_entry(); !   210: void rpt_tree_html_end();     211: void rpt_tree_rtf_hdr();"   212: void rpt_tree_rtf_entry();    213: void rpt_tree_rtf_end();$   214: void rpt_tree_winhelp_hdr();&   215: void rpt_tree_winhelp_entry();$   216: void rpt_tree_winhelp_end();$   217: void rpt_tree_vmshelp_hdr();&   218: void rpt_tree_vmshelp_entry();$   219: void rpt_tree_vmshelp_end();   220: #   221: void rpt_byfile_text_hdr();P%   222: void rpt_byfile_text_entry();)#   223: void rpt_byfile_text_end();G#   224: void rpt_byfile_sdml_hdr();o%   225: void rpt_byfile_sdml_entry();>#   226: void rpt_byfile_sdml_end(); #   227: void rpt_byfile_html_hdr();3%   228: void rpt_byfile_html_entry(); #   229: void rpt_byfile_html_end();n"   230: void rpt_byfile_rtf_hdr();$   231: void rpt_byfile_rtf_entry();"   232: void rpt_byfile_rtf_end();&   233: void rpt_byfile_winhelp_hdr();(   234: void rpt_byfile_winhelp_entry();&   235: void rpt_byfile_winhelp_end();&   236: void rpt_byfile_vmshelp_hdr();(   237: void rpt_byfile_vmshelp_entry();&   238: void rpt_byfile_vmshelp_end();   239: !   240: void rpt_file_text_hdr();;#   241: void rpt_file_text_entry();t!   242: void rpt_file_text_end();!   243: void rpt_file_sdml_hdr();}#   244: void rpt_file_sdml_entry(); !   245: void rpt_file_sdml_end();o!   246: void rpt_file_html_hdr();/#   247: void rpt_file_html_entry();
kROUTINE report_hdr_routine. Go to: smNext routine in file; Routines in this file.



d?   282: #define report_hdr_routine(t) ((t)[report_format()][0])
PEND report_hdr_routine. Go to: Beginning of routine.





>

mROUTINE report_entry_routine. Go to: mNext routine in file; Routines in this file.

4

eA   283: #define report_entry_routine(t) ((t)[report_format()][1])4
REND report_entry_routine. Go to: Beginning of routine.





E

kROUTINE report_end_routine. Go to: mNext routine in file; Routines in this file.

r

/?   284: #define report_end_routine(t) ((t)[report_format()][2]) 
PEND report_end_routine. Go to: Beginning of routine.





N   285: $   286: typedef void (*FORMATTER)();   287: 6   288: static FORMATTER rpt_defined_routines[][3] = {Q   289:     {rpt_defined_text_hdr, rpt_defined_text_entry, rpt_defined_text_end},4Q   290:     {rpt_defined_sdml_hdr, rpt_defined_sdml_entry, rpt_defined_sdml_end},OQ   291:     {rpt_defined_html_hdr, rpt_defined_html_entry, rpt_defined_html_end}, P   292:     {rpt_defined_rtf_hdr,  rpt_defined_rtf_entry,  rpt_defined_rtf_end},Z   293:     {rpt_defined_winhelp_hdr, rpt_defined_winhelp_entry, rpt_defined_winhelp_end},Y   294:     {rpt_defined_vmshelp_hdr, rpt_defined_vmshelp_entry, rpt_defined_vmshelp_end}<
   295: };   296: 8   297: static FORMATTER rpt_undefined_routines[][3] = {W   298:     {rpt_undefined_text_hdr, rpt_undefined_text_entry, rpt_undefined_text_end}, W   299:     {rpt_undefined_sdml_hdr, rpt_undefined_sdml_entry, rpt_undefined_sdml_end},EW   300:     {rpt_undefined_html_hdr, rpt_undefined_html_entry, rpt_undefined_html_end},
bROUTINE tree_size. Go to: mNext routine in file; Routines in this file.



o   361: int tree_size(S   362: /* Computes the size (number of nodes) of a routine's call tree. The	    */2T   363: /* current implementation is only an approximation, showing a minimal	    */V   364: /* tree size, since it only looks down one level; deep trees will throw it  */   365: /* off.									    */   366:    367:     DEFINITION   368: 	    *aDef/   369: 	    /* (MODIFY, BY ADDR):  					    */2O   370: 	    /* Definition to check. The tree size will be cached in this    */2'   371: 	    /* definition.						    */   372: -   373: )	/* Returns size of tree.					    */lO   374: 	/*****************************************************************--*/t   375: 	   376: {r9   377:     int	    nodes;			    /* Node counter.		    */ ?   378:     REFERENCE				    /* Current reference entry.     */d   379: 	    *called;f>   380:     DEFINITION				    /* Definition for current	    */7   381: 	    *curdef;			    /* reference entry.		    */;   382: P   383:     if (def_tree_size(aDef) != 0) {	    /* Already been computed.	    */$   384: 	return def_tree_size(aDef);
   385:     }lL   386:     else if (!needs_tree(aDef)) {	    /* No tree for routine.	    */   387: 	return 0;
   388:     }t:   389:     else {				    /* Check called routines.	    */=   390: 	for (nodes = 0, called = list_first(def_refs(aDef));_E   391: 	     called != NULL; nodes++, called = next_entry(called)) {s6   392: 	    if (needs_tree(ref_definition(called))) {9   393: 		nodes += def_num_calls(ref_definition(called));s   394: 	    }
   395: 	}(   396: 	set_def_tree_size(aDef, nodes);   397: 	return nodes;
   398:     }s	   399: }l
GEND tree_size. Go to: Beginning of routine.

l



2   400: V   401: /*************************************************************************++*/

dROUTINE fold_string. Go to: mNext routine in file; Routines in this file.

.

0   402: int fold_string(T   403: /* Folds a string at the non-alphanumeric nearest the right margin. A	    */T   404: /* whitespace is removed; anything else is left in front of the fold.	    */   405:    406:     char    *aSrc,-   407: 	    /* (READ, BY ADDR):  					    */35   408: 	    /* Source string to be folded.				    */H   409:    410:     int	    vPos,A+   411: 	    /* (READ, BY VAL):						    */oO   412: 	    /* Position in source string where characters should be copied  */ O   413: 	    /* from. When repeatedly folding a long string, this should	    */fO   414: 	    /* be the return value from a previous call to fold_string. It  */rF   415: 	    /* is assumed to be less than the length of aSrc.		    */   416:    417:     char    *aPrefix,O+   418: 	    /* (READ, BY VAL):						    */0K   419: 	    /* Optional prefix string to be written to aDest before	    */nO   420: 	    /* characters from aSrc. Must be shorter than vLength, or it    *//O   421: 	    /* will be ignored. If NULL ptr is passed, no prefix is used.   */e   422:    423:     char    *aDest,4,   424: 	    /* (WRITE, BY ADDR):					    */O   425: 	    /* Destination buffer into which string is to be folded. It is  */AJ   426: 	    /* assumed to be at least vLength + 1 characters long.	    */   427:    428:     int	    vLength}+   429: 	    /* (READ, BY VAL):						    */fI   430: 	    /* Maximum length of string to be written into aDest.	    */,   431: P   432: )	/* Returns position in aStr where copying stopped. It will be equal */O   433: 	/* to the length of aSrc when all characters have been copied from  */_O   434: 	/* aSrc.  This may be used as the vPos value on a successive call   */p'   435: 	/* to fold_string.						    */nO   436: 	/*****************************************************************--*/u   437: 	   438: {8C   439:     int	    curlen = 0;			    /* Length accumulator.	    */dD   440:     int	    remlen;			    /* Remaining length of string.  */B   441:     int	    fold;			    /* Point at which to fold it.   */F   442:     int	    spaceflag = 0;		    /* Flag: fold at space.	    */   443: U   444:     if (aPrefix != NULL && (curlen = strlen(aPrefix)) < vLength) {dB   445: 	strcpy(aDest, aPrefix);		    /* Copy prefix first.	    */
   446:     }    447: -   448:     remlen = strlen(&aSrc[vPos]);rW   449:     if (curlen + remlen <= vLength) {	    /* Remainder of string fits	    */iP   450: 	strcpy(&aDest[curlen], &aSrc[vPos]);/* without folding.		    */   451: 	return vPos + remlen;
   452:     }c<   453:     else {				    /* Need to fold it, find fold   */#   454: 					    /* point.			    */c1   455: 	for (fold = vPos + vLength - curlen - 1;r;   456: 	    fold > vPos && isalnum(aSrc[fold]);l   457: 	    fold--);lD   458: 	if (fold == vPos) {		    /* Fold point not found, fold   */I   459: 	    fold = vPos + vLength - 1;	    /* it at right margin.	    */4
   460: 	}7   461: 	else if (!(spaceflag = isspace(aSrc[fold]))) { 3   462: 					    /* Folding at non-alphanum,	    */t=   463: 	    fold++;			    /* non-space, fold after it.    */t
   464: 	}3   465: 					    /* Copy folded part of string.  */nC   466: 	strncpy(&aDest[curlen], &aSrc[vPos], fold - vPos);f#   467: 	aDest[fold - vPos] = '\0'; A   468: 	if (spaceflag) {		    /* Remove whitespace at fold.   */_   469: 	    fold++;
   470: 	}>   471: 	return fold;			    /* Next fold will start after   */*   472:     }					    /* this one.		    */	   473: }s
IEND fold_string. Go to: Beginning of routine.

,



    474: V   475: /*************************************************************************++*/

fROUTINE report_filext. Go to: mNext routine in file; Routines in this file.

d

t   476: char *report_filext(V   477: /* Returns the file extension string to be used for report files, based on  */:   478: /* the type of report output requested.					    */   479: )   480:     /* No arguments.							    */r   481: @   482: )	/* Returns ptr to file name extension string.			    */O   483: 	/*****************************************************************--*/d   484: 	   485: {t<   486:     if (rpt_sdml_enabled())	return OUTFILE_EXT_SDML;<   487:     if (rpt_html_enabled())	return OUTFILE_EXT_HTML;:   488:     if (rpt_rtf_enabled())	return OUTFILE_EXT_RTF;B   489:     if (rpt_winhelp_enabled())	return OUTFILE_EXT_WINHELP;B   490:     if (rpt_vmshelp_enabled())	return OUTFILE_EXT_VMSHELP;J   491:     return OUTFILE_EXT_TEXT;		    /* Default output format.	    */	   492: },
KEND report_filext. Go to: Beginning of routine.

t



3   493: V   494: /*************************************************************************++*/

kROUTINE next_defining_file. Go to: lmNext routine in file; Routines in this file.

s

e'   495: SOURCEFILE *next_defining_file(_K   496: /* Returns next source file containing routine definitions.		    */c   497:    498:     SOURCEFILE   499: 	    *aSourceFilem-   500: 	    /* (READ, BY ADDR):  					    */t0   501: 	    /* Source file to check.					    */   502: I   503: )	/* Returns ptr to source file, or NULL if one not found.	    */cO   504: 	/*****************************************************************--*/r   505: 	   506: {}@   507:     SOURCEFILE				    /* Current file being checked.  */   508: 	    *curfile;
   509: 	    *U   510:     for (curfile = next_entry(aSourceFile); /* Scan rest of file list.	    */4   511: 	curfile != NULL; )   512: 	curfile = next_entry(curfile)) {<0   513: 	if (source_routines(curfile) > 0) { D   514: 	    return curfile;		    /* Found another with defs.	    */
   515: 	}
   516:     });   517:     return NULL;			    /* No more with defs.	    */p	   518: } 
PEND next_defining_file. Go to: Beginning of routine.





l   519: V   520: /*************************************************************************++*/

kROUTINE prev_defining_file. Go to: imNext routine in file; Routines in this file.



.'   521: SOURCEFILE *prev_defining_file(*O   522: /* Returns previous source file containing routine definitions.		    */7   523:    524:     SOURCEFILE   525: 	    *aSourceFile -   526: 	    /* (READ, BY ADDR):  					    */.0   527: 	    /* Source file to check.					    */   528: I   529: )	/* Returns ptr to source file, or NULL if one not found.	    */nO   530: 	/*****************************************************************--*/A   531: 	   532: {	@   533:     SOURCEFILE				    /* Current file being checked.  */   534: 	    *curfile;
   535: 	     S   536:     for (curfile = prev_entry(aSourceFile); /* Scan prior file list.	    */e   537: 	curfile != NULL;o)   538: 	curfile = prev_entry(curfile)) {l0   539: 	if (source_routines(curfile) > 0) { D   540: 	    return curfile;		    /* Found another with defs.	    */
   541: 	}
   542:     }i<   543:     return NULL;			    /* No prior with defs.	    */	   544: }s
PEND prev_defining_file. Go to: Beginning of routine.





    545: V   546: /*************************************************************************++*/

hROUTINE isfirst_in_file. Go to: mNext routine in file; Routines in this file.



=   547: int isfirst_in_file(V   548: /* Determines whether a definition entry is the first one in its source	    */T   549: /* file, assuming the definitions are currently sorted in file order.	    */   550:    551:     DEFINITION   552: 	    *aDef-   553: 	    /* (READ, BY ADDR):  					    */ /   554: 	    /* Definition to check.					    */    555: I   556: )	/* Returns flag indicating whether definition is first:		    */	7   557: 	/*  1 - Definition is first in file.				    */ :   558: 	/*  0 - Definition is not first in file.			    */O   559: 	/*****************************************************************--*/h   560: 	   561: { 9   562:     DEFINITION				    /* Ptr to prev def.		    */r   563: 	    *prevdef;   564: 7   565:     if ((prevdef = prev_entry(aDef)) != NULL) {l:   566: 	return (def_source(aDef) != def_source(prevdef));
   567:     }x   568:     return 1;A	   569: }	
MEND isfirst_in_file. Go to: Beginning of routine.

*



    570: V   571: /*************************************************************************++*/

gROUTINE islast_in_file. Go to: EmNext routine in file; Routines in this file.

6

/   572: int islast_in_file(gU   573: /* Determines whether a definition entry is the last one in its source	    */ T   574: /* file, assuming the definitions are currently sorted in file order.	    */   575:    576:     DEFINITION   577: 	    *aDef-   578: 	    /* (READ, BY ADDR):  					    */ /   579: 	    /* Definition to check.					    */a   580: H   581: )	/* Returns flag indicating whether definition is last:		    */7   582: 	/*  1 - Definition is lasst in file.				    */l:   583: 	/*  0 - Definition is not last in file.				    */O   584: 	/*****************************************************************--*/n   585: 	   586: { 9   587:     DEFINITION				    /* Ptr to next def.		    */n   588: 	    *nextdef;   589: 7   590:     if ((nextdef = next_entry(aDef)) != NULL) {c:   591: 	return (def_source(aDef) != def_source(nextdef));
   592:     }t   593:     return 1; 	   594: } 
LEND islast_in_file. Go to: Beginning of routine.





,   595: V   596: /*************************************************************************++*/

bROUTINE next_tree. Go to: mNext routine in file; Routines in this file.

;

2   597: DEFINITION *next_tree(C   598: /* Returns next definition that needs a call tree.			    */    599:    600:     DEFINITION   601: 	    *aDef-   602: 	    /* (READ, BY ADDR):  					    */a/   603: 	    /* Definition to check.					    */8   604: F   605: )	/* Returns ptr to definition, or NULL if none found.		    */O   606: 	/*****************************************************************--*/s   607: 	   608: {s@   609:     DEFINITION				    /* Current def being checked.   */   610: 	    *curdef; 
   611: 	    /P   612:     for (curdef = next_entry(aDef);	    /* Scan rest of def list.	    */   613: 	curdef != NULL;'   614: 	curdef = next_entry(curdef)) {v#   615: 	if (needs_tree(curdef)) { fC   616: 	    return curdef;		    /* Found another needing tree.  */p
   617: 	}
   618:     } >   619:     return NULL;			    /* No more needing tree.	    */	   620: }r
GEND next_tree. Go to: Beginning of routine.





G   621: V   622: /*************************************************************************++*/

bROUTINE prev_tree. Go to: mNext routine in file; Routines in this file.

n

A   623: DEFINITION *prev_tree(G   624: /* Returns previous definition that needs a call tree.			    */   625:    626:     DEFINITION   627: 	    *aDef-   628: 	    /* (READ, BY ADDR):  					    */e/   629: 	    /* Definition to check.					    */4   630: F   631: )	/* Returns ptr to definition, or NULL if none found.		    */O   632: 	/*****************************************************************--*/*   633: 	   634: {*@   635:     DEFINITION				    /* Current def being checked.   */   636: 	    *curdef;T
   637: 	    N   638:     for (curdef = prev_entry(aDef);	    /* Scan prior def list.	    */   639: 	curdef != NULL;'   640: 	curdef = prev_entry(curdef)) {l#   641: 	if (needs_tree(curdef)) { LC   642: 	    return curdef;		    /* Found another needing tree.  */;
   643: 	}
   644:     }E?   645:     return NULL;			    /* No prior needing tree.	    */R	   646: }o
GEND prev_tree. Go to: Beginning of routine.

3



    647: V   648: /*************************************************************************++*/

eROUTINE next_defined. Go to: EmNext routine in file; Routines in this file.

e

5!   649: DEFINITION *next_defined(B   650: /* Returns next definition for a defined routine.			    */   651:    652:     DEFINITION   653: 	    *aDef-   654: 	    /* (READ, BY ADDR):  					    */R/   655: 	    /* Definition to check.					    */c   656: F   657: )	/* Returns ptr to definition, or NULL if none found.		    */O   658: 	/*****************************************************************--*/*   659: 	   660: {@   661:     DEFINITION				    /* Current def being checked.   */   662: 	    *curdef; 
   663: 	    fP   664:     for (curdef = next_entry(aDef);	    /* Scan rest of def list.	    */   665: 	curdef != NULL;'   666: 	curdef = next_entry(curdef)) {r*   667: 	if (isdefined_routine(curdef)) { B   668: 	    return curdef;		    /* Found another defined one.  */
   669: 	}
   670:     }e3   671:     return NULL;			    /* No more.			    */e	   672: }	
JEND next_defined. Go to: Beginning of routine.





d   673: V   674: /*************************************************************************++*/

eROUTINE prev_defined. Go to: rmNext routine in file; Routines in this file.

R

u!   675: DEFINITION *prev_defined(sE   676: /* Returns previous definition of a defined routine.			    */2   677:    678:     DEFINITION   679: 	    *aDef-   680: 	    /* (READ, BY ADDR):  					    */R/   681: 	    /* Definition to check.					    *//   682: F   683: )	/* Returns ptr to definition, or NULL if none found.		    */O   684: 	/*****************************************************************--*/    685: 	   686: {*@   687:     DEFINITION				    /* Current def being checked.   */   688: 	    *curdef; 
   689: 	    EN   690:     for (curdef = prev_entry(aDef);	    /* Scan prior def list.	    */   691: 	curdef != NULL;'   692: 	curdef = prev_entry(curdef)) { *   693: 	if (isdefined_routine(curdef)) { C   694: 	    return curdef;		    /* Found another defined one.   */u
   695: 	}
   696:     }07   697:     return NULL;			    /* No prior one.		    */w	   698: } 
JEND prev_defined. Go to: Beginning of routine.





    699: V   700: /*************************************************************************++*/

gROUTINE next_undefined. Go to: RmNext routine in file; Routines in this file.



E#   701: DEFINITION *next_undefined(AE   702: /* Returns next definition for an undefined routine.			    */E   703:    704:     DEFINITION   705: 	    *aDef-   706: 	    /* (READ, BY ADDR):  					    */n/   707: 	    /* Definition to check.					    */    708: F   709: )	/* Returns ptr to definition, or NULL if none found.		    */O   710: 	/*****************************************************************--*/4   711: 	   712: {t@   713:     DEFINITION				    /* Current def being checked.   */   714: 	    *curdef;s
   715: 	    	P   716:     for (curdef = next_entry(aDef);	    /* Scan rest of def list.	    */   717: 	curdef != NULL;'   718: 	curdef = next_entry(curdef)) {*+   719: 	if (!isdefined_routine(curdef)) { -C   720: 	    return curdef;		    /* Found another undefined one. */r
   721: 	}
   722:     } 3   723:     return NULL;			    /* No more.			    */e	   724: }f
LEND next_undefined. Go to: Beginning of routine.





    725: V   726: /*************************************************************************++*/

gROUTINE prev_undefined. Go to: *mNext routine in file; Routines in this file.

i

 #   727: DEFINITION *prev_undefined(oH   728: /* Returns previous definition of an undefined routine.			    */   729:    730:     DEFINITION   731: 	    *aDef-   732: 	    /* (READ, BY ADDR):  					    */h/   733: 	    /* Definition to check.					    */,   734: F   735: )	/* Returns ptr to definition, or NULL if none found.		    */O   736: 	/*****************************************************************--*/    737: 	   738: {/@   739:     DEFINITION				    /* Current def being checked.   */   740: 	    *curdef;r
   741: 	    lN   742:     for (curdef = prev_entry(aDef);	    /* Scan prior def list.	    */   743: 	curdef != NULL;'   744: 	curdef = prev_entry(curdef)) {*+   745: 	if (!isdefined_routine(curdef)) { *C   746: 	    return curdef;		    /* Found another undefined one. */ 
   747: 	}
   748:     }*7   749:     return NULL;			    /* No prior one.		    */x	   750: }_
LEND prev_undefined. Go to: Beginning of routine.





t   751: V   752: /*************************************************************************++*/

fROUTINE separate_tree. Go to: mNext routine in file; Routines in this file.

e

<   753: int separate_tree(V   754: /* Determines whether or not the user has requested a separate call tree    */&   755: /* for a routine.							    */   756:    757:     DEFINITION   758: 	    *aDef-   759: 	    /* (READ, BY ADDR):  					    */ 6   760: 	    /* Routine definition to check.				    */   761: -   762: )	/* Returns status flag:						    */cJ   763: 	/*  1 - User has requested separate tree for this routine.	    */N   764: 	/*  0 - User has not requested separate tree for this routine.	    */O   765: 	/*****************************************************************--*/r   766: 	   767: {dC   768:     char    **rlist;			    /* Routine name list ptr.	    */e   769: 8   770:     if ((rlist = separate_list()) == NULL) {    :   771: 	return 0;			    /* No list to worry about.	    */
   772:     }e<   773:     else {				    /* Otherwise, check each name   */:   774: 	while (*rlist != NULL) {	    /* in list.			    */9   775: 	    if (strcmp(*rlist++, def_name(aDef)) == 0) {/;   776: 		return 1;		    /* Found it, separate tree.	    */8   777: 	    }
   778: 	}:   779: 	return 0;			    /* Routine is not in list.	    */
   780:     }*	   781: }*
KEND separate_tree. Go to: Beginning of routine.

n



1   782: V   783: /*************************************************************************++*/

cROUTINE needs_tree. Go to: smNext routine in file; Routines in this file.



    784: int needs_tree(	V   785: /* Determines whether or not a routine definition needs a separate call	    */N   786: /* tree. See the description of report_call_trees for details.		    */   787:    788:     DEFINITION   789: 	    *aDef-   790: 	    /* (MODIFY, BY ADDR):					    */NO   791: 	    /* Routine definition entry to check. If the routine has not    */A   792: 	    /* already been checked, the results of the			    */ @   793: 	    /* evalution are cached in the definition.			    */   794: J   795: )	/* Returns flag indicating whether or not tree is needed:	    */3   796: 	/*  1	- Separate tree is needed.				    */6M   797: 	/*  0	- Separate tree is not needed, routine should be expanded   */ %   798: 	/*	  in callers.						    */ O   799: 	/*****************************************************************--*/8   800: 	   801: {*>   802:     int	    status;			    /* Evaluation status.	    */?   803:     DEFINITION				    /* Current definition ptr.	    */1   804: 	    *curdef;d   805: &   806:     curdef = next_entry(aDef);?   807:     if (def_tree_required(aDef) != NOT_YET_EVALUATED) {h;   808: 	return (def_tree_required(aDef) == TREE_REQUIRED);
   809:     }rV   810:     else if (def_num_calls(aDef) == 0) {    /* Does not call anything, no   */9   811: 	status = 0;			    /* tree to worry about.	    */ 
   812:     } U   813:     else if (tree_inline_disabled()) {	    /* User says separate tree for  */n3   814: 	status = 1;			    /* all routines.		    */*
   815:     }*Q   816:     else if (separate_tree(aDef)) {	    /* User says make this one	    */I/   817: 	status = 1;			    /* separate.		    */
   818:     }u4   819:     else if (!isend_of_list(aDef) &&>   820: 	     strcmp(def_name(aDef), def_name(curdef)) == 0) {=   821: 	status = 1;			    /* Multiply-defined routine,    */ @   822: 	curdef = aDef;			    /* all versions of it need a    */3   823: 	for (curdef = aDef;		    /* tree.			    */6U   824: 	    curdef != NULL && strcmp(def_name(aDef), def_name(curdef)) == 0;N+   825: 	    curdef = next_entry(curdef)) {e5   826: 	    set_def_tree_req(curdef, TREE_REQUIRED);6
   827: 	}
   828:     }*@   829:     else if (def_num_callers(aDef) >= 1 &&   9   830: 	    def_num_callers(aDef) <= max_callers()) {1=   831: 	status = 0;			    /* Too few callers for separate */8'   832:     }					    /* tree.			    */u?   833:     else if (!tree_greater_than(aDef, MIN_TREE_SIZE)) {56   834: 	status = 0;			    /* Tree is trivial.		    */
   835:     }    836:     else {<   837: 	status = 1;			    /* Generate separate tree!	    */
   838:     }/B   839:     if (status) {			    /* Cache evaluation result.	    *//   840: 	set_def_tree_req(aDef, TREE_REQUIRED);r
   841:     }    842:     else {3   843: 	set_def_tree_req(aDef, TREE_NOT_REQUIRED);*
   844:     }*   845:     return status;	   846: }6
HEND needs_tree. Go to: Beginning of routine.





   847: V   848: /*************************************************************************++*/

gROUTINE report_defined. Go to: mNext routine in file; Routines in this file.

L

    849: void report_defined(O   850: /* Reports the defined routines in alphabetical order to a file.	    */i   851:    852:     char    *aFileName,   853: 	    /* (READ, BY ADDR):						    */3   854: 	    /* Report output file name.					    */M   855: )   856: )	/* No return value.						    */.O   857: 	/*****************************************************************--*/n   858: 	   859: {rH   860:     void    (*report_hdr)();		    /* Ptr to report header	    */%   861: 					    /* routine.			    */tN   862:     void    (*report_entry)();		    /* Ptr to report line routine.  */L   863:     void    (*report_end)();		    /* Ptr to report end routine.   */?   864:     FILE    *rptfile;			    /* Report file ptr.		    */7>   865:     DEFINITION				    /* Current routine entry.	    */   866: 	    *curdef;*B   867:     long    total;			    /* Total defined routines.	    */   868:    869:     /*+									    */U   870:     /*	Select appropriate set of output formatter routines. Then open file */ U   871:     /*	and write report header. Next, for each defined routine (i.e. each  */eU   872:     /*	routine for which the source file is known), write a report line.   */uE   873:     /*	Finally, write report trailer and close file.			    */    874:     /*-									    */   875:     D   876:     report_hdr   = report_hdr_routine(rpt_defined_routines);F   877:     report_entry = report_entry_routine(rpt_defined_routines);D   878:     report_end   = report_end_routine(rpt_defined_routines);   879: <   880:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K   881: 	printf("ERROR: Unable to open %s for report output\n", aFileName);>
   882:     }H   883:     else {   884: 	if (list_enabled()) {K   885: 	    fprintf(list_file(), "\nREPORT Defined routines in file %s\n",I   886: 		aFileName);
   887: 	}   888: 	if (log_enabled()) {nG   889: 	    printf("REPORT Defined routines in file %s\n", aFileName); 
   890: 	}>   891: 	(*report_hdr)(rptfile);		    /* Write header.		    */O   892: 	for (total = 0, curdef = list_first(global_deflist()); curdef != NULL; +   893: 	    curdef = next_entry(curdef)) {*-   894: 	    if (isdefined_routine(curdef)) {*,   895: 					    /* Write entry line.	    */$   896: 		if (trace_rpt_enabled()) {A   897: 		    printf("TRACE: Report defined routine %s @ %lxh\n",7%   898: 			def_name(curdef), curdef);	   899: 		}r8   900: 		(*report_entry)(rptfile, curdef, (total == 0),&   901: 		    islast_defined(curdef));   902: 		total++;   903: 	    },   904: 	    else if (trace_rpt_enabled()) {   905: 		printf(.J   906: 		"TRACE: Report defined, skipping undefined routine %s @ %lxh\n",(   907: 		    def_name(curdef), curdef);   908: 	    }
   909: 	}E   910: 	(*report_end)(rptfile, total);	    /* Write trailer.		    */7   911: 	fclose(rptfile);*   912: 	if (list_enabled()) {J   913: 	    fprintf(list_file(), "       %ld Defined routines\n", total);
   914: 	}"   915: 	if (log_full_enabled()) {>   916: 	    printf("       %ld Defined routines\n\n", total);
   917: 	}
   918:     }i	   919: }s
LEND report_defined. Go to: Beginning of routine.





e   920: V   921: /*************************************************************************++*/

iROUTINE report_undefined. Go to: imNext routine in file; Routines in this file.



e   922: void report_undefined(Q   923: /* Reports the undefined routines in alphabetical order to a file.	    */    924:    925:     char    *aFileName,   926: 	    /* (READ, BY ADDR):						    */3   927: 	    /* Report output file name.					    */    928: )   929: )	/* No return value.						    */0O   930: 	/*****************************************************************--*/o   931: 	   932: {	H   933:     void    (*report_hdr)();		    /* Ptr to report header	    */%   934: 					    /* routine.			    */UN   935:     void    (*report_entry)();		    /* Ptr to report line routine.  */L   936:     void    (*report_end)();		    /* Ptr to report end routine.   */?   937:     FILE    *rptfile;			    /* Report file ptr.		    */t>   938:     DEFINITION				    /* Current routine entry.	    */   939: 	    *curdef;=C   940:     long    total;			    /* Total undefined routines.    */    941:    942:     /*+									    */U   943:     /*	Select appropriate set of output formatter routines. Then open file */ U   944:     /*	and write report header. Next, for each undefined routine (i.e.	    */8S   945:     /*	each routine for which the source file is not known), write a	    */AQ   946:     /*	report line.  Finally, write report trailer and close file.	    */u   947:     /*-									    */   948: F   949:     report_hdr   = report_hdr_routine(rpt_undefined_routines);H   950:     report_entry = report_entry_routine(rpt_undefined_routines);F   951:     report_end   = report_end_routine(rpt_undefined_routines);   952: <   953:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K   954: 	printf("ERROR: Unable to open %s for report output\n", aFileName);a
   955:     }i   956:     else {   957: 	if (list_enabled()) {L   958: 	    fprintf(list_file(), "\nREPORT External routines in file %s\n",   959: 		aFileName);*
   960: 	}   961: 	if (log_enabled()) {eH   962: 	    printf("REPORT External routines in file %s\n", aFileName);
   963: 	}>   964: 	(*report_hdr)(rptfile);		    /* Write header.		    */O   965: 	for (total = 0, curdef = list_first(global_deflist()); curdef != NULL; +   966: 	    curdef = next_entry(curdef)) { .   967: 	    if (!isdefined_routine(curdef)) {,   968: 					    /* Write entry line.	    */$   969: 		if (trace_rpt_enabled()) {B   970: 		    printf("TRACE: Report external routine %s @ %lxh\n",%   971: 			def_name(curdef), curdef);    972: 		}8   973: 		(*report_entry)(rptfile, curdef, (total == 0),(   974: 		    islast_undefined(curdef));   975: 		total++;   976: 	    },   977: 	    else if (trace_rpt_enabled()) {   978: 		printf(bI   979: 		"TRACE: Report external, skipping defined routine %s @ %lxh\n", (   980: 		    def_name(curdef), curdef);   981: 	    }
   982: 	}E   983: 	(*report_end)(rptfile, total);	    /* Write trailer.		    */u   984: 	fclose(rptfile);    985: 	if (list_enabled()) {K   986: 	    fprintf(list_file(), "       %ld External routines\n", total);D
   987: 	}"   988: 	if (log_full_enabled()) {?   989: 	    printf("       %ld External routines\n\n", total); 
   990: 	}
   991:     } 	   992: }a
NEND report_undefined. Go to: Beginning of routine.





s   993: V   994: /*************************************************************************++*/

eROUTINE report_calls. Go to: smNext routine in file; Routines in this file.



    995: void report_calls(V   996: /* Reports the calls and callers of the defined routines in alphabetical    */(   997: /* order to a file.							    */   998:    999:     char    *aFileName,  1000: 	    /* (READ, BY ADDR):						    */3  1001: 	    /* Report output file name.					    */8  1002: )  1003: )	/* No return value.						    */eO  1004: 	/*****************************************************************--*/1  1005: 	  1006: { I  1007:     void    (*report_hdr)();		    /* Ptr to section header	    */*%  1008: 					    /* routine.			    */6N  1009:     void    (*report_entry)();		    /* Ptr to report line routine.  */L  1010:     void    (*report_end)();		    /* Ptr to section end routine.  */?  1011:     FILE    *rptfile;			    /* Report file ptr.		    */8>  1012:     DEFINITION				    /* Current routine entry.	    */  1013: 	    *curdef; :  1014:     REFERENCE				    /* Current caller ref.	    */  1015: 	    *caller;o:  1016:     REFERENCE				    /* Current called ref.	    */  1017: 	    *called;rB  1018:     long    total;			    /* Total defined routines.	    */  1019:   1020:     /*+									    */U  1021:     /*	Select appropriate set of output formatter routines and open file.  */	P  1022:     /*	For each defined routine, write a header section. For each	    */U  1023:     /*	reference and caller in a routine definition, write a report line   */ Q  1024:     /*	(they are output in side-by-side pairs until both lists are	    */	Q  1025:     /*	exhausted, although there is no relationship implied by the	    */eU  1026:     /*	pairing). Then write a trailer section for the defined routine.	    */r0  1027:     /*	Last, close the file.						    */  1028:     /*-									    */  1029: B  1030:     report_hdr   = report_hdr_routine(rpt_calls_routines);D  1031:     report_entry = report_entry_routine(rpt_calls_routines);B  1032:     report_end   = report_end_routine(rpt_calls_routines);  1033: <  1034:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K  1035: 	printf("ERROR: Unable to open %s for report output\n", aFileName); 
  1036:     }   1037:     else {  1038: 	if (list_enabled()) {!  1039: 	    fprintf(list_file(), @  1040: 		"\nREPORT Defined routine calls/callers in file %s\n",  1041: 		aFileName); 
  1042: 	}  1043: 	if (log_enabled()) {=H  1044: 	    printf("REPORT Defined routine calls/callers in file %s\n",  1045: 		aFileName);e
  1046: 	}O  1047: 	for (total = 0, curdef = list_first(global_deflist()); curdef != NULL;9+  1048: 	    curdef = next_entry(curdef)) {e-  1049: 	    if (isdefined_routine(curdef)) {b0  1050: 					    /* Write header section.	    */$  1051: 		if (trace_rpt_enabled()) {  1052: 		    printf((A  1053: 			"TRACE: Report calls/callers for routine %s @ %lxh\n",i%  1054: 			def_name(curdef), curdef);  1055: 		} )  1056: 		(*report_hdr)(rptfile, curdef);p5  1057: 		for (called = list_first(def_refs(curdef)),)8  1058: 		     caller = list_first(def_callers(curdef));0  1059: 		     called != NULL || caller != NULL;J  1060: 		     caller = next_entry(caller), called = next_entry(called)) {3  1061: 					    /* Write calls/caller line.	    */u7  1062: 		    (*report_entry)(rptfile, called, caller); 2  1063: 		}			    /* Write trailer section.	    */)  1064: 		(*report_end)(rptfile, curdef);   1065: 		total++;  1066: 	    },  1067: 	    else if (trace_rpt_enabled()) {  1068: 		printf(lN  1069: 	"TRACE: Report calls/callers, skipping external routine %s @ %lxh\n",(  1070: 		    def_name(curdef), curdef);  1071: 	    }
  1072: 	}  1073: 	fclose(rptfile);	  1074: 	if (list_enabled()) {J  1075: 	    fprintf(list_file(), "       %ld Defined routines\n", total);
  1076: 	}"  1077: 	if (log_full_enabled()) {>  1078: 	    printf("       %ld Defined routines\n\n", total);
  1079: 	}
  1080:     } 	  1081: }e
JEND report_calls. Go to: Beginning of routine.





   1082: V  1083: /*************************************************************************++*/

eROUTINE report_xrefs. Go to: emNext routine in file; Routines in this file.

*

/  1084: void report_xrefs(V  1085: /* Reports caller cross references for all routines (defined and undefined) */6  1086: /* in alphabetical order to a file.					    */  1087:   1088:     char    *aFileName,  1089: 	    /* (READ, BY ADDR):						    */3  1090: 	    /* Report output file name.					    */e  1091: )  1092: )	/* No return value.						    */O  1093: 	/*****************************************************************--*/9  1094: 	  1095: {t  1096:     void report_tree();8  1097: H  1098:     void    (*report_hdr)();		    /* Ptr to report header	    */%  1099: 					    /* routine.			    */-N  1100:     void    (*report_entry)();		    /* Ptr to report line routine.  */R  1101:     void    (*report_entry_tree)();	    /* Ptr to report line routine.  */L  1102:     void    (*report_end)();		    /* Ptr to report end routine.   */P  1103:     void    (*report_end_tree)();	    /* Ptr to report end routine.   */?  1104:     FILE    *rptfile;			    /* Report file ptr.		    */	>  1105:     DEFINITION				    /* Current routine entry.	    */  1106: 	    *curdef;a@  1107:     DEFINITION				    /* Temporary def to hold call   */.  1108: 	    *treedef;			    /* tree.			    */?  1109:     REFERENCE				    /* Temporary ref to current	    */92  1110: 	    *curref;			    /* definition.		    */B  1111:     long    total;			    /* Total defined routines.	    */I  1112:     int	    xreffile = 0;		    /* Xref report file number.	    */e  1113:   1114:     /*+									    */U  1115:     /*	Select appropriate set of output formatter routines. Then open file */pU  1116:     /*	and write report header. Next, for each routine, write a report	    */nK  1117:     /*	line.  Finally, write report trailer and close file.		    */_  1118:     /*									    */  1119: A  1120:     report_hdr   = report_hdr_routine(rpt_xref_routines);(C  1121:     report_entry = report_entry_routine(rpt_xref_routines); H  1122:     report_entry_tree = report_entry_routine(rpt_tree_routines);D  1123:     report_end_tree = report_end_routine(rpt_tree_routines);A  1124:     report_end   = report_end_routine(rpt_xref_routines);2  1125: <  1126:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K  1127: 	printf("ERROR: Unable to open %s for report output\n", aFileName);5
  1128:     }   1129:     else {  1130: 	if (list_enabled()) {!  1131: 	    fprintf(list_file(),e:  1132: 		"\nREPORT Caller cross references in file %s\n",  1133: 		aFileName);/
  1134: 	}  1135: 	if (log_enabled()) {rN  1136: 	    printf("REPORT Caller cross references in file %s\n", aFileName);
  1137: 	}>  1138: 	(*report_hdr)(rptfile);		    /* Write header.		    */?  1139: 	for (total = 0, curdef = list_first(global_deflist());t  1140: 	    curdef != NULL;+  1141: 	    curdef = next_entry(curdef)) { R  1142: 	    if (rpt_html_enabled() && def_xreffile(curdef) != xreffile) {I  1143: 		xreffile = rpt_html_continue(&rptfile, CALLER_XREF_SECTION,d4  1144: 				curdef, xreffile, def_xreffile(curdef));  1145: 	    },  1146: 					    /* Write entry line.	    */'  1147: 	    if (trace_rpt_enabled()) {eE  1148: 		printf("TRACE: Report caller xref for routine %s @ %lxh\n",\(  1149: 		    def_name(curdef), curdef);  1150: 	    }M  1151: 	    (*report_entry)(rptfile, curdef, !total, isend_of_list(curdef));}  1152: .  1153: 	    if (def_num_calls(curdef) != 0) {  1154: Q  1155: 	    /******* The following code adapted from report_call_trees ********/*  1156: -  1157: 		curref  = new_ref(0, curdef, NULL);*$  1158: 		if (trace_rpt_enabled()) {G  1159: 		    printf("TRACE: Report call tree for routine %s @ %lxh\n",o%  1160: 			def_name(curdef), curdef);4  1161: 		}t6  1162: 		(*report_entry_tree)(rptfile, curref, 0, 0);  1163: 		free_ref(curref);E  1164: 					    p  1165: 		/*+							    */H  1166: 		/* Generate the subtree. Create a temporary def to serve as */F  1167: 		/* the tree root and set its tree root to the current	    */H  1168: 		/* definition as a context value. This is used in detection */H  1169: 		/* of duplicate and recursive expansions. Use the ref list  */H  1170: 		/* of this tree to build a stack of caller refs. Push a ref */H  1171: 		/* for the current routine to this stack, reflecting the    */H  1172: 		/* fact that it is the first caller, then report the tree.  */H  1173: 		/* Then pop the reference and free the root definition.	    */  1174: 		/*-							    */  1175: B  1176: 		treedef = new_def(def_name(curdef), def_source(curdef));(  1177: 		set_def_root(treedef, curdef);6  1178: 		push_ref(treedef, new_ref(0, curdef, NULL));F  1179: 		report_tree(rptfile, report_entry_tree, curdef, 1, treedef);%  1180: 		free_ref(pop_ref(treedef));0  1181: 		free_def(treedef);1  1182: 					    /* Write trailer section.	    */ ?  1183: 		(*report_end_tree)(rptfile, curdef, (total == 0), 1);e  1184: Q  1185: 	    /****** The preceding code adapted from report_call_trees *********/p  1186:   1187: 	    }  1188: 	    total++;i
  1189: 	}E  1190: 	(*report_end)(rptfile, total);	    /* Write trailer.		    */	  1191: 	fclose(rptfile);r  1192: 	if (list_enabled()) {B  1193: 	    fprintf(list_file(), "       %ld Routines\n", total);
  1194: 	}"  1195: 	if (log_full_enabled()) {6  1196: 	    printf("       %ld Routines\n\n", total);
  1197: 	}
  1198:     }*	  1199: } 
JEND report_xrefs. Go to: Beginning of routine.





s  1200: V  1201: /*************************************************************************++*/

dROUTINE report_tree. Go to: mNext routine in file; Routines in this file.

a

e  1202: void report_tree( U  1203: /* Recursively reports one line for each routine in the call tree. The	    */ V  1204: /* recursion is depth first (i.e. expanding each referenced routine before  */R  1205: /* showing the next at the same level). The recursion nesting level	    */E  1206: /* controls indentation of the called routine names.			    */P  1207:   1208:     FILE    *aRptFile,,  1209: 	    /* (READ, BY ADDR):						    */E  1210: 	    /* Report output file. Must be opened by caller.		    */   1211: &  1212:     void    (*aReportEntry)(),,  1213: 	    /* (EXEC, BY ADDR):						    */8  1214: 	    /* Report line formatter routine.				    */  1215:   1216:     DEFINITION  1217: 	    *aDef,f-  1218: 	    /* (MODIFY, BY ADDR):					    */ O  1219: 	    /* Routine definition entry to report. The tree root for the    */0=  1220: 	    /* definition will be set to aTreeRoot.			    */   1221:       1222:     int	    vLevel, +  1223: 	    /* (READ, BY VAL):						    */I  1224: 	    /* Recursion nesting level. Level 0 is the top level.	    */e  1225:   1226:     DEFINITION  1227: 	    *aTreeRoot	-  1228: 	    /* (MODIFY, BY ADDR):					    */0N  1229: 	    /* Routine definition entry that acts as root of this call	    */O  1230: 	    /* tree.  References to the routines in the call tree will be   */oN  1231: 	    /* added to this definition. Its root field is used as the	    */?  1232: 	    /* context value for this tree expansion.			    */l  1233:     )  1234: )	/* No return value.						    */uO  1235: 	/*****************************************************************--*/_  1236: 	  1237: { ?  1238:     REFERENCE				    /* Current reference entry.     */;  1239: 	    *called;i>  1240:     DEFINITION				    /* Definition for current	    */7  1241: 	    *curdef;			    /* reference entry.		    */0E  1242:     int	    expanded;			    /* Flag indicating routine	    */ 3  1243: 					    /* has already been reported.   */*G  1244:     int	    recursive;			    /* Flag indicating routine is   */+.  1245: 					    /* called recursively.	    */E  1246:     char    errmsg[256];		    /* Error message buffer.	    */  1247:   1248:     /*+									    */U  1249:     /*	For each referenced routine, report the routine. If the routine has */oU  1250:     /*	not already been expanded in this tree, is defined, and does not    */aU  1251:     /*	have a separate tree (and we have not exceeded max tree depth),	    */0:  1252:     /*	generate its subtree recursively.				    */  1253:     /*-									    */  1254: 5  1255:     for (called = list_first(def_refs(aDef));u8  1256: 	 called != NULL; called = next_entry(called)) {
  1257: 	 3  1258: 					    /* Get current def ptr and find */ 1  1259: 					    /* out expanded/recursive	    */0C  1260: 	curdef    = ref_definition(called); /* conditions.		    */8  1261: 	recursive = isrecursive_ref(called, aTreeRoot);J  1262: 	expanded  = (!recursive && !needs_tree(curdef) &&?  1263: 		    isalready_expanded(curdef, def_root(aTreeRoot)));   1264: H  1265: 	(*aReportEntry)(aRptFile, called, vLevel, expanded, recursive);  1266: 3  1267: 					    /* Mark def as part of tree.    */d3  1268: 	set_def_root(curdef, def_root(aTreeRoot));*	  1269: 	e7  1270: 	if (!expanded && !recursive &&rH  1271: 	    isdefined_routine(curdef) && !needs_tree(curdef)) {0  1272: 	    if (vLevel < max_tree_depth()) {  1273:   1274: 		/*+							    */H  1275: 		/*  A subtree needs to be generated. Push a reference to    */H  1276: 		/*  the current routine to the call stack for recursion	    */H  1277: 		/*  detection at lower levels, do the lower level subtree,  */7  1278: 		/*  and discard the added reference.			    */   1279: 		/*-							    */  1280: 8  1281: 		push_ref(aTreeRoot, new_ref(0, curdef, NULL));A  1282: 		report_tree(aRptFile, aReportEntry, curdef, vLevel + 1,h  1283: 		    aTreeRoot); '  1284: 		free_ref(pop_ref(aTreeRoot));e  1285: 	    }1  1286: 	    else if (vLevel == MAX_TREE_DEPTH) {   1287: 		sprintf(errmsg, O  1288: 	    "\nWARNING: %s tree depth exceeds %d levels, halting expansion\n",=3  1289: 		    def_name(aTreeRoot), MAX_TREE_DEPTH); "  1290: 		fputs(errmsg, aRptFile);  1291: 		if (list_enabled()) {3)  1292: 		    fputs(errmsg, list_file());r  1293: 		}n  1294: 		puts(errmsg);e  1295: 		break;  1296: 	    }
  1297: 	}
  1298:     }1	  1299: }(
IEND report_tree. Go to: Beginning of routine.

n



t  1300: 
  1301: #if 0V  1302: /*************************************************************************++*/  1303: void report_call_trees(RV  1304: /* Reports the call trees for the defined routines in alphabetical order to */U  1305: /* a file. The report attempts to minimize the number of trivial trees	    */,Q  1306: /* generated and maximize tree depth, while limiting the amount of	    */ V  1307: /* repetitive subtree expansion. To meet this goal, a separate call tree    */A  1308: /* will not be generated in the following cases:			    */   1309: /*									    */ Q  1310: /*	1) a routine that calls no other routines (this eliminates empty    */n'  1311: /*	   call trees);							    */   1312: /*									    */ Q  1313: /*	2) a routine that calls one or more other routines, but is called   *//Q  1314: /*	   from only 1-x other routines, where x is a user-settable limit   */xQ  1315: /*	   (this eliminates low-usage routines that can be better shown	    */ 6  1316: /*	   as subtrees of their callers);				    */  1317: /*									    */}Q  1318: /*	3) a routine that is called from more than x other routines, but    *//L  1319: /*	   that has a total tree expansion of only 1-4 nodes (this	    */Q  1320: /*	   eliminates very simple call trees that can be easily shown as    */)4  1321: /*	   subtrees of their callers).					    */  1322: /*									    */1V  1323: /* In these cases, any call relationships will be shown in the call trees   */V  1324: /* of any caller. There is one special exception to cases 2 and 3, where a  */Q  1325: /* routine is multiply-defined. This indicates multiple, alternate	    */ S  1326: /* implementations of the same routine, possibly with different call	    */fV  1327: /* structures. Until the product is linked, it cannot be determined which   */V  1328: /* version of the routine will be called; therefore a separate tree will be */?  1329: /* generated for each version of the routine.				    */e  1330: /*									    */tR  1331: /* In all other cases, a separate call tree will be generated for a	    */V  1332: /* routine. Specifically, this means routines that are not called from any  */V  1333: /* other, and frequently-used routines with complex call trees. There are   */U  1334: /* also two user-selectable overrides to this behavior. The "separate"	    */rV  1335: /* option allows the user to specify a file containing a list of routine    */V  1336: /* names for which separate trees must be generated if they call anything.  */V  1337: /* The "noinline" option forces separate trees for all routines that call   */"  1338: /* anything.								    */  1339:   1340:     char    *aFileName,  1341: 	    /* (READ, BY ADDR):						    */3  1342: 	    /* Report output file name.					    */r  1343: )  1344: )	/* No return value.						    */ O  1345: 	/*****************************************************************--*/r  1346: 	  1347: { I  1348:     void    (*report_hdr)();		    /* Ptr to section header	    */{%  1349: 					    /* routine.			    */nN  1350:     void    (*report_entry)();		    /* Ptr to report line routine.  */L  1351:     void    (*report_end)();		    /* Ptr to section end routine.  */?  1352:     FILE    *rptfile;			    /* Report file ptr.		    */*>  1353:     DEFINITION				    /* Current routine entry.	    */  1354: 	    *curdef;l@  1355:     DEFINITION				    /* Temporary def to hold call   */.  1356: 	    *treedef;			    /* tree.			    */E  1357:     int	    lastdef;			    /* Flag indicating last def	    */o3  1358: 					    /* with separate call tree.     */l?  1359:     REFERENCE				    /* Temporary ref to current	    */c2  1360: 	    *curref;			    /* definition.		    */B  1361:     long    total;			    /* Total defined routines.	    */I  1362:     int	    treefile = 0;		    /* Tree report file number.	    */e  1363:   1364:     /*+									    */U  1365:     /*	Select appropriate set of output formatter routines and open file.  */ U  1366:     /*	For each defined routine that warrants a separate call tree, write  */oU  1367:     /*	a header section. Then do a depth-first recursive traversal of the  */ T  1368:     /*	routine references and write a report line for each reference.	    */U  1369:     /*	Then write a trailer section for the defined routine.  Last, close  */i%  1370:     /*	the file.							    */o  1371:     /*-									    */  1372: A  1373:     report_hdr   = report_hdr_routine(rpt_tree_routines); C  1374:     report_entry = report_entry_routine(rpt_tree_routines); A  1375:     report_end   = report_end_routine(rpt_tree_routines);2  1376: <  1377:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K  1378: 	printf("ERROR: Unable to open %s for report output\n", aFileName); 
  1379:     }   1380:     else {  1381: 	if (list_enabled()) {!  1382: 	    fprintf(list_file(),l=  1383: 		"\nREPORT Defined routine call trees in file %s\n",f  1384: 		aFileName); 
  1385: 	}  1386: 	if (log_enabled()) {tE  1387: 	    printf("REPORT Defined routine call trees in file %s\n",	  1388: 		aFileName);*
  1389: 	}O  1390: 	for (total = 0, curdef = list_first(global_deflist()); curdef != NULL; +  1391: 	    curdef = next_entry(curdef)) {cM  1392: 	    if (needs_tree(curdef)) {	    /* If routine needs tree, write */n3  1393: 					    /* header section and toplevel  */ "  1394: 					    /* line.			    */O  1395: 		if (rpt_html_enabled() && def_treefile(curdef) != treefile) { K  1396: 		    treefile = rpt_html_continue(&rptfile, CALL_TREE_SECTION, 8  1397: 				    curdef, treefile, def_treefile(curdef));  1398: 		}y(  1399: 		lastdef = islast_tree(curdef);@  1400: 		(*report_hdr)(rptfile, curdef, (total == 0), lastdef);-  1401: 		curref  = new_ref(0, curdef, NULL);c$  1402: 		if (trace_rpt_enabled()) {G  1403: 		    printf("TRACE: Report call tree for routine %s @ %lxh\n",i%  1404: 			def_name(curdef), curdef);   1405: 		} 1  1406: 		(*report_entry)(rptfile, curref, 0, 0);p  1407: 		free_ref(curref);g  1408: 					       1409: 		/*+							    */H  1410: 		/* Generate the subtree. Create a temporary def to serve as */F  1411: 		/* the tree root and set its tree root to the current	    */H  1412: 		/* definition as a context value. This is used in detection */H  1413: 		/* of duplicate and recursive expansions. Use the ref list  */H  1414: 		/* of this tree to build a stack of caller refs. Push a ref */H  1415: 		/* for the current routine to this stack, reflecting the    */H  1416: 		/* fact that it is the first caller, then report the tree.  */H  1417: 		/* Then pop the reference and free the root definition.	    */  1418: 		/*-							    */  1419: B  1420: 		treedef = new_def(def_name(curdef), def_source(curdef));(  1421: 		set_def_root(treedef, curdef);6  1422: 		push_ref(treedef, new_ref(0, curdef, NULL));A  1423: 		report_tree(rptfile, report_entry, curdef, 1, treedef); %  1424: 		free_ref(pop_ref(treedef));   1425: 		free_def(treedef);1  1426: 					    /* Write trailer section.	    */	@  1427: 		(*report_end)(rptfile, curdef, (total == 0), lastdef);  1428: 		total++;  1429: 	    },  1430: 	    else if (trace_rpt_enabled()) {I  1431: 		printf("TRACE: Report call tree, skipping routine %s @ %lxh\n",*(  1432: 		    def_name(curdef), curdef);  1433: 	    }  1434: 
  1435: 	}  1436: 	fclose(rptfile);e  1437: 	if (list_enabled()) {I  1438: 	    fprintf(list_file(), "       %ld Trees generated\n", total);3
  1439: 	}"  1440: 	if (log_full_enabled()) {=  1441: 	    printf("       %ld Trees generated\n\n", total); 
  1442: 	}
  1443:     } 	  1444: }r  1445: #endif  1446: V  1447: /*************************************************************************++*/

gROUTINE report_by_file. Go to: tmNext routine in file; Routines in this file.



   1448: void report_by_file(V  1449: /* Reports the defined routines in the order in which they occurred in the  */V  1450: /* source files to a file. The files themselves are ordered alphabetically. */V  1451: /* Since this report is driven by the list of defined routines, if a file   */P  1452: /* contains no routine definitions, it will not be reported here.	    */  1453:   1454:     char    *aFileName,  1455: 	    /* (READ, BY ADDR):						    */3  1456: 	    /* Report output file name.					    */   1457: )  1458: )	/* No return value.						    */eO  1459: 	/*****************************************************************--*/   1460: 	  1461: { I  1462:     void    (*report_hdr)();		    /* Ptr to section header	    */e%  1463: 					    /* routine.			    */nN  1464:     void    (*report_entry)();		    /* Ptr to report line routine.  */L  1465:     void    (*report_end)();		    /* Ptr to section end routine.  */?  1466:     FILE    *rptfile;			    /* Report file ptr.		    */b>  1467:     DEFINITION				    /* Current routine entry.	    */  1468: 	    *curdef;o;  1469:     SOURCEFILE				    /* Current file entry.	    */   1470: 	    *curfile;B  1471:     long    total;			    /* Total defined routines.	    */D  1472:     int	    totfiles;			    /* Total number of files.	    */F  1473:     int	    lastfile;			    /* Flag indicating last file    */&  1474: 					    /* with defs.		    */N  1475:     int	    byfilefile = 0;		    /* By-file report file number.	    */  1476:   1477:     /*+									    */U  1478:     /*	Select appropriate set of output formatter routines and open file.  */sU  1479:     /*	For each source file, write a header section. For each routine in   */fU  1480:     /*	that file, write a report list. Then write a trailer section for    */e9  1481:     /*	the file. Last, close the file.					    */s  1482:     /*-									    */  1483: C  1484:     report_hdr   = report_hdr_routine(rpt_byfile_routines);iE  1485:     report_entry = report_entry_routine(rpt_byfile_routines);dC  1486:     report_end   = report_end_routine(rpt_byfile_routines);*  1487: <  1488:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K  1489: 	printf("ERROR: Unable to open %s for report output\n", aFileName);e
  1490:     }m  1491:     else {  1492: 	if (list_enabled()) {!  1493: 	    fprintf(list_file(), :  1494: 		"\nREPORT Routines by source file in file %s\n",  1495: 		aFileName);r
  1496: 	}  1497: 	if (log_enabled()) {uN  1498: 	    printf("REPORT Routines by source file in file %s\n", aFileName);
  1499: 	}.  1500: 					    /* Skip past undefined	    */%  1501: 					    /* routines.		    */f4  1502: 	for (curdef = list_first(global_deflist());B  1503: 	    curdef != NULL && !isdefined_routine(curdef);+  1504: 	    curdef = next_entry(curdef)) {	'  1505: 	    if (trace_rpt_enabled()) {i  1506: 		printf(rF  1507: 		"TRACE: Report file, skipping external routine %s @ %lxh\n",(  1508: 		    def_name(curdef), curdef);  1509: 	    }
  1510: 	}3  1511: 					    /* Report each file's routines. */;#  1512: 	for (total = totfiles = 0,{?  1513: 		curdef != NULL ? curfile = def_source(curdef) : NULL;e  1514: 	    curdef != NULL;D  1515: 	    curdef != NULL ? curfile = def_source(curdef) : NULL) {6  1516: 	    lastfile = islast_defining_file(curfile);
  1517: 	    *#  1518: 	    if (rpt_html_enabled() @  1519: 		&& source_byfilefile(curfile) != byfilefile) {6  1520: 		byfilefile = rpt_html_continue(&rptfile,:  1521: 				ROUTINES_BY_FILE_SECTION, curfile, byfilefile,(  1522: 				source_byfilefile(curfile));  1523: 	    }0  1524: 					    /* Write header section.	    */H  1525: 	    (*report_hdr)(rptfile, curfile, (totfiles == 0), lastfile);'  1526: 	    if (trace_rpt_enabled()) {	>  1527: 		printf("TRACE: Report routines in file %s @ %lxh\n",-  1528: 		    source_name(curfile), curfile);n  1529: 	    }  1530: 	    do {p,  1531: 					    /* Write entry line.	    */$  1532: 		if (trace_rpt_enabled()) {A  1533: 		    printf("TRACE: Report file %s routine %s @ %lxh\n",*=  1534: 			source_name(def_source(curdef)), def_name(curdef),a  1535: 			curdef);   1536: 		} C  1537: 		(*report_entry)(rptfile, curdef, isfirst_in_file(curdef), &  1538: 		    islast_in_file(curdef));  1539: 		total++;&  1540: 		curdef = next_entry(curdef);O  1541: 	    } while (curdef != NULL && def_source(curdef) == curfile);i  1542: 1  1543: 					    /* Write trailer section.	    */	H  1544: 	    (*report_end)(rptfile, curfile, (totfiles == 0), lastfile);  1545: 	    totfiles++;
  1546: 	}  1547: 	fclose(rptfile);p  1548: 	if (list_enabled()) {N  1549: 	    fprintf(list_file(), "       %ld Defined routines in %d files\n",  1550: 		total, totfiles); 
  1551: 	}"  1552: 	if (log_full_enabled()) {I  1553: 	    printf("       %ld Defined routines in %d files\n\n", total,   1554: 		totfiles);
  1555: 	}
  1556:     } 	  1557: }l
LEND report_by_file. Go to: Beginning of routine.





   1558: V  1559: /*************************************************************************++*/

eROUTINE report_files. Go to: (mNext routine in file; Routines in this file.

/

u  1560: void report_files(L  1561: /* Reports the source files in alphabetical order to a file.		    */  1562:   1563:     char    *aFileName,  1564: 	    /* (READ, BY ADDR):						    */3  1565: 	    /* Report output file name.					    */;  1566: )  1567: )	/* No return value.						    */ O  1568: 	/*****************************************************************--*/u  1569: 	  1570: {eH  1571:     void    (*report_hdr)();		    /* Ptr to report header	    */%  1572: 					    /* routine.			    */(N  1573:     void    (*report_entry)();		    /* Ptr to report line routine.  */L  1574:     void    (*report_end)();		    /* Ptr to report end routine.   */?  1575:     FILE    *rptfile;			    /* Report file ptr.		    */c;  1576:     SOURCEFILE				    /* Current file entry.	    */4  1577: 	    *curfile;B  1578:     int	    total;			    /* Total defined routines.	    */  1579:   1580:     /*+									    */U  1581:     /*	Select appropriate set of output formatter routines. Open file and  */3U  1582:     /*	write a header section. For each source file, write a report line.  */sG  1583:     /*	Then write a trailer section and close the file.		    */e  1584:     /*-									    */  1585: A  1586:     report_hdr   = report_hdr_routine(rpt_file_routines);oC  1587:     report_entry = report_entry_routine(rpt_file_routines);oA  1588:     report_end   = report_end_routine(rpt_file_routines);   1589: <  1590:     if ((rptfile = fopen(aFileName, "w")) == NULL) {K  1591: 	printf("ERROR: Unable to open %s for report output\n", aFileName);N
  1592:     }   1593:     else {  1594: 	if (list_enabled()) {!  1595: 	    fprintf(list_file(),t;  1596: 		"\nREPORT Source files in file %s\n", aFileName); 
  1597: 	}  1598: 	if (log_enabled()) {*C  1599: 	    printf("REPORT Source files in file %s\n", aFileName);+
  1600: 	}  1601: >  1602: 	(*report_hdr)(rptfile);		    /* Write header.		    */A  1603: 	for (total = 0, curfile = list_first(global_filelist());   1604: 	    curfile != NULL; -  1605: 	    curfile = next_entry(curfile)) {l,  1606: 					    /* Write entry line.	    */'  1607: 	    if (trace_rpt_enabled()) { 9  1608: 		printf("TRACE: Report source file %s @ %lxh\n", -  1609: 		    source_name(curfile), curfile);   1610: 	    }H  1611: 	    (*report_entry)(rptfile, curfile, isbegin_of_list(curfile),"  1612: 		isend_of_list(curfile));  1613: 	    total++;*
  1614: 	}E  1615: 	(*report_end)(rptfile, total);	    /* Write trailer.		    */<  1616: 	fclose(rptfile);0  1617: 	if (list_enabled()) {>  1618: 	    fprintf(list_file(), "       %d files\n", total);
  1619: 	}"  1620: 	if (log_full_enabled()) {2  1621: 	    printf("       %d files\n\n", total);
  1622: 	}
  1623:     }d	  1624: }i
JEND report_files. Go to: Beginning of routine.





t  1625: V  1626: /*************************************************************************++*/

fROUTINE report_source. Go to: mNext routine in file; Routines in this file.

t

e  1627: void report_source(S  1628: /* Reports annotated source files with line numbers. The sources are	    */*2  1629: /* reported in separate files.						    */  1630:   1631:     char    *aFileName,  1632: 	    /* (READ, BY ADDR):						    */?  1633: 	    /* Report output file name format string.			    */t  1634: )  1635: )	/* No return value.						    */ O  1636: 	/*****************************************************************--*/6  1637: 	  1638: {eI  1639:     void    (*report_hdr)();		    /* Ptr to section header	    */e%  1640: 					    /* routine.			    */*N  1641:     void    (*report_entry)();		    /* Ptr to report line routine.  */L  1642:     void    (*report_end)();		    /* Ptr to section end routine.  */V  1643:     char    rptname[MAX_FILE_NAME + 1];	    /* Report file name prefix.	    */V  1644:     char    outputname[MAX_FILE_NAME + 1];  /* Report file name buffer.	    */Q  1645:     char    srcline[MAX_FILE_NAME * 2];	    /* Source line buffer.	    */	?  1646:     FILE    *rptfile;			    /* Report file ptr.		    */S?  1647:     FILE    *srcfile;			    /* Source file ptr.		    */ >  1648:     DEFINITION				    /* Current routine entry.	    */  1649: 	    *curdef; ;  1650:     SOURCEFILE				    /* Current file entry.	    */t  1651: 	    *curfile;B  1652:     long    line;			    /* Current line number in file. */>  1653:     long    total;			    /* Total source lines.	    */D  1654:     int	    totfiles;			    /* Total number of files.	    */  1655:   1656:     /*+									    */T  1657:     /*	Select appropriate set of output formatter routines.  For each	    */R  1658:     /*	source file, open source and report files and write a header	    */U  1659:     /*	section.  Write each line in the file, merging with the routine	    */lU  1660:     /*	definitions.  Then write a trailer section for the file and close   */R6  1661:     /*	the source and report files.					    */  1662:     /*-									    */  1663: C  1664:     report_hdr   = report_hdr_routine(rpt_source_routines);nE  1665:     report_entry = report_entry_routine(rpt_source_routines);eC  1666:     report_end   = report_end_routine(rpt_source_routines);u  1667: !  1668:     if (list_enabled()) { A  1669: 	fputs("\nREPORT Annotated source files\n", list_file()); 
  1670:     }e   1671:     if (log_enabled()) {/  1672: 	puts("REPORT Annotated source files");
  1673:     }E.  1674: 					    /* Skip past undefined	    */%  1675: 					    /* routines.		    */ 7  1676:     for (curdef = list_first(global_deflist()); >  1677: 	curdef != NULL && !isdefined_routine(curdef);'  1678: 	curdef = next_entry(curdef)) {e#  1679: 	if (trace_rpt_enabled()) {4  1680: 	    printf(L  1681: 	    "TRACE: Report sources, skipping external routine %s @ %lxh\n",$  1682: 		def_name(curdef), curdef);
  1683: 	}
  1684:     }3  1685: 					    /* Report each file's contents. */&O  1686:     for (total = totfiles = 0, curfile = list_first(global_filelist());_:  1687: 	curfile != NULL; curfile = next_entry(curfile)) {  1688:   1689: 	line = 0;:  1690: 	sprintf(rptname, aFileName, source_seq(curfile));D  1691: 	if ((srcfile = fopen(source_name(curfile), "r")) == NULL) {;  1692: 	    printf("ERROR: Unable to open %s for input\n",    1693: 		source_name(curfile));
  1694: 	}K  1695: 	else if ((rptfile = fopen(make_filename(outfile_prefix(), rptname,)?  1696: 	        report_filext(), outputname), "w")) == NULL) { M  1697: 	    printf("ERROR: Unable to open %s for report output\n", rptname); 
  1698: 	}6  1699: 	else {				    /* Write header section.	    */=  1700: 	    (*report_hdr)(rptfile, curfile, (totfiles == 0),c"  1701: 		isend_of_list(curfile));'  1702: 	    if (trace_rpt_enabled()) {_F  1703: 		printf("TRACE: Report annotated source in file %s @ %lxh\n",-  1704: 		    source_name(curfile), curfile);5  1705: 	    }3  1706: 					    /* Report lines through last    */f2  1707: 					    /* routine defined in this	    */"  1708: 					    /* file.			    */N  1709: 	    while (curdef != NULL && def_source(curdef) == curfile) {-  1710: 		while (line < def_end(curdef)) {8,  1711: 					    /* Copy source line.	    */7  1712: 		    fgets(srcline, sizeof(srcline), srcfile);,?  1713: 		    (*report_entry)(rptfile, curdef, srcline, ++line,_$  1714: 			source_tabsize(curfile));  1715: 		    total++;  1716: 		}n&  1717: 		curdef = next_entry(curdef);  1718: 	    }/  1719: 					    /* Report rest of file.	    */oG  1720: 	    while (fgets(srcline, sizeof(srcline), srcfile) != NULL) {59  1721: 		(*report_entry)(rptfile, NULL, srcline, ++line,*'  1722: 		    source_tabsize(curfile));H  1723: 		total++;  1724: 	    }1  1725: 					    /* Write trailer section.	    */f=  1726: 	    (*report_end)(rptfile, curfile, (totfiles == 0),A"  1727: 		isend_of_list(curfile));  1728: 	    totfiles++;  1729: 	    fclose(srcfile);r  1730: 	    fclose(rptfile);e
  1731: 	}
  1732:     }a!  1733:     if (list_enabled()) { ?  1734: 	fprintf(list_file(), "       %ld Lines in %d files\n",:  1735: 	    total, totfiles);
  1736:     }e%  1737:     if (log_full_enabled()) {	E  1738: 	printf("       %ld Lines in %d files\n\n", total, totfiles);*
  1739:     }*	  1740: }*
KEND report_source. Go to: Beginning of routine.

r



a  1741: 
END OF FILE/"TOTAL: 108 routines, 12 Avg Length

LGo to: Contents; Previous section; Beginning of section; Next file in section; Previous file in section.