scandetail(1) scandetail(1)
NAME
scandetail - Creates detailed transition impact report
SYNOPSIS
scandetail [options] file ...
scandetail [options] -f filelist
scandetail [options] -r rootdir
DESCRIPTION
The scandetail tool finds transition impacts in HP-UX source files when
transitioning applications from a release of HP-UX to a later release of
HP-UX. Among the source files supported are shell scripts, makefiles, and
programs written in C, C++, Fortran, and COBOL.
The scandetail tool produces a report that identifies all of the lines in
the HP-UX source file(s) that have an associated transition impact. A tran-
sition impact is found when a source file contains commands, functions,
structures, header files, or other keywords that have changed from a previ-
ous release of HP-UX. A transition impact statement describes the differ-
ences in behavior and identifies possible solutions to resolve the differ-
ences.
If you do not specify any options when running scandetail, it behaves as
follows by default:
o Executes silently
o Does not follow symbolic links across file systems
o Scans files of unknown type
o Scans for all transition impact classifications, identifier types,
impact types, and impact severities
o Sorts in the order of the scanned source files
o Uses HTML format for the output report
o Names the output report stk_detail.html
o Titles the output report Detail Report
Command options are available to override all of the default behaviors.
You can specify your own set of default behaviors by creating a .scanrc
file in your home directory which contains the options you want to use for
every scan. List the command options in the .scanrc file, one per line. For
example, if you always want to not scan files of unknown type and you want
to always sort by the problem synopsis, then the first line of the .scanrc
file would be -u and -s synopsis would be on the second line. An example
.scanrc file is /opt/STK/examples/sample_scanrc. You can copy this file to
your home directory, renaming it to .scanrc, and uncomment the options you
want to use for every scan.
OUTPUT REPORT
There are two output formats (HTML, text) and three sorting options
(default, lineno, synopsis) that can be used to create a detailed transi-
tion impact report. The HTML format contains links that can be clicked on
when the report is viewed in a web browser. The text format displays the
URL for the link. The choice of output format depends on how you want to
view the report since the content is the same for both output formats.
The sorting options determine how the transition impacts found by the scan-
detail utility are organized. The default sorting option is to display the
transition impacts in the order the source files are scanned. For example,
if the source files specified on the command line are oranges.c, apples.c,
and grapes.c, then the transition impacts for oranges.c would be displayed
first, followed by apples.c and grapes.c. The lineno sorting option
displays the transition impacts sorted by file name and line number. Using
the same example, if the lineno sorting option is used, the transition
impacts for apples.c would be displayed first, followed by grapes.c and
oranges.c. The synopsis sorting option organizes the information by transi-
tion impact rather than file name. Critical transition impacts are
displayed first. The source files and line numbers where the impact was
found are listed under the synopsis for the transition impact. This allows
you to know all of the lines in the scanned source files that contain the
same transition impact. The choice for the sorting option depends on if you
want the detailed transition report organized by file name or by transition
impact.
For both output formats and the three sorting options, the detailed transi-
tion report contains the following sections:
o Report Identification
o Transition Impacts Found
o Identifier Type Legend
o Options Used
o See Also
The report identification section contains the name of the report, Software
Transition Kit information, the date the report was created, the report
format, and information on the files scanned. The organization of this sec-
tion is the same for both output formats and the three sorting options.
The transitions impacts found section identifies the lines in the scanned
source file(s) that should be reviewed as you transition your application.
Additionally, for each file name and line number listed, the transition
impact identifier name and identifier type are displayed along with the
impact synopisis, severity, type, and identification number. If you are
viewing the report in a web browser and the output format is HTML, you can
click on any of the displayed file name:line number entries to view the
line in the source file. You can click on the impact synopsis to display
the transition impact statement, or you can click on the identifier type to
learn about the identifier type and how to reduce over reporting. If the
output format is text, then the URL for the transition impact statement is
displayed.
The organization of the information displayed in the transitions impacts
found section depends on the sorting option used to create the report. For
the default sorting option and the lineno sorting option, the information
is displayed in one table that contains the identifier type, identifier
name, file name:line number, and impact synopsis. The impact severity,
type, and identification number are displayed in parentheses after the
impact synopsis. For the synopis sorting option, the information is
displayed in multiple tables. Each table starts with the impact synopsis
followed by the impact severity, type, and identification number in
parentheses. After this, the identifier type, identifier name, and file
name:line number are listed for each occurance of this transition impact in
the source code.
The identifier type legend maps the letter(s) used for the impact identif-
ier type to a short description of the identifier type. If the output for-
mat of the report is HTML, then you can click on the identifier type
letter(s) to display additional information. If the report is in the text
output format, then the URL for the additional information is displayed.
The options used section displays information on the command options used
to generate the report and the values of the Software Transition Kit
environment variables when the report was created. You can use this infor-
mation to determine which editor will be invoked if you click on one of the
file name:line number entries in the HTML output format. An editor cannot
be invoked from the text output format.
In the HTML output format, the see also section contains links for informa-
tion on the Software Transition Kit, transition impacts, scanning tools,
and documentation. The text output format, displays the URLs for this
information.
COMMAND OPTIONS
You can use the following command options when running scandetail.
Input File Options
file Absolute or relative path name to a source file to scan. You can
specify more than one file on the command line.
-f filelist
Absolute or relative path name to a file containing a list of source
files to scan, one per line. (That is, filelist is a name of a file
that contains a list of file names.) You can specify more than one
file list on the command line.
-r rootdir
Absolute or relative path name to a directory. You can list more than
one root directory on the command line. The scandetail tool recur-
sively scans all files and subdirectories within the specified direc-
tory.
-R cdfs | hfs | nfs | vxfs | lofs
Only descend directories with file systems of the specified type. You
must also use the -r rootdir option to name the directory you want to
scan. Note: The hfs, vxfs, and lofs options only apply when running
scandetail on a system running the HP-UX operating system.
+u,-u
Scan ( +u ) or do not scan ( -u ) files of unknown type. The default
is to not scan files of an unknown type.
-y Follow directory symbolic links across file systems. The default is
not to follow symbolic links. You must also use the -r rootdir option
to name the directory where you want to begin to scan.
List Options
-d List all impact classifications, impact severities, impact types,
operating system transitions, and identifier types that are supported
by scandetail.
Filtering Options
You can filter the transition impacts that scandetail reports by using the
following options:
- Exclusion options to exclude from the scan specific identifier types or
impact classifications, severities, or types. For example, -CST
excludes the standards compliance classification from the scan. Impacts
in every other classification are reported.
+ Inclusion options to include in the scan only specific identifier types
or impact classifications, severities, or types. For example, +CST
includes only the standards compliance impact classification in the
scan. Impacts in other classifications are not reported.
For options that take arguments, you can type the option letter with each
argument, or you can type the option letter once with the arguments
separated by a comma (,). For example, the following two commands produce
the same results:
scandetail -CKN -CTH -CNW *.c
scandetail -CKN,TH,NW *.c
You can use the following filtering options when running scandetail:
+C,-C impact_classification
Includes ( +C ) or excludes ( -C ) one or more transition impact clas-
sifications. You cannot use the -C option and the +C option together.
The list of impact classifications and their corresponding switch
values follows:
Switch Impact Classification
32 32-64 Bit Interoperability Impacts - Source changes that
affect interoperability of new and existing 32-bit software
with 64-bit software.
64 64-Bit API Impacts - Source changes related to using 64-bit
APIs and libraries, if you are creating a 64-bit version of
your software.
CC C and C++ Language and Compiler Impacts - Source changes
related to C and C++ compiler and language changes.
BI Binary Compatibility Impacts - Source changes that affect
whether software can execute on a given release of HP-UX.
CAP Capacity Scaling and Limits Impacts - Source changes related
to system capacity issues.
CBL4 COBOL Compiler Impacts - Source changes related to COBOL
language and compiler differences.
CLU Cluster Impacts - Source changes related to software that
uses cluster technology.
CMD Commands and Utilities Impacts - Source changes related to
commands and utilities.
DA Date and Time Impacts - Source changes related to date tran-
sitions.
F90 Fortran Compiler Impacts - Source changes related to Fortran
language and compiler differences.
HDR Header File Impacts - Source changes related to header file
differences.
I18N Internationalization and Localization Impacts - Source
changes related to internationalization and/or localization.
IO I/O Impacts - Source changes related to Input/Output rou-
tines and functionality.
IPF Itanium(R) Architecture Impacts - Changes related to HP-UX
API differences for the Itanium(R) architecture.
KN Kernel Impacts - Source changes related to kernel routines.
LIB Library Impacts - Source changes related to library func-
tionality.
NW Networking Impacts - Source changes that only affect
software that uses networking features.
PA PA-RISC Architecture Impacts - Changes related to the PA-
RISC Architecture.
SEC Security Impacts - Source changes related to security
issues, including system administration.
SHL Shell Impacts - Source changes related to the use of dif-
ferent shells.
SIG Signals Impacts - Source changes related to signals and
their use.
ST Standards Compliance Impacts - Source changes related to
conformance to standards such as POSIX
TH Threads Impacts - Source changes that only affect software
that uses threads and thread-safe routines.
UN Unclassified/Miscellaneous Impacts - Source changes that are
outside all of the other classifications.
-F file
Excludes file from scan.
+I,-I synopsisID
Includes ( +I ) or excludes ( -I ) one or more synopsis identifiers.
You cannot use the -I option and the +I option together.
-L file:lineno
Excludes all output for lineno (line number) in file.
+S,-S impact_severity
Includes ( +S ) or excludes ( -S ) one or more impact severities. You
cannot use the -S option and the +S option together. The list of
impact severities and their corresponding switch values are as fol-
lows:
Switch Impact Severity
Cr Critical - The impact detected must be resolved to transi-
tion the source.
Nc Non critical - The impact detected may need to be resolved
to transition the source.
+T,-T impact_type
Includes ( +T ) or excludes ( -T ) one or more impact types. You can-
not use the -T option and the +T option together. The list of impact
types and their corresponding switch values are as follows:
Switch Critical Impact Type
Ch Changed - Usage or behavior is different; you must change
the source.
Ob Obsolete - No longer available in a current or future
release of HP-UX; you must change the source.
Un Unavailable - Not available on HP-UX; you must change the
source.
Switch Non Critical Impact Type
En Enhancement - Enhanced functionality you might want to con-
sider using.
Ns Non standard - Usage is discouraged because it either does
not conform to current standards, or it will not conform to
future standards.
Wn Warning - Usage might indicate a problem; check the source
to be sure.
+Y,-Y identifier_type
Includes ( +Y ) or excludes ( -Y ) one or more identifier types. You
cannot use the -Y option and the +Y option together. The list of iden-
tifier types and their corresponding switch values are as follows:
Switch Identifier Type
A Command Arguments - Impacts triggered by the use of command
arguments, command options, or environment variables.
C Commands and Utilities - Impacts triggered by commands or
utilities that can be executed in scripts, with system
calls, or with exec calls.
Cc COBOL Callable Routines - Impacts triggered by calls to
COBOL library routines.
Cf COBOL Intrinsic Functions - Impacts triggered by calls to
functions intrinsic to COBOL.
Ck COBOL Keywords - Impacts triggered by COBOL keywords, opera-
tors, or compiler directives.
Ff Fortran Functions - Impacts triggered by Fortran functions.
Fi Fortran Identifiers - Impacts triggered by Fortran specif-
iers or common blocks.
Fk Fortran Keywords - Impacts triggered by Fortran keywords,
operators, or compiler directives.
Fs Fortran Subroutines - Impacts triggered by Fortran subrou-
tines.
L Libraries - Impacts triggered by programming library names
or a compiler option to link to a library.
P Path Names - Impacts triggered by hardcoded path names.
F C/C++ Functions - Impacts triggered by C or C++ functions,
pointers to C or C++ functions, or #define macros with argu-
ments.
H C/C++ Header Files - Impacts triggered by C or C++ header
files.
I C/C++ Misc. Identifiers - Impacts triggered by miscellaneous
C or C++ identifiers (global variables, type names, enum
members, or #define macros).
K C/C++ Keywords - Impacts triggered by C or C++ keywords,
operators, or preprocessor directives.
M C/C++ Structure Members - Impacts triggered by a C or C++
structures, classes, or union members.
S C/C++ Structures - Impacts triggered by a C or C++ struc-
tures, classes, unions, or enum tags.
Release Options
-O source os [-destination os]
Specifies the operating system release from which you are transition-
ing. This prevents transition impacts from other releases being
included in the scandetail output report. If you want to transition to
a specific version of the HP-UX operating system, you can specify a
destination release. For a list of the possible operating system
releases, enter the scandetail command with the -d option.
Define/Undefine Options
The scandetail tool scans all lines of the specified source files. Unlike
the C preprocessor cpp(1), scandetail scans code enclosed within the C
preprocessor commands #ifdef, #ifndef, #if, #else, and #endif without
checking whether the symbols specified are defined or not. This is the
default action for scandetail.
The #define and #undef C preprocessor commands in the scanned files are
ignored by scandetail. To activate scandetail processing of #ifdef,
#ifndef, and #if, specify the -D, -U, or -N options on the command line or
in your .scanrc file.
-D sym
Define the symbol sym and activate processing of #ifdef, #ifndef, and
#if when sym is present.
-U sym
Undefine the symbol sym and activate the processing of #ifdef,
#ifndef, and #if when sym is present.
-N Undefines all #ifdef and #ifndef symbols except for those symbols
explicitly defined with the -D sym option. However, evaluation of gen-
eral #if expressions is not affected by use of the -N option.
For example, consider the following lines of code:
#ifdef foo
Line 1....
#else
Line 2....
#endif
The command scandetail -D foo causes scandetail to scan Line 1 and not Line
2. The command scandetail -U foo causes scandetail to scan Line 2 and not
Line 1. The command scandetail -N causes scandetail to scan Line 2 and not
Line 1. The command scandetail will scan both Lines 1 and 2.
As another example, consider the following lines of code:
#ifdef foo1
Line 1....
#endif
#ifdef foo2
Line 2....
#endif
#ifdef foo3
Line 3....
#endif
The command scandetail -N does not scan Line 1, Line 2, or Line 3. The com-
mand scandetail -N -D foo1 scans Line 1 but does not scan Lines 2 and 3.
The command scandetail scans Lines 1, 2, and 3.
Output Options
-m message
Specifies the text to appear in the title of the output report. By
default, a scandetail output report is titled "Detail Report".
-o html | text
Outputs the report in HTML or text format. The default is to output
the report in HTML format.
-p prefix
Specifies a prefix that replaces stk in the default output file name
(stk_detail.html). Use this option to change the name of the file or
the directory in which the output is placed, or to direct text format
output to a file.
-s lineno | synopsis
By default, scandetail sorts in the order the source files are
scanned. Use scandetail -s lineno to sort by source file name and line
number, or use scandetail -s synopsis to sort by transition impact
severity, type, and synopsis.
-v Produces verbose output including progress indicator, count of current
files scanned, and current filename. The default is no verbose output.
EXAMPLES
Example 1
Scan the C++ files in filelist to find transition impacts; exclude enhance-
ments, standards compliance, threads, and unclassified impacts; and write a
detailed report in HTML format to
/home/user2/scan_output/myfiles_detail.html:
scandetail -C ST,TH,UN -T En \
-p /home/user2/scan_output/myfiles -f filelist
You can generate a list of C include files ( h ), C source files ( .c ),
C++ include files ( .H ), C++ source files ( .C ) and makefiles using the
find(1) command as follows:
find . -type f -name '*.[hcHC]' -o -name '*akef*' > filelist
Example 2
Scan all files in filelist for transition impact types command arguments or
commands and utilities; suppress all other impact types; and write a
detailed report in HTML format to stk_detail.html:
scandetail +Y A,C -f filelist
Example 3
Scan only for kernel transition impacts in all files in the directory
top_code_dir, and write a detailed report in HTML format to
stk_detail.html:
scandetail +C KN -r top_code_dir
ENVIRONMENT VARIABLE
The following environment variable affects the execution of scandetail:
STK_EDITOR
Determines the editor invoked when you view a scandetail output report
and you click on a file name. The name of the editor is included in
the output report. Therefore, set this variable before running scande-
tail.
SEE ALSO
Commands: scansummary(1), scanwizard(1)