home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / CSCOP110.ZIP / CSCOPE.DOC < prev    next >
Text File  |  1993-04-15  |  35KB  |  989 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                     c-scope
  12.  
  13.  
  14.                                    C program
  15.  
  16.                                  analysis tool
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                                  User's Manual
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.                                  JAYAR Systems
  54.                                253 College Street
  55.                                    Suite 263
  56.                                 Toronto, Ontario
  57.                                 Canada   M5T 1R5
  58.                                  (416) 751-5678
  59.  
  60.  
  61.  
  62.                                     LICENSE
  63.  
  64.      The license for the Shareware evaluation (trial use) version of
  65.      c-scope is contained in the file LICENSE.DOC.  This file has been
  66.      included for your convenience as an appendix to this manual.
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                     WARRANTY
  74.  
  75.      The Shareware evaluation (trial use) version of c-scope is provided AS
  76.      IS.  JAYAR Systems MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR
  77.      IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
  78.      MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.                                  SUPPORT POLICY
  86.  
  87.      JAYAR Systems provides free support for this product.  We will answer
  88.      questions and fix serious bugs.  If you have any questions about or
  89.      problems with using this product, give us a call at the number on the
  90.      inside front cover of this manual.  Or, if you are not in a rush, send
  91.      us a letter.
  92.  
  93.      We would also appreciate hearing from you if you have any comments or
  94.      suggestions for improvements.
  95.  
  96.  
  97.  
  98.  
  99.  
  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) 1992-93 JAYAR Systems
  116.                               All Rights Reserved
  117.  
  118.  
  119.  
  120.  
  121.                                    CONTENTS
  122.  
  123.         1       INTRODUCTION . . . . . . . . . . . . . . . . . . . . 2
  124.         2       WHAT C-SCOPE DOES  . . . . . . . . . . . . . . . . . 2
  125.         3       USING C-SCOPE  . . . . . . . . . . . . . . . . . . . 7
  126.         3.1       Installing C-scope . . . . . . . . . . . . . . . . 8
  127.         3.2       Running C-scope  . . . . . . . . . . . . . . . . . 8
  128.         3.3       Ignoring Functions . . . . . . . . . . . . . . . . 9
  129.         3.4       Function Declarations  . . . . . . . . . . . . . . 9
  130.         4       NOTES  . . . . . . . . . . . . . . . . . . . . . .  10
  131.         4.1       Non-standard Function Types  . . . . . . . . . .  10
  132.         4.2       Preprocessor . . . . . . . . . . . . . . . . . .  10
  133.         4.3       Function Pointers  . . . . . . . . . . . . . . .  10
  134.  
  135.  
  136. APPENDIX A      LICENSE
  137.  
  138.         A.1     TRIAL USE LICENSE: . . . . . . . . . . . . . . . . A-1
  139.         A.2     LIMITED DISTRIBUTION LICENSE:  . . . . . . . . . . A-2
  140.  
  141.  
  142. APPENDIX B      DEFINITION OF SHAREWARE
  143.  
  144.  
  145. APPENDIX C      HOW TO REGISTER
  146.  
  147. c-scope User's Manual (JAYAR Systems)                           Page 2
  148. INTRODUCTION
  149.  
  150.  
  151.      1  INTRODUCTION
  152.  
  153.      c-scope is an analysis tool for C programs.  It shows you what
  154.      functions are contained in a program and which functions they
  155.      reference.  This information is provided in several easy-to-use
  156.      formats.  In addition, the registered version of c-scope computes and
  157.      reports a number of software complexity metrics for each function.
  158.  
  159.      The program to be analyzed may be contained in one file, or spread
  160.      across many files, as is typical with C programs.
  161.  
  162.      It is possible with c-scope to get detailed information on all of the
  163.      inter-function references, or just on those that you are interested
  164.      in.
  165.  
  166.      The analysis provided by c-scope is ideal for understanding or
  167.      documenting the structure and operation of a large C program, whether
  168.      it is a program you wrote or one that you inherited.
  169.  
  170.      Using c-scope is simple and is described in the following sections of
  171.      the manual.  Section 2 describes c-scope's capabilities by working
  172.      through a short example.  Section 3 shows you how to use c-scope.  And
  173.      Section 4 provides a few notes on using c-scope.
  174.  
  175.  
  176.  
  177.      2  WHAT C-SCOPE DOES
  178.  
  179.      The easiest way to explain what c-scope does is to work through an
  180.      example.  For illustration purposes we will use the following simple
  181.      example program (the RPN desk calculator program, borrowed from K & R)
  182.      and analyze it with c-scope.  The program consists of five functions,
  183.      in three files.
  184.  
  185.      File DCALC.C in Figure 1 contains the main program, main(), file
  186.      STACK.C in Figure 2 contains the functions push(), pop() and clear()
  187.      and file GETOP.C in Figure 3 contains function getop().
  188.  
  189.      When c-scope analyzes a program it produces four reports which are
  190.      printed on stdout:
  191.  
  192.      1.  A Function Location report.  For each function defined in your
  193.          program (i.e., has source code), c-scope lists the function
  194.          (functions are listed alphabetically), the name of the file the
  195.          function is contained in, and the line number in the file where
  196.          the function is defined; for our example program:
  197.  
  198.                  FUNCTION LOCATION
  199.  
  200.                  Function              File                  Line No.
  201.                  --------------------  --------------------  --------
  202.                  clear                 STACK.C                     34
  203.                  getop                 GETOP.C                      6
  204.                  main                  DCALC.C                      7
  205. c-scope User's Manual (JAYAR Systems)                           Page 3
  206. WHAT C-SCOPE DOES
  207.  
  208.  
  209.                  pop                   STACK.C                     22
  210.                  push                  STACK.C                     10
  211.  
  212.  
  213.      2.  A File Contents report.  This is similar to the Function Location
  214.          report, but for each file the functions defined in it are listed.
  215.          File names are printed in the order determined by the contents of
  216.          the file SOURCE.DAT (discussed later in Section 3.2):
  217.  
  218.                  FILE CONTENTS
  219.  
  220.                  File                  Function
  221.                  --------------------  --------------------
  222.  
  223.                  GETOP.C               getop               
  224.  
  225.                  DCALC.C               main                
  226.  
  227.                  STACK.C               push                
  228.                                        pop                 
  229.                                        clear               
  230.  
  231.  
  232.      3.  A Function References report.  For each function defined in the
  233.          program (i.e., whose source code is available), an alphabetical
  234.          list of the functions called by that function are listed.  c-scope
  235.          recognizes a function call if it occurs in the body of the
  236.          function or in an initialization statement.  Functions which do
  237.          not reference any other functions are listed as referencing
  238.          function void (e.g., function clear() in our example):
  239.  
  240.                  FUNCTION REFERENCES
  241.  
  242.                  Function              References function
  243.                  --------------------  --------------------
  244.  
  245.                  getop                 getc                
  246.                                        ungetc              
  247.  
  248.                  main                  atof                
  249.                                        clear               
  250.                                        getop               
  251.                                        pop                 
  252.                                        printf              
  253.                                        push                
  254.  
  255.                  push                  clear               
  256.                                        printf              
  257.  
  258.                  pop                   clear               
  259.                                        printf              
  260.  
  261.                  clear                 void
  262.  
  263. c-scope User's Manual (JAYAR Systems)                           Page 4
  264. WHAT C-SCOPE DOES
  265.  
  266.  
  267.      4.  A Static Calling Tree.  Starting with the main() function, all the
  268.          functions it calls, and all the functions called by those
  269.          functions, etc.  are listed in a tree format:
  270.  
  271.                  STATIC CALLING TREE
  272.  
  273.                     0. main
  274.                        1. atof[E]
  275.                        1. clear
  276.                        1. getop
  277.                           2. getc[E]
  278.                           2. ungetc[E]
  279.                        1. pop
  280.                           2. clear
  281.                           2. printf[E]
  282.                        1. printf[E]
  283.                        1. push
  284.                           2. clear
  285.                           2. printf[E]
  286.  
  287.          A level number is printed beside each function name to aid
  288.          interpretation.  main() is at level 0, all the functions called by
  289.          main() are at level 1, and so on.  The functions referenced by a
  290.          higher level function are listed alphabetically.
  291.  
  292.          Multiple references to a function are ignored--main() in our
  293.          example calls push() and pop() several times, but they only appear
  294.          in the tree once.  If a function appears more than once in the
  295.          tree, because it is called by more than one function, the function
  296.          is only expanded the first time, to reduce the amount of output.
  297.          Including the -E option will force c-scope to expand all
  298.          references though.
  299.  
  300.          The letter [E] following a function name means the function is
  301.          defined externally--its source code was not available.  The letter
  302.          [R] is also printed for functions that are called recursively.
  303.  
  304.          If a main() function is not defined, a static calling tree is not
  305.          produced.
  306.  
  307.  
  308.      The registered version of c-scope also produces a Function Complexity
  309.      report.  For each function in your program c-scope lists the function
  310.      name, the number of source lines in it, the number of statements in it
  311.      and the number of while, for, switch and if statements.  See Appendix
  312.      C for information on registering your version of c-scope.
  313. c-scope User's Manual (JAYAR Systems)                           Page 5
  314. WHAT C-SCOPE DOES
  315.  
  316.  
  317.      #include <stdio.h>
  318.  
  319.      #define MAXOP 20
  320.      #define NUMBER '0'
  321.      #define TOOBIG '9'
  322.  
  323.      main()
  324.      {
  325.        int type;
  326.        char s[MAXOP];
  327.        double op2, atof(char *), pop(void), push(double);
  328.        void clear(void);
  329.        int getop(char *s, int lim);
  330.        
  331.        while ((type = getop(s, MAXOP)) != EOF)
  332.          switch (type)
  333.          { case NUMBER: push(atof(s));
  334.                         break;
  335.            case '+':    push(pop() + pop());
  336.                         break;
  337.            case '*':    push(pop() * pop());
  338.                         break;
  339.            case '-':    op2 = pop();
  340.                         push(pop() - op2);
  341.                         break;
  342.            case '/':    op2 = pop();
  343.                         if (op2 != 0.0)
  344.                           push(pop() / op2);
  345.                         else
  346.                           printf("zero divisor popped\n");
  347.                         break;
  348.            case '=':    printf("\t%f\n",push(pop()));
  349.                         break;
  350.            case 'c':    clear();
  351.                         break;
  352.            case TOOBIG: printf("%.20s ... is too long\n",s);
  353.                         break;
  354.            default:     printf("unknown command %c\n", type);
  355.                         break;
  356.          }
  357.      }
  358.  
  359.  
  360.  
  361.  
  362.      Figure 1:  File DCALC.C which contains function main().
  363. c-scope User's Manual (JAYAR Systems)                           Page 6
  364. WHAT C-SCOPE DOES
  365.  
  366.  
  367.      #include <stdio.h>
  368.  
  369.      #define MAXVAL 100
  370.  
  371.      int sp = 0;
  372.      double val[MAXVAL], push(double f), pop(void);
  373.      void clear(void);
  374.  
  375.  
  376.      double push(double f)
  377.      {
  378.        if (sp < MAXVAL)
  379.          return(val[sp++] = f);
  380.        else
  381.        { printf("error: stack full\n");
  382.          clear();
  383.          return(0);
  384.        }
  385.      }
  386.  
  387.  
  388.      double pop(void)
  389.      {
  390.        if (sp > 0)
  391.          return(val[--sp]);
  392.        else
  393.        { printf("error: stack empty\n");
  394.          clear();
  395.          return(0);
  396.        }
  397.      }
  398.  
  399.  
  400.      void clear(void)
  401.      {
  402.        sp = 0;
  403.      }
  404.  
  405.  
  406.  
  407.  
  408.      Figure 2:  File STACK.C which contains the functions push(), pop() and
  409.      clear().
  410. c-scope User's Manual (JAYAR Systems)                           Page 7
  411. WHAT C-SCOPE DOES
  412.  
  413.  
  414.      #include <stdio.h>
  415.  
  416.      #define NUMBER '0'
  417.      #define TOOBIG '9'
  418.  
  419.      int getop(char *s, int lim)
  420.      {
  421.        int i,c;
  422.  
  423.        while ((c = getc(stdin)) == ' ' || c == '\t' ||
  424.                c == '\n')
  425.          ;
  426.          
  427.        if (c != '.' && (c < '0' || c > '9'))
  428.          return(c);
  429.  
  430.        s[0] = c;
  431.        for (i=1; (c = getc(stdin)) >= '0' && c <= '9'; i++)
  432.          if (i < lim)
  433.            s[i] = c;
  434.        if (c == '.')
  435.        { if (i < lim)
  436.            s[i] = c;
  437.          for (i++; (c = getc(stdin)) >= '0' && c <= '9'; i++)
  438.            if (i < lim)
  439.              s[i] = c;
  440.        }
  441.        
  442.        if (i < lim)
  443.        { ungetc(c,stdin);
  444.          s[i] = '\0';
  445.          return(NUMBER);
  446.        }
  447.        else
  448.        { while (c != '\n' && c != EOF)
  449.            c = getc(stdin);
  450.          s[lim-1] = '\0';
  451.          return(TOOBIG);
  452.        }
  453.      }
  454.  
  455.  
  456.  
  457.  
  458.      Figure 3:  File GETOP.C which contains function getop().
  459. c-scope User's Manual (JAYAR Systems)                           Page 8
  460. USING C-SCOPE
  461.  
  462.  
  463.      3  USING C-SCOPE
  464.  
  465.      3.1  Installing C-scope
  466.  
  467.      Installation of c-scope couldn't be easier.  The distribution diskette
  468.      contains the program CS.EXE and a file called READ.ME that you should
  469.      check for any last minute updates that did not make this manual.
  470.  
  471.      The distribution diskette is not copy protected so you can copy the
  472.      program to your hard disk--a good location would be the directory
  473.      where you keep your utilities.  It should be a directory that is
  474.      pointed to by your PATH environment variable so that c-scope will be
  475.      easy to use.
  476.  
  477.      It is also possible to use c-scope from a floppy diskette too.  It is
  478.      quite small and doesn't require a lot of memory or disk space so it is
  479.      convenient to use even from a diskette.
  480.  
  481.      In any event, don't execute the program from the distribution
  482.      diskette.  Copy it to another disk and put the distribution diskette
  483.      away in a safe place.
  484.  
  485.  
  486.  
  487.      3.2  Running C-scope
  488.  
  489.      c-scope may be used to analyze a single source file by typing
  490.  
  491.              CS program.c
  492.  
  493.      where program.c is the name of the source file.  More typically it
  494.      will be used to analyze a program spread across numerous files.  In
  495.      this case you just type
  496.  
  497.              CS
  498.  
  499.      c-scope looks in the current directory for a file called SOURCE.DAT.
  500.      In this file it expects to find the names of the files comprising the
  501.      program--one per line.  Full filenames are required, and paths may be
  502.      included for source files not in the current directory.  For instance,
  503.      in the example program in Section 2, SOURCE.DAT contained the
  504.      following three lines:
  505.  
  506.              GETOP.C
  507.              DCALC.C
  508.              STACK.C
  509.  
  510.      As the source files are processed, c-scope writes their names to
  511.      stderr, and the analysis is written to stdout which usually appears on
  512.      your screen.  If you would rather have the reports in a file, use I/O
  513.      redirection:
  514.  
  515.              CS > PROGRAM.RPT
  516.  
  517. c-scope User's Manual (JAYAR Systems)                           Page 9
  518. USING C-SCOPE
  519.  
  520.  
  521.      This puts the output in a file called PROGRAM.RPT which can be printed
  522.      or edited.
  523.  
  524.      As mentioned above, the -E option will force c-scope to expand all
  525.      references to a function, e.g.,
  526.  
  527.              CS -E
  528.  
  529.  
  530.  
  531.  
  532.      3.3  Ignoring Functions
  533.  
  534.      Usually you will find with c-scope that many of the functions
  535.      referenced in a program belong to the C library.  You may not be
  536.      interested in these functions, and may feel their inclusion clutters
  537.      the output needlessly.  If so you may create a file called IGNORE.DAT,
  538.      which c-scope will read if it is present in the current directory.
  539.  
  540.      c-scope expects to find the names of functions, one per line, in
  541.      IGNORE.DAT.  c-scope will ignore these functions when it generates its
  542.      output reports.
  543.  
  544.      For example, if you didn't want the references to the functions
  545.      printf, fprintf, strcpy and strcmp to appear in the reports,
  546.      IGNORE.DAT would contain
  547.  
  548.              printf
  549.              fprintf
  550.              strcpy
  551.              strcmp
  552.  
  553.      You may also include names of functions which are defined in your
  554.      source--not just C library function names.
  555.  
  556.  
  557.  
  558.      3.4  Function Declarations
  559.  
  560.      When c-scope encounters a function name internal to another function
  561.      it determines if the reference is a declaration or a call by checking
  562.      for one of C's reserved storage class or type identifiers.  However,
  563.      if you have declared a function that returns a DEFINEd or typedef'd
  564.      result, c-scope will not recognize it as a declaration and will treat
  565.      it as a call.  A common example is:
  566.  
  567.              FILE *myopen();
  568.  
  569.      To avoid this problem, you can make sure all internal function
  570.      declarations have the extern class, i.e.,
  571.  
  572.              extern FILE *myopen();
  573.  
  574.      or, you can create a file called TYPES.DAT.  This file will be read by
  575. c-scope User's Manual (JAYAR Systems)                          Page 10
  576. USING C-SCOPE
  577.  
  578.  
  579.      c-scope if present, and will be assumed to consist of type identifiers
  580.      that c-scope will add to its list of C keywords.  In the above
  581.      illustration, TYPES.DAT would contain the line:
  582.  
  583.              FILE
  584.  
  585.      This problem does not occur for function declarations external to a
  586.      function.
  587.  
  588.  
  589.  
  590.      4  NOTES
  591.  
  592.      c-scope examines each source file in SOURCE.DAT looking for function
  593.      names.  When it encounters one, it determines if the function name
  594.      represents a definition, a call, or an external or internal
  595.      declaration.
  596.  
  597.      c-scope uses a knowledge of C program syntax to identify functions and
  598.      their context.  It is not a compiler though, and some situations may
  599.      cause problems.  These are discussed in this section.
  600.  
  601.  
  602.  
  603.      4.1  Non-standard Function Types
  604.  
  605.      This was discussed in Section 3.4.  c-scope doesn't recognize an
  606.      internal function declaration as such if it returns a type which is
  607.      not one of C's predefined types (int, float, double, char, etc.  or
  608.      pointers to these) and an implicitly defined storage class.                        ___
  609.  
  610.      You can remedy this by declaring the function to be of the extern
  611.      storage class (which is proper form but often left assumed for
  612.      functions), or by including the new type in TYPES.DAT.
  613.  
  614.      Note that all external function declarations are recognized as such,
  615.      regardless of the type.
  616.  
  617.  
  618.  
  619.      4.2  Preprocessor
  620.  
  621.      The current version of c-scope ignores preprocessor lines.  This means
  622.      it does not process include files (however, good style dictates that
  623.      such files should not contain executable code anyway).
  624.  
  625.      Macros are not expanded, so that functions which are referenced by
  626.      macros are not noticed by c-scope.  Also, macros which take arguments
  627.      are not recognized as such, but are interpreted as external functions.
  628.  
  629.      Conditional compilation directives are ignored.
  630. c-scope User's Manual (JAYAR Systems)                          Page 11
  631. NOTES
  632.  
  633.  
  634.      4.3  Function Pointers
  635.  
  636.      c-scope does not deal properly with pointers to functions; for
  637.      example, in the following:
  638.  
  639.              main()
  640.              {
  641.                char *(*fncn)();
  642.                char *a(void);
  643.                fncn = a;
  644.                printf ("this is %s\n",(*fncn)());
  645.              }
  646.  
  647.              char name[10];
  648.              char *a(void)
  649.              {
  650.                strcpy(name,"function A");
  651.                return(name);
  652.              }
  653.  
  654.      c-scope does not recognize (*fncn)() as a function call.  Such calls
  655.      should be rewritten as fncn() which is permissible under the ANSI
  656.      standard, where the syntax for calls to functions and to functions
  657.      specified by pointers is allowed to be the same.
  658.  
  659.      Even with this change though, c-scope will only recognize that fncn()
  660.      has been called, and not that a() was indirectly called.
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.                                 APPENDIX A
  675.  
  676.                                   LICENSE
  677.  
  678.  
  679.  
  680. This appendix contains important license information regarding the use of
  681. c-scope, Version 1.10.  This information applies to individual users who
  682. wish to pass copies out to friends and associates.
  683.  
  684. User Groups, Computer Clubs, Disk Vendors and Distributors, Subscription
  685. Services, Disk-of-the-Month Clubs, etc., should refer to the VENDOR.DOC
  686. file for complete information relating to them.
  687.  
  688. BBS SYSOPs should refer to the SYSOP.DOC file for complete information
  689. relating to them.
  690.  
  691. PLEASE!  Show your support for Shareware by registering the programs you
  692. actually use.  JAYAR Systems depends upon and needs your support.  Thank
  693. you!
  694.  
  695.  
  696.  
  697. A.1  TRIAL USE LICENSE:
  698.  
  699. c-scope is NOT a public domain program.  It is Copyright (C) 1992-93 by
  700. JAYAR Systems.  All rights reserved.
  701.  
  702. This software and accompanying documentation are protected by Canadian
  703. Copyright law and also by International Treaty provisions.  Any use of this
  704. software in violation of Copyright law or the terms of this limited license
  705. will be prosecuted to the best of our ability.  The conditions under which
  706. you may copy this software and documentation are clearly outlined below
  707. under "Distribution Restrictions".
  708.  
  709. JAYAR Systems hereby grants you a limited license to use this software for
  710. evaluation purposes for a period not to exceed sixty (60) days.  If you
  711. intend to continue using this software (and/or it's documentation) after
  712. the sixty (60) day evaluation period, you MUST make a registration payment
  713. to JAYAR Systems.
  714.  
  715. Using this software after the sixty (60) day evaluation period, without
  716. registering the software is a violation of the terms of this limited
  717. license.
  718.  
  719. Licensee shall not use, copy, rent, lease, sell, modify, decompile,
  720. LICENSE                                                       Page A-2
  721. TRIAL USE LICENSE:
  722.  
  723.  
  724. disassemble, otherwise reverse engineer, or transfer the licensed program
  725. except as provided in this agreement.  Any such unauthorized use shall
  726. result in immediate and automatic termination of this license.
  727.  
  728. All rights not expressly granted here are reserved to JAYAR Systems.
  729.  
  730. For information on registering your copy of c-scope see Appendix C, "How to
  731. Register."
  732.  
  733.  
  734.  
  735. A.2  LIMITED DISTRIBUTION LICENSE:
  736.  
  737. As the copyright holder for c-scope, JAYAR Systems authorizes distribution
  738. by individuals only in accordance with the following restrictions.
  739.  
  740. (User Groups, Computer Clubs, Disk Vendors and Distributors, Subscription
  741. Services, Disk-of-the-Month Clubs, etc., should refer to the VENDOR.DOC
  742. file for complete information relating to them.)
  743.  
  744. (BBS SYSOPs should refer to the SYSOP.DOC file for complete information
  745. relating to them.)
  746.  
  747. Individuals are hereby granted permission by JAYAR Systems to copy the
  748. c-scope diskette for their own use (for evaluation purposes) or for other
  749. individuals to evaluate, ONLY when the following conditions are met.
  750.  
  751. The c-scope package is defined as containing all the material listed in the
  752. PACKING.LST text file.  If any files listed in the PACKING.LST text file,
  753. or the PACKING.LST file itself, are missing, then the package is not
  754. complete and distribution is forbidden.  Please contact us to obtain a
  755. complete package suitable for distribution.
  756.  
  757.       o  The c-scope package--including all related program files and
  758.          documentation files - CANNOT be modified in any way and must be
  759.          distributed as a complete package, without exception.  The
  760.          PACKING.LST text file contains a list of all files that are part
  761.          of the c-scope package.
  762.  
  763.       o  No price or other compensation may be charged for the c-scope
  764.          package.  A distribution cost may be charged for the cost of the
  765.          diskette, shipping and handling, as long as the total (per disk)
  766.          does not exceed $10.00.
  767.  
  768.       o  The c-scope package CANNOT be sold as part of some other inclusive
  769.          package.  Nor can it be included in any commercial software
  770.          packaging offer, without a written agreement from JAYAR Systems.
  771.  
  772.       o  The PRINTED User's Guide may not be reproduced in whole or in
  773.          part, using any means, without the written permission of JAYAR
  774.          Systems.  In other words, the disk-based documentation may not be
  775.          distributed in PRINTED (hardcopy) form.
  776. LICENSE                                                       Page A-3
  777. LIMITED DISTRIBUTION LICENSE:
  778.  
  779.  
  780.       o  The c-scope package cannot be "rented" or "leased" to others.
  781.  
  782.       o  Licensee shall not use, copy, rent, lease, sell, modify,
  783.          decompile, disassemble, otherwise reverse engineer, or transfer
  784.          the licensed program except as provided in this agreement.  Any
  785.          such unauthorized use shall result in immediate and automatic
  786.          termination of this license.
  787.  
  788.       o  U.S.  Government Information:  Use, duplication, or disclosure by
  789.          the U.S.  Government of the computer software and documentation in
  790.          this package shall be subject to the restricted rights applicable
  791.          to commercial computer software as set forth in subdivision
  792.          (b)(3)(ii) of the Rights in Technical Data and Computer Software
  793.          clause at 252.227-7013 (DFARS 52.227-7013).  The
  794.          Contractor/manufacturer is JAYAR Systems, 253 College Street,
  795.          Suite 263, Toronto, Ontario, CANADA M5T 1R5.
  796.  
  797. All rights not expressly granted here are reserved to JAYAR Systems.
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.                                 APPENDIX B
  811.  
  812.                           DEFINITION OF SHAREWARE
  813.  
  814.  
  815.  
  816. Shareware distribution gives users a chance to try software before buying
  817. it.  If you try a Shareware program and continue using it, you are expected
  818. to register.  Individual programs differ on details--some request
  819. registration while others require it, some specify a maximum trial period.
  820. With registration, you get anything from the simple right to continue using
  821. the software to an updated program with printed manual.
  822.  
  823. Copyright laws apply to both Shareware and commercial software, and the
  824. copyright holder retains all rights, with a few specific exceptions as
  825. stated below.  Shareware authors are accomplished programmers, just like
  826. commercial authors, and the programs are of comparable quality.  (In both
  827. cases, there are good programs and bad ones!) The main difference is in the
  828. method of distribution.  The author specifically grants the right to copy
  829. and distribute the software, either to all and sundry or to a specific
  830. group.  For example, some authors require written permission before a
  831. commercial disk vendor may copy their Shareware.
  832.  
  833. Shareware is a distribution method, not a type of software.  You should
  834. find software that suits your needs and pocketbook, whether it's commercial
  835. or Shareware.  The Shareware system makes fitting your needs easier,
  836. because you can try before you buy.  And because the overhead is low,
  837. prices are low also.  Shareware has the ultimate money-back guarantee--if
  838. you don't use the product, you don't pay for it.
  839.  
  840.  
  841.  
  842.  
  843.  
  844.                            ASP OMBUDSMAN POLICY
  845.  
  846. This program is produced by a member of the Association of Shareware
  847. Professionals (ASP).  ASP wants to make sure that the shareware principle
  848. works for you.  If you are unable to resolve a shareware-related problem
  849. with an ASP member by contacting the member directly, ASP may be able to
  850. help.  The ASP Ombudsman can help you resolve a dispute or problem with an
  851. ASP member, but does not provide technical support for members' products.
  852. Please write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or
  853. send a CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536.
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.                                 APPENDIX C
  867.  
  868.                               HOW TO REGISTER
  869.  
  870.  
  871.  
  872. c-scope is a "shareware program" and is provided at no charge to the user
  873. for evaluation.  Feel free to share it with your friends, but please do not
  874. give it away altered or as part of another system.  The essence of
  875. "user-supported" software is to provide personal computer users with
  876. quality software without high prices, and yet to provide incentive for
  877. programmers to continue to develop new products.  If you find this program
  878. useful and find that you are using c-scope and continue to use c-scope
  879. after a reasonable trial period, you must make a registration payment of
  880. US$24.00 (Cdn$28.00) to JAYAR Systems.  The registration fee will license
  881. one copy for use on any one computer at any one time.
  882.  
  883. When you register you receive the following:
  884.  
  885.       o  You will get the latest version of c-scope,
  886.  
  887.       o  The registered version of c-scope does not display a banner
  888.          (registration reminder notice) when it runs,
  889.  
  890.       o  You will get a typeset manual,
  891.  
  892.       o  The registered version of c-scope generates an additional
  893.          report--a set of software complexity metrics.  For each function
  894.          you see the number of lines, statements, whiles, fors, switches
  895.          and ifs.  This tells you which functions in the program are the
  896.          most complex.
  897.  
  898.       o  You will be informed of updates and given a reduced upgrade cost.
  899.  
  900.  
  901. You must treat this software just like a book.  An example is that this
  902. software may be used by any number of people and may be freely moved from
  903. one computer location to another, so long as there is no possibility of it
  904. being used at one location while it's being used at another.  Just as a
  905. book cannot be read by two different persons at the same time.
  906.  
  907. Commercial users of c-scope must register and pay for their copies of
  908. c-scope within 30 days of first use or their license is withdrawn.  Your
  909. registration fee purchases a single user license.  If you need to use
  910. multiple copies, significant savings can be had by purchasing a site
  911. license rather than registering multiple individual copies.  Even a
  912. HOW TO REGISTER                                               Page C-2
  913.  
  914.  
  915.  
  916. two-user site license saves you money.  See the file SITELICE.DOC for
  917. details.
  918.  
  919. Anyone distributing c-scope for any kind of remuneration must first contact
  920. JAYAR Systems at the address given in DESCRIBE.DOC for authorization.  This
  921. authorization is automatically granted to distributors and vendors who are
  922. members of the Association of Shareware Professionals (ASP).  See files
  923. VENDOR.DOC and SYSOP.DOC for details.
  924.  
  925. You are encouraged to pass a copy of c-scope along to your friends for
  926. evaluation.  Please encourage them to register their copy if they find that
  927. they can use it.  All registered users will receive a copy of the latest
  928. version of the c-scope system.
  929.  
  930. Send in the following form to register your copy of c-scope:
  931. HOW TO REGISTER                                               Page C-3
  932.  
  933.  
  934.  
  935. REGISTRATION FORM
  936. Send to:  JAYAR Systems                  GST Registration Number:
  937.           253 College Street             R124607193
  938.           Suite 263
  939.           Toronto, Ontario
  940.           Canada   M5T 1R5
  941.  
  942. Name       ___________________________________________
  943.  
  944. Address    ___________________________________________
  945.  
  946.            ___________________________________________
  947.  
  948.            ___________________________________________
  949.  
  950.            ___________________________________________
  951.  
  952. Telephone  __________________________
  953.  
  954. +--------+------------------------+------------+------------+
  955. |Quantity| Product                | Each       |   Total    |
  956. +--------+------------------------+------------+------------+
  957. |        |                        |  US$24.00  |            |
  958. |        | c-scope                |     or     |            |
  959. |        |                        | Cdn$28.00  |            |
  960. +--------+------------------------+------------+------------+
  961. |               Canadian residents add 7% GST  |            |
  962. +----------------------------------------------+------------+
  963. |                Ontario residents add 8% PST  |            |
  964. +----------------------------------------------+------------+
  965. |      Outside Canada/U.S.A.,   add shpg/hndlg |   $5.00    |
  966. +----------------------------------------------+------------+
  967. |                                       TOTAL  |            |
  968. +----------------------------------------------+------------+
  969.  
  970. Please remit by cheque (we will accept cheques in your local currency at
  971. the appropriate rate of exchange) or by money order.  We will accept your
  972. company's purchase order.  We also accept payment by Visa or Mastercard.
  973.  
  974. P.O. Number  ______________________________________ (P.O. to follow)
  975.  
  976.      +------------------------------------------------------------------+
  977.      | Note - Fill out the following ONLY if you are making payment by  |
  978.      |        credit card.  You may also call (416) 751-3284 for credit |
  979.      |        card registrations.                                       |
  980.      |                                                                  |
  981.      | Master Card [ ]  Visa [ ] Card Number ______ ______ _____ ______ |
  982.      |                                                                  |
  983.      | Name on the Card (print) _______________________________________ |
  984.      |                                                                  |
  985.      | Expires ____/____                                                |
  986.      |                    Signature ___________________________________ |
  987.      |                                                                  |
  988.      +------------------------------------------------------------------+
  989.