EXAMPLE.DOC July 1993 This file describes the use of CFT and CST, the main parts of CXT, the C EXPLORATION TOOLS. The example session shows the processing of a small program composed of two source files X1.C and X2.C and one include file X.H as listed below. When invoked, the program produces the following output: hello world .................... The source code of the files is as follows: SOURCE LISTING 1: X1.C #include #include "x.h" WORD main(void); VOID x1(void); WORD main(void) { x1(); y1(); return(0); } static VOID x2(void) { printf("hello "); } VOID x1(VOID) { x2(); } END OF SOURCE LISTING 1 SOURCE LISTING 2: X2.C #include #include "x.h" VOID y1(VOID); static int x1(void); static void x3(void); VOID y1(VOID) { x1(); } static char x2(VOID) { printf("world "); x3(); return(1); } - 1 - static int x1(void) { x2(); return(1); } static void x3(void) { static i = 0; printf("."); if (++i < 20) x3(); } END OF SOURCE LISTING 2 SOURCE LISTING 3: X.H typedef void VOID; typedef char BYTE; typedef int WORD; typedef long DWORD; typedef struct _s_x { BYTE a; WORD b; BYTE string[20]; FILE *fptr; } S_XT; extern VOID y1(VOID); END OF SOURCE LISTING 3 First of all, the two source files X1.C and X2.C are processed by CFT to look for the functions and their hierarchy with the following command line (see documentation for description): CFT -m -rauspMP -TMSC70,L -cs -Cs -na -Zs -z x?.c The resulting screen output during processing is shown below. Besides the default informations about the file actually processed there are also some warnings given. (NOTE: Some of the following output lines are truncated due to their length.) SCREEN OUTPUT CFT (TM) C FUNCTION TREE GENERATOR 2.12 Copyright (C) J.M 1988- processing C:/C/CXT/DOC/X1.C C:/C/CXT/DOC/X1.C(15): warning: function 'x2' definition used as prototype processing C:/C/CXT/DOC/X2.C C:/C/CXT/DOC/X2.C(14): warning: function 'x2' definition used as prototype - 2 - writing output file CFT.LST END OF SCREEN OUTPUT The finally generated output file CFT.LST has the following listed contents. For further informations about the meaning of the several sections listed in the output file see the CFT and CST documentation. CFT OUTPUT: CFT.LST ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί CFT (TM) C FUNCTION TREE GENERATOR 2.12 Copyright (C) J.M ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί CFT is part of CXT - the C EXPLORATION TOOLS Ί You are expressly prohibited from selling this software Ί of it in any form, distributing it with another product Ί removing this notice. This software is Copyright (C) Ί File creation date: Sat Nov 21 13:08:22 1992 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί EXAMPLE: int test() (9999) Ί - int : function return type Ί - test() : function name Ί - (9999) : function cross reference number Ί - : function found as D=definition, M=macro, P=P Ί C=function call, A=assembler function Ί - : file name, line number ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION CALLTREE HIERARCHY LISTING ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ WORD main() (1) Γ VOID x1() (2) ³ ΐ static VOID x2() (3) ³ ΐ int printf() (4) ³ ΐ VOID y1() (5) ΐ static int x1() (6) ΐ static char x2() (7) Γ int printf() ΐ static void x3() (8) Γ int printf() ΐ static void x3() ...recursive call of (8) WORD main() ...relations shown at (1) int printf() ...relations shown at (4) - 3 - VOID x1() ...relations shown at (2) static int x1() ...relations shown at (6) static VOID x2() ...relations shown at (3) static char x2() ...relations shown at (7) static void x3() ...relations shown at (8) VOID y1() ...relations shown at (5) ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί TOTAL NUMBER OF FUNCTIONS REFERENCED : 8 Ί NUMBER OF FUNCTION DEFINITIONS : 7 Ί NUMBER OF UNDEFINED FUNCTIONS : 1 Ί DIRECTED CALL GRAPH WITH 8 NODES AND 10 CONNECTI ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί UNDEFINED FUNCTIONS ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ int printf() (4) ...first found in ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION CALL STATISTICS ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ VOID x1() (2) <1 calls> static int x1() (6) <1 calls> static VOID x2() (3) <1 calls> static char x2() (7) <1 calls> VOID y1() (5) <1 calls> static void x3() (8) <2 calls> int printf() (4) <3 calls> ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION CALLER-MEMBER LIST ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ main() (1) <0, 2> x1() (2) <1> y1() (5) <1> - 4 - main() (1) <1> x1() (2) <1, 1> x2() (3) <1> y1() (5) <1> x1() (6) <1, 1> x2() (7) <1> x1() (2) <1> x2() (3) <1, 1> printf() (4) <1> x1() (6) <1> x2() (7) <1, 2> printf() (4) <1> x3() (8) <1> main() (1) <1> y1() (5) <1, 1> x1() (6) <1> x2() (7) <1> x3() (8) <1, recursion> x3() (8) <2, 2> printf() (4) <1> x3() (8) <1, recursion> x2() (7) <1> x2() (3) <1> x3() (8) <1> printf() (4) <3, 0> ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION CALL REFERENCE LIST ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ main() (1) [3]: 8 printf() (4) [1]: 256 [3]: 16 [4]: 15 30 x1() (2) [3]: 20 [3]: 9 x1() (6) [4]: 21 [4]: 10 x2() (3) [3]: 15 [3]: 21 x2() (7) [4]: 14 [4]: 22 - 5 - x3() (8) [4]: 27 [4]: 16 33 y1() (5) [4]: 9 [3]: 10 FILE INDEX LIST 1 G:/C700/INCLUDE/STDIO.H 2 C:/C/CXT/DOC/X.H 3 C:/C/CXT/DOC/X1.C 4 C:/C/CXT/DOC/X2.C ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί CRITICAL FUNCTION CALL PATH (NL...nestinglevel) ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ main() (1) (NL 0) ΐ y1() (5) (NL 1) ΐ x1() (6) (NL 2) ΐ x2() (7) (NL 3) ΐ x3() (8) (NL 4) Γ printf() (4) (NL 5) ΐ x3() ...recursive call of (8) x2() (3) (NL 0) ΐ printf() (NL 1) x1() (2) (NL 0) ΐ x2() ...relations shown at (3) (NL 1) ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί SOURCE FILE - INCLUDE FILE DEPENDENCY ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ C:/C/CXT/DOC/X1.C : G:/C700/INCLUDE/STDIO.H C:/C/CXT/DOC/X.H C:/C/CXT/DOC/X2.C : G:/C700/INCLUDE/STDIO.H C:/C/CXT/DOC/X.H ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION TABLE: C:/C/CXT/DOC/X1.C ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ LINE FUNCTION [SRC BYTES,CMNT BYTES,LINES,BYTES/LINE,FUNCS CALLED,CTRL STMTS,BRACE LVLS] 8 : WORD main() (1) [29,0,4,7.25,2,0,1] 15 : static VOID x2() (3) [22,0,2,11.00,1,0,1] 20 : VOID x1() (2) [10,0,2,5.00,1,0,1] - 6 - [3 FUNCTIONS, AVERAGE VALUES: 20.33, 0.00, 2.67, 7.63, 1.33, 0.00, 1.00] NOTE: NONE OF THESE FUNCTIONS WILL BE CALLED OUTSIDE THIS FILE! ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FUNCTION TABLE: C:/C/CXT/DOC/X2.C ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ LINE FUNCTION [SRC BYTES,CMNT BYTES,LINES,BYTES/LINE,FUNCS CALLED,CTRL STMTS,BRACE LVLS] 9 : VOID y1() (5) [10,0,2,5.00,1,0,1] 14 : static char x2() (7) [41,0,4,10.25,2,0,1] 21 : static int x1() (6) [22,0,3,7.33,1,0,1] 27 : static void x3() (8) [58,0,7,8.29,2,1,1] [4 FUNCTIONS, AVERAGE VALUES: 32.75, 0.00, 4.00, 8.19, 1.50, 0.25, 1.00] ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FILES REFERENCED : 2 Ί FUNCTIONS REFERENCED : 7 Ί AVERAGE # OF FUNCTIONS/FILE : 3.50 Ί AVERAGE # OF BYTES/FUNCTION : 27.43 Ί AVERAGE # OF COMMENT BYTES/FUNCTION : 0.00 Ί AVERAGE # OF LINES/FUNCTION : 3.43 Ί AVERAGE # OF BYTES/LINE : 8.00 Ί AVERAGE # OF CONTROL STATEMENTS/FUNCTION : 0.14 Ί AVERAGE # OF BRACE LEVELS/FUNCTION : 1.00 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FILE INFORMATION ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ FILE SIZE/ SCANNED LINES/SCANNED STDIO.H : 7467/ 0 bytes, 340/ 0 lines, 0 functions (* included *) (7467, 1.000) X.H : 217/ 0 bytes, 16/ 0 lines, 0 functions (* included *) (217, 1.000) X1.C : 212/ 7896 bytes, 23/ 379 lines, 3 functions (* 2 files included *) (212, 1.000) X2.C : 352/ 8036 bytes, 35/ 391 lines, 4 functions (* 2 files included *) (352, 1.000) TOTAL : 8248/ 15932 bytes, 414/ 770 lines, 7 functions in 2 of 4 files 2 (* included *) files program code: 8248 bytes, program comment: 0 bytes average program code/filesize ratio 1.000 see exact file values above: ... (code bytes, code/filesize ratio) END OF CFT OUTPUT: CFT.LST - 7 - Second, the two source files are processed by CST to get the data types and their relations with the following command line: CST -rapP -TMSC70,L -cs -Cs -na -Zs -z x?.c The resulting screen output during processing is as follows: SCREEN OUTPUT CST (TM) C STRUCTURE TREE GENERATOR 2.12 Copyright (C) J.M 1988 processing C:/C/X1.C processing C:/C/X2.C writing output file CST.LST END OF SCREEN OUTPUT The contents of the output file CST.LST is listed below: CST OUTPUT: CST.LST ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί CST (TM) C STRUCTURE TREE GENERATOR 2.12 Copyright (C) J.M ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί CST is part of CXT - the C EXPLORATION TOOLS Ί You are expressly prohibited from selling this software Ί of it in any form, distributing it with another product Ί removing this notice. This software is Copyright (C) Ί File creation date: Sat Nov 21 13:08:25 1992 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί EXAMPLE: struct _test (9999) [] : data type: B=basic type, S=struct, U=union, C Ί - : file name, line number of type definition Ί - : file name, line number of basic type definiti ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA STRUCTURE CALLTREE HIERARCHY LISTING ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ BYTE (1) DWORD (2) FILE (3) Γ *_ptr ΔΔΔ char Γ _cnt ΔΔΔΔ int - 8 - Γ *_base ΔΔ char Γ _flag ΔΔΔ char ΐ _file ΔΔΔ char S_XT (4) Γ a ΔΔΔΔΔΔΔΔΔΔΔ BYTE Γ b ΔΔΔΔΔΔΔΔΔΔΔ WORD Γ string[20] ΔΔ BYTE ΐ *fptr ΔΔΔΔΔΔΔ FILE ...relations shown at (3) VOID (5) WORD (6) char ...relations shown at (1) fpos_t ...relations shown at (2) int ...relations shown at (6) long ...relations shown at (2) size_t (7) struct _iobuf ...relations shown at (3) struct _s_x ...relations shown at (4) unsigned int ...relations shown at (7) void ...relations shown at (5) ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί TOTAL NUMBER OF DATA TYPES REFERENCED : 7 Ί NUMBER OF DATA TYPE DEFINITIONS : 2 Ί DIRECTED CALL GRAPH WITH 7 NODES AND 5 CONNECTIO ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA TYPE CALL STATISTICS ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ DWORD (2) <0 uses> alias: fpos_t long S_XT (4) <0 uses> alias: struct _s_x VOID (5) <0 uses> alias: void size_t (7) <0 uses> alias: unsigned int - 9 - FILE (3) <1 uses> alias: struct _iobuf WORD (6) <2 uses> alias: int BYTE (1) <6 uses> alias: char ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA TYPE CALLER-MEMBER LIST ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ DWORD (2) <0, 0> S_XT (4) <0, 4> BYTE (1) <2> WORD (6) <1> FILE (3) <1> VOID (5) <0, 0> fpos_t ...relations shown at (2) long ...relations shown at (2) size_t (7) <0, 0> struct _s_x ...relations shown at (4) unsigned int ...relations shown at (7) void ...relations shown at (5) struct _s_x (4) <1> FILE (3) <1, 5> char (1) <4> int (6) <1> struct _iobuf ...relations shown at (3) struct _iobuf (3) <1> struct _s_x (4) <1> WORD (6) <2, 0> int ...relations shown at (6) - 10 - struct _iobuf (3) <4> struct _s_x (4) <2> BYTE (1) <6, 0> char ...relations shown at (1) ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA TYPE CALL REFERENCE LIST ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ BYTE (1) [1]: 44 [1]: 44 46 47 48 44 46 47 48 [2]: 8 10 8 10 DWORD (2) [1]: 105 FILE (3) [1]: 43 [2]: 11 11 S_XT (4) [2]: 7 VOID (5) [2]: 1 WORD (6) [1]: 45 [1]: 45 45 [2]: 9 9 char ...relations shown at (1) fpos_t ...relations shown at (2) int ...relations shown at (6) long ...relations shown at (2) size_t (7) [1]: 26 struct _iobuf ...relations shown at (3) struct _s_x ...relations shown at (4) unsigned int ...relations shown at (7) void ...relations shown at (5) FILE INDEX LIST 1 G:/C700/INCLUDE/STDIO.H 2 C:/C/CXT/DOC/X.H 3 C:/C/CXT/DOC/X1.C 4 C:/C/CXT/DOC/X2.C ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ - 11 - Ί DATA STRUCTURE NESTING (NL...nestinglevel) ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ S_XT (4) (NL 0) ΐ FILE (3) (NL 1) Γ char (1) (NL 2) ΐ int (6) ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA TYPE TABLE: G:/C700/INCLUDE/STDIO.H ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ LINE DATA TYPE [ELEMENTS,SUBELEMENTS] 43 : FILE (3) [5,0] alias: struct _iobuf [1 DATA TYPES, AVERAGE VALUES: 5.00, 0.00] ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί DATA TYPE TABLE: C:/C/CXT/DOC/X.H ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ LINE DATA TYPE [ELEMENTS,SUBELEMENTS] 7 : S_XT (4) [4,1] alias: struct _s_x [1 DATA TYPES, AVERAGE VALUES: 4.00, 1.00] ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FILES REFERENCED : 2 Ί DATA TYPES REFERENCED : 2 Ί AVERAGE # OF TYPES/FILE : 1.00 Ί AVERAGE # OF ELEMENTS/TYPE : 4.50 Ί AVERAGE # OF SUBSTRUCTURES/TYPE : 0.50 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ Ί FILE INFORMATION ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ FILE SIZE/ SCANNED LINES/SCANNED STDIO.H : 7467/ 0 bytes, 340/ 0 lines, 1 data types (* included *) (7467, 1.000) X.H : 217/ 0 bytes, 16/ 0 lines, 1 data types (* included *) (217, 1.000) X1.C : 212/ 7896 bytes, 23/ 379 lines, 0 data types (* 2 files included *) (212, 1.000) X2.C : 352/ 8036 bytes, 35/ 391 lines, 0 data types (* 2 files included *) (352, 1.000) TOTAL : 8248/ 15932 bytes, 414/ 770 lines, 2 data types in 2 of 4 files 2 (* included *) files - 12 - program code: 8248 bytes, program comment: 0 bytes average program code/filesize ratio 1.000 see exact file values above: ... (code bytes, code/filesize ratio) END OF CST OUTPUT: CST.LST This short example session gives only a small overview about the capabilities of CFT and CST. There is (nearly) no limitation in the number of files to process, nor is there a limitation in the complexity of the relationship between the items to analyse and to display. Test CFT and CST with your own programs or, for example, with your compiler include files, to get a feeling for what these tools can be useful to you and your work. For a complete description of the available commands see the CFT_CST.DOC file. If you have the BRIEF, MicroEMACS or QEDIT editor you can use the generated database from CFT and CST and try the macro functions to access items in multiple files with just a keystroke. - 13 -