home *** CD-ROM | disk | FTP | other *** search
/ Collection of Education / collectionofeducationcarat1997.iso / COMPUSCI / CSCOP.ZIP / CSCOPE.DOC < prev    next >
Encoding:
Text File  |  1993-10-31  |  38.0 KB  |  1,495 lines

  1.  
  2.  
  3.                                                                             
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                                     c-scope
  16.  
  17.  
  18.                                    C program
  19.  
  20.                                  analysis tool
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                                  User's Manual
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.                                  JAYAR Systems
  52.                               253 College Street
  53.                                    Suite 263
  54.                                Toronto, Ontario
  55.                                Canada   M5T 1R5
  56.                                 (416) 751-5678
  57.  
  58.  
  59.                                        
  60.  
  61.  
  62.  
  63.                                                                             
  64.  
  65.  
  66.                                     LICENSE
  67.  
  68.         The license for the Shareware evaluation (trial use) version of
  69.   c-scope is contained in the file LICENSE.DOC. This file has been included
  70.   for your convenience as an appendix to this manual.
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.                                    WARRANTY
  79.  
  80.         The Shareware evaluation (trial use) version of c-scope is provided
  81.   AS IS. JAYAR Systems MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED,
  82.   INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR
  83.   FITNESS FOR A PARTICULAR PURPOSE.
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.                                 SUPPORT POLICY
  92.  
  93.         JAYAR Systems provides free support for this product. We will answer
  94.   questions and fix serious bugs. If you have any questions about or problems
  95.   with using this product, give us a call at the number on the front cover of
  96.   this manual. Or, if you are not in a rush, send us a letter.
  97.  
  98.         We would also appreciate hearing from you if you have any comments or
  99.   suggestions for improvements.
  100.  
  101.  
  102.  
  103.  
  104.  
  105.                      _______                    
  106.                 ____|__     |               (R) 
  107.              --|       |    |-------------------
  108.                |   ____|__  |  Association of   
  109.                |  |       |_|  Shareware        
  110.                |__|   o   |    Professionals    
  111.              -----|   |   |---------------------
  112.                   |___|___|    MEMBER           
  113.  
  114.  
  115.                   c-scope Copyright (C) 1991-93 JAYAR Systems
  116.                               All Rights Reserved
  117.  
  118.  
  119.                                        
  120.  
  121.  
  122.  
  123.                                                                             
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                                    CONTENTS
  132.  
  133.  
  134.  
  135.   1      Introduction  . . . . . . . . . . . . . . . . . . . . . . . . .    1
  136.   2      What c-scope does . . . . . . . . . . . . . . . . . . . . . . .    2
  137.   3      Using c-scope . . . . . . . . . . . . . . . . . . . . . . . . .    8
  138.           1 Installing c-scope . . . . . . . . . . . . . . . . . . . . .    8
  139.           2 Running c-scope  . . . . . . . . . . . . . . . . . . . . . .    8
  140.           3 Ignoring functions . . . . . . . . . . . . . . . . . . . . .    9
  141.           4 Function declarations  . . . . . . . . . . . . . . . . . . .    9
  142.   4      Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  143.           1 Non-standard function types  . . . . . . . . . . . . . . . .   11
  144.           2 Preprocessor . . . . . . . . . . . . . . . . . . . . . . . .   11
  145.           3 Function pointers  . . . . . . . . . . . . . . . . . . . . .   11
  146.   A      Error messages  . . . . . . . . . . . . . . . . . . . . . . . .   13
  147.   B      License . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15
  148.   C      Trial Use License:  . . . . . . . . . . . . . . . . . . . . . .   16
  149.   D      Limited Distribution License: . . . . . . . . . . . . . . . . .   17
  150.   E      Definition of Shareware . . . . . . . . . . . . . . . . . . . .   19
  151.   F      How to Register . . . . . . . . . . . . . . . . . . . . . . . .   20
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                      iii
  179.  
  180.  
  181.  
  182.  
  183.                                                                             
  184.  
  185.  
  186.  
  187.  
  188.  
  189.                                 1 Introduction 
  190.  
  191.  
  192.   c-scope is an analysis tool for C programs. It shows you what functions are
  193.   contained in a program and which functions they reference. This information
  194.   is provided in several easy-to-use formats. In addition, the registered
  195.   version of c-scope computes and reports a number of software complexity
  196.   metrics for each function.
  197.  
  198.         The program to be analyzed may be contained in one file, or spread
  199.   across many files, as is typical with C programs.
  200.  
  201.         It is possible with c-scope to get detailed information on all of the
  202.   inter-function references, or just on those that you are interested in.
  203.  
  204.         The analysis provided by c-scope is ideal for understanding or
  205.   documenting the structure and operation of a large C program, whether it is
  206.   a program you wrote or one that you inherited.
  207.  
  208.         Using c-scope is simple and is described in the following sections of
  209.   the manual. Section 2 describes c-scope's capabilities by working through a
  210.   short example. Section 8 shows you how to use c-scope. And Section 3.4
  211.   provides a few notes on using c-scope.
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.                                       1
  239.  
  240.  
  241.  
  242.  
  243.                                                        What c-scope does   2
  244.  
  245.  
  246.  
  247.  
  248.  
  249.                              2 What c-scope does 
  250.  
  251.  
  252.   The easiest way to explain what c-scope does is to work through an example.
  253.   For illustration purposes we will use the following simple example program
  254.   (the RPN desk calculator program, borrowed from K & R) and analyze it with
  255.   c-scope. The program consists of five functions, in three files.
  256.  
  257.         File DCALC.C in Figure 1 contains the main program, main(), file
  258.   STACK.C in Figure 2 contains the functions push(), pop() and clear() and
  259.   file GETOP.C in Figure 3 contains function getop().
  260.  
  261.         When c-scope analyzes a program it produces four reports which are
  262.   printed on stdout:
  263.  
  264.     o A Function Location report. For each function defined in your program
  265.       (i.e., has source code), c-scope lists the function (functions are
  266.       listed alphabetically), the name of the file the function is contained
  267.       in, and the line number in the file where the function is defined; for
  268.       our example program:
  269.  
  270.               FUNCTION LOCATION
  271.  
  272.               Function              File                  Line No.
  273.               --------------------  --------------------  --------
  274.               clear                 STACK.C                     34
  275.               getop                 GETOP.C                      6
  276.               main                  DCALC.C                      7
  277.               pop                   STACK.C                     22
  278.               push                  STACK.C                     10
  279.  
  280.     o A File Contents report. This is similar to the Function Location
  281.       report, but for each file the functions defined in it are listed. File
  282.       names are printed in the order determined by the contents of the file
  283.       SOURCE.DAT (discussed later in Section 8):
  284.  
  285.               FILE CONTENTS
  286.  
  287.               File                  Function
  288.               --------------------  --------------------
  289.  
  290.               GETOP.C               getop               
  291.  
  292.               DCALC.C               main                
  293.  
  294.               STACK.C               push                
  295.                                     pop                 
  296.                                     clear               
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.                                                        What c-scope does   3
  304.  
  305.  
  306.     o A Function References report. For each function defined in the program
  307.       (i.e., whose source code is available), an alphabetical list of the
  308.       functions called by that function are listed. c-scope recognizes a
  309.       function call if it occurs in the body of the function or in an
  310.       initialization statement. Functions which do not reference any other
  311.       functions are listed as referencing function void (e.g., function
  312.       clear() in our example):
  313.  
  314.               FUNCTION REFERENCES
  315.  
  316.               Function              References function
  317.               --------------------  --------------------
  318.  
  319.               getop                 getc                
  320.                                     ungetc              
  321.  
  322.               main                  atof                
  323.                                     clear               
  324.                                     getop               
  325.                                     pop                 
  326.                                     printf              
  327.                                     push                
  328.  
  329.               push                  clear               
  330.                                     printf              
  331.  
  332.               pop                   clear               
  333.                                     printf              
  334.  
  335.               clear                 void
  336.  
  337.     o A Static Calling Tree. Starting with the main() function, all the
  338.       functions it calls, and all the functions called by those functions,
  339.       etc. are listed in a tree format:
  340.  
  341.               STATIC CALLING TREE
  342.                  0. main
  343.                     1. atof[E]
  344.                     1. clear
  345.                     1. getop
  346.                        2. getc[E]
  347.                        2. ungetc[E]
  348.                     1. pop
  349.                        2. clear
  350.                        2. printf[E]
  351.                     1. printf[E]
  352.                     1. push
  353.                        2. clear
  354.                        2. printf[E]
  355.  
  356.       A level number is printed beside each function name to aid
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.                                                        What c-scope does   4
  364.  
  365.  
  366.       interpretation. main() is at level 0, all the functions called by
  367.       main() are at level 1, and so on. The functions referenced by a higher
  368.       level function are listed alphabetically.
  369.  
  370.       Multiple references to a function are ignored--main() in our example
  371.       calls push() and pop() several times, but they only appear in the tree
  372.       once. If a function appears more than once in the tree, because it is
  373.       called by more than one function, the function is only expanded the
  374.       first time, to reduce the amount of output. Including the -E option
  375.       will force c-scope to expand all references though.
  376.  
  377.       The letter [E] following a function name means the function is defined
  378.       externally--its source code was not available. The letter [R] is also
  379.       printed for functions that are called recursively.
  380.  
  381.       If a main() function is not defined, a static calling tree is not
  382.       produced.
  383.  
  384.         The registered version of c-scope also produces a Function Complexity
  385.   report. For each function in your program c-scope lists the function name,
  386.   the number of source lines in it, the number of statements in it and the
  387.   number of while, for, switch and if statements. See Appendix C for
  388.   information on registering your version of c-scope.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.                                                        What c-scope does   5
  424.  
  425.  
  426.   #include <stdio.h>
  427.  
  428.   #define MAXOP 20
  429.   #define NUMBER '0'
  430.   #define TOOBIG '9'
  431.  
  432.   main()
  433.   {
  434.     int type;
  435.     char s[MAXOP];
  436.     double op2, atof(char *), pop(void), push(double);
  437.     void clear(void);
  438.     int getop(char *s, int lim);
  439.  
  440.     while ((type = getop(s, MAXOP)) != EOF)
  441.       switch (type)
  442.       { case NUMBER: push(atof(s));
  443.                      break;
  444.         case '+':    push(pop() + pop());
  445.                      break;
  446.         case '*':    push(pop() * pop());
  447.                      break;
  448.         case '-':    op2 = pop();
  449.                      push(pop() - op2);
  450.                      break;
  451.         case '/':    op2 = pop();
  452.                      if (op2 != 0.0)
  453.                        push(pop() / op2);
  454.                      else
  455.                        printf("zero divisor popped\n");
  456.                      break;
  457.         case '=':    printf("\t%f\n",push(pop()));
  458.                      break;
  459.         case 'c':    clear();
  460.                      break;
  461.         case TOOBIG: printf("%.20s ... is too long\n",s);
  462.                      break;
  463.         default:     printf("unknown command %c\n", type);
  464.                      break;
  465.       }
  466.   }
  467.  
  468.  
  469.  
  470.  
  471.   Figure 1: File DCALC.C which contains function main().
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.                                                        What c-scope does   6
  484.  
  485.  
  486.   #include <stdio.h>
  487.  
  488.   #define MAXVAL 100
  489.  
  490.   int sp = 0;
  491.   double val[MAXVAL], push(double f), pop(void);
  492.   void clear(void);
  493.  
  494.  
  495.   double push(double f)
  496.   {
  497.     if (sp < MAXVAL)
  498.       return(val[sp++] = f);
  499.     else
  500.     { printf("error: stack full\n");
  501.       clear();
  502.       return(0);
  503.     }
  504.   }
  505.  
  506.  
  507.   double pop(void)
  508.   {
  509.     if (sp > 0)
  510.       return(val[--sp]);
  511.     else
  512.     { printf("error: stack empty\n");
  513.       clear();
  514.       return(0);
  515.     }
  516.   }
  517.  
  518.  
  519.   void clear(void)
  520.   {
  521.     sp = 0;
  522.   }
  523.  
  524.  
  525.  
  526.  
  527.   Figure 2: File STACK.C which contains the functions push(), pop() and
  528.   clear().
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.                                                        What c-scope does   7
  544.  
  545.  
  546.   #include <stdio.h>
  547.  
  548.   #define NUMBER '0'
  549.   #define TOOBIG '9'
  550.  
  551.   int getop(char *s, int lim)
  552.   {
  553.     int i,c;
  554.  
  555.     while ((c = getc(stdin)) == ' ' || c == '\t' ||
  556.             c == '\n')
  557.       ;
  558.  
  559.     if (c != '.' && (c < '0' || c > '9'))
  560.       return(c);
  561.  
  562.     s[0] = c;
  563.     for (i=1; (c = getc(stdin)) >= '0' && c <= '9'; i++)
  564.       if (i < lim)
  565.         s[i] = c;
  566.     if (c == '.')
  567.     { if (i < lim)
  568.         s[i] = c;
  569.       for (i++; (c = getc(stdin)) >= '0' && c <= '9'; i++)
  570.         if (i < lim)
  571.           s[i] = c;
  572.     }
  573.  
  574.     if (i < lim)
  575.     { ungetc(c,stdin);
  576.       s[i] = '\0';
  577.       return(NUMBER);
  578.     }
  579.     else
  580.     { while (c != '\n' && c != EOF)
  581.         c = getc(stdin);
  582.       s[lim-1] = '\0';
  583.       return(TOOBIG);
  584.     }
  585.   }
  586.  
  587.  
  588.  
  589.  
  590.   Figure 3: File GETOP.C which contains function getop().
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.                                                            Using c-scope   8
  604.  
  605.  
  606.  
  607.  
  608.  
  609.                                3 Using c-scope 
  610.  
  611.  
  612.  
  613.  
  614.   3.1 Installing c-scope 
  615.  
  616.   Installation of c-scope couldn't be easier. The distribution diskette
  617.   contains the program CS.EXE and a file called READ.ME that you should check
  618.   for any last minute updates that did not make this manual.
  619.  
  620.         The distribution diskette is not copy protected so you can copy the
  621.   program to your hard disk--a good location would be the directory where you
  622.   keep your utilities. It should be a directory that is pointed to by your
  623.   PATH environment variable so that c-scope will be easy to use.
  624.  
  625.         It is also possible to use c-scope from a floppy diskette too. It is
  626.   quite small and doesn't require a lot of disk space so it is convenient to
  627.   use even from a diskette.
  628.  
  629.         In any event, don't execute the program from the distribution
  630.   diskette. Copy it to another disk and put the distribution diskette away in
  631.   a safe place.
  632.  
  633.  
  634.   3.2 Running c-scope 
  635.  
  636.         c-scope may be used to analyze a single source file by typing
  637.  
  638.           CS program.c
  639.  
  640.   where program.c is the name of the source file. More typically it will be
  641.   used to analyze a program spread across numerous files. In this case you
  642.   just type
  643.  
  644.           CS
  645.  
  646.   c-scope looks in the current directory for a file called SOURCE.DAT. In
  647.   this file it expects to find the names of the files comprising the
  648.   program--one per line. Full filenames are required, and paths may be
  649.   included for source files not in the current directory. For instance, in
  650.   the example program in Section , SOURCE.DAT contained the following three
  651.   lines:
  652.  
  653.           GETOP.C
  654.           DCALC.C
  655.           STACK.C
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.                                                            Using c-scope   9
  664.  
  665.  
  666.   As the source files are processed, c-scope writes their names to stderr,
  667.   and the analysis is written to stdout which usually appears on your screen.
  668.   If you would rather have the reports in a file, use I/O redirection:
  669.  
  670.           CS > PROGRAM.RPT
  671.  
  672.   This puts the output in a file called PROGRAM.RPT which can be printed or
  673.   edited.
  674.  
  675.         As mentioned above, the -E option will force c-scope to expand all
  676.   references to a function, e.g.,
  677.  
  678.           CS -E
  679.  
  680.  
  681.  
  682.   3.3 Ignoring functions 
  683.  
  684.         Usually you will find with c-scope that many of the functions
  685.   referenced in a program belong to the C library. You may not be interested
  686.   in these functions, and may feel their inclusion clutters the output
  687.   needlessly. If so you may create a file called IGNORE.DAT, which c-scope
  688.   will read if it is present in the current directory.
  689.  
  690.         c-scope expects to find the names of functions, one per line, in
  691.   IGNORE.DAT. c-scope will ignore these functions when it generates its
  692.   output reports.
  693.  
  694.         For example, if you didn't want the references to the functions
  695.   printf, fprintf, strcpy and strcmp to appear in the reports, IGNORE.DAT
  696.   would contain
  697.  
  698.           printf
  699.           fprintf
  700.           strcpy
  701.           strcmp
  702.  
  703.   You may also include names of functions which are defined in your
  704.   source--not just C library function names.
  705.  
  706.  
  707.   3.4 Function declarations 
  708.  
  709.         When c-scope encounters a function name internal to another function
  710.   it determines if the reference is a declaration or a call by checking for
  711.   one of C's reserved storage class or type identifiers. However, if you have
  712.   declared a function that returns a DEFINEd or typedef'd result, c-scope
  713.   will not recognize it as a declaration and will treat it as a call. A
  714.   common example is:
  715.  
  716.           FILE *myopen();
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                           Using c-scope   10
  724.  
  725.  
  726.  
  727.   To avoid this problem, you can make sure all internal function declarations
  728.   have the extern class, i.e.,
  729.  
  730.           extern FILE *myopen();
  731.  
  732.   or, you can create a file called TYPES.DAT. This file will be read by
  733.   c-scope if present, and will be assumed to consist of type identifiers that
  734.   c-scope will add to its list of C keywords. In the above illustration,
  735.   TYPES.DAT would contain the line:
  736.  
  737.           FILE
  738.  
  739.   This problem does not occur for function declarations external to a
  740.   function.
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.                                                                   Notes   11
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                    4 Notes 
  790.  
  791.  
  792.   c-scope examines each source file in SOURCE.DAT looking for function names.
  793.   When it encounters one, it determines if the function name represents a
  794.   definition, a call, or an external or internal declaration.
  795.  
  796.         c-scope uses a knowledge of C program syntax to identify functions
  797.   and their context. It is not a compiler though, and some situations may
  798.   cause problems. These are discussed in this section.
  799.  
  800.  
  801.   4.1 Non-standard function types 
  802.  
  803.         This was discussed in Section . c-scope doesn't recognize an internal
  804.   function declaration as such if it returns a type which is not one of C's
  805.   predefined types (int, float, double, char, etc. or pointers to these)
  806.   ___                                     
  807.   and an implicitly defined storage class.
  808.  
  809.         You can remedy this by declaring the function to be of the extern
  810.   storage class (which is proper form but often left assumed for functions),
  811.   or by including the new type in TYPES.DAT.
  812.  
  813.         Note that all external function declarations are recognized as such,
  814.   regardless of the type.
  815.  
  816.  
  817.   4.2 Preprocessor 
  818.  
  819.         The current version of c-scope ignores preprocessor lines. This means
  820.   it does not process include files (however, good style dictates that such
  821.   files should not contain executable code anyway).
  822.  
  823.         Macros are not expanded, so that functions which are referenced by
  824.   macros are not noticed by c-scope. Also, macros which take arguments are
  825.   not recognized as such, but are interpreted as external functions.
  826.  
  827.         Conditional compilation directives are ignored.
  828.  
  829.  
  830.   4.3 Function pointers 
  831.  
  832.         c-scope does not deal properly with pointers to functions; for
  833.   example, in the following:
  834.  
  835.           main()
  836.           {
  837.             char *(*fncn)();
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.                                                                   Notes   12
  845.  
  846.  
  847.             char *a(void);
  848.             fncn = a;
  849.             printf ("this is %s\n",(*fncn)());
  850.           }
  851.  
  852.           char name[10];
  853.           char *a(void)
  854.           {
  855.             strcpy(name,"function A");
  856.             return(name);
  857.           }
  858.  
  859.   c-scope does not recognize (*fncn)() as a function call. Such calls should
  860.   be rewritten as fncn() which is permissible under the ANSI standard, where
  861.   the syntax for calls to functions and to functions specified by pointers is
  862.   allowed to be the same.
  863.  
  864.         Even with this change though, c-scope will only recognize that fncn()
  865.   has been called, and not that a() was indirectly called.
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.                                                          Error messages   13
  905.  
  906.  
  907.  
  908.  
  909.  
  910.                                A Error messages 
  911.  
  912.  
  913.   This section describes the error messages that c-scope may produce and
  914.   offers suggestions on how to remedy the problems they indicate.
  915.  
  916.                        ____  
  917.         Invalid option -opt
  918.   A program option was specified that is not one of -e or -c.
  919.  
  920.                        ________  
  921.         Unable to open filename
  922.   A source file was specified on the command line or in the file SOURCE.DAT
  923.   that cannot be opened--check for spelling mistakes, etc.
  924.  
  925.         Error--no main function
  926.   There is no main function in any of the source files; a static calling tree
  927.   will not be produced.
  928.  
  929.         Error - insufficient memory to proceed
  930.   c-scope was unable to allocate any more memory for its internal tables. The
  931.   more files, functions and function references your source files contain,
  932.   the more memory will be required. It is unlikely this error will ever
  933.   occur, but if it does, try to free up some memory in your system and try
  934.   again.
  935.  
  936.                                        ___       _  _____  
  937.         Error--token too long (limit = nnn) line n: token
  938.   A token was found in the source file that exceeds the internal limit. Most
  939.   likely due to a too-long literal character string--may result from an
  940.   unmatched ".
  941.  
  942.                                                       ___ 
  943.         Error - too many function references (limit = nnn)
  944.   The source files in SOURCE.DAT collectively call too many functions.
  945.   Contact JAYAR Systems.
  946.  
  947.                                                    ___ 
  948.         Error - too many source functions (limit = nnn)
  949.   The source files in SOURCE.DAT collectively contain too many functions.
  950.   Contact JAYAR Systems.
  951.  
  952.         Unable to open source.dat and no arguments given
  953.   You need to supply the name of a source file on the command line or have a
  954.   file called SOURCE.DAT containing source file names in the current working
  955.   directory.
  956.  
  957.                                        ___ 
  958.         Too many source files (limit = nnn)
  959.   Too many source files were specified in SOURCE.DAT. Contact JAYAR Systems.
  960.  
  961.                                 ___ 
  962.         Too many types (limit = nnn)
  963.   You have specified too many user types in TYPES.DAT. Contact JAYAR Systems.
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.                                                          Error messages   14
  972.  
  973.  
  974.                                                    ___ 
  975.         Too many functions in ignore list (limit = nnn)
  976.   You have specified too many function names to ignore in IGNORE.DAT. Contact
  977.   JAYAR Systems.
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.                                                                 License   15
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.                                   B License 
  1039.  
  1040.  
  1041.   This appendix contains important license information regarding the use of
  1042.   c-scope, Version 1.11. This information applies to individual users who
  1043.   wish to pass copies out to friends and associates.
  1044.  
  1045.         User Groups, Computer Clubs, Disk Vendors and Distributors,
  1046.   Subscription Services, Disk-of-the-Month Clubs, etc., should refer to the
  1047.   VENDOR.DOC file for complete information relating to them.
  1048.  
  1049.         BBS SYSOPs should refer to the SYSOP.DOC file for complete
  1050.   information relating to them.
  1051.  
  1052.         PLEASE! Show your support for Shareware by registering the programs
  1053.   you actually use. JAYAR Systems depends upon and needs your support. Thank
  1054.   you!
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.                                                      Trial Use License:   16
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.                              C Trial Use License: 
  1099.  
  1100.  
  1101.   c-scope is NOT a public domain program. It is Copyright (C) 1991-93 by
  1102.   JAYAR Systems. All rights reserved.
  1103.  
  1104.         This software and accompanying documentation are protected by
  1105.   Canadian Copyright law and also by International Treaty provisions. Any use
  1106.   of this software in violation of Copyright law or the terms of this limited
  1107.   license will be prosecuted to the best of our ability. The conditions under
  1108.   which you may copy this software and documentation are clearly outlined
  1109.   below under "Distribution Restrictions".
  1110.  
  1111.         JAYAR Systems hereby grants you a limited license to use this
  1112.   software for evaluation purposes for a period not to exceed sixty (60)
  1113.   days. If you intend to continue using this software (and/or it's
  1114.   documentation) after the sixty (60) day evaluation period, you MUST make a
  1115.   registration payment to JAYAR Systems.
  1116.  
  1117.         Using this software after the sixty (60) day evaluation period,
  1118.   without registering the software is a violation of the terms of this
  1119.   limited license.
  1120.  
  1121.         Licensee shall not use, copy, rent, lease, sell, modify, decompile,
  1122.   disassemble, otherwise reverse engineer, or transfer the licensed program
  1123.   except as provided in this agreement. Any such unauthorized use shall
  1124.   result in immediate and automatic termination of this license.
  1125.  
  1126.         All rights not expressly granted here are reserved to JAYAR Systems.
  1127.  
  1128.         For information on registering your copy of c-scope see Appendix 4.3,
  1129.   "How to Register."
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.                                           Limited Distribution License:   17
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.                        D Limited Distribution License: 
  1159.  
  1160.  
  1161.   As the copyright holder for c-scope, JAYAR Systems authorizes distribution
  1162.   by individuals only in accordance with the following restrictions.
  1163.  
  1164.         (User Groups, Computer Clubs, Disk Vendors and Distributors,
  1165.   Subscription Services, Disk-of-the-Month Clubs, etc., should refer to the
  1166.   VENDOR.DOC file for complete information relating to them.)
  1167.  
  1168.         (BBS SYSOPs should refer to the SYSOP.DOC file for complete
  1169.   information relating to them.)
  1170.  
  1171.         Individuals are hereby granted permission by JAYAR Systems to copy
  1172.   the c-scope diskette for their own use (for evaluation purposes) or for
  1173.   other individuals to evaluate, ONLY when the following conditions are met.
  1174.  
  1175.         The c-scope package is defined as containing all the material listed
  1176.   in the PACKING.LST text file. If any files listed in the PACKING.LST text
  1177.   file, or the PACKING.LST file itself, are missing, then the package is not
  1178.   complete and distribution is forbidden. Please contact us to obtain a
  1179.   complete package suitable for distribution.
  1180.  
  1181.     o The c-scope package--including all related program files and
  1182.       documentation files--CANNOT be modified in any way and must be
  1183.       distributed as a complete package, without exception. The PACKING.LST
  1184.       text file contains a list of all files that are part of the c-scope
  1185.       package.
  1186.  
  1187.     o No price or other compensation may be charged for the c-scope package.
  1188.       A distribution cost may be charged for the cost of the diskette,
  1189.       shipping and handling, as long as the total (per disk) does not exceed
  1190.       $10.00.
  1191.  
  1192.     o The c-scope package CANNOT be sold as part of some other inclusive
  1193.       package. Nor can it be included in any commercial software packaging
  1194.       offer, without a written agreement from JAYAR Systems.
  1195.  
  1196.     o The PRINTED User's Guide may not be reproduced in whole or in part,
  1197.       using any means, without the written permission of JAYAR Systems. In
  1198.       other words, the disk-based documentation may not be distributed in
  1199.       PRINTED (hardcopy) form.
  1200.  
  1201.     o The c-scope package cannot be "rented" or "leased" to others.
  1202.  
  1203.     o Licensee shall not use, copy, rent, lease, sell, modify, decompile,
  1204.       disassemble, otherwise reverse engineer, or transfer the licensed
  1205.       program except as provided in this agreement. Any such unauthorized use
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.                                           Limited Distribution License:   18
  1213.  
  1214.  
  1215.       shall result in immediate and automatic termination of this license.
  1216.  
  1217.     o U.S. Government Information: Use, duplication, or disclosure by the
  1218.       U.S. Government of the computer software and documentation in this
  1219.       package shall be subject to the restricted rights applicable to
  1220.       commercial computer software as set forth in subdivision (b)(3)(ii) of
  1221.       the Rights in Technical Data and Computer Software clause at
  1222.       252.227-7013 (DFARS 52.227-7013). The Contractor/manufacturer is JAYAR
  1223.       Systems, 253 College Street, Suite 263, Toronto, Ontario, CANADA M5T
  1224.       1R5.
  1225.  
  1226.         All rights not expressly granted here are reserved to JAYAR Systems.
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.                                                 Definition of Shareware   19
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.                           E Definition of Shareware 
  1279.  
  1280.  
  1281.         Shareware distribution gives users a chance to try software before
  1282.   buying it. If you try a Shareware program and continue using it, you are
  1283.   expected to register. Individual programs differ on details--some request
  1284.   registration while others require it, some specify a maximum trial period.
  1285.   With registration, you get anything from the simple right to continue using
  1286.   the software to an updated program with printed manual.
  1287.  
  1288.         Copyright laws apply to both Shareware and commercial software, and
  1289.   the copyright holder retains all rights, with a few specific exceptions as
  1290.   stated below. Shareware authors are accomplished programmers, just like
  1291.   commercial authors, and the programs are of comparable quality. (In both
  1292.   cases, there are good programs and bad ones!) The main difference is in the
  1293.   method of distribution. The author specifically grants the right to copy
  1294.   and distribute the software, either to all and sundry or to a specific
  1295.   group. For example, some authors require written permission before a
  1296.   commercial disk vendor may copy their Shareware.
  1297.  
  1298.         Shareware is a distribution method, not a type of software. You
  1299.   should find software that suits your needs and pocketbook, whether it's
  1300.   commercial or Shareware. The Shareware system makes fitting your needs
  1301.   easier, because you can try before you buy. And because the overhead is
  1302.   low, prices are low also. Shareware has the ultimate money-back
  1303.   guarantee--if you don't use the product, you don't pay for it.
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.                              ASP OMBUDSMAN POLICY
  1310.  
  1311.         This program is produced by a member of the Association of Shareware
  1312.   Professionals (ASP). ASP wants to make sure that the shareware principle
  1313.   works for you. If you are unable to resolve a shareware-related problem
  1314.   with an ASP member by contacting the member directly, ASP may be able to
  1315.   help. The ASP Ombudsman can help you resolve a dispute or problem with an
  1316.   ASP member, but does not provide technical support for members' products.
  1317.   Please write to the ASP Ombudsman at 545 Grover Road Muskegon, MI 49442 or
  1318.   send a CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536.
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.                                                         How to Register   20
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.                               F How to Register 
  1339.  
  1340.  
  1341.   c-scope is a "shareware program" and is provided at no charge to the user
  1342.   for evaluation. Feel free to share it with your friends, but please do not
  1343.   give it away altered or as part of another system. The essence of
  1344.   "user-supported" software is to provide personal computer users with
  1345.   quality software without high prices, and yet to provide incentive for
  1346.   programmers to continue to develop new products. If you find this program
  1347.   useful and find that you are using c-scope and continue to use c-scope
  1348.   after a reasonable trial period, you must make a registration payment of
  1349.   US$24.00 (Cdn$28.00) to JAYAR Systems. The registration fee will license
  1350.   one copy for use on any one computer at any one time.
  1351.  
  1352.         When you register you receive the following:
  1353.  
  1354.     o You will get the latest version of c-scope,
  1355.  
  1356.     o The registered version of c-scope does not display a banner
  1357.       (registration reminder notice) when it runs,
  1358.  
  1359.     o You will get a typeset manual,
  1360.  
  1361.     o The registered version of c-scope generates an additional report--a set
  1362.       of software complexity metrics. For each function you see the number of
  1363.       lines, statements, whiles, fors, switches and ifs. This tells you which
  1364.       functions in the program are the most complex.
  1365.  
  1366.     o You will be informed of updates and given a reduced upgrade cost.
  1367.  
  1368.         You must treat this software just like a book. An example is that
  1369.   this software may be used by any number of people and may be freely moved
  1370.   from one computer location to another, so long as there is no possibility
  1371.   of it being used at one location while it's being used at another. Just as
  1372.   a book cannot be read by two different persons at the same time.
  1373.  
  1374.         Commercial users of c-scope must register and pay for their copies of
  1375.   c-scope within 30 days of first use or their license is withdrawn. Your
  1376.   registration fee purchases a single user license. If you need to use
  1377.   multiple copies, significant savings can be had by purchasing a site
  1378.   license rather than registering multiple individual copies. Even a two-user
  1379.   site license saves you money. See the file SITELICE.DOC for details.
  1380.  
  1381.         Anyone distributing c-scope for any kind of remuneration must first
  1382.   contact JAYAR Systems at the address given in DESCRIBE.DOC for
  1383.   authorization. This authorization is automatically granted to distributors
  1384.   and vendors who are members of the Association of Shareware Professionals
  1385.   (ASP). See files VENDOR.DOC and SYSOP.DOC for details.
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.                                                         How to Register   21
  1393.  
  1394.  
  1395.         You are encouraged to pass a copy of c-scope along to your friends
  1396.   for evaluation. Please encourage them to register their copy if they find
  1397.   that they can use it. All registered users will receive a copy of the
  1398.   latest version of the c-scope system.
  1399.  
  1400.         Send in the following form to register your copy of c-scope:
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.   REGISTRATION FORM
  1451.   Send to:  JAYAR Systems                  GST Registration Number:
  1452.             253 College Street             R124607193
  1453.             Suite 263
  1454.             Toronto, Ontario
  1455.             Canada   M5T 1R5
  1456.  
  1457.   Name       ___________________________________________
  1458.  
  1459.   Address    ___________________________________________
  1460.  
  1461.              ___________________________________________
  1462.  
  1463.              ___________________________________________
  1464.  
  1465.              ___________________________________________
  1466.  
  1467.   Telephone  __________________________
  1468.  
  1469.   +--------+------------------------+------------+------------+
  1470.   |Quantity| Product                | Each       |   Total    |
  1471.   +--------+------------------------+------------+------------+
  1472.   |        |                        |  US$24.00  |            |
  1473.   |        | c-scope                |     or     |            |
  1474.   |        |                        | Cdn$28.00  |            |
  1475.   +--------+------------------------+------------+------------+
  1476.   |               Canadian residents add 7% GST  |            |
  1477.   +----------------------------------------------+------------+
  1478.   |                Ontario residents add 8% PST  |            |
  1479.   +----------------------------------------------+------------+
  1480.   |      Outside Canada/U.S.A.,   add shpg/hndlg |   $5.00    |
  1481.   +----------------------------------------------+------------+
  1482.   |                                       TOTAL  |            |
  1483.   +----------------------------------------------+------------+
  1484.  
  1485.   Please remit by cheque (we will accept cheques in your local currency at
  1486.   the appropriate rate of exchange) or by money order.  We will accept your
  1487.   company's purchase order.  We also accept payment by Visa or Mastercard.
  1488.  
  1489.   P.O. Number  ______________________________________ (P.O. to follow)
  1490.  
  1491.        +------------------------------------------------------------------+
  1492.        | Note - Fill out the following ONLY if you are making payment by  |
  1493.        |        credit card.  You may also call (416) 751-5678 for credit |
  1494.        |        card registrations.                                       |
  1495.        |                                                                  |
  1496.        | Master Card [ ]  Visa [ ] Card Number ______ ______ _____ ______ |
  1497.        |                                                                  |
  1498.        | Name on the Card (print) _______________________________________ |
  1499.        |                                                                  |
  1500.        | Expires ____/____                                                |
  1501.        |                    Signature ___________________________________ |
  1502.        |                                                                  |
  1503.        +------------------------------------------------------------------+
  1504.