                       Resource Standard Metrics
                             Version 4.0
      (c)1996-1998, M Squared Technologies,  All Rights Reserved.


RSM provides a standard metrics tool for all of your C, C++ and Java projects
across today's popular operating systems, including DOS, Windows 95, Windows
NT and all UNIX systems.

                            ~ Features ~

  - Metrics for C, C++ and Java in Text or HTML format

  - HTML reports include hyper-links to the source code for source browsing.

  - HTML reports are in color and are supported by all web browsers.

  - Provides code line count, logical complexity, code style and
    code quality analysis.

  - Calculates functional cyclomatic, logic and interface complexity.

  - Provides code estimation factors based on LOC and eLOC.

  - Perform metrics differentials between two code trees or between
    two points in time.  Easy track the quantity of work performed.

  - Counts lines of code, comments, blanks, logical and physical lines.

  - Calculates percentages of code, comments and white space.

  - Performs project, file, class, functional and macro analysis.

  - Create documentation from comments relative to functions and files.

  - Analyzes source code against common coding practices.

  - Analyzes source code for quality problems

  - Analyzes C source for C++ compatibility

  - Analyzes C, C++ and Java for classes, templates, functions and files.

  - Allows the user to customize applicable coding practices with
    minimum levels of comments and white space allowable within
    the code.

  - Simple command line interface with parameter switches for variable
    output ranging from summary lists to verbose reports.

  - Provides memory function counts for memory allocation and
    de-allocation analysis.

  - Allows the user to see how the tool determines LOC counts against
    the given source code.

  - Source code printing/documentation with line numbers, margins,
    header, and file date/time.

  - Completely portable across all UNIX compatible operating
    systems, Windows 95/NT/dpmi DOS compiled with DJGPP(gcc) 2.0.

  - Pre-compiled for Windows 95/NT/dpmi DOS.  Source is easily
    compiled on any UNIX ANSI C compiler.

  - Paid source licenses come with source code for portability across
    all compatible operating systems, with money back guarantee
    for cross compilation.  Provided source code may not be
    altered or transferred.


                         ~~ Installation ~~

RSM versions 4.0 and greater require a license file to operate.  This license
file must exist in a directory specified in your systems path.  The best way
to install RSM is to create a directory called rsm, copy the distribution into
this directory and place this directory within your systems path environment
variable.

RSM uses an encrypted license file to provide each user with a unique license
tailored to each users runtime requirements.  RSM will look for the license
file rsm.lic in the local directory where the RSM program is located.  If the
file is not found there, RSM will look for the license file at the location
specified by the environment variable RSMHOME.

If the license file is not found at the RSMHOME location, RSM will search the
system PATH for the rsm.lic file.  If the license file cannot be located, RSM
will warn the users and default to the SHAREWARE mode.  If the rsm.lic file
detects that the file contents have been modified, RSM will default to the
SHAREWARE mode.  Hacking the RSM license file will void the end user license
agreement.

UNIX Installation
-----------------

Place the diskette in your machine's local floppy drive and execute the
following commands.

% mkdir rsm
% cd rsm
% tar -xvf /dev/fd0

or for the *.tar.gz distribution

% gunzip rsm.tar.gz
% tar -xvf rsm.tar

The source files will be extracted from the tar format diskette.  Modify your
path to include the rsm directory.


DOS/Windows Installation
------------------------

Place the diskette in your machines local floppy drive and execute the
following commands.

  C:\> mkdir rsm
  C:\> cd rsm
  C:\> copy a:\*.*

The source files will be copied to the rsm directory.

DOS/Windows 3.1 & Windows 95 Execution
--------------------------------------
rsm_95.exe is a 32 Bit program.  It will run naturally in 32 bit mode on
Windows 95.  However, under Windows 3.1 and DOS, a dpmi 32 bit extender must
be used.  Such an extender is called cwsdpmi.exe and is located on the source
diskette.  This executable must be found in your system path.  Example:  C:\>
copy cwsdpmi.exe c:\dos.

Windows NT Execution
--------------------
rsm_nt.exe is a Windows 32 bit shell application which requires the shared
library cygwinb19.dll.  This library must be present in the ..\windows\system
directory or the local directory where the rsm_nt.exe file is found.

Remember to modify your path in the autoexec.bat, to include the rsm
directory.


                         ~ Use and Operation ~

Syntax: rsm <-option -option parameter> filename or wild cards

          A Automated processing terse output
          a Allocation/de-allocation memory function counts
          b Benchmark processing performance
          C Comment Documentation relative to function or class
          c Complexity measure, Cyclomatic and comparative
          d Determine source against LOC algorithm
          e Estimation Analysis based on LOC and Complexity       
          f Function names and LOC per function                   
          F <File List> process file names from list              
          H HTML output mode for use with WWW browsers            
          h Help and licensing information                        
          i Identify class names and location                     
          l List function names declared in each file             
          m Macro names declared in each file                     
          n Notices for code quality & common errors              
          o Object class metrics                                  
          p Printable format for source code                      
            B Begin Top Margin  (1)                               
            M Left Margin (5)                                     
            P Page Length (55)                                    
            L Line Length (72)                                    
            S Header String "string contents"                     
          q Query for configuration and notice setup              
          r <ext,ext,...> <directory> Recurse directory           
          R List the recursive files
          s Summary LOC metrics per file
          t Template Identification and location
          T Totals only mode
          v Verbose LOC, keywords and metrics
          w Work file created for the specified source files
          W Work differential between last (workfile.dat) and now
          x Extract work differential between two work files
          y Display configuration parameters, export rsm.cfg
          z Show Source/Software License Agreement

Resource Standard Metrics provides a standard method to quantify the quantity
and quality of worked performed for a source code module or a project.  This
program will analyze a C, C++ or Java source for metrics and semantic quality
problems which most compilers do not catch.

Source files may be processed via wild cards, recursively down a file tree or
from a specified list of file names.  RSM will perform Lines of Code (LOC)
metrics between two versions of code trees.  The evaluation copy of this
program will only process 2 files at a time.

If the information you desire is not located in this help listing, please
refer to the manual (rsm.txt) and/or the frequently asked questions, FAQ file 
(rsmfaq.txt).

Lines of code, (LOC), are defined as a line of code, if a line in the source
code is not a blank line or not a comment line. Resource Standard Metrics
defines an effective line of code as a line which are not stand-alone braces
{} or parenthesis ().

Logical lines within a source file can exceed the physical lines within a file
if there occurs code and comments on the same physical line.  The sum of code,
blanks and comments should equal the logical lines.  Metrics programs that
show code, comments and blank lines equal to the physical lines are not
accounting for second instance of code or comments.

Various key words and statements are provided for code analysis.  Read-ability
and code quality can easily be determined by analyzing the quality notices,
comment percentage, white space content and key words used within the source
code.

                            RSM Configuration

RSM can be configured from environment variables which are detailed within
this document.  However many users prefer to specify RSM's configurable
parameters from the rsm configuration file, rsm.cfg.  RSM loads environment
variable first then if the rsm.cfg file is located the specified parameters in
the configuration file will be loaded.  You may use the -y option to provide a
template for the rsm.cfg file from the existing default parameters.

RSM looks for the rsm.cfg file at the location specified by the environment
variable RSMHOME and then along the system path.  The rsm.cfg file, like the
license file should be place in the RSM directory which should be located on
your system path.  The file name has to be named rsm.cfg.  This file is a text
file of the following format.

The following sub-sections will describe the configurable parameters.  HTML
colors must be valid HTML colors in either test or hexadecimal format.

  RSM Configuration File 4.0
  # Lines with # signs are comment and are ignored by RSM
  Printed Line Length                     : 72
  Printed Page Length                     : 55
  Printed Left Margin                     : 5
  Printed Top Margin                      : 1
  Printed Page Header                     : RSM Version 4.00
  HTML Text Color                         : #000000
  HTML VLink Color                        : #660099
  HTML Link Color                         : #0000EE
  # No value for background color yields the browser default color
  HTML Background Color                   :
  HTML Function Color                     : GREEN
  HTML Macro Color                        : TEAL
  HTML Class Color                        : PURPLE
  HTML Notice Color                       : RED
  HTML Highlight Color                    : BROWN
  HTML Green Color                        : GREEN
  HTML Blue Color                         : BLUE
  HTML Red Color                          : RED
  HTML Teal Color                         : TEAL
  HTML Maroon Color                       : MAROON
  HTML Purple Color                       : PURPLE
  HTML Brown Color                        : BROWN
  RSM KEY String                          :
  Notice Flag Value                       : 33554431
  Minimum Comment Percent                 : 10
  Minimum Whitespace Percent              : 10
  Maximum Function LOC                    : 200

                          File Names and Wild Cards

  RSM_NT under Windows 95 or Windows NT, requires UNIX type paths
  for file specifications, c:\src\*.c must by c:/src/*.c.  Under
  DOS, Win95 and Windows NT, files can be created using mixed case,
  these operating system treat mixed case equally, but RSM is sensitive
  to case and your file spec must match the exact case of the files.

       i.e.  normal with wild cards: rsm.sol -facmnv *.c *.cc
             recursive descent:      rsm.sol -facmnv -r c,cc,h,hh /proj
             read a file list:       rsm.sol -facmnv -F filelist.txt
       (Windows 95)                  rsm_95 -fc c:\src\*.c c:\src\*.h
       (Windows NT)                  rsm_nt -fc c:/src/*.c c:/src/*.h
       (UNIX)                        rsm.sol -fc /src/*.c /src/*.h

                          Run Time Switch Options 

The options shown with a * can be aggregated together to form compound
reports.  Some experimentation will be required to find the combination of
options which yield the desired report

Common usage:
     i.e.  normal with wild cards: rsm -facmnv *.c *.cc
           recursive descent:      rsm -facmnv -r c,cc,h,hh /proj
           read a file list:       rsm -facmnv -F filelist.txt


Automated Processing Output Mode
------------------------------------------------------------------------------
-A

Terse output generates a summary report which can be parsed by scripting
languages such as Pearl.  Each data line has the following syntax:  keyword:
data ...

     i.e.  rsm -A *.c *.cc

Example Output:
File: timer.c LOC: 87 eLOC: 66 Comments: 2 Blanks: 16 Lines: 105


* Allocation/De-allocation of Memory Mode
------------------------------------------------------------------------------
-a

Produces metrics on memory creation through the counting of instances of
malloc, calloc, realloc and new.  Memory de-allocation is measured by counting
free and delete.  This metric is useful for focusing on functions which use
dynamic memory.  Most program bugs can be attributed to problems in dynamic
memory management.

     i.e.  rsm -a *.c


* Benchmark Mode
------------------------------------------------------------------------------
-b

This mode tracks the CPU, User, Wait and elapsed time for the running of RSM.
This mode is intended to create a timing metric for RSM so that the time
required to execute the systems metrics is known.  It may also serve as a
benchmark for comparing RSM to other like products, although no other products
are known which have as many features as RSM.

     i.e.  rsm -b *.c


* Comment Documentation Mode
------------------------------------------------------------------------------
-C

This mode extracts comments relative to functions and classes for the
specified files by either wild cards or file specification options.  This mode
should not be used with other metrics options.

     i.e.  rsm -C *.c


* Complexity Mode
------------------------------------------------------------------------------
-c

This mode measures both cyclomatic complexity and comparative complexity.
Function cyclomatic and comparison complexity are combined to form logic flow
complexity for each function.

Cyclomatic complexity is consistent with McCabe's definition where each code
branch is counted plus 1 for the function body.  RSM yields this metric
similar to other tools like Cadre's Ensemble in about 1,000th of the time.

Cyclomatic complexity is calculated by the sum of; 1 for the function
construct plus the number of instances of keywords for while, if, goto and 
case.  Cyclomatic complexity is a measure of branching or paths within a 
module.  A Cyclomatic complexity of 10 or greater is very susceptible to 
problematic behavior and should be thoroughly unit tested.

Comparative complexity is calculated by the sum of the number of instances of
comparison and logical test operators ( &&, ||, !=, ==, <=, >=, <, > ) within 
the test conditions for each 'if' and 'while'.  Comparative complexity can be 
used to determine the degree of complexity of branching decisions.

If a module has a cyclomatic complexity of 12 and a comparative complexity of
30, the module has branching decisions which are composed of at least two 
tests or conditions per branch which indicates 30 test cases are required to 
completely test this module.

Functional logic flow complexity is calculated by the sum of cyclomatic
(logical) complexity and comparative complexity.  The maximum and average
complexity is reported for the file and for all files processed.

Functional interface complexity is calculated by summing the number of
function input parameters and the number of return states.  This metric can be
useful when analyzing the complexity of a functions interface.  A function's
estimated size can be related to a function's interface complexity.

     i.e.  rsm -c *.c *.h


Deterministic Mode
------------------------------------------------------------------------------
-d

This mode will show the user a line of source and how RSM determines whether
the line is code or comment.  Too often metrics tools yield code lines and 
comment lines equal to the physical lines measured.  RSM accounts for comments 
and code on a single line and counts two logical lines.  RSM also measure 
effective code by eliminating the lines of code which contain just { } or ( ).

     i.e.  rsm -d source.c

This mode produces the validation of the given source against the LOC
algorithm of Resource Standard Metrics.  Output will echo each line of code
and a state of the LOC determination.

     Example Output:

     Line 1: /* functions using pointers to functions */
     LOC Type(s): <C Comment>

     Line 2:
     LOC Type(s): <Blank>

     Line 3: #include <stdlib.h> /*standard includes*/
     LOC Type(s): <Code> <C Comment>

     Line 4: #include <stdio.h>  // more includes
     LOC Type(s): <Code> <C++/Java Comment>


* Estimation Analysis Based on LOC and Complexity
------------------------------------------------------------------------------
-e

Estimation analysis presents LOC per function input parameter; per function
return state; per interface complexity (parameters + returns); per cyclomatic
complexity; per comparison complexity; per cyclomatic + comparison complexity;
and LOC per total functional complexity (Interface + Cyclomatic + Compare)
complexity.

     i.e.  rsm -e *.c


* Function Analysis Mode
------------------------------------------------------------------------------
-f

Function mode determines the functions in the source and if quality notices
are on, it will perform quality checking on the functions.  Modes -f and -n
are usually used together.

     i.e.  rsm -f *.c


* File List Mode
------------------------------------------------------------------------------
-F <FileList.txt>

Will process files from a file list.  This mode is useful for performing a
discrete set of file metrics.  The list must be a text file with on literal
filename on each line.

     i.e.  rsm -fac -F filelist.txt

     File Format:
     filelist.txt

     ./src/control.c
     ./src/display.c
     ./inc/control.h
     ./inc/display.h

Note that no wild cards are valid in this mode.


* HTML Output Mode
------------------------------------------------------------------------------
-H

This mode creates HTML output with color, fonts and hyperlinks to files.  Such
output is meant to be processed by a WWW browsers like Netscape Navigator or
MS Explorer.  You may set the background color of the HTML reports by setting
the environment variable RSMBGCOLOR to the HTML color code you desire.  If the
RSMBGCOLOR variable is unset, then the browser default background color will
be used.  The HTML is designed for use with the star, * command line options,
as noted in this documentation.

    i.e.  rsm -Hfacmnv *.c > metrics.htm
          rsm -Hx rm122819.97 rm122919.97 > metrics.html
          netscape metrics.html

The HTML text, vlink and link color must be specified together to override the
standard browser default.  You may redefine the specified HTML colors by
setting the environment variable associated with each color.  You may also 
define specific aspects of RSM reports by defining the color for the 
environment variable shown below.  HTML colors may be specified by the #000000 
hex value or the test word.

     For example in the UNIX csh;  setenv RSMBGCOLOR #FFFFFF
                    or DOS Shell;  set RSMBGCOLOR=WHITE

HTML colors may be redefined by specifying an HTML code for the following 
environment variable.

     Description                     Env. Variable Default Setting
     ---------------------------------------------------------------
     HTML Background Color           RSMBGCOLOR    <Browser Default>
     HTML Text, Vlink and link Color RSMTEXT       #000000
                                     RSMVLINK      #660099
                                     RSMLINK       #0000EE
     HTML Color GREEN or #005500     RSMGREEN      GREEN
     HTML Color BLUE  or #0000FF     RSMBLUE       BLUE
     HTML Color RED   or #FF0000     RSMRED        RED
     HTML Color TEAL                 RSMTEAL       TEAL
     HTML Color MAROON               RSMMAROON     MAROON
     HTML Color PURPLE               RSMPURPLE     PURPLE
     HTML Color BROWN                RSMBROWN      BROWN
     Function Name Color             RSMFCOLOR     GREEN
     Class Name Color                RSMCCOLOR     PURPLE
     Macro Name Color                RSMMCOLOR     TEAL
     Section Header Color            RSMHCOLOR     BROWN
     Notice Color                    RSMNCOLOR     RED
     --------------------------------------------------------------


Help Mode
------------------------------------------------------------------------------
-h

Produces the help output.  Such output can be printed under UNIX by piping the
output to lpr or redirecting if to a file.

     UNIX:
     i.e.  rsm -h | lpr
           rsm -h > help.txt

     DOS/W95/NT:
     i.e.  rsm -h > prn
           rsm -h > help.txt


* Identify Class Mode
------------------------------------------------------------------------------
-i

This mode will identify C++/Java class names to the report.  The class 
definition line is shown on the report helping to identify class names, 
template classes and inheritance.  This information is helpful when assessing 
the complexity of a system.

     i.e.  rsm -i *.cc *.hh


* List Function Name Mode
------------------------------------------------------------------------------
-l

This mode produces a list of functions which can be cut and pasted from the 
output into the comment header of the file which was processed.  It will 
create a report where all function names are correlated with their parent 
file.  This is useful when documenting the system.

     i.e.  rsm -l *.cc *.c

     Example Output:

     Function: Show
     Function: Drawable::Drawable
     Function: Drawable::Show


* Macro Mode
------------------------------------------------------------------------------
-m

Macro mode is similar to function mode except it reports the names of the 
macros within the source.  Macros are a common cause of maintenance and 
portability headaches so locating their existence is quite valuable.

     i.e.  rsm -fm *.c


* Quality Notice Mode
------------------------------------------------------------------------------
-n

Turns on quality checking on the source for approximately 50 common problems
which create difficult maintenance, porting or semantic bugs the compiler 
simply misses.  This mode will return the number of notices to the operating 
system upon RSM normal exit.  This will enable scripting languages to pickup 
the non-zero exit state and flag the end user.

     i.e.  rsm -facmn *.cc *.c *.cpp


* Object Class Metrics
------------------------------------------------------------------------------
-o

This mode details metrics for each class specification identified within the
source code.  Metrics include LOC, lines of code, eLOC, comments and blanks.

     i.e.  rsm -of *.cc *.cpp


Print Format, Code Listing Mode
------------------------------------------------------------------------------
-p

This mode generates a code listing for the files specified by name, wild card,
file list or recursive mode.  Files are created with a user specified header,
file name, page number, file date and line numbers for each line of code.  
Line numbers correspond with the line numbers generated from other RSM modes.  
This output is suitable for publication and peer reviews.

     i.e.  rsm -p *.cc *.c *.cpp
           rsm -p -F filelist.txt
           rsm -p -r cpp,h,hh ./

Page Formatting switches which apply to print code listing mode.

     -B <number> Top Margin,  Default 0
     -M <number> Left Margin, Default 5
     -P <number> Page Length, Default 55
     -L <number> Line Length, Default 72
     -S "string" Header String

     i.e..  rsm -p -B5 -M5 -P60 -L78 -H"My Code" .\src\*.c


Query Configuration Mode
------------------------------------------------------------------------------
-q

Prompts the user to determine which quality notices should be included into
the -n analysis.  The query for each quality notice effects the value of the 
environment variable which sets the quality states.

     i.e.  rsm -q

     Example Output:

     Notice                                               Current State
     ------------------------------------------------------------------
     Check for line lengths > 80 characters.                        On
     Activate this notification? [y/n]: y

     Check for function names > 32 characters.                      On
     Activate this notification? [y/n]: n

The results create a numeric value which must be set into the environment of
the shell which operates the RSM tool.

To set an environment variable in UNIX it is best to set the environment
variable from the .cshrc or .login file.  For the c shell: setenv RSMNOTICE
31748.

To set the environment variable in DOS, set the value in the autoexec.bat
file.  set RSMNOTICE=31748


* Recursive Descent Mode
------------------------------------------------------------------------------
-r

Recursive descent mode will process all the specified files from a given point 
in the directory tree.  A file spec must be specified as a list of file 
extensions separated by commas.  The starting point must be a directory.

     i.e.  rsm <options> -r <ext,ext,...> <directory>
           rsm -facr c,cpp ./proj
           rsm -f -a -c -r cc,c,h,hh ../mysrc
           rsm -vr c c:\srcs


* Recursive File List Mode
------------------------------------------------------------------------------
-R

Generates a list of all files which will be processed in the recursive 
descent.  This list may be cut from the report to provide a project file 
inventory.

     i.e.  rsm -Rr c,h,cc,hh .
           rsm -R -r c,cpp .\proj


* Summary Mode
------------------------------------------------------------------------------
-s

Summary mode summarizes the LOC, eLOC comments and blanks per file.  This mode 
present the metrics in a summarized format.

     i.e.  rsm -facmns *.c
           rsm *.c "default if no option specified"


* Template Identification Mode
------------------------------------------------------------------------------
-t

Identify template classes and template functions by emitting the line number 
and code lines.

     i.e.  rsm -t *.c *.cc


* Totals Only Mode
------------------------------------------------------------------------------
-T

This mode only displays grand totals for all files processed.  In this mode,
other reporting data is suppressed.  This mode makes it easy to determine
grand totals for your project.

     i.e.  rsm -T *.c *.cc
           rsm -Tr c,h c:\src
           rsm -Tvr c ./project


* Work Analysis Based on LOC Metric Differentials
------------------------------------------------------------------------------
-w

Work analysis is the capability to track LOC metrics on a specific code tree
over time.  This facility will create a differential metrics report using the
-W or -x mode for processing the created work analysis files.

The -w mode creates a work analysis file based on the files specified by the 
respective mode.  This file is named based on the date, for example, 
rm<month><date><century>.<year>.  This file is copied to a file called 
workfile.dat.  The file workfile.dat is used as the last work analysis file 
for -W mode.

     i.e.  rsm -w -r c,cc,h,hh /project1


Work Analysis From Last Work Analysis File
------------------------------------------------------------------------------
-W

This mode uses the last work analysis file (workfile.dat) and the current work
analysis metrics based upon the specified files.  The specified files must
match the files specified which originally created the (workfile.dat) file.  A 
work file differential analysis report will be generated.

     i.e.  rsm -W -r c,cc,h,hh /project1


Work Analysis Extraction From Work Analysis Files
------------------------------------------------------------------------------
-x

This mode extracts the work analysis differential between two work analysis
files.  These work analysis files must be based on the same code tree.  The
reported metrics will show LOC information based upon the time differential
between these two files.

     i.e.  rsm -x <ancestor file> <current file>
           rsm -x rm111019.97 rm 111419.97


* Verbose Mode
------------------------------------------------------------------------------
-v

Verbose output shows many metrics for each file and a grand total for all
files.  This mode provides many different numbers which the user can
interpret.

     i.e.  rsm -facmnv *.cpp *.c


RSM Configuration Parameters
------------------------------------------------------------------------------
-y

This options shows the RSM configuration parameters.  These settings can be
made by environment variables, as described in this document or specified in 
the rsm.cfg file.

The emitted format is compliant with the rsm.cfg syntax.  You can easily
create the rsm.cfg file by redirecting the output to a file called rsm.cfg.

     i.e.  rsm -y > c:\rsm\rsm.cfg

Remember the rsm.cfg and rsm.lic file must be found in a directory along the
system path or at the location specified by the environment variable RSMHOME


License Agreement
------------------------------------------------------------------------------
-z

Shows the software/source code license agreement which the user and company
are bound to by using RSM.


                      ~~ Code Quality Analysis ~~

The following quality conditions are analyzed with the -fn switch.
These switches will analyze each function for compliance with
standard coding practices and common errors sometimes missed by
compilers or present in questionable design.


Latent Code Problems:
------------------------------------------------------------------------------

  NOTICE: Line 317, '...' ellipsis found for a variable argument list.
          The compiler will not check the types of these parameters.

  NOTICE: Identified a Non-ANSI function prototype.  Function
          parameters will not be type checked.

  NOTICE: All 'switch conditions do not have a matching 'default'.
          This could cause unexpected behavior if the switch condition
          is not met by the available case statements.

  NOTICE: All 'case' conditions do not have a matching 'break'.
          This condition can occur when sequential case statements
          are used.  Check this function to insure no erroneous
          behavior will occur by an unexpected drop through to the
          next case statement.

  NOTICE: Line 532, a pre-increment '++<identifier>' identified
          within a MACRO.  This syntax is non-portable and is
          NOT recommended within macro definitions.

  NOTICE: Line 544, pre-increment '++<identifier>' identified.
          This can be a problematic construct in compound statements.

  NOTICE: Line 557, a pre-decrement '--<identifier>' identified
          within a MACRO.  This syntax is non-portable and is
          NOT recommended within macro definitions.

  NOTICE: Line 569, pre-decrement '--<identifier>' identified.
          This can be a problematic construct in compound statements.

  NOTICE: Line 585, '=' assignment identified within an 'if'
          condition.  This is an indication of a compound statement
          or suggest use of an '==' equivalence test.

  NOTICE: Line 590, '=' assignment identified within a 'while'
          condition.  This is an indication of a compound statement
          or suggest use of an '==' equivalence test.

  NOTICE: Line 612, The '?' operator was identified.  This implied
          if-else construct is very problematic in it's syntax and use.

  NOTICE: Line 913, realloc has been identified.
          A realloc of 0 size will free the pointer.  This may
          cause an unanticipated action on a NULL pointer.

Portability and Maintainability Issues:
------------------------------------------------------------------------------

  NOTICE: Line 234, The keyword, 'if', appears not to be delimited
          with scope { .. } operators around its content.  This
          could cause a maintenance problem where code falls outside
          the intended scope of the 'if' statement.

  NOTICE: Line 244, The keyword, 'else', appears not to be delimited
          with scope { .. } operators around its content.  This
          could cause a maintenance problem where code falls outside
          the intended scope of the 'else' statement.

  NOTICE: Line 254, The keyword, 'for', appears not to be delimited
          with scope { .. } operators around its content.  This
          could cause a maintenance problem where code falls outside
          the intended scope of the 'for' statement.

  NOTICE: Line 264, The keyword, 'while', appears not to be delimited
          with scope { .. } operators around its content.  This
          could cause a maintenance problem where code falls outside
          the intended scope of the 'while' statement.

  NOTICE: Line 274, The keyword, 'do', appears not to be delimited
          with scope { .. } operators around its content.  This
          could cause a maintenance problem where code falls outside
          the intended scope of the 'do' statement.

  NOTICE: The function name 'Show_List_From_Database_Optical_Parts'
          length 37 is greater than 32 characters long.
          This can be a portability and/or maintenance issue.

  NOTICE: Brackets, [ ] are not balanced.
          The compiler should have caught this error.
          This notice may indicate dead code within the
          source commented out through a #define construct

  NOTICE: Parenthesis, ( ) are not balanced.
          The compiler should have caught this error.
          This notice may indicate dead code within the
          source commented out through a #define construct

  NOTICE: Line 417, friend class 'Graphics' identified.
          This is a problematic construct as it breaks encapsulation.

  NOTICE: Line 734, 'goto' keyword identified.  This can cause
          maintenance difficulties and propagate hidden logic flow.

C to C++ Migration Analysis
------------------------------------------------------------------------------

The following ANSI C++ keywords are checked in C files to ensure the C source
code can be migrated to C++.  This mode can be disabled using the -q option
for the configuration of RSM.

ANSI C++ Keywords additional to ANSI C Syntax:
----------------------------------------------
asm               bool         catch     class       const_cast  delete
dynamic_cast      false        friend    mutable     namespace   new
operator          overload     private   protected   public
reinterpret_cast  static_cast  template  this        throw       true
try               typeid       using     virtual     wchar_t

  NOTICE: Line 5, An ANSI C++ keyword 'asm' has been found
          within a C file.  This will cause a compile error if this file
          is compiled with a C++ compiler.  It is suggested that this
          symbol name be changed to a non-conflicting name for C to
          C++ migration.

Code Understandability Analysis
------------------------------------------------------------------------------

  NOTICE: Line 311, Line character length = 92.  This width
          exceeds the standard terminal width of 80 characters.

  NOTICE: Lines of Code, LOC, in this function exceed the specified
          standard of 200 lines.

  NOTICE: Function comments, 7.4% are less than 10%.

  NOTICE: Function white space, 3.3% is less than 10%.

  NOTICE: File comment line percentage, 2.3% is less than 10%

  NOTICE: File white space percentage, 4.3% is less than 10%

Miscellaneous Notifications
------------------------------------------------------------------------

  NOTICE: File does not contain the key string specified in the
          environment variable RSMKEYSTR.
          Key String:

You may customize the notification boundaries for Comment Percentage, White
space percentage and maximum lines per function (module) by specifying the
following environment variables or set the associated parameter in the
rsm.cfg configuration file.

Specify which notices to check '-q'      - setenv RSMNOTICE 33554431
Specify a key string for CM control      - setenv RSMKEYSTR "@(#)Ver"
Comment Percentage per file/function     - setenv RSMCOMMENT 10
White space percentage per file/function - setenv RSMWHITE 10
Maximum Lines per function (module)      - setenv RSMLINES 200

Common Modes
------------------------------------------------------------------------------

The switches are listed below and create a variety of output.  Running RSM
without any switches creates plain LOC summaries as output.  We can suggest a
few modes which we routinely use.

RSM -facomv *.c ..\*.h

This mode produces the most information without any quality notices.
 -f     creates functional analysis.
 -a     produces memory allocation and de-allocation counts.
 -c     produces complexity measures.
 -m     produces an output of any macro defined in the source.
 -o     produces class analysis
 -v     produces verbose output of keywords and constructs.

RSM -facmvn *.c ..\*.h

Adds quality notices to the above specification.  Remember you turn on and off
notices by using the -q option and the RSMNOTICE memory variable.

Analysis limits for comment, white space, and lines per module are determined
by the following defaults or changed by the following environment variables:

Defaults:       Minimum comments per function    = 10%
                Minimum comments per file        = 10%

                                    Lines Comments
             Comment Percent = ----------------------- * 100
                               Lines (Comments + Code)

                                    Lines Code
             Code Percent    = ----------------------- * 100
                               Lines (Comments + Code)

                                Blank Characters
             White Space     = ------------------ * 100
                                Total Characters

To set the comment percentage per file or function use the environment
variable RSMCOMMENT.  The following specifies the file and function comment
percent to 25 percent.

     UNIX csh: setenv RSMCOMMENT 25
     DOS/W95/NT: set RSMCOMMENT=25

To set the white space percentage per file or function use the environment
variable RSMWHITE.  The following specifies the file and function white space
content percentage to 5 percent.

     UNIX csh: setenv RSMWHITE 5
     DOS/W95/NT: set RSMWHITE=5

To set the maximum lines per function, specify the environment variable
RSMLINES.  The following sets the maximum line of code per function to 500
lines of code.

     UNIX csh: setenv RSMLINES 500
     DOS/W95/NT: set RSMLINES=500

There may be instances where each source file must contain a specific string
and you would like RSM to check for the occurrence of this string.  This 
condition is appropriate for a copyright notice, security markings or version 
string for configuration management.

To specify the string for RSM to look for, specify the environment variable 
RSMKEYSTR.  To specify the string "(C) 1997  Acme Software".

     UNIX csh: setenv RSMKEYSTR "(C) 1997  Acme Software"
     DOS/W95/NT: set RSMKEYSTR="(C) 1997  Acme Software"

Make sure that the quality notice for the key string is ON and the -n switch
is specified.


                      ~~ Support, Sales and Licenses ~~

Please contact M Squared Technologies for all RSM licenses.  All licenses turn
on the wild card support and summations for all files and functions, yielding
project metrics.

Licenses include the latest revision, pre-compiled for DOS, Win95/NT and UNIX.
Single user or Network licenses available.  Source licenses include
unmodifiable source code for compiling on your exact machine and UNIX
operating system.  The source is compilable on any ANSI UNIX C compiler.

Resource Standard Metrics and Visual Metrics are Trade Marks belonging to M
Squared Technologies.

M Squared Technologies
2128 Hidden Pine Lane
Apopka, FL 32712
Email - m2tech@tqnet.com
Phone/Fax - (407) 880-2627
Web Site  - http://www.tqnet.com/m2tech


                         M Squared Technologies
                 Software/Source Code License Agreement

As a licensee of our products you are legally bound by this license agreement,
its terms and conditions.  The software, source code and documentation which 
you have/will acquired is the legal intellectual property of M Squared 
Technologies and is protected by the copyright laws of the United States and 
international copyright treaties.  The possession and use of this Software and 
Documentation is subject to the restrictions contained in this license 
agreement.

You, the LICENSEE, are licensed to the type of license identified under 
LICENSE.  This license is non-transferable to any other party other than the 
LICENSEE.

License Type: Shareware Use Only or The Licensed Shown in RSM

The source code provided with this software is for re-compilation only.  You
may NOT modify, print, publish, sell, give away or distribute this source code
in any manner, shape or form.  Failure to comply to this provision will void
this License agreement, product support and result in prosecution.

M Squared Technologies reserves all rights not expressly granted to the
licensee.

General Terms

This License will become effective on the date you acquire the Software and 
will remain in force until terminated.  You may terminate this License at any 
time by destroying the Documentation, Source Code and all binary executables, 
object code or images built from said source, together with all copies and 
adaptations.  This License shall automatically terminate if you breach any of 
the terms or conditions.  You agree to destroy the original and all copies of 
the Software and Documentation, or return them to M Squared Technologies upon 
termination of the License.

Governing Laws

Except as otherwise restricted by law, this License shall be governed by, and 
interpreted in accordance with, the laws of the State of Florida of the United 
States of America, without regard to Laws of Florida governing conflicts of 
law.  Furthermore, it is understood that this License shall be treated as 
though it were executed in the State of Florida.  The parties agree that any 
action relating to this License shall be prosecuted in the courts of competent 
jurisdiction of the State of Florida.

Entire License

This License sets forth the entire understanding of the License between you
and M Squared Technologies and may be amended only in writing by both parties.
No vendor, distributor, dealer, retailer, sales person or other person is
authorized to modify this License or to make any warranty, representation, or
promise which is different than, or in addition to, the representations or 
promises of this license.

(c) 1998 M Squared Technologies
