vaxckitsrc CC — VMS C_3.0
The CC command invokes the VAX C compiler to compile C source
programs. The syntax is as follows:
CC file-spec,... +library-file-spec/LIBRARY...
Additional information available:
Command ParametersQualifiersErrorsLanguage topicsLink libraries
Run-time functionsRelease Notes
/ANALYSIS_DATA/CROSS_REFERENCE/DEBUG/DEFINE/DIAGNOSTICS
/G_FLOAT/INCLUDE_DIRECTORY/LIBRARY/LIST/MACHINE_CODE
/OBJECT/OPTIMIZE/PARALLEL/PRECISION/PREPROCESS_ONLY
/SHOW/STANDARD/UNDEFINE/WARNINGS
Command Parameters
file-spec,...
One or more VAX C source files separated by plus signs or
commas. If plus signs are used, the input files are
concatenated into a single object file. If commas are used,
each file is compiled separately to create separate object
files. If no input file extension is specified, VAX C assumes
the .C default file extension.
library-file-spec
A text library containing #include modules referenced in one or
more of the source files. A library file specification must be
concatenated with a file specification with a plus sign and
qualified using the /LIBRARY qualifier. If the input file
extension is not specified, VAX C assumes the .TLB default file
extension.
Qualifiers
Indicate special actions to be performed by the compiler or special input file properties. Compiler qualifiers can apply to either the CC command or to the specification of the file being compiled. When a qualifier follows the CC command, it applies to all the files listed. When a qualifier follows the file specification, it applies only to the file immediately preceding it. The following list shows all the qualifiers available with the CC command: o /[NO]ANALYSIS_DATA[=file-spec] o /[NO]CROSS_REFERENCE o /[NO]DEBUG[=(options,...)] o /[NO]DEFINE=(identifier[=definition][,...]) o /[NO]DIAGNOSTICS[=file-spec] o /[NO]G_FLOAT o /[NO]INCLUDE_DIRECTORY=(pathname [,pathname...]] o /LIBRARY o /[NO]LIST[=file-spec] o /[NO]MACHINE_CODE[=option] o /[NO]OBJECT[=file-spec] o /[NO]OPTIMIZE[=option] o /[NO]PARALLEL o /PRECISION=(SINGLE,DOUBLE) o /[NO]PREPROCESS_ONLY[=filename] o /SHOW[=option] o /[NO]STANDARD=[NO]PORTABLE o /[NO]UNDEFINE=(identifier[,...]) o /[NO]WARNINGS[=option]
/ANALYSIS_DATA [=file-spec]
/NOANALYSIS_DATA[=file-spec] (D)
Controls whether the compiler generates a file of source code
analysis information. The default file name is the file name of
the primary source file; the default file type is .ANA.
/CROSS_REFERENCE
/NOCROSS_REFERENCE (D)
Specifies whether the compiler is to generate cross-references. If
you specify /CROSS_REFERENCE, the compiler lists, for each variable
referenced in the procedure, the line numbers of the lines on which
the variable is referenced. You must use the /CROSS_REFERENCE
qualifier with either the /SHOW=SYMBOLS or the /SHOW=BRIEF
qualifiers. To obtain any type of listing, you must specify /LIST.
/DEBUG[=(options,...)] (D=TRACEBACK,NOINLINE)
/NODEBUG
Requests that information be included in the object module for use
with the VAX Symbolic Debugger. You can select the following
options:
ALL Includes all possible debug information
INLINE Tells the compiler to generate debug information to
cause a STEP to step into the inlined function call
NOINLINE Tells the compiler to generate debug information to
cause a STEP to step over the inlined function call
NONE Do not include any debugging information
NOTRACEBACK Do not include traceback records
TRACEBACK Include only traceback records
If you use /DEBUG without specifying any option, the default is
/DEBUG=NOINLINE.
/DEFINE=(identifier[=definition][,...])
/NODEFINE (D)
/DEFINE performs the same function as the #define preprocessor
directive. That is, /DEFINE defines a token string or macro to be
substituted for every occurrence of a given identifier in the
program.
DCL converts all input to uppercase unless it is enclosed in
quotation marks.
The simplest form of a /DEFINE definition is as follows:
/DEFINE=true
This results in a definition like the one that would result from
the following definition:
#define TRUE 1
Macro definitions must be enclosed in quotation marks as seen in
the following definition:
/DEFINE="funct(a)=a+sin(a)"
This definition produces the same results as the following
definition:
#define funct(a) a+sin(a)
When more than one /DEFINE is present on the CC command line or in
a single compilation unit, only the last /DEFINE is used.
When both /DEFINE and /UNDEFINE are present in a command line,
/DEFINE is evaluated before /UNDEFINE.
The default is /NODEFINE.
/DIAGNOSTICS[=file-spec]
/NODIAGNOSTICS (D)
The /DIAGNOSTICS qualifier creates a file containing compiler
messages and diagnostic information. The default file extension
for a diagnostics file is .DIA. The diagnostics file is primarily
for use with DIGITAL's layered products, which flag errors in
source code files.
/G_FLOAT
/NOG_FLOAT (D)
Controls the format of floating-point variables. When /G_FLOAT is
not specified, double variables are represented in D-float format.
When /G_FLOAT is specified, all variables declared as double are
represented in G-float format. A program compiled with /G_FLOAT
must be linked with the G-float library, VAXCRTLG.OLB. This
library must be specified so that it is searched before
VAXCRTL.OLB.
/INCLUDE_DIRECTORY=(pathname [,pathname...]]
/NOINCLUDE_DIRECTORY (D)
Provides an additional level of search for user-defined include
files. Each pathname argument can be either a logical name or a
legal directory specification, in quoted form.
The /INCLUDE_DIRECTORY qualifier provides the functionality of the
-i qualifier in PCC on ULTRIX. This qualifier allows you to
specify additional directories to search for include files. The
forms of inclusion are the #include "file-spec" and #include
<file-spec> forms. For the quoted form, the order of search is as
follows:
1. The directory containing the source file
2. The directories specified in the /INCLUDE qualifier (if any)
3. The directory or search list of directories specified in the
logical name C$INCLUDE (if any)
For the bracketed form, the order of search is as follows:
1. The directories specified in the /INCLUDE qualifier (if any)
2. The directory or search list of directories specified in the
logical name VAXC$INCLUDE (if any)
3. If VAXC$INCLUDE is not defined, then the directory or search
list of directories specified by SYS$LIBRARY
/LIBRARY
Indicates that the associated input file is a library containing source text modules specified in #include directives. The compiler searches the specified library for all #include module names that are not enclosed in angle brackets or quotation marks. The name of the library must be concatenated with the file specification using a plus sign. For example: CC DATAB/LIBRARY+APPLIC
/LIST[=file-spec] (Batch default)
/NOLIST (Interactive default)
Controls whether a listing file is produced. The default output
file extension is .LIS.
/MACHINE_CODE[=option]
/NOMACHINE_CODE (D)
Controls whether the listing produced by the compiler includes the
machine language code generated during the compilation. If you use
this qualifier you also need to use the /LIST qualifier. The three
options are as follows:
AFTER The machine code produced during compilation prints
after the source code listing.
BEFORE The machine code prints before the source code
listing.
INTERSPERSED The lines of machine code print alternately with the
lines of source code.
The default option is INTERSPERSED.
/OBJECT[=file-spec] (D)
/NOOBJECT
Controls whether the compiler produces an output object module.
The default output file extension is .OBJ.
/OPTIMIZE[=option] (D)
/NOOPTIMIZE
Controls whether optimization is performed by the compiler.
/NOOPTIMIZE turns off the /PARALLEL qualifier. The two options are
as follows:
[NO]DISJOINT Directs the compiler to optimize the generated
machine code.
[NO]INLINE Specifies whether the compiler is allowed to perform
the function inline optimization.
/PARALLEL
/NOPARALLEL (D)
Specifies whether the compiler should perform dependency analysis
on loops in the program and generate optimized code to run on a
multiprocessor system for loops with no dependencies.
/PRECISION=(SINGLE,DOUBLE)
/PRECISION=DOUBLE (D)
Controls whether floating-point operations on float variables are
performed in single or double precision.
/PREPROCESS_ONLY[=filename]
/NOPREPROCESS (D)
Causes the compiler to perform only the actions of the preprocessor
phase and write the resulting processed text out to a file.
/SHOW=(option,...) D=(SOURCE)
This qualifier is used with the /LIST qualifier to set or cancel
specific listing options. You can select the following options:
ALL Print all listing information.
BRIEF Print a brief symbol table, listing only those
identifiers that are referenced in the program
[NO]DECOMPOSITION Show/do not show a summary of the loops that were
decomposed. Must use with the /LIST and
/PARALLEL qualifiers for /SHOW=DECOMPOSITION to
take effect. (D = NODECOMPOSITION)
[NO]DICTIONARY Print/do not print Common Data Dictionary
definitions (D = NODICTIONARY)
[NO]EXPANSION Print/do not print macro expansions (D =
NOEXPANSION)
[NO]INCLUDE Print/do not print contents of #include files (D
= NOINCLUDE)
[NO]INTERMEDIATE Print/do not print intermediate macro expansions
(D = NOINTERMEDIATE)
NONE Print no listing information
[NO]SOURCE Print/do not print source file statements (D =
SOURCE)
[NO]STATISTICS Print/do not print compiler performance
statistics (D = NOSTATISTICS)
[NO]SYMBOLS Print/do not print symbol table (D = NOSYMBOLS)
[NO]TERMINAL Display/do not display compiler messages at the
terminal. If NOTERMINAL is specified, only the
summary message is displayed. (D = TERMINAL)
[NO]TRANSLATION Display/do not display the translation of a UNIX*
system file specification to a VAX/VMS file
specification. (D = NOTRANSLATION)
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
/STANDARD=[NO]PORTABLE (D=NOPORTABLE)
Specifies whether the compiler is to generate messages to flag VAX C specific constructs and deviation from conventional C constructs and rules (PORTABLE), or not to generate such messages (NOPORTABLE). The default is /STANDARD=NOPORTABLE.
/UNDEFINE=(identifier[,...])
/NOUNDEFINE (D)
/UNDEFINE performs the same function as the #undef preprocessor
directive--it cancels a macro definition.
The /UNDEFINE qualifier is useful for undefining the predefined VAX
C preprocessor constants. For example, if you use a preprocessor
constant (such as vaxc, VAXC, VAX11C, or vms) to conditionally
compile segments of VAX C specific code, you can undefine constants
to see how the portable sections of your program execute. For
example:
/UNDEFINE="vaxc"
When both /DEFINE and /UNDEFINE are present on the CC command line,
/DEFINE is evaluated before /UNDEFINE.
The default is /NOUNDEFINE.
/WARNINGS[=option] (D=/WARNINGS)
/NOWARNINGS
Controls whether the compiler prints warning diagnostic messages,
informational diagnostic messages, neither, or both. The two
options are as follows:
NOINFORMATIONALS
NOWARNINGS
The /WARNINGS qualifier alone forces the compiler to print both
informationals and warnings (the same as if no qualifier were used
on the command line). The /NOWARNINGS qualifier forces the
compiler to suppress both informationals and warnings. The
/WARNINGS=NOINFORMATIONALS qualifier forces the compiler to
suppress the informationals. The /WARNINGS=NOWARNINGS qualifier
forces the compiler to suppress warnings.
Errors
VAX C compiler error messages.
Additional information available:
ADDRDEPENDENCEAGGREGATEDEPENDANACHRONISMARGINVSTRPTR
ARGLISTOOLONGARGNOFLOATARGNOTINTPTRARGNOTLVALUE
ARGNOTPTRVALARGOVERFLOWARGREADONLYARGSTOOFEW
ARGSTOOMANYARRAYDEPENDENCEBADCODEBADPSECTBITARRAY
BITFIELDSIZEBOUNDADJUSTEDBUGCHECKBUILTARGCONV
CANTINLINECALLCANTINLINECALLCANTINLINEPROCCANTINLINEPROC
CANTINLINEPROCCASECONSTANTCDDATTRIGNOREDCDDNAMETOOLONG
CDDTOODEEPCMPLXINITCOLMAJORCOMPILERRCOMPLEXINITEXPR
COMPLEXSTEPEXPRCOMPLEXTERMEXPRCONBUILTARGCONFLICTDECL
CONTROLDEPENDCRXCONDITIONDEFTOOLONGDIVIDEZERO
DUPCASEDUPDEFAULTDUPDEFINITIONDUPINLINEFUNC
DUPLABELDUPLISTITEMDUPMAINFUNCDUPMEMBER
DUPPARAMETERENUMCLASHENUMOPEXTERNNAMETOOLONG
EXTRACOMMAEXTRAFORMALSEXTRAMODULEEXTRATEXT
FATALSYNTAXFILENOTFOUNDFLOATCONFLICTFLOATOVERFLOW
FUNCNOTDEFGLOBALENUMIFEVALERRORIFSYNTAX
IGNOREDINCBUILTARGINLINCONFINSBEFOREINSMATCHINTERNALLIMIT
INTVALERRORINTVALREQINVAGGASSIGNINVALIDIF
INVALIGNSPECINVALINITINVANAFILEINVARRAYBOUND
INVARRAYDECLINVASSIGNTARGINVBREAKINVBUILTIN
INVCMDVALINVCONDEXPRINVCONSTINVCONTINUE
INVCONVERTINVDATATYPEINVDEFNAMEINVDICTPATH
INVFIELDSIZEINVFIELDTYPEINVFILESPECINVFUNCDECL
INVFUNCOPTIONINVHEXCHARINVHEXCONINVIFNAME
INVINAGGASNINVLINEFILEINVLINELINEINVMAINRETVAL
INVMODIDENTINVMODIFIERINVMODTITLEINVOCTALCHAR
INVOPERANDINVPPKEYWORDINVPROTODEFINVPTRMATH
INVSTORCLASSINVSUBUSEINVSUBVALUEINVTAGUSE
INVVARIANTINVVOIDUSELIBERRORLIBLOOKUP
LISTTOOLONGLIVEOUTSIDELOOPMACDEFINREFMACNONTERMCHAR
MACREQARGSMACSYNTAXMACUNEXPEOFMAXMACNEST
MERGEDMISARGNUMBERMISPARAMNUMBERMISPARAMTYPE
MISPARENSMISSENDIFMISSEXPMISSPELLEDMISWIDETYPE
MODULENAMELONGMODZERONAMETOOLONGNESTEDCOMMENT
NOBJECTNOFLOATOPNOLIFETIMENOLISTINGNOMIXNMATCH
NONAUTOMATICNONEXTERNNONOCTALDIGITNONOCTALESC
NONPORTADDRNONPORTARGNONPORTCLASSNONPORTCOMP
NONPORTCONSTNONPORTCVTNONPORTINCLUDENONPORTINIT
NONPORTOPTIONNONPORTPPDIRXNONPORTPTRNONPORTTYPE
NONSEQUITURNONTERMCHARNONTERMNULCHARNONTERMSTRING
NOOPTIMIZATIONNOSUBSTITUTIONNOTFUNCTIONNOTPARAMETER
NOTPOINTERNOTSAFECALLNOTSWITCHNOTUNIQUE
NULCHARCONNULHEXCONOVERDRAFTPARAMNOTUSED
PARAMREDECLPARSTKOVRFLWPPUNEXPEOFPRAGMASYNTAX
PTRDEPENDENCEPTRFLOATCVTQUALNOTLVALUEQUALNOTSTRUCT
REDEFPROTOREDUNDANTREGADDRREPABBREV
REPLACEDREPOVERFLOWRESERVEDSCALEFACTORSEMICOLONADDED
SUMMARYSYMTABOVFLSYNTAXERRORTBLOVRFLW
TOOFEWMACARGSTOOFEWPRAGIDSTOOMANYCHARTOOMANYERR
TOOMANYFUNARGSTOOMANYINITSTOOMANYMACARGSTOOMANYMACPARM
TOOMANYSTRTRUNCFLOATTRUNCSTRINITTYPECONFLICT
TYPEINLISTUABORTUNDECLAREDUNDECLARED
UNDEFIFMACUNDEFLABELUNDEFMACROUNDEFSTRUCT
UNEXPENDUNEXPEOFUNEXPPDIRXUNKSIZEOFUNRECCHAR
UNRECPRAGMAUNSUPPORTEDLCVUNSUPPORTEDOPUNSUPPTYPE
VARNOTMEMBERVOIDCALLVOIDEXPRVOIDNOTFUNCVOIDRETURN
ADDRDEPENDENCE
Message Potential dependence created by use of variable
"****" within the expression which inhibited
decomposition at loop control variable "****".
Informational You used a variable in an address dereferencing
expression, which can cause a loop-carried
dependency. Loop decomposition is inhibited. This
message is issued if you specified the /PARALLEL
qualifier on the CC command line.
User Action If you are sure that the target memory accessed
conflicts with no other memory accessed during loop
execution, use the ignore_dependency decomposition
pragma to specify loop decomposition.
AGGREGATEDEPEND
Message Variable "****" has subscript expressions which are
not the same, which inhibited loop decomposition at
loop control variable "****".
Informational A variable's subscripts are not the same across two
references to the variable, indicating a potential
dependency. This message is issued if you specified
the /PARALLEL qualifier on the CC command line.
User Action If the loop must be decomposed, then rework your
algorithm or use the ignore_dependency decomposition
pragma to disregard the dependency.
ANACHRONISM
Message The "****" operator is an obsolete form, and may not
be portable.
Informational You used an old-style assignment operator such as =+
or =*. The message is issued if you specified
/STANDARD=PORTABLE on the CC command line.
User Action For the program to be portable, reverse the order of
the operator parts. For example, =+ should be += and
=* should be *=. The old-style operators are
supported by VAX C, but they may not be supported by
other C compilers, and they are not guaranteed to be
supported in future releases of VAX C.
ARGINVSTRPTR
Message The *** argument of "***" builtin function is not a
pointer to structure or union with size: 1, 2, or 4
bytes.
Error A built-in function that takes a struct argument was
not passed a struct of the appropriate size.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments.
ARGLISTOOLONG
Message Function reference specifies an argument list whose
length exceeds the VAX architecture limit.
Error The size of your argument list in the function call
exceeded 255 longwords.
User Action Rewrite the function definition and function call
with a list whose member(s) take less space; for
example, by passing floating-point and structure
arguments by reference rather than by value. Recall
that floating-point arguments occupy two longwords,
and that structures passed by value occupy as many
longwords as are necessary to contain the whole
structure.
ARGNOFLOAT
Message The *** argument of "***" builtin function may not be
floating point. The argument has been converted to
an integer.
Warning An argument to a built-in function has a
floating-point type when it should have an integer
type.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. If you really
wish to pass a float argument, use an explicit cast.
ARGNOTINTPTR
Message The *** argument of "***" builtin function is not a
pointer to integer.
Error An argument to a built-in function does not have the
required type of pointer to some type of integer.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. Check the
arguments for missing "address of" operators (&).
ARGNOTLVALUE
Message The *** argument of "***" builtin function is not an
lvalue.
Error An argument that is required to be an lvalue is a
non-lvalue expression.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. Make sure the
appropriate arguments are lvalues.
ARGNOTPTRVAL
Message The *** argument of "***" builtin function is not a
pointer.
Error An argument that is required to be some type of
pointer does not have pointer type.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. Check the
arguments for missing "address of" operators (&).
ARGOVERFLOW
Message Length of the argument list for macro "****" exceeds
buffer capacity; overflowing argument(s) considered
to be null.
Warning The total length of the arguments in a macro
reference exceeded the compiler's capacity to store
the arguments before substitution.
User Action Shorten or eliminate one or more arguments.
ARGREADONLY
Message The *** argument of "***" builtin function is
read-only.
Error An argument that is used by the function to modify
memory is a pointer to const or read-only memory.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. Make sure that
arguments that the function uses to change memory
point to writeable memory.
ARGSTOOFEW
Message Argument list for builtin function "***" contains too
few arguments; the builtin function is being ignored.
Error Not all of the required arguments were specified.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments.
ARGSTOOMANY
Message Argument list for builtin function "***" contains too
many arguments; excess arguments ignored.
Warning A function was called with extra arguments.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments.
ARRAYDEPENDENCE
Message Variable "****" has subscript expressions which are
not the same, which inhibited loop decomposition at
loop control variable "****".
Informational You have an array that has a loop-carried dependency
due to your use of array subscripts. This message is
issued if you specified the /PARALLEL qualifier on
the CC command line.
User Action Rework your algorithm or use the ignore_dependency
decomposition pragma to force decomposition.
BADCODE
Message Invalid code generation sequence.
Fatal An internal compiler error occurred.
User Action Gather as much information as you can about the
conditions in effect when the error occurred, and
submit an SPR.
BADPSECT
Message The program section (psect) specified by this
statement has conflicting 'nowrite' attributes with
another definition of the same program section.
Warning You specified two or more references to the same
program section, and the attributes of the references
do not correspond.
For example, this message appears when two globaldef
definitions exist for the same name, but only one
specifies the storage class readonly.
User Action Make all references to a program section consistent.
BITARRAY
Message The CDD description for "****" specifies that it is
an array of bit fields; it has been converted to a
scalar bit-field.
Informational The compiler generated a declaration of a bit field
whose size is the same as the total size of the
original CDD item. (VAX C does not support arrays of
bit fields.)
User Action If the generated declaration is acceptable, you need
not take any action; otherwise, change the CDD
description as appropriate.
BITFIELDSIZE
Message The CDD description for bit-field "****" specifies a
size greater than 32; the excess is declared
separately.
Informational VAX C generated a series of bit-field declarations
whose total size is the same as the original CDD
item. (VAX C does not support individual bit fields
larger than 32 bits.)
User Action If the generated declarations are acceptable, you
need take no action; otherwise, change the CDD
description as appropriate.
BOUNDADJUSTED
Message The CDD description for "****" specifies
non-zero-origin dimension bound(s); adjusted to
zero-origin.
Informational VAX C generated a declaration whose bound(s) have
been adjusted to start at zero. The generated array
had the same number of elements as the original CDD
item. (VAX C does not support dimension bounds that
do not start at zero.)
User Action Make sure that subscript expressions in references to
this array are offset by the appropriate amounts.
BUGCHECK
Message Compiler bug check during ****. Submit an SPR with a
problem description.
Fatal An internal error occurred during the specified phase
of compilation.
User Action Gather as much information as possible about the
conditions under which the error occurred, including
the phase of compilation, and submit an SPR (see the
VAX C Installation Guide).
BUILTARGCONV
Message The *** argument of "***" builtin function has been
converted from pointer to arithmetic type.
Warning An argument that should have an integer or
floating-point type instead had a pointer type.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments. If you wish to
pass a pointer argument to an arithmetic argument,
use an explicit cast.
CANTINLINECALL
Message Can't inline this call to "****" as requested because
an offset into a by value parameter exceeds size of
actual.
Informational The actual value of a parameter provided in a call
was smaller in size than the corresponding formal
parameter of the function, and uses of the formal
parameter require the full amount of storage. This
indicates that the type of the formal parameter does
not match the type of the actual value provided in
the call.
User Action Change either the formal parameter or the actual
value provided in the call so that the type of the
formal parameter exactly matches the type of the
actual value.
CANTINLINECALL
Message Can't inline this call to "****" as requested because
not enough actual parameters are supplied in the
call.
Informational The number of parameters supplied in a call to the
function is fewer than the number of formal
parameters declared and used in the function.
Function calls that do not supply enough parameters
will not be expanded inline.
User Action Change the call so that all necessary parameters are
supplied, or eliminate unneeded formal parameters
from the function.
CANTINLINEPROC
Message Can't inline "****" as requested because it declares
an exception handler.
Informational It was requested that a function be expanded inline.
However, that function declares an exception handler.
Since the function would not have a call frame, it
cannot have an exception handler if it is to be
expanded inline.
User Action Eliminate the exception handler, or remove the pragma
that requests that the function be expanded inline.
CANTINLINEPROC
Message Can't inline "****" as requested because it takes the
address of a passed by value parameter.
Informational The function uses operators such as & to take the
address of a formal parameter, or uses the VARARGS
package. These practices prevent inline expansion of
the function because it may store parameters in
registers (which have no address) after inline
expansion, and because the programmer may have been
relying upon the parameters being adjacent to each
other in memory which will not be true after inline
expansion.
User Action If possible, code the function without using the
address of the parameter, or if an address is needed,
then change the formal parameter to be a pointer to
the value. If the VARARGS package is used, then
remove the pragma requesting that the function be
expanded inline.
CANTINLINEPROC
Message Can't inline "****" as requested because a variable
offset into a by value parameter is used.
Informational A formal parameter is referenced with a run-time
variable subscript. This is usually a parameter of
type struct that contains a field that is an array.
Functions that use formal parameters in this way
will not be expanded inline.
User Action Pass a pointer to the struct instead of the struct
itself, or remove the pragma that requests that the
function be expanded inline.
CASECONSTANT
Message Case label value is not a constant expression.
Error You specified a value in a case label that was not a
constant.
User Action Replace the case value with a valid constant
expression.
CDDATTRIGNORED
Message The CDD description for "****" specifies the "****"
attribute, which is being ignored.
Informational The CDD record description specifies an attribute for
the indicated item that is not supported by VAX C.
The compiler ignores the indicated attribute.
User Action None.
CDDNAMETOOLONG
Message The CDD identifier name exceeds 31 characters; "name
truncated to "name.
Warning You specified an identifier name that exceeded 31
characters.
User Action Shorten or change the identifier name.
CDDTOODEEP
Message The attributes for the Common Data Dictionary record
description "****" exceed the implementation's limit
for record complexity.
Error The indicated record description was too complex for
VAX C to generate usable declarations.
User Action Simplify the record description in the CDD.
CMPLXINIT
Message "****" is too complex to initialize.
Warning The depth of the indicated aggregate variable
exceeded the limit of 32 levels.
User Action Simplify or correct the initializer list or
declaration, or initialize the variable within an
assignment statement.
COLMAJOR
Message The CDD description for "****" specifies that it is a
column-major array; it has been converted to a
one-dimensional array.
Informational VAX C generated a declaration for this item with a
single dimension. (VAX C supports only row-major
arrays.)
The number of elements in the array is the same as
the total number of elements in the original array.
User Action Make sure that you properly compute references to
this array.
COMPILERR
Message Previous errors prevent continued compilation.
Please correct reported errors and recompile.
Fatal The compiler detected too many errors to continue.
User Action Correct the errors reported in the previous compiler
messages.
COMPLEXINITEXPR
Message Loop decomposition inhibited due to complex loop
initialization expression.
Informational A loop initialization expression was a function call
or other complex expression. This message is issued
if you specified the /PARALLEL qualifier on the CC
command line.
User Action If the loop must be decomposed, rewrite the
initialization section in the loop.
COMPLEXSTEPEXPR
Message Loop decomposition inhibited due to complex loop step
expression.
Informational A loop step expression was a function call or other
complex expression. This message is issued if you
specified the /PARALLEL qualifier on the CC command
line.
User Action If the loop must be decomposed, rewrite the step
expression in the loop.
COMPLEXTERMEXPR
Message Loop decomposition inhibited due to complex loop
termination expression.
Informational A loop termination expression was a function call or
other complex expression. This message is issued if
you specified the /PARALLEL qualifier on the CC
command line.
User Action If the loop must be decomposed, rewrite the
termination condition in the loop.
CONBUILTARG
Message Constant expression required for "****" argument of
"****" builtin function.
Error Some built-in functions require that certain
arguments be constants or expressions that the
compiler can evaluate at compile time to produce a
constant. If a nonconstant expression is used for
any such argument, this error message is issued.
User Action Replace the offending argument expression with a
constant. If the structure of the program requires
that the built-in function be called with different
values that can only be calculated at run time,
consider using a switch statement to call the
built-in function with different constant arguments
on the basis of the run-time expression.
CONFLICTDECL
Message This declaration of "****" conflicts with a previous
declaration of the same name.
Warning The compiler determined that both declarations refer
to the same object, yet the two declarations conflict
in data-type or storage-class organization.
In addition, for external variables and global
symbols, the compiler may detect conflicting
storage-class specifiers, or identifiers that are
spelled the same but consist of letters that are in
different cases (the linker converts all external and
global names to uppercase letters). If the compiler
issues an error message for this reason, the program
may be correct; issuing a message in this instance is
a warning against possible programming errors.
User Action If the declarations refer to the same object, make
sure that they specify the same types and
organizations. Otherwise, either rename one of the
identifiers, or separate the scopes of the
declarations.
CONTROLDEPEND
Message Loop "****" has no lifetime information, which
inhibited loop decomposition at loop control variable
"****".
Informational You have a loop that contains a goto, exit, or return
statement. This message is issued if you specified
the /PARALLEL qualifier on the CC command line.
User Action If the loop must be decomposed, then rework your
algorithm.
CRXCONDITION
Message Common Data Dictionary description extraction
condition.
Informational An anomaly occurred during the extraction of a CDD
record description. The specific condition is
described in an accompanying message. The severity
of this message may be increased to warning or error
depending on the specific condition.
User Action If necessary, correct the indicated condition in the
CDD record description.
DEFTOOLONG
Message Text in #define preprocessor directive is too long;
directive ignored.
Warning The length of the token string in the #define line
exceeded the implementation's limit.
User Action Simplify the directive.
DIVIDEZERO
Message Constant expression includes divide by zero; the
result has been replaced with 0.
Warning A division by 0 was encountered in a constant
expression. The expression was replaced by 0.
User Action Made sure that no divisors in the expression can
evaluate to 0.
DUPCASE
Message Duplicate case label value "****".
Error You specified more than one case for the indicated
value in a switch statement. (The cases must be
unique.)
User Action Change the case labels and/or combine the cases, as
appropriate.
DUPDEFAULT
Message Duplicate default label.
Error You specified more than one default case in the same
switch statement.
User Action Combine the cases or make other changes necessary to
eliminate the duplicate(s).
DUPDEFINITION
Message Duplicate definition of "****".
Warning The named definition appeared more than once in the
program.
The two definitions are essentially the same. Both
definitions specify the same data types and
organizations, but there may be differences in the
values, initializers, or array bounds. If the name
is a function, there may be a difference in the
number or types of parameters, or in the contents of
the function body.
User Action The purpose of this message is to call a possible
programming error to your attention.
DUPINLINEFUNC
Message Duplicate [no]inline function "****" ignored.
Warning You duplicated a function name in one or more pragma
declarations.
User Action Change the name of the function declaration.
DUPLABEL
Message Duplicate label "****".
Error You specified duplicates of the indicated label in
the same function. (Label identifiers must be unique
within a function definition.)
User Action Rewrite the labels (and goto statements that refer to
them) to eliminate the duplicates.
DUPLISTITEM
Message Duplicate list item "****" ignored.
Warning You specified the same name more than once in a list
of arguments to a #pragma directive.
User Action Remove the duplicate argument if it is redundant;
otherwise, check for misspellings.
DUPMAINFUNC
Message Duplicate main function.
Warning You have defined two or more main functions in the
same compilation unit. A main function is any
function whose name is "main", or whose definition
specifies the "main_program" function definition
option.
User Action Make sure that there is only one such function in the
compilation unit.
DUPMEMBER
Message Duplicate declaration of member "****" .
Warning You declared two members with the same name in the
same structure.
User Action Rename one of the members or remove one of the member
declarations.
DUPPARAMETER
Message Duplicate parameter "****" ignored.
Warning The stated function parameter occurred more than once
in the function's formal parameter list. For
example:
funct(a,b,c,a) { }
All occurrences of the parameter after the first are
ignored.
User Action Remove or change the duplicate parameter identifier.
ENUMCLASH
Message Mismatched enum type in "****" operation.
Warning The indicated operation combined an enum variable or
value with a value of a nonmatching type. The
compiler issued this message if you used the
/STANDARD=PORTABLE qualifier on the CC command line.
User Action Use a cast operation to cast either the enum value or
the other value to a matching type.
ENUMOP
Message "****" is an undefined operation for enum values;
enum operand(s) converted to int.
Warning You used an enum variable or constant with an
arithmetic or bitwise operator. These operators are
undefined for use with enum types. The operation is
performed; however, the compiler treats the enum
object as an integer.
User Action Cast the enum object to int.
EXTERNNAMETOOLONG
Message The external identifier name exceeds 31 characters;
"name truncated to "name.
Warning You specified an external identifier name that
exceeded 31 characters.
User Action Shorten or change the external identifier name.
EXTRACOMMA
Message Extraneous comma in **** ignored.
Warning You have coded an extra comma in the indicated
context; the comma was ignored by the compiler.
User Action Make sure that any required item was not
inadvertently omitted; otherwise, remove the extra
comma.
EXTRAFORMALS
Message Extraneous formal parameter(s) ignored in declaration
of "****"
Warning You included a function's formal parameters in a
function declaration or definition.
For example, the following function declaration is
not allowed because it names the function's
parameters:
int funct(a,b,c);
The parameters a, b, and c are ignored.
Similarly, the following example defines a function
returning a pointer to a function returning an
integer. The names of the parameters of the function
returning an integer are not allowed:
int (*f(p1,p2))(q1,q2)
int p1, p2;
{...}
The compiler ignores the parameters q1 and q2.
User Action Check the syntax of the function declaration and, if
appropriate, remove the extra identifier(s).
EXTRAMODULE
Message Redundant #module preprocessor directive ignored.
Warning You specified more than one #module directive in a
single compilation; the excess directive or
directives were ignored.
User Action Make sure that only one #module directive exists in
the source file, and that it is placed before any VAX
C source code.
EXTRATEXT
Message Extraneous text in preprocessor directive ignored.
Informational Extra text appeared in the directive. For example:
#endif ABC
The compiler issued this message if you specified the
/STANDARD=PORTABLE qualifier on the CC command line.
User Action Either remove the extra text or enclose it in a
comment.
FATALSYNTAX
Message Fatal syntax error.
Fatal The compiler could not continue due to syntax errors.
User Action Correct the error in the indicated line and/or errors
reported in previous compiler messages.
FILENOTFOUND
Message Include file could not be opened.
Fatal The compiler could not find the include file in any
of the valid text libraries or directories.
User Action Check to see if the file does exist. Then check that
the include method you used for this file will search
for the file in the place where you expected it to
search.
FLOATCONFLICT
Message The CDD description for "****" specifies the
D_floating data type; the data cannot be represented
when compiling with /G_FLOAT.
Message The CDD description for "****" specifies the
G_floating data type; the data cannot be represented
when compiling with /NOG_FLOAT.
Warning The data type of the indicated CDD item conflicted
with the indicated command-line qualifier.
Only one of the two double-precision, floating-point
data formats may be used in a compilation, as
specified by the command-line qualifier (the default
qualifier being /NOG_FLOAT). VAX C generates a
declaration of an 8-byte structure for the item.
User Action Specify the appropriate command-line qualifier, or
change the description of the item in the CDD.
FLOATOVERFLOW
Message Overflow during evaluation of floating point constant
expression.
Error Overflow occurred during the evaluation of a constant
expression containing floating-point operands.
User Action Make sure that the expression value is in the range
0.29 * 10**-38 to 1.7 * 10**38.
FUNCNOTDEF
Message Static function "****" is not defined in this
compilation; assumed to be external.
Warning The indicated static function declaration did not
refer to an existing definition. The compiler
treated the function as external.
User Action Remove the storage-class specifier static in the
function declaration or use the specifier in the
appropriate function definition.
GLOBALENUM
Message Enumerators may not be initialized when declared with
"globalref".
Warning You tried to specify the values of enumeration
constants in a declaration of an enum variable with
the globalref storage-class specifier.
You must define these values elsewhere, in a
globaldef declaration, and you must not initialize
them in the globalref declaration.
User Action Remove all initializing values from the globalref
declaration.
IFEVALERROR
Message **** while evaluating #if or #elif expression; "true"
expression assumed.
Warning The substitute text is "Stack overflow," or "Divide
by zero."
User Action For stack overflow, reduce the complexity of the
expression. Make sure that no divisors are 0.
IFSYNTAX
Message Syntax error in #if or #elif expression; true
expression assumed.
Warning The #if or #elif expression on the indicated line
cannot be evaluated because of syntax errors; it was
assumed to be true.
User Action Correct the line.
IGNORED
Message Unexpected **** ignored.
Warning The compiler encountered an unexpected macro in the
source program, and has ignored it. (This may be a
syntax error.)
User Action Make sure that the macro and surrounding text is
syntactically correct.
INCBUILTARG
Message Incorrect type for *** argument of "***" builtin
function.
Error An argument to a built-in function has the wrong
type.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments.
INLINCONF
Message Previous inline or noinline pragma for "****"
conflicts with this pragma.
Warning You used both an inline pragma and a noinline pragma
specifying conflicting inline specifications for one
particular function.
User Action Determine whether you want the function to be
expanded inline, and remove the conflicting pragma.
INSBEFORE
Message Inserted **** before ****.
Warning The compiler tried to recover from a syntax error by
inserting a macro into the source.
User Action Correct the syntax.
INSMATCH
Message Inserted **** to match **** ****.
Message Inserted **** to match **** inserted earlier.
Warning The compiler tried to recover from a syntax error by
inserting a macro to match a previous macro in the
source code. The previous macro may or may not have
been inserted by the compiler.
User Action Make sure that you match all parentheses, brackets,
and braces.
INTERNALLIMIT
Message Loop decomposition inhibited due to compiler's
internal limitations.
Informational You have too many loops within a single function for
decomposition to proceed. This message is issued if
you specified the /PARALLEL qualifier on the CC
command line.
User Action If the loop must be decomposed, create two functions
in place of the existing function or create nested
loops in place of the single loops.
INTVALERROR
Message Integer value not used where required.
Error You used a noninteger value as an initializer for an
enum constant, or to specify the size of a bit field.
You must specify these values as integer constants.
User Action Specify an integer constant.
INTVALREQ
Message Non-integer value used incorrectly in a ****;
converted to integer.
Warning You used a noninteger value in a switch statement or
a case label. The value has been converted to
integer.
User Action Specify switch expressions and case label values as
integer values, or use a cast operator to make the
conversion explicit.
INVAGGASSIGN
Message Invalid aggregate assignment.
Error You tried to assign an array to another array or to
assign structures or unions of different sizes.
User Action Correct the assignment.
INVALIDIF
Message "****" is not a valid constant or operator in a #if
or #elif expression; "true" expression assumed.
Warning You used an invalid construction in an #if or #elif
expression, which is assumed to be true.
User Action Correct the expression.
INVALIGNSPEC
Message Invalid alignment specification ignored.
Warning You specified an alignment option that was not in the
range allowed. The compiler ignored the specified
option.
User Action Correct the alignment specification.
INVALINIT
Message The initialization of "****" is not valid.
Warning The indicated object cannot be initialized as
specified. Some objects may not be initialized at
all, such as functions, unions, and extern or
globalref objects. In other cases, the initializer
may not be appropriate, for example, a static pointer
cannot be initialized with the address of an
automatic variable. This and any subsequent
initializers for the same object have been ignored.
User Action Eliminate or correct the initializer, or correct the
type or storage class of the target object, or
initialize the object with an explicit assignment.
INVANAFILE
Message The compiler has generated an invalid ANA file.
Please submit an SPR with the sources which generate
this error.
Warning The compiler generated an inconsistent .ANA file for
this source file.
User Action Correct all other errors. If the error persists,
submit an SPR.
INVARRAYBOUND
Message The declaration of "****" specifies a missing or
invalid array bound.
Error In a declaration of an array, you omitted a required
dimension bound value or specified an invalid value
for a bound.
For multidimensional arrays, you must specify bounds
for dimensions other than the first. You also must
specify a bound for the first (or only) dimension if
this declaration is a definition. Valid bound values
are integer constant expressions greater than 0.
User Action Make sure that all required bounds are present and
valid.
INVARRAYDECL
Message "****" is an improperly declared array.
Error You improperly declared an array, such as an array of
functions.
User Action Make sure that the syntax of the declarator correctly
describes the object. (The declared object may not
be what you want.)
You may find the output from the /SHOW=SYMBOLS
qualifier to be helpful in diagnosing this error.
INVASSIGNTARG
Message Invalid target for assignment.
Error You specified, as the left operand of an assignment
operator, an expression that was not valid for
assignment. For example, you may have tried to
assign something to an array, to a function, to a
constant, or to a variable declared with either the
readonly storage-class modifier or the const
data-type modifier.
User Action Make sure that the target is appropriate for
assignments.
INVBREAK
Message Invalid use of the "break" statement.
Error You used break outside the body of a for, a while, a
do, or a switch statement.
User Action Remove the break statement, or check that any braces
in recent loops or switch statements are properly
balanced.
INVBUILTIN
Message The "***" builtin function call is being ignored; it
has invalid argument(s).
Error A call to a built-in function contains errors. This
message usually follows other error messages
describing errors in the argument expressions.
User Action Correct any errors listed before this one. Make sure
that the function is called with the correct number
and types of arguments.
INVCMDVAL
Message "****" is an invalid command qualifier value.
Fatal The indicated CC command qualifier value was
acceptable to the VMS Command Language Interpreter
(CLI), but it is meaningless to VAX C; for example,
LIST_OPTS is an invalid value for /SHOW, although it
is accepted by the CLI.
User Action Correct the qualifier value.
INVCONDEXPR
Message The second and third operands of a conditional
expression cannot be converted to a common type.
Error You specified an invalid combination of operands in a
conditional expression.
This can occur if the operands are pointers to
objects of a different size or type, or if the
operands are different structures.
User Action Make sure that both operands are of compatible sizes
and data types.
INVCONST
Message "****" is an invalid numeric constant.
Warning The indicated constant contained illegal characters
or was otherwise invalid.
User Action Correct the constant.
INVCONTINUE
Message Invalid use of the "continue" statement.
Error You used the continue statement outside the body of a
for, a while, or a do statement.
User Action Remove the continue statement, or check that any
braces in recent loops are properly balanced.
INVCONVERT
Message The source or target of a conversion is
noncomputational.
Error One of the operands in an expression could not be
converted as specified. For example, you tried to
cast some object to a structure.
User Action Correct the expression or cast.
INVDATATYPE
Message "****" has an invalid data type for use in this
#pragma preprocessor directive; directive ignored.
Error The indicated identifier was not declared with the
data type required by the directive in which it
appears. The entire directive was ignored by the
compiler. For example:
#pragma ignore_dependency(p, q)
requires that "p" and "q" be pointer variables, and
#pragma safe_call (f, pf)
requires that "f" and "pf" be either functions or
pointers to functions.
User Action Make sure that only appropriately-declared
identifiers appear in these directives.
INVDEFNAME
Message Missing or invalid name in **** preprocessor
directive.; directive ignored.
Warning The indicated directive was missing a required name.
For example:
#define
The entire directive was ignored.
User Action Correct or remove the directive.
INVDICTPATH
Message Missing or invalid path name in #dictionary
preprocessor directive; directive ignored.
Warning The indicated directive was missing a required name.
For example:
#dictionary
The compiler ignores the entire directive.
User Action Correct or remove the directive.
INVFIELDSIZE
Message The declaration of "****" specifies an invalid field
size; size of 32 bits assumed.
Warning The indicated field declaration was invalid because
it specified too large a size.
User Action Correct the declaration to specify either a single,
smaller field or several contiguous fields.
INVFIELDTYPE
Message The declaration of "****" specifies an invalid data
type; type "unsigned" assumed.
Warning You declared a field with an invalid data type.
Fields must be declared (and manipulated) as integers
or enumerated types.
User Action Correct the declaration to specify a valid data type.
INVFILESPEC
Message Missing or invalid file specification in #include
preprocessor directive; directive ignored.
Warning The #include directive either was missing a file or
module name or specified one that is syntactically
invalid. The directive was ignored.
User Action Correct the line.
INVFUNCDECL
Message "****" is an improperly declared function.
Error You improperly declared a function. For example, you
may have omitted the parameter list or a semicolon
between the function and a previous declaration.
User Action Correct the syntax of the declaration.
INVFUNCOPTION
Message Invalid function definition option "****" ignored.
Warning The indicated function definition option was not
supported. (The only valid option is the
main_program option.)
User Action Check the spelling of the option, or the syntax of
the function definition.
INVHEXCHAR
Message Invalid hexadecimal character value; high-order bits
truncated.
Warning An escape character specifed in hexadecimal exceeded
the limit of a 1-byte character.
User Action Correct the hexadecimal constant to represent a valid
escape character.
INVHEXCON
Message Hexadecimal constant contains an invalid character.
Error You specified an invalid hexadecimal constant, such
as 0xG.
User Action Correct the constant.
INVIFNAME
Message Missing or invalid name in #ifdef or #ifndef
preprocessor directive; "true" assumed.
Warning You specified no name, or a syntactically invalid
one, in the directive; the result of the test is
assumed to be true.
User Action Correct the directive.
INVINAGGASN
Message Invalid "***" builtin function call; structure or
union arguments are not of same size.
Error A built-in function that requires two or more
arguments be of the same size was called with
arguments of different sizes.
User Action Correct the call to the built-in function to pass the
correct number and type of arguments.
INVLINEFILE
Message Invalid file specification in #line preprocessor
directive; directive ignored.
Warning The file specification was syntactically invalid, and
the directive was ignored.
User Action Correct the directive.
INVLINELINE
Message Missing or invalid line number in #line preprocessor
directive; directive ignored.
Warning The line number was missing or was syntactically
invalid, and the directive is ignored.
User Action Correct the directive.
INVMAINRETVAL
Message Return value of main function is not an integer type.
Warning You have declared a main function with a return value
that is not an integer type.
User Action Check for an omitted semicolon at the end of any
declaration immediately preceding the declaration of
the main function or change the return value
specification to one of the integer types.
INVMODIDENT
Message Invalid ident specification in #module preprocessor
directive; directive ignored.
Warning The ident specification in the directive either was
not a valid identifier or was not a valid
character-string constant.
User Action Correct the directive.
INVMODIFIER
Message "****" is an invalid data type modifier in this
declaration.
Warning You specified a data-type modifier other than const
or volatile as in the the following example:
char *int ptr;
The data-type modifier int will be ignored.
User Action Remove or change the data-type modifier.
INVMODTITLE
Message Missing or invalid title specification in #module
preprocessor directive; directive ignored.
Warning The required title in the directive either was
missing or was not a valid identifier.
User Action Correct the directive.
INVOCTALCHAR
Message Invalid octal character value; high-order bits
truncated.
Warning The octal value in an escape sequence was too large,
as in '\477'. Its high-order bits were truncated.
User Action Correct the value.
INVOPERAND
Message Invalid **** operand of a "****" operator.
Error You specified an invalid operand for the indicated
operator.
This message is issued for arithmetic and bitwise
operators if the operand is noncomputational (such as
a structure). For other operators (such as the
increment operator), the compiler issues the message
if the operand is not an lvalue. For binary
operators, the substituted text indicates which
operand, left or right, is invalid.
User Action Make sure that the operand is the proper type for the
operator, and that it is an lvalue.
INVPPKEYWORD
Message Missing or invalid keyword in preprocessor directive;
directive ignored.
Warning You wrote a directive with no keyword. For example:
# ABC
The directive is ignored.
User Action Correct or remove the directive.
INVPROTODEF
Message The parameter list for a function prototype
definition must associate an identifier with each
type.
ERROR The function definition uses the prototype format but
does not contain an identifier for each type in the
parameter list.
User Action Place an identifier name in the appropriate type
declaration.
INVPTRMATH
Message Invalid pointer arithmetic.
Error You tried to perform an invalid arithmetic operation
on a pointer or pointers. The only valid arithmetic
operations allowed with pointers are addition and
subtraction.
For addition, the only forms allowed are as follows:
pointer + integer
pointer += integer
For subtraction, the only forms allowed are as
follows:
pointer - integer
pointer -= integer
pointer - pointer
In the last form, both pointers must point to objects
of the same size.
User Action Make sure that the expression conforms to one of the
previous forms listed. If necessary, cast one or
both operands to a compatible type.
INVSTORCLASS
Message "****" is an invalid storage class in this
declaration.
Message The "****" storage class is invalid for the
declaration of "****".
Warning You made one of the following programming errors:
o You specified a storage class that is invalid in
the context in which the declaration appears; for
example, specifying auto in a declaration located
outside of a function.
o You specified a storage class that is
incompatible with another storage-class
specifier; for example, specifying both static
and extern.
o You specified a storage class that is
incompatible with the data type of the indicated
declarator; for example, specifying globalvalue
for an array.
In all cases, the compiler ignores the storage-class
specifier.
User Action Correct the declaration.
INVSUBUSE
Message Invalid use of subscripting.
Error You specified a subscript in reference to a bit
field.
User Action Correct the syntax. If the structure containing the
bit field is an array, you must specify the
subscript(s) with the qualifier instead of the member
name.
INVSUBVALUE
Message Invalid subscript value.
Error You specified a subscript value that is not an
integer type.
User Action Change or cast the value to an integer type.
INVTAGUSE
Message Invalid use of tag "****".
Error You used a previously declared tag name in a
declaration of a different type.
User Action Make sure that the use of tag names is unique to each
of the data types, enum, struct, or union.
INVVARIANT
Message Invalid declaration of variant aggregate.
Error You specified a missing or invalid declarator in the
declaration of a *variant_struct* or *variant_union*.
For example, you have specified a list of
declarators, a declarator of an array, a function, or
a pointer type.
User Action Either declare the aggregate as an ordinary *struct*
or *union* or specify a single, simple identifier as
the declarator.
INVVOIDUSE
Message "void" is only valid in a parameter list when it
appears alone. Its use is ignored.
Warning "void" has been used in a function prototype
parameter list but is not the only item in the list.
User Action Either eliminate "void" or eliminate the extra
parameter types in the parameter list.
LIBERROR
Message Error while reading library "****".
Fatal The compiler could not read the indicated library.
Either it was not a text library, or its format had
been corrupted.
User Action Verify the spelling of the library's name, and verify
that it is a valid VMS text library.
LIBLOOKUP
Message "****" was not found in any of the specified
libraries.
Fatal The compiler failed to locate the indicated #include
module in any of the specified or default libraries.
User Action Check the CC command line to verify that the library
containing the module was specified and that the
module name, if specified, was spelled correctly. If
the library was a default library, verify (with SHOW
TRANSLATION C$LIBRARY) that its name is the
equivalent for C$LIBRARY.
LISTTOOLONG
Message List in #pragma preprocessor directive is too long;
directive ignored.
Warning You have specified more than 128 items in the list.
The entire directive was ignored by the compiler.
User Action Split the list into separate directives.
LIVEOUTSIDELOOP
Message Variable "****" is in use outside the loop, which
inhibited loop decomposition at control variable
"****".
Informational You have a scalar variable that has recurrence in a
loop or has a lifetime outside of the loop. This
message is issued if you specify the /PARALLEL
qualifier on the CC command line.
User Action If the loop must be decomposed, rework your algorithm
or use the sequential_loop decomposition pragma to
specify no decomposition for the loop.
MACDEFINREF
Message A macro cannot be **** during the scan of a reference
to the macro; directive ignored.
Warning You tried to redefine or undefine a macro within a
reference to it. The compiler ignores the
preprocessor directive.
User Action Move the directive to a position outside of the macro
reference.
MACNONTERMCHAR
Message Nonterminated character constant in macro argument;
apostrophe added at end of line.
Warning You omitted the closing apostrophe in a character
constant appearing in an argument in a macro
reference.
User Action Correct the constant.
MACREQARGS
Message Macro reference requires an argument list; "****" not
substituted.
Error You wrote a macro reference without an argument list.
The reference was deleted from the source file.
User Action Correct the reference, specifying the same number of
arguments as in the definition of the macro.
MACSYNTAX
Message Syntax error in macro definition; line ignored.
Warning The syntax of the parameter list in a macro
definition was invalid. (You must enclose the
parameter list in parentheses and delimit individual
parameters with commas.)
User Action Correct the syntax.
MACUNEXPEOF
Message Unexpected end-of-file encountered in a macro
reference; "****" not substituted.
Error The end-of-file was encountered during a macro
reference; the reference was deleted.
User Action See if you misplaced the closing parenthesis in the
macro argument list.
MAXMACNEST
Message Maximum text replacement nesting level exceeded;
"****" not substituted.
Error You specified a macro reference that is recursive or
otherwise causes repeated substitutions to a depth
greater than the implementation maximum of 64.
User Action Correct the recursion or simplify the definitions.
MERGED
Message Merged **** and **** to form ****.
Warning The compiler merged two separate source macros into a
single macro.
For example, two plus signs separated by a space may
be merged to form the increment operator (++).
User Action If the compiler's action is correct, remove the space
between the macros. Otherwise, check for a missing
macro between those merged.
MISARGNUMBER
Message The number of arguments passed to the function does
not match the number declared in a previous function
prototype.
Warning The function call contains too few or extra
arguments.
User Action Correct the number of arguments passed to the
function. If the prototype is incorrect, correct the
prototype.
MISPARAMNUMBER
Message The number of parameters declared does not match the
number declared in a previous function prototype.
Warning A function prototype for this function, which appears
earlier in the source file, contains a different
number of parameters than this declaration.
User Action Determine which declarator is correct and modify the
declarator to match it.
MISPARAMTYPE
Message The type of parameter "****" does not match the type
declared in a previous function prototype.
Warning The type of a parameter in a function definition does
not match the type specified for that parameter in
the previous prototype.
User Action Determine which type is correct for that parameter
and correct either the function definition or the
prototype.
MISPARENS
Message Mismatched parentheses in #if or #elif expression;
"true" expression assumed.
Warning The expression in a #if or #elif preprocessor
directive contained unbalanced parentheses.
User Action Make sure that you balanced the parentheses in the
expression.
MISSENDIF
Message Missing #endif preprocessor directive(s).
Error The compiler did not encounter an #endif directive
for the most recent #if, #ifdef, or #ifndef
directive.
User Action Be sure that all directives are properly structured,
and, if appropriate, add the missing #endif
preprocessor directive(s).
MISSEXP
Message Missing or invalid exponent in float constant; zero
exponent ('e0') assumed.
Warning You wrote a floating-point constant with the letter
'e' or 'E' but with no exponent or an invalid
exponent. The exponent was assumed to be zero.
User Action Correct the constant.
MISSPELLED
Message Replaced **** with ****. Warning You misspelled a reserved word. User Action Correct the spelling.
MISWIDETYPE
Message The prototype for this function does not specify the
default widened type for the parameter.
Error A prototype was declared with a parameter having a
type that is, by default, widened with old-style
function definitions. For instance, a float is, by
default, sized to a double for old-style function
definitions. If a prototype is in scope with a size
of float, then the argument will not have the size
that the function expects.
User Action Correct the declaration in the prototype to specify
the larger widened type. If the type is a float,
then specify double.
MODULENAMELONG
Message Identifier name in #module exceeds 31 characters;
"name" truncated to "name".
Warning You specified an identifier name that exceeded 31
characters.
User Action Shorten or change the identifier name.
MODZERO
Message Constant expression includes mod 0; the result has
been replaced with 0.
Warning The constant expression had an invalid mod
expression, such as 5 % 0. The result was 0.
User Action Correct the expression (but note that its operands
must not be floating point).
NAMETOOLONG
Message Identifier name exceeds 255 characters; truncated to
"****".
Warning VAX C identifiers are limited to a length of 255
recognized characters.
User Action Shorten the indicated identifier.
NESTEDCOMMENT
Message Nested comment encountered.
Informational The compiler detected an opening comment delimiter
(/*) within another comment. (VAX C does not support
the nesting of comments; the first ending comment
delimiter (*/) encountered ends the comment.)
User Action Check that you have not misplaced a comment delimiter
and inadvertently "commented out" necessary code.
NOBJECT
Message No object file produced.
Informational The compiler did not produce an object file, due to
conditions reported in previous messages.
User Action Make the corrections suggested by the other
message(s).
NOFLOATOP
Message The **** operand of a "****" operator has been
converted from floating-point to integer.
Warning The compiler converted the operand to an integer.
The left or right operand of the indicated binary
operator, or the operand of the indicated unary
operator, cannot be of type float or double.
User Action Change or cast the operand to an integral type.
NOLIFETIME
Message Variable "****" has no lifetime information, which
inhibited loop decomposition.
Informational You have a loop that contains too many scalar
variables. This message is issued if you specified
the /PARALLEL qualifier on the CC command line.
User Action If the loop must be decomposed, reorder the
declarations of your scalar variables so that the
variables most important for decomposition are
declared first.
NOLISTING
Message No listing file produced.
Informational The compiler did not create a listing file (usually
due to previously reported errors).
User Action None.
NOMIXNMATCH
Message The parameter list of a function can either contain
all identifiers or all types, but not both.
Error The parameter list of a function contains some type
specifiers and some identifiers that do not have type
specifiers.
User Action Either eliminate the type specifiers or add type
specifiers to the identifiers that are missing them
to create a valid function prototype.
NONAUTOMATIC
Message Variable "****" is not declared automatic, which
inhibited loop decomposition at loop control variable
"****".
Informational You have a loop control variable that does not have
the [auto] storage class. Only [auto] variables can
be placed in registers and placing scalars in
registers is required for decomposition to occur.
This message is issued if you specified the /PARALLEL
qualifier on the CC command line.
User Action If the loop must be decomposed, declare the loop
control variable to be [auto].
NONEXTERN
Message Array "****" is not declared external, which
inhibited loop decomposition at loop control variable
"****".
Informational You have a scalar variable in a loop that has the
globaldef or static storage class. This message is
issued if you specified the /PARALLEL qualifier on
the CC command line.
User Action If the loop must be decomposed, change the
declaration of the scalar variable to [auto] or
[extern].
NONOCTALDIGIT
Message Octal escape sequence in a character or string
constant terminated by a nonoctal digit.
Warning There was an 8 or 9 in the second or third position
of an octal escape sequence. In this case, the
digits preceding the nonoctal digit were evaluated,
and the 8 or 9 was considered a separate character.
The compiler issued this message if you used the
/STANDARD=PORTABLE qualifier on the CC command
.b.i-14 User Action Make sure that the escape
sequence contains only octal digits. If the 8 or 9
is separate from the escape sequence, yet must
immediately follow it, then pad the escape sequence
to three digits using leading zeros.
NONOCTALESC
Message Escape sequence in a character or string constant
starts with a non-octal digit.
Warning The first of three digits of an escape sequence was
an 8 or 9. In this case, the backslash is ignored,
and the 8 or 9 was treated as a character. The
compiler issued this message if you used the
/STANDARD=PORTABLE qualifier on the CC command line.
User Action Make sure that the compiler correctly resolves the
ambiguity.
NONPORTADDR
Message Taking the address of a constant may not be portable.
Informational You used an ampersand operator with a constant in the
argument list of a function call. (VAX C permits
this special case, but other compilers may not.)
User Action If you do not require portability, no action is
necessary. Otherwise, correct the line.
NONPORTARG
Message Passing a structure by value may not be portable.
Informational You passed a structure by value in a function call or
declared a function parameter as a structure. This
message is issued if you used the /STANDARD=PORTABLE
option on the CC command line.
User Action If the program must be portable, pass the structure
by reference.
NONPORTCLASS
Message Storage class "****" is not portable.
Informational This message was issued against the use of the
globalref, globaldef, globalvalue, readonly, or
noshare storage-class specifiers. This message is
issued if you specified the /STANDARD=PORTABLE
qualifier on the CC command line.
User Action No action is necessary if you do not require
compatibility with other C compilers. Otherwise,
correct the line.
NONPORTCOMP
Message Comparisons between pointers and integers may not be
portable. Comparisons between pointers to different
types may not be portable.
Informational You compared the value of a pointer or an address
expression with either an integer expression, a
nonzero integer constant, or a pointer or address
expression of a different type. Such usage may not
be portable and is not recommended. The only
portable pointer comparisons are between a pointer
and the integer constant 0, or between pointers to
objects of the same type. This message is issued
only if you specified /STANDARD=PORTABLE on the CC
command line.
User Action Cast one of the operands to be the same type as the
other.
NONPORTCONST
Message Character constant **** may not be portable.
Informational VAX C allows up to four characters to be specified in
a character constant, but other compilers may not.
The compiler issues this message if you use the
/STANDARD=PORTABLE qualifier on the CC command line.
User Action If you do not require portability, no action is
necessary.
NONPORTCVT
Message Conversions between pointers to different types may
not be portable.
Informational You converted a pointer or an address expression to
an integer type or to a different pointer type, or an
integer expression or a nonzero integer constant to a
pointer type. Such usage may not be portable and is
not recommended. The only portable assignments are
between pointers to objects of the same type or
converion of the integer constant 0 to any pointer
type. This message is issued if you specified
/STANDARD=PORTABLE on the CC command line.
User Action Change the operands or cast them to the same type.
This usage is not portable and is not recommended.
The only portable assignment is the following:
pointer = 0
NONPORTINCLUDE
Message #include of a library module is not portable.
Informational The specification of a library module name in an
#include preprocessor directive is VAX C specific and
is not portable. This message is issued if you
specified the /STANDARD=PORTABLE qualifier on the CC
command line.
User Action No action is necessary if you do not require
compatibility with other C compilers.
NONPORTINIT
Message Automatic initialization for "****" may not be
portable.
Informational You initialized an array or structure of storage
class auto. This message is issued if you specified
/STANDARD=PORTABLE on the CC command line.
User Action If you require portability, use separate assignment
statement(s) to set the initial value(s).
NONPORTOPTION
Message The "****" function definition option is not
portable.
Informational The VAX C function definition options are VAX C
specific and are not portable. The compiler issued
this message if you used /STANDARD=PORTABLE on the CC
command line.
User Action No action is necessary if you do not require
compatibility with other C compilers.
NONPORTPPDIRX
Message The **** preprocessor directive is not portable.
Informational You used the #dictionary or #module preprocessor
directive.
These directives are VAX C specific and may not be
recognized by other compilers. The compiler issues
this message if you specified /STANDARD=PORTABLE on
the CC command line.
User Action No action is necessary if you do not require program
portability.
NONPORTPTR
Message The use of an integer value as a pointer qualifier
for "****" may not be portable.
Informational In a reference to a structure or union member
accessed via the "->" operator, the qualifying
expression to the left of the "->" should have a
pointer value. VAX C allows the use of integer
values as well, but such usage is not portable. This
message is issued if you specify /STANDARD=PORTABLE
on the CC command line.
User Action Either use a true pointer expression as the
qualifier, or cast the integer expression as an
appropriate structure or union pointer.
NONPORTTYPE
Message Data type "****" is not portable.
Informational You used the data type variant_struct or
variant_union in a declaration or cast. This message
is issued if you specify /STANDARD=PORTABLE on the CC
command line.
User Action No action is necessary if you do not require program
portablility.
NONSEQUITUR
Message "****" is not a member of the specified structure or
union.
Informational In a reference to the indicated member name, you
specified a qualifier that does not represent the
structure or union to which the member belonged.
The reference is valid, because the member name is
unique and the offset can be resolved unambiguously.
This use of member names is maintained only for
compatibility with older programs.
User Action If the qualifier is a pointer, cast it as a pointer
to the appropriate structure or union.
NONTERMCHAR
Message Nonterminated character constant; **** assumed.
Warning The compiler encountered the end of the source line
before the end of a character constant. The compiler
assumed the indicated value.
User Action Correct the constant.
NONTERMNULCHAR
Message Nonterminated character constant contains no
characters; '\0' assumed.
Warning The compiler detected a single apostrophe (') at the
end of the source line.
User Action Check to see if there is an extra apostrophe;
otherwise, correct the constant.
NONTERMSTRING
Message Nonterminated string constant; quotes added at end of
line.
Warning The compiler encountered the end of the source line
before the end of a character string. The compiler
inserted a quotation mark (") at the end of the line.
User Action Check to see if the string should be continued on the
following line; if so, insert a backslash (\) at the
end of the line. Otherwise, check for the missing
quotation mark.
NOOPTIMIZATION
Message Complex control flow caused optimization to be
suppressed for procedure or function "****".
Informational Optimization was not performed for the indicated
function.
User Action To take advantage of optimization, simplify the
control flow within the indicated function.
NOSUBSTITUTION
Message Macro substitution cannot be performed during the
scan of a macro reference; "****" not substituted;
directive ignored.
Message Macro substitution cannot be performed during the
scan of a macro reference; "****" not substituted;
"true" expression assumed.
Warning You wrote a complex macro reference that contained a
preprocessor directive, which in turn contained
another macro reference. For example:
macref1 ( arg1,
#include MACREF2
.
.
,argn)
The substitution of MACREF2 was not performed and the
directive containing it was ignored. If the
directive was either #if or #elif, the expression
would be assumed to be true.
User Action Restructure your code so that the directive is not
contained within the macro reference.
NOTFUNCTION
Message Function-valued expression not found.
Error You used an expression in the context of a function
call, but the expression does not evaluate to a
function.
User Action Make sure that the expression properly evaluates to a
function; also make sure that you properly
dereference any pointer to a function.
NOTPARAMETER
Message "****" is not listed in the function's formal
parameter list; treated as if declared internally.
Warning You declared the specified identifier as a function
parameter, but the identifier does not appear in the
parameter list. For example:
f(a) int a,b; {...}
The identifier b does not appear in the function f's
formal parameter list. Its declaration is not
portable, and is probably a coding error. The
compiler treats b as if it were declared inside the
function definition; in this case, b becomes an
automatic variable.
User Action Correct the declaration or the parameter list.
NOTPOINTER
Message Address-valued expression not found.
Error You used an expression in a context requiring a
pointer value but the expression did not evaluate to
an address.
User Action Make sure that the expression evaluates to a pointer
value.
NOTSAFECALL
Message Function "***" inhibited loop decomposition at loop
control variable "****".
Informational You have a function that inhibited loop decomposition
at a loop control variable. This message is issued
if you specified the /PARALLEL qualifier on the CC
command line.
User Action If the loop must be decomposed and the function does
not introduce a dependency, insert a safe_call
decomposition pragma.
NOTSWITCH
Message Default labels and case labels are valid only in
"switch" statements.
Error You used case or default as a label outside the body
of a switch statement.
User Action Check for unmatched braces that may have prematurely
terminated the most recent switch statement.
NOTUNIQUE
Message "****" is not a unique member name in this context.
Error You used the same member name in more than one
structure or union definition, and then used that
member name as an offset from some other structure or
union. Since the compiler had no way of knowing
which member definition to use as an offset, a
message was generated.
User Action To avoid ambiguities, try to make all member names
unique.
NULCHARCON
Message Character constant contains no characters; '\0'
assumed.
Warning You used '' for an ASCII NUL character instead of
'\0'.
User Action Use '\0'.
NULHEXCON
Message Hexadecimal constant contains no digits; 0X0 assumed.
Warning You specified a constant such as 0X or 0x.
User Action Be sure that 0 is a valid value in this context; if
so, change the constant to 0x0.
OVERDRAFT
Message **** has gone into DISK QUOTA overdraft.
Informational Your disk I/O quota was exceeded while writing to a
file.
User Action Purge your directories to create more space or
increase your disk I/O quota.
PARAMNOTUSED
Message Macro parameter "****" is not referenced in the
definition.
Warning A macro definition had more parameters than appeared
in its substitution. For example:
#define m(a,b,c) a*b
User Action Specify the extra parameter in the substitution or,
if it is superfluous, delete it from the parameter
list. (This is a possible programming error.)
PARAMREDECL
Message This declaration of "****" overrides a formal
parameter.
Warning Your source program contained a redeclaration of one
of the function's formal parameters. For example:
f(a) { int a; }
You cannot reference the parameter from within the
function.
User Action If the declaration is misplaced, move it to a
position between the function header and the left
brace at the beginning of the function body.
Otherwise, rename one of the identifiers.
PARSTKOVRFLW
Message Parse stack overflow.
Fatal The source code in your program was too complex,
containing statements nested too deeply.
User Action Simplify the program.
PPUNEXPEOF
Message Unexpected end-of-file encountered in preprocessor
directive; directive ignored.
Warning The compiler detected the end of the source file
while attempting to read a continuation of a
preprocessor directive.
User Action Check for nonterminated comments, character strings,
and other constructs that can span several lines of
code.
PRAGMASYNTAX
Message Syntax error in #pragma preprocessor directive;
directive ignored.
Warning You have incorrectly coded the directive.
User Action Correct the error. Check for misspellings or
punctuation errors.
PTRDEPENDENCE
Message Pointer "****" inhibited loop decomposition at loop
control variable "****".
Informational You have a pointer that inhibited loop decomposition
at a loop control variable. This message is issued
if you specified the /PARALLEL qualifier on the CC
command line.
User Action If the loop must be decomposed and if the pointer
does not introduce a dependency, use the
ignore_dependency decomposition pragma.
PTRFLOATCVT
Message Operand of pointer addition or subtraction converted
from floating-point to integer.
Warning You combined a pointer operand with a floating-point
value. For example:
int i,*ip;
.
.
.
i = ip + 2.;
User Action Make sure that pointers are used only with other
pointers or with integers; in the previous example
and in similar situations, remove the decimal point
from the literal constant.
QUALNOTLVALUE
Message The qualifier for "****" is not a valid lvalue.
Error In a reference to a structure or union member
accessed by the period operator (.), the qualifying
expression to the left of the period must be an
lvalue.
User Action Correct the qualifying expression.
QUALNOTSTRUCT
Message The qualifier for "****" is not a structure or union.
Informational In a reference to a structure or union member, the
qualifying expression to the left of the period
operator (.) or right arrow operator (->) did not
represent a structure or union.
User Action Check for possible spelling errors.
REDEFPROTO
Message This prototype conflicts with either the function
definition or with a function prototype which appears
earlier in the file.
Warning The prototype conflicts with a previous declaration
of this function, either in number, type of
arguments, or in the return type of the function.
User Action Determine what attribute does not match and what the
correct attribute should be. Correct the invalid
definition.
REDUNDANT
Message The operand of the & operator is already an address.
The & is ignored.
Informational You specified & in front of an array or function
name. The message is issued if you specified
/STANDARD=PORTABLE on the CC command line.
User Action Make sure that you intend to pass the address of the
array or function. If you require portability,
remove the redundant "&".
REGADDR
Message Taking the address of register variable "****" is not
portable and causes its storage class to be changed
to auto.
Informational You used the unary ampersand operator (&) to take the
address of a register variable. VAX C changes the
storage class of the variable from register to auto.
This allows the address of the variable to be taken.
The message is used if you specified the
/STANDARD=PORTABLE qualifier on the CC command line.
User Action No action is needed if you do not require
compatibility with other C compilers. If you do
require compatibility, change the storage class of
the variable from register to auto.
REPABBREV
Message Replaced abbreviation **** with ****. Warning You abbreviated a reserved word. User Action Complete the spelling of all reserved words.
REPLACED
Message Replaced **** with ****.
Warning The compiler replaced an invalid macro with a
different macro. (Programs that contain syntax
errors usually generate this message.)
User Action Check for incorrect syntax.
REPOVERFLOW
Message Length of replacement text exceeds maximum buffer
capacity; "****" not substituted.
Error The length of the replacement text for a macro
reference or the length of the text plus the rest of
the line exceeded the implementation's limit.
User Action Shorten the replacement text or use multiple
substitutions to achieve the desired result.
RESERVED
Message "****" is a reserved identifier; directive ignored.
Warning You have specified a reserved identifier name in a
#define or #undef preprocessor directive. The
following reserved names may not be redefined or
undefined:
o __DATE__
o __FILE__
o defined
o __TIME__
o __LINE__
User Action Choose a different spelling for the identifier.
SCALEFACTOR
Message The CDD description for "****" specifies a scale
factor of ****; the scale factor is being ignored.
Informational VAX C does not support scaled arithmetic.
User Action Make sure that you appropriately scale computations
involving this item.
SEMICOLONADDED
Message Semicolon added at the end of the previous source
line.
Warning A missing semicolon was added to the line prior to
the line numbered in this message.
User Action Check the previous line carefully and add the
semicolon in the appropriate place.
SUMMARY
Message Completed with **** errors, **** warnings, and ****
information messages.
Message Completed with **** errors, **** suppressed
warning(s), and **** informational messages.
Informational This message indicates the number of compiler
messages (errors, warnings, and informationals)
issued during the compilation process. You can
suppress informational and warning messages using the
/[NO]WARNINGS CC command-line qualifier (see Chapter
1 in the Guide to VAX C.)
User Action Consider the individual messages and recompile if
necessary.
SYMTABOVFL
Message The total number of symbol table pages exceeds the
implementation's limit.
Fatal The program was too complex.
User Action Simplify the program by reducing the number and size
of variables and other names, constants, and so
forth.
SYNTAXERROR
Message **** Found **** when expecting ****.
Error The syntax error shown prevented the generation of an
object file.
User Action Correct the errors shown.
TBLOVRFLW
Message Internal table overflow, too many procedures,
external symbols (psects), or the program is too
complex.
Fatal Either the source file contains too many functions or
expressions, or the compiler has overflowed its
virtual address space.
User Action Reduce the size of the source file by dividing it
into smaller, separate files, or change the logic of
the program to reduce the number of complicated
expressions.
TOOFEWMACARGS
Message Argument list for macro "****" contains too few
arguments; missing arguments assumed to be null.
Warning You wrote a reference to the indicated macro with
fewer arguments than were specified in its
definition.
User Action Make sure that the number of arguments in the macro
reference is the same as the number of parameters in
the definition.
TOOFEWPRAGIDS
Message At least two identifiers must be specified in this
#pragma preprocessor directive; directive ignored.
Warning You have coded only one identifier in the list of
identifiers in this directive; at least two are
required. The directive was ignored by the compiler.
User Action Remove the directive, or add the missing identifiers,
as appropriate.
TOOMANYCHAR
Message Character constant contains too many characters;
truncated to ****.
Warning The length of a character constant exceeded the
implementation limit (four characters). The constant
was truncated to the indicated value.
User Action Reduce the length of the indicated character constant
to four or fewer characters.
TOOMANYERR
Message The total number of errors exceeds the limit of 100.
Fatal The compiler reported more than 100 error messages in
this compilation. The compilation ended at this
point.
User Action Correct the errors reported in previous compiler
messages and recompile the program.
TOOMANYFUNARGS
Message Function reference specifies too many arguments;
excess arguments ignored.
Warning You called a function with more than 253 arguments.
The compiler passed only the first 253 arguments; the
compiler ignored the remainder.
User Action Shorten the argument list.
TOOMANYINITS
Message The initializer list for "****" specifies too many
initializers; excess initializers ignored.
Warning You specified too many initializers for the indicated
variable. (If the indicated item is an array or
structure, it may be only partially initialized.)
User Action Make sure that all braces near the initializer
sublists are balanced; if the item being initialized
is or contains an array, make sure that you accounted
for all dimensions.
TOOMANYMACARGS
Message Argument list for macro "****" contains too many
arguments; excess arguments ignored.
Warning You wrote a reference to the indicated macro with
more arguments than were specified in its definition.
User Action Make sure that the number of arguments in the macro
reference is the same as the number of parameters in
the definition.
TOOMANYMACPARM
Message Parameter list for macro "****" contains too many
parameters; excess parameters ignored.
Warning The number of macro parameters in a #define
preprocessor directive exceeded the implementation
limit of 64.
User Action Rewrite the macro definition so that it uses 64 or
fewer parameters.
TOOMANYSTR
Message String constant contains too many characters;
truncated.
Warning You wrote a character-string constant whose length
exceeded the implementation's limit of 65,535
characters.
User Action Shorten the string.
TRUNCFLOAT
Message Double precision floating-point constant cannot be
converted to single precision; 0.0 assumed.
Warning You specified a double-precision constant in an
expression involving a conversion to
single-precision, but the constant's value was too
small to be represented in single-precision.
User Action Ensure that 0 is a valid value in this context; if
necessary, redeclare the conversion target as double.
TRUNCSTRINIT
Message String initializer for "****" contains too many
characters to fit; truncated.
Warning If the variable was a simple one-dimensional array,
the initializer was truncated (so that the length of
the initializer was array-1) and the null byte was
added to the end of the array. If the array is a
multidimensional array or an array within a
structure, the initializer was truncated to the
length of the array and a null byte was not added.
User Action Treat arrays of characters as strings allowing for
the null byte at the end of the array. The special
case of multidimensional arrays and arrays within
structures should be taken into account, especially
when you do not want the null byte to be truncated.
TYPECONFLICT
Message "****" conflicts with a previous data type in this
declaration; previous data type ignored.
Warning You specified more than one data-type specifier in
this declaration, and the indicated specifier
conflicted with a previous one.
User Action Check for a missing semicolon in the previous
declaration; otherwise, make sure that all specifiers
are compatible.
TYPEINLIST
Message The type of "****" was specified in the parameter
list. This declaration is ignored.
Warning The function definition uses the prototype format but
still contains a declaration of this parameter in the
parameter declaration section.
User Action Eliminate the redundant declaration.
UABORT
Message Compilation terminated by user.
Fatal The compilation was terminated by a DCL CTRL/C
command.
User Action None.
UNDECLARED
Message "****" is not declared within the scope of this
usage.
Error You referred to an undeclared variable. (You must
declare variables before you use them.)
User Action Check the spelling of the identifier, or add a
declaration for it, if appropriate.
UNDECLARED
Message "****" is not declared prior to this #pragma
preprocessor directive; directive ignored.
Warning This directive lists an identifier that has not yet
been declared. The entire directive has been ignored
by the compiler.
User Action Check the spelling of the identifier, or add a
declaration for it, if appropriate.
UNDEFIFMAC
Message "****" is not a currently defined macro; constant
zero assumed.
Informational The identifier in a constant expression in a #if or
#elif preprocessor directive was not currently
defined as a macro. The expression was evaluated as
if the identifier were a constant zero. This message
is only issued if you compile with /STANDARD=PORTABLE
on the CC command line.
User Action Define the identifier as a macro or remove the
reference to it.
UNDEFLABEL
Message Label "****" is undefined in this function.
Error You wrote "goto label-name" for an undefined label.
The scope of a label name is restricted to the
function in which it is used as a label; goto
statements cannot branch to labels inside other
functions.
User Action Check the spelling of the label name or make other
corrections as appropriate.
UNDEFMACRO
Message "****" is already undefined; line ignored.
Warning The specified identifier (in an #undef line) was
either never defined or else occurred in a previous
#undef.
User Action Remove the #undef, or, if applicable, appropriately
add the definition of the identifier.
UNDEFSTRUCT
Message "****" is a structure or union type that is not fully
defined at this point in the compilation.
Error You used a name in the context of a structure or
union tag, but the name is either undefined or is not
yet fully defined as a tag.
User Action Check the spelling of the name, and make sure that it
is fully defined as a tag before it is used.
UNEXPEND
Message Unexpected end-of-**** encountered in ****
preprocessor directive; directive ignored.
Warning The end of the directive or end of the source file
was encountered before the directive was completely
processed.
User Action Check for an incomplete comment within the
definition, or for a missing continuation of the
line.
UNEXPEOF
Message Unexpected end-of-file encountered in a ****.
Error The compiler encountered the end of the source file
while scanning for the end of a string constant or a
comment.
User Action Make sure that string constants and comments are
properly terminated.
UNEXPPDIRX
Message Unexpected **** preprocessor directive encountered;
directive ignored.
Warning The specified directive occurred out of place and was
ignored.
User Action Check the logic of all directives in the program to
be sure that it is valid.
UNKSIZEOF
Message Operand of sizeof has an unknown size; 0 assumed.
Warning The operand of a sizeof operator was an array whose
size was unknown at compile time. A size of 0 was
assumed.
User Action Change the declaration of the array to specify the
appropriate dimension bound.
UNRECCHAR
Message Unrecognized character ignored.
Warning The line contained either an entirely meaningless
character or one that appears out of its proper
context, for example. For example, a number sign (#)
that was not the first character on a line.
User Action Move or remove the character.
UNRECPRAGMA
Message Unrecognized #pragma preprocessor directive ignored.
Informational You have specified a #pragma preprocessor directive
that is not recognized by VAX C.
User Action Correct the syntactic or semantic error that rendered
the directive unrecognizable. Common errors include
misspelled parameters.
UNSUPPORTEDLCV
Message Loop decomposition inhibited due to unsupported loop
control variable.
Informational A function was inlined whose formal parameter was
used as a loop-control variable.
User Action Declare the loop-control variable to be the automatic
storage class.
UNSUPPORTEDOP
Message Variable "****" has an unsupported type which
inhibited loop decomposition at loop control variable
"****".
Informational A variable that is modified in the loop is of a type
not currently supported by VAX C decomposition
processing. This message is issued if you specified
the /PARALLEL qualifier on the CC command line.
User Action No action.
UNSUPPTYPE
Message The CDD description for "****" specifies a data type
not supported in C.
Informational The compiler could not represent the indicated item
in a VAX C construct. The compiler generated a
declaration of a structure whose length was the same
as the length of the unsupported data type.
User Action Change the CDD description to specify a supported
data type, if you require a precise representation in
VAX C.
VARNOTMEMBER
Message A variant aggregate must be a member of a struct or
union.
Error You attempted to specify a variant_struct or a
variant_union outside of an aggregate declaration.
User Action If you intend to use the structure or union as
declared, and if the structure or union is the
outermost aggregate in a group of nested aggregates,
replace the variant keywords with struct or union.
If you intend to use the structure or union as a
variant aggregate, and if the structure or union is
otherwise properly declared, nest the declaration
within a valid structure or union declaration. If
you used the variant_struct or variant_union keywords
in declarations other than structure or union
declarations, remove the variant keywords.
VOIDCALL
Message A "void" function cannot be invoked in a context
where a value is expected.
Error You coded a call to a function declared as void, but
the call appeared in a context where a return value
was expected.
User Action Move the function call to a different context, or if
the function does return a value, declare it to be
void.
VOIDEXPR
Message A "void" expression cannot be used in a context where
a value is expected.
Error You cast an expression to be void, but the expression
was used in a context where its value was required.
User Action Remove the cast, or move the expression to a context
that requires no value.
VOIDNOTFUNC
Message "****" is not declared to be a function; only
functions may be declared "void".
Error You declared an object other than a function to be
void.
User Action Check the syntax of the declarator. You may find the
output produced by the /SHOW=SYMBOLS CC command-line
qualifier to be helpful in diagnosing this problem.
VOIDRETURN
Message A "return" statement in a "void" function may not
specify a value; expression ignored.
Warning You specified a value in a return statement within a
function declared as void.
User Action Either remove the return value or redefine the
function as returning the appropriate data type.
Language topics
VAX C language topics
Additional information available:
BlockValid File SpecificationsData TypesDeclarationsFunctionsBuiltin Functions
Variable Length Argument ListsPreprocessorPredefined tokensStatements
Storage ClassesData type modifiersStorage class modifiers
Block
A block is a compound statement. It allows more than one statement
to appear where a single statement ordinarily is used. It is made
up of a list of declarations and statements, enclosed in braces:
{ [declaration ...] [statement ...] }
The declaration list is optional; if it is included, all
declarations of variables are local to the block and supersede
previous declarations for the duration of the block. Any auto or
register variables are initialized each time the block is entered
normally; the initializations do not occur if the block is entered
by a goto statement. Blocks can be used wherever single statements
are valid--for example, as the action clause of an if statement:
if ( i < 1 )
{ /* BEGINNING OF BLOCK */
char x;
for (x = 'a'; x <= 'z'; x++)
printf("char = %c\n", x);
} /* END OF BLOCK */
Valid File Specifications
Since the VAX C Run-time Library (RTL) includes functions from the
DEC/Shell RTL, all valid VMS file specifications and most UNIX*
system file specifications are acceptable. Combinations of the two
specifications are not supported by VAX C.
An example of a valid UNIX file specification is as follows:
beatle!/dba0/lennon/songs.lis.3
An example of an invalid file specification is as follows:
BEATLE::DBA0:[LENNON.C]/songs.lis.3
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
Data Types
The data type of an object must be specified in its declaration. The fundamental data types are the scalar types: int 32-bit signed integer unsigned 32-bit unsigned integer float single-precision floating-point number double double-precision floating-point number enum enumerated type char character The adjectives short and long can be used to specify the size of the object. For example, a short int is a 16-bit signed integer. A long int is the same as an int in VAX C. A long float is the same as a double. The unsigned keyword can also be used as an adjective. An unsigned short or unsigned char is a 16- or 8-bit unsigned integer, respectively.
Additional information available:
ArrayenumPointerStructuretypedefUnionVoid
Array
An array is an aggregate of subscripted elements of the same type.
Elements of an array can have one of the fundamental data types or
can be structures, unions, or other arrays (multidimensional
arrays). An array is declared using square brackets. The
following example declares array1 to be an array of 10 integers.
The valid subscripts for array1 range from 0 to 9.
int array1[10];
The next example declares array2 to be a two-dimensional (2 by 3)
array of integers:
int array2[2][3];
The elements are stored in row-major order as follows:
array2[0][0], array2[0][1], ... array2[1][2].
enum
Enumerated types are sets of scalar objects that have type names.
Variables are declared with enum-specifiers in the place of the
type specifier. The forms of enum-specifier are as follows:
enum { enumerator,... }
or
enum tag { enumerator,... }
or
enum tag
Each enumerator defines a constant of the enumerated type (tag).
The enumerator list forms an ordered list of the type's values.
Each enumerator has the form "identifier [= expression]", where the
"identifier" is the name to be used for the constant value and the
optional "expression" gives its integer equivalent. If a tag
appears but no list of enumerators, the enum-specifier refers to a
previous definition of the enumerated type, identified by the tag.
Pointer
A pointer in C is a variable that holds the address of another
variable. Pointers are declared with the asterisk operator as
follows:
int i, *ip, *np; /* i IS AN INTEGER, ip AND np ARE
POINTERS TO INTEGERS */
The following operations are permitted on pointers:
o Assigning an address to the pointer (as in ip = &i;)
o Fetching the object of the pointer (by dereferencing the
pointer) with the asterisk operator (i = *ip;, which assigns the
addressed integer to i)
o Adding (as in ip += 5;, which makes ip point to the object that
is five longwords away from the initial address in ip)
o Subtracting (as in i = np - ip;, which gives the number of
objects separating the objects pointed to by np and ip)
Structure
A structure is an aggregate of members whose data types can differ.
Members can be scalar variables, arrays, structures, unions, and
pointers to any object. The size of a structure is the sum of the
sizes of its members, which are stored in the order of their
declarations. Structures are defined with the keyword struct,
followed by an optional tag, followed by a structure-declaration
list in braces. The syntax is as follows:
struct [identifier] { struct-declaration ... }
Each struct-declaration is a type specifier (type keyword, struct
tag, union tag, enum tag, or typedef name) followed by a list of
member declarators. The syntax is as follows:
type-specifier member-declarator,... ;
Each member declarator defines either an ordinary variable or a bit
field. The syntax is as follows:
declarator
or
[declarator] : constant-expression
typedef
Use the typedef keyword to define an abbreviated name, or synonym,
for a lengthy type definition. Grammatically, typedef is a
storage-class specifier, so it can precede any valid declaration.
In such a declaration, the identifiers name types instead of
variables. For example:
typedef char CH, *CP, STRING[10], CF();
In the scope of this declaration, CH is a synonym for "character,"
CP for "pointer to character," STRING for "10-element array of
characters," and CF for "function returning a character." Each of
the type definitions can be used in that scope to declare
variables. For example:
CF c; /* c IS A FUNCTION RETURNING A CHARACTER */
STRING s; /* s IS A 10-CHARACTER STRING */
Union
A union is an aggregate of members whose data types can differ.
Members can be scalar variables, arrays, structures, unions, and
pointers to any object. The size of a union is the size of its
longest member; all its members occupy the same storage. Unions
are defined with the union keyword, followed by an optional tag,
followed by a union-declaration list in braces. The syntax is as
follows:
union [identifier] { union-declaration ... }
Each union-declaration is a type specifier (type keyword, struct
tag, union tag, enum tag, or typedef name) followed by a list of
member declarators. The syntax is as follows:
type-specifier member-declarator,... ;
Each member declarator defines either an ordinary variable or a bit
field. The syntax is as follows:
declarator
or
[declarator] : constant-expression
Void
You can use the void data type to declare functions that do not return a value. Functions declared to be of this type cannot contain return statements and cannot be used in statements where a return value is expected. The void data type can be used in the cast operation if casting to a "function without a return value ..." You can also use the void data type with pointers.
Declarations
Declarations specify the functions and variables referenced in a
program. Declarations in C have the following syntax:
declaration ::=
decl-specifier ... [init-declarator,...] ;
decl-specifier ::=
type-specifier [decl-specifier,...]
sc-specifier [decl-specifier,...]
dm-specifier [decl-specifier,...]
"decl-specifiers" give the data types and, optionally, storage
classes of the declared objects. "init-declarators" list the
declared identifiers and, optionally, their initial values.
For more information, see HELP CC lANGUAGE_TOPICS DATA_TYPES, HELP
CC LANGUAGE_TOPICS STORAGE_CLASSES, and HELP CC LANGUAGE_TOPICS
DATA_TYPE_MODIFIERS.
Additional information available:
Interpretation
The symbols used in declarations are VAX C operators, subject to
the usual rules of precedence and associativity. These operators
are parentheses, brackets, and asterisks for "function
returning...", "array of...", and "pointer to...", respectively.
Parentheses and brackets associate left to right; asterisk
operators associate right to left. Parentheses and brackets have
the same precedence, which is higher than that of asterisks.
Parentheses are also used to change the associativity of the other
operators. For example:
char * ( *x() ) [];
* ( *x() ) [] is char
( *x() ) [] is (pointer to) char
*x() is (array of) (pointer to) char
x() is (pointer to) (array of) (pointer to)
char
x is (function returning) (pointer to)
(array of) (pointer to) char
In this sort of breakdown, lower precedence operators are removed
first. With two equal precedence operators, you remove the
rightmost if they are left-to-right operators, and the leftmost if
they are right-to-left operators. For example, "[]()" means "array
of functions returning...."
Functions
Functions consist of one or more blocks of statements that perform
one logical operation. They can be called from other functions
either in the same program or in different programs. A function
may exchange values with the calling function by use of parameters.
Function declarations have the following syntax:
function_name()
or
function_name(arg1,arg2,...)
or
function_name(data-type arg1, data-type arg2,...)
In the first form of the function declaration, the function takes
no arguments. In the second form, the function takes arguments.
In the third form, the function declaration is a function prototype
that specifies the data type of its arguments in the identifier
list. In all three cases, the parenthesis after the function name
are required.
VAX C provides a library of common functions. These functions
perform standard I/O operations, character and string handling,
mathematical operations, miscellaneous system services, and UNIX*
system emulation.
For more information, see HELP CC RUN-TIME_FUNCTIONS.
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
Builtin Functions
Built-in functions allow you to directly access the VAX hardware
and machine instructions to perform operations that are cumbersome,
slow, or impossible in pure C.
These functions are very efficient because they are built into the
VAX C compiler. This means a call to one of these functions does
not result in a reference to a function in the C run-time library
or in the user's program. Instead, the compiler generates the
machine instructions necessary to carry out the function directly
at the call site. Because most of these built-in functions closely
correspond to single VAX machine instructions, the result is small,
fast code.
Some of these functions (such as those that operate on strings or
bits) are of general interest. Others (such as the functions
dealing with process context) are of interest if you are writing
device drivers or other privileged software. Some of the functions
are privileged and unavailable to user mode programs.
The following pragma must occur in the source file before you can
use a built-in function:
#pragma builtins
Some of the built-in functions have optional arguments or allow a
particular argument to have one of many different types. To
describe the different legal combinations of arguments, the
description of each built-in function may list several different
prototypes for the function. As long as a call to a built-in
function matches one of the prototypes listed, the call is legal.
Furthermore, any legal call to a built-in function acts as if the
corresponding prototype was in scope, so the compiler performs the
argument checking and argument conversions specified by that
prototype.
The majority of the built-in functions are named after the VAX
instruction that they generate. For more information on these
built-in functions, see the documentation on the corresponding
machine instruction. In particular, see that reference for the
structure of queue entries manipulated by the queue built-in
functions.
Additional information available:
Add Aligned Word InterlockedBranch on Bit Clear-Clear InterlockedBranch on Bit Set-Set Interlocked
Find First Clear BitFind First Set BitHaltInsert Entry into Queue at Head Interlocked
Insert Entry into Queue at Tail InterlockedInsert Entry in QueueLoad Process Context
Locate CharacterMove from Processor RegisterMove Character 3 Operand
Move Character 5 OperandMove from Processor Status LongwordMove to Processor Register
Probe Read AccessibilityProbe Write AccessibilityRead General-Purpose Register
Remove Entry from Queue at Head InterlockedRemove Entry from Queue at Tail Interlocked
Remove Entry from QueueScan CharactersSimple ReadSimple WriteSkip Character
Span CharactersSave Process ContextWrite General Purpose Register
Add Aligned Word Interlocked
The _ADAWI function adds its source operand to the destination.
This operation is interlocked against similar operations by other
processors or devices in the system.
Syntax:
int _ADAWI(short src, short *dest);
int _ADAWI(short src, unsigned short *dest);
Branch on Bit Clear-Clear Interlocked
The _BBCCI function performs the following functions in interlocked
fashion:
o Returns the complement of the bit specified by the two
arguments
o Clears the bit specified by the two arguments
Syntax:
int _BBCCI(int position, void *address);
Branch on Bit Set-Set Interlocked
The _BBSSI function performs the following functions in interlocked
fashion:
o Returns the status of the bit specified by the two arguments
o Sets the bit specified by the two arguments
Syntax:
int _BBSSI(int position, void *address);
Find First Clear Bit
The _FFC function finds the position of the first clear bit in a
field. The bits are tested for clear status starting at bit 0 and
extending to highest bit in the field.
Syntax:
int _FFC(int start, char size, const void *base, int
*position);
Find First Set Bit
The _FFS function finds the position of the first set bit in a
field. The bits are tested for set status starting at bit 0 and
extending to the highest bit in the field.
Syntax:
int _FFS(int start, char size, const void *base, int
*position);
Halt
The _HALT function halts the processor when executed by a process
running in kernel mode. This is a privileged function.
Syntax:
void _HALT(void);
Insert Entry into Queue at Head Interlocked
The _INSQHI function inserts an entry into the front of a queue in
an indivisible manner. This operation is interlocked against
similar operations by other processors or devices in the system.
Syntax:
int _INSQHI(void *new_entry, void *head);
Insert Entry into Queue at Tail Interlocked
The _INSQTI function inserts an entry at the end of a queue in an
indivisible manner. This operation is interlocked against similar
operations by other processors or devices in the system.
Syntax:
int _INSQTI(void *new_entry, void *head);
Insert Entry in Queue
The _INSQUE function inserts a new entry into a queue following an
existing entry.
Syntax:
int _INSQUE(void *new_entry, void *predecessor);
Load Process Context
The _LDPCTX function restores the register and memory management
context. This is a privileged function.
Syntax:
void _LDPCTX(void);
Locate Character
The _LOCC function locates the first character in a string matching
the target character.
Syntax:
int _LOCC(char target, short length, const char *string);
int _LOCC(char target, short length, const char *string, char
**position);
Move from Processor Register
The _MFPR function returns the contents of a processor register.
This is a privileged function.
Syntax:
void _MFPR(int register_num, int *destination);
void _MFPR(int register_num, unsigned int *destination);
Move Character 3 Operand
The _MOVC3 function copies a block of memory. It is the preferred
way to copy a block of memory to a new location.
Syntax:
void _MOVC3(short length, const char *src, char *dest);
void _MOVC3(short length, const char *src, char *dest, char
**endsrc);
void _MOVC3(short length, const char *src, char *dest, char
**endsrc,
char **enddest);
Move Character 5 Operand
The _MOVC5 function allows the source string specified by the
pointer and length pair to be moved to the destination string
specified by the other pointer and length pair. If the source
string is smaller than the destination string, the destination
string is padded with the specified character.
Syntax:
void _MOVC5(short srclen, const char *src, char fill, short
destlen, char *dest);
void _MOVC5(short srclen, const char *src, char fill, short
destlen, char *dest, short *unmoved_src);
void _MOVC5(short srclen, const char *src, char fill, short
destlen, char *dest, short *unmoved_src, char **endsrc);
void _MOVC5(short srclen, const char *src, char fill, short
destlen, char *dest, short *unmoved_src, char **endsrc, char
**enddest);
Move from Processor Status Longword
The _MOVPSL function stores the value of the Processor Status
Longword (PSL).
Syntax:
void _MOVPSL(int *psl);
void _MOVPSL(unsigned int *psl);
Move to Processor Register
The _MTPR function loads a value into one of the special processor
registers. It is a privileged function.
Syntax:
int _MTPR(int src, int register_num);
Probe Read Accessibility
The _PROBER function checks to see if you can read the first and
last byte of the given address and length pair.
Syntax:
int _PROBER(char mode, short length, const void *address);
Probe Write Accessibility
The _PROBEW function checks the write accessibility of the first
and last byte of the given address and length pair.
Syntax:
int _PROBEW(char mode, short length, const void *address);
Read General-Purpose Register
The _READ_GPR function returns the value of a general-purpose
register.
Syntax:
int _READ_GPR(int register_number);
Remove Entry from Queue at Head Interlocked
The _REMQHI function removes the first entry from the queue in an
in an indivisible manner. This operation is interlocked against
similar operations by other processors or devices in the system.
Syntax:
int _REMQHI(void *head, void **removed_entry);
Remove Entry from Queue at Tail Interlocked
The _REMQTI function removes the last entry from the queue in an
indivisible manner. This operation is interlocked against similar
operations by other processors or devices in the system.
Syntax:
int _REMQTI(void *head, void **removed_entry);
Remove Entry from Queue
The _REMQUE function removes an entry from a queue.
Syntax:
int _REMQUE(void *entry, void **removed_entry);
Scan Characters
The _SCANC function locates the first character in a string with
the desired attributes. The attributes are specified through a
table and a mask.
Syntax:
int _SCANC(short length, const char *string, const char
*table, char mask);
int _SCANC(short length, const char *string, const char
*table, char mask,
char **match);
Simple Read
The _SIMPLE_READ function reads I/O registers or shared memory. It
causes a MOVB, MOVW, or MOVL instruction to be generated that
cannot be moved or modified during optimization.
Syntax:
char _SIMPLE_READ(const char *source);
short _SIMPLE_READ(const short *source);
int _SIMPLE_READ(const int *source);
long _SIMPLE_READ(const long *source);
Simple Write
The _SIMPLE_WRITE function writes to I/O registers or shared
memory. It causes a MOVB, MOVW, or MOVL instruction to be
generated that cannot be moved or modified during optimization.
Syntax:
void _SIMPLE_WRITE(char value, char *dest);
void _SIMPLE_WRITE(short value, short *dest);
void _SIMPLE_WRITE(int value, int *dest);
void _SIMPLE_WRITE(long value, long *dest);
Skip Character
The _SKPC function locates the first character in a string that
does not match the target character.
Syntax:
int _SKPC(char target, short length, const char *string);
int _SKPC(char target, short length, const char *string, char
**position);
Span Characters
The _SPANC function locates the first character in a string without
certain attributes. The attributes are specified through a table
and a mask.
Syntax:
int _SPANC(short length, const char *string, const char
*table, char mask);
int _SPANC(short length, const char *string, const char
*table, char mask, char **position);
Save Process Context
The _SVPCTX function saves the context of a process. The
general-purpose registers are saved in the process control block
which is later used to resume a process. This function is
privileged.
Syntax:
void _SVPCTX(void);
Write General Purpose Register
The _WRITE_GPR function loads a value into a specified
general-purpose register.
Syntax:
void _WRITE_GPR(int value, int register_number);
Variable Length Argument Lists
The set of functions defined and declared in the varargs definition
module provide a portable method of accessing variable length
argument lists.
The function header va_alist, the definition va_dcl, and the type
va_list are used to declare the argument list and the variable that
is used to traverse the list.
o The header va_alist is a parameter in the function definition.
o The definition va_dcl declares the parameter va_alist (va_dcl
is a definition that is not terminated with a semicolon (;)).
o The type va_list declares the variable used to traverse the
list. You must declare at least one incrementing variable of
type va_list when using varargs.
The syntax of these headers and declarations is as follows:
function_name(va_alist);
va_dcl
va_list list_incrementor;
There are five RTL macros used to manipulate variable length
argument lists. To use them, you must include the varargs
definition module. The five functions are as follows:
va_start The va_start macro initializes the variable
list_incrementor to the beginning of the argument list.
For more information, see HELP CC RUN-TIME_FUNCTIONS
VA_START.
va_start_1 The va_start_1 macro initializes the variable
list_incrementor to the beginning of the argument list
if there are other arguments that precede the variable
length argument list. For more information, see HELP CC
RUN-TIME_FUNCTIONS VA_START_1.
va_arg The va_arg macro returns the next item in the argument
list. The function must determine the type of the
returned item. For more information, see HELP CC
RUN-TIME_FUNCTIONS VA_ARG.
va_count The va_count macro returns the number of longwords
contained in the argument list. The function is
responsible for knowing whether or not a single argument
is larger than a single longword. For more information,
see HELP CC RUN-TIME_FUNCTIONS VA_COUNT.
va_end The va_end macro terminates the varargs session. You
may traverse an argument list more than once. For more
information, see HELP CC RUN-TIME_FUNCTIONS VA_END.
Preprocessor
The VAX C preprocessor uses directives to affect the compilation of a source file. In VAX C, these directives are processed by an early phase of the compiler, not by a separate program. The preprocessor directives begin with a number sign (#) and do not end with a semicolon. The number sign must appear in the first column of the source line.
Additional information available:
Conditional Compilation#define#dictionary#include#line#module
#pragma#undef
Conditional Compilation
Conditional compilation is provided by the following directives:
#if constant-expression
Checks whether the constant expression is nonzero (true)
#ifdef identifier
Checks whether the identifier is defined
#ifndef identifier
Checks whether the identifier is undefined
#else
Introduces source lines to be compiled as an alternative to the
conditions tested by the previous directives
#elif constant-expression
Delimits alternative source lines to be compiled if the constant
expression in the corresponding #if, #ifdef, or #ifndef
directive is false and if the additional constant expression
presented in the #elif directive is true. An #elif directive is
optional.
#endif
Ends the scope of the previous directives
If the condition checked by #if, #ifdef, or #ifndef is true, then
all lines between the #else, #elif, and #endif are ignored. If the
condition is false, then any lines between the conditional
directive and the #else or #elif (if any) are ignored. If there is
no #else, then the lines between the conditional and the #endif are
ignored.
#define
The #define preprocessor directive has the form:
#define identifier token-string
The preprocessor substitutes the token string everywhere in the
program that it finds the identifier except within comments,
character constants, or string constants.
Macro replacements are defined in a #define directive of the
following form:
#define name([parm1[,parm2,...]]) token-string
Within the program, all macro references that have the following
form are replaced by the token string. The arguments in the macro
reference replace the corresponding parameters in the token string.
name([arg1[,arg2,...]])
#dictionary
The #dictionary directive extracts Common Data Dictionary (CDD)
definitions from the specified dictionary. These definitions are
then translated into VAX C and included in the program.
The #dictionary directive has the following form:
#dictionary "cdd_path"
The cdd_path is a character string that gives the path name of the
CDD record. It can also be a macro that resolves to such a
character string.
#include
The #include directive instructs the preprocessor to insert the
contents of the specified file or module into the program. An
#include directive can have one of three forms as follows:
#include "filespec"
#include <filespec>
#include module-name
Each form is interpreted differently by the compiler. For the
quoted form, the order of search is as follows:
1. The directory containing the source file
2. The directories specified in the /INCLUDE qualifier (if any)
3. The directory or search list of directories specified in the
logical name C$INCLUDE (if any)
For the bracketed form, the order of search is as follows:
1. The directories specified in the /INCLUDE qualifier (if any)
2. The directory or search list of directories specified in the
logical name VAXC$INCLUDE (if any)
3. If VAXC$INCLUDE is not defined, then the directory or search
list of directories specified by SYS$LIBRARY
In the first two forms, .H is the default file type.
There is no defined limit to the nesting level of #include files
and modules.
#line
The #line directive applies a specified line number and file
specification to the next line of source text. This can be useful
for diagnostic messages. The #line directive has the following
forms:
#line constant identifier
#line constant string
# constant identifier
# constant string
The constant gives the line number to be applied to the next line
of source text in diagnostics reported to the terminal, not to the
compiler listing file. It must be a nonsigned integer. The second
argument supplies the file specification. It can be either a VAX C
identifier or a character-string constant (not to exceed 255
characters).
#module
The #module directive passes information about an object module to
the compiler.
The #module directive can have one of three forms as follows:
#module identifier
#module identifier identifier
#module identifier string
The first argument of the directive is a VAX C identifier or macro
that resolves to an identifier. It gives the system-recognized
(for example, internally recognized by the debugger and the
librarian) name of the module; the object file name remains the
same. The second argument specifies the optional identification
that appears on listings. This may be either a VAX C identifier, a
character-string constant with no more than 31 characters, or a
macro that resolves to one of these.
There can be only one #module directive per compilation. It can
appear anywhere before the VAX C language text.
#pragma
The #pragma directive performs compiler-specific tasks as
designated by each particular implementation of the C language.
The forms of this pragma are as follows:
#pragma [no]builtins
Enables the VAX C built-in functions that directly access VAX
instructions. If the pragma does not appear in your program,
[no]builtins is the default.
#pragma ignore_dependency(id,id,...)
Specifies to the compiler that a variable that appears to be
in conflict is safe to decompose.
#pragma [no]member_alignment
Tells VAX C to align structure members on the next boundary
appropriate to the type of the member rather than the next byte.
For example, a long variable is aligned on the next longword
boundary; a short variable on the next word boundary.
#pragma safe_call (id,...)
Tells VAX C that a function does not contain any dependencies
so it is safe to decompose.
#pragma sequential_loop
Tells VAX C not to decompose the specified loop.
#pragma standard
Tells VAX C to ignore the current setting of the
/STANDARD=PORTABLE qualifier until the #pragma nostandard directive
is encountered. The number of #pragma standard and #pragma
nostandard directives in the compiled program (and in all included
files) must be the same.
#undef
The #undef directive cancels a previously defined macro
replacement. Any other macro replacements that occurred prior to
the #undef directive remain.
The #undef directive has the following syntax:
#undef identifier
Predefined tokens
The VAX C compiler has predefined tokens and macros for use in programs.
Additional information available:
VAXVAXCVAX11C__DATE____FILE____LINE____TIME__
vaxvmsvaxcvax11cCC$gfloatCC$parallel
vax
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
VAX
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
vms
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
vaxc
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
VAXC
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
vax11c
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
VAX11C
This symbol is defined as the constant 1 and may be used in #elif, #if, #ifdef, and #ifndef directives to separate portable and nonportable code in any of your VAX C programs.
CC$gfloat
The CC$gfloat definition may be used if you compile your VAX C program using the /G_FLOAT qualifier. If you specify the /G_FLOAT qualifier, CC$gfloat is defined as 1. You can also use this definition if you did not compile your VAX C program using the /G_FLOAT qualifier. When you do not specify the /G_FLOAT qualifier, CC$gfloat is defined as 0.
CC$parallel
The CC$parallel definition may be used if you compile your VAX C program using the /PARALLEL qualifier. If you specify the /PARALLEL qualifier, CC$parallel is defined as 1. You can also use this definition if you did not compile your VAX C program using the /PARALLEL qualifier. When you do not specify the /PARALLEL qualifier, CC$parallel is defined as zero.
__DATE__
The __DATE__ macro evaluates to a string specifying the date on which the compilation started. The string presents the date in the form dd-mmm-yyyy.
__FILE__
The __FILE__ macro evaluates to a string specifying the file specification of the current source file.
__LINE__
The __LINE__ macro evaluates to an integer specifying the number of the line in the source file containing the macro reference.
__TIME__
The __TIME__ macro evaluates to a string specifying the time at which the compilation started. The string presents the time in the form hh:mm:ss.
Statements
Statements are the executable instructions performed by the program. Statements produce values and control program flow. A group of statements enclosed in braces makes up a block. Any valid expression or declaration terminated by a semicolon is considered a statement. The statements that control program flow are described in further HELP frames. See also HELP CC LANGUAGE_TOPICS DECLARATION and HELP CC LANGUAGE_TOPICS PREPROCESSOR.
Additional information available:
breakcontinuedoforgotoifLabeled
Nullreturnswitchwhile
break
The break statement terminates the immediately enclosing while, do,
for, or switch statement. Control passes to the statement
following the terminated statement. The break statement has the
following syntax:
break ;
continue
The continue statement passes control to the test portion of the
immediately enclosing while, do, or for statement. It has the
following syntax:
continue ;
In each of the following statements, a continue statement is
equivalent to "goto label;":
while (expression) { statement ... label: ; }
do { statement ... label: ; } while (expression);
for (expression; expression; expression)
{ statement ... label: ; }
The continue statement is not intended for switches. A continue
statement inside a switch statement inside a loop causes
reiteration of the loop.
do
The do statement executes a statement one or more times, as long as
a stated condition expression is true. The syntax is as follows:
do statement while ( expression ) ;
The do statement is executed at least once. The expression is
evaluated after each execution of the statement. If the expression
is not zero, the statement is executed again. The statement
following the do statement (the body of the do statement) is not
optional; the null statement (a lone semicolon) is provided for
specifying a do statement with an empty body.
for
The for statement executes a statement zero or more times, with
three specified control expressions. Expression-1 is evaluated
only once, before the first iteration; expression-2 is evaluated
before every iteration; expression-3 is evaluated after every
iteration. The for loop terminates if, on evaluation, expression-2
is 0. The format of the for statement is as follows:
for ( [expression-1] ; [expression-2] ; [expression-3] )
statement
The for statement is equivalent to the following format:
expression-1;
while ( expression-2 ) { statement expression-3; }
You can omit any of the three expressions. If expression-2 is
omitted, the while condition is true.
goto
The goto statement transfers control unconditionally to a labeled
statement. This statement has the following syntax:
goto identifier ;
The identifier must be a label located in the current function.
You may use goto to branch into a block, but no initializations are
performed on variables declared in the block.
if
The if statement is a conditional statement. It can be written
with or without an else clause as follows:
if ( expression ) statement
if ( expression ) statement else statement
In both cases, the expression is evaluated, and if it is not 0, the
first statement is executed. If the else clause is included and
the expression is 0, the statement following else is executed
instead. In a series of if-else clauses, the else matches the most
recent else-less if.
Labeled
Any statement can be preceded by a label prefix of the following
form:
identifier:
This declares the identifier as a label. The scope of such a
declaration is the current function. Labels are used only as the
targets of goto statements.
Null
A null statement is a semicolon:
;
The null statement provides a null action -- for example, the body
of a for loop that takes no action:
for(i=0; i < ARRAYSIZE && x[i] == 5; i++)
;
return
The return statement causes a return from a function, with or
without a return value. This statement has the following syntax:
return ;
return expression ;
The return value is undefined if not specified in a return
statement. If an expression is specified in the return statement,
it is evaluated and the value is returned to the calling function;
the value is converted, if necessary, to the type with which the
called function was declared. If a function does not have a return
statement, the effect (on reaching the end of the function) is the
same as with a return statement that does not specify an
expression. Functions declared as void may not contain return
statements specifying an expression.
switch
The switch statement executes one or more of a series of cases,
based on the value of an integer expression. This statement has
the following syntax:
switch ( expression ) body
The switch's body typically is a block, within which any statement
can be prefixed with one or more case labels as follows:
case constant-expression :
At most one statement in the body may have the label as follows:
default :
The switch expression is evaluated and compared to the cases. If
there is a case matching the expression's value, it is executed; if
not, the default case is executed. The switch is normally
terminated by a break, return, or goto statement in one of the
cases. If there is no matching case and no default, the body of
the switch statement is skipped.
while
The while statement executes a statement 0 or more times, as long
as a stated condition is true. This statement has the following
syntax:
while ( expression ) statement
The expression is evaluated before each execution, and the
statement is executed if the expression is not 0. The statement
following the parentheses (the body of the while statement) is not
optional; the null statement (a lone semicolon) is provided for
specifying a while statement with an empty body.
Storage Classes
The storage class of a variable determines when its storage is allocated, whether its contents are preserved across different blocks or functions, and what link-time scope the variable has. Auto variables are allocated at run time. They are not preserved across functions. Auto is the default storage class for variables declared within a function. Extern variables are allocated at compile time. They are preserved across functions. There can be only 65,532 extern variables per program. Extern is the default storage class for variables declared outside a function. Globaldef, globalref, and globalvalue variables are allocated at compile time. They are preserved across functions. The number of global symbols is unlimited. Register variables are allocated at run time. They cannot be referenced from other separately compiled functions. Static variables are allocated at compile time. If externally declared, they retain their values across functions. If internally declared (inside of a function), they cannot be referenced from other functions; if control passes from the defining function, to other functions, and then passed back to the defining function, the variable retains its previous value and is not reinitialized.
Data type modifiers
Data-type modifiers affect the allocation or access of data storage. The data-type modifiers are const and volatile.
Additional information available:
const
The const data-type modifier restricts access to stored data. If
you declare an object to be of type const, you cannot modify that
object. The const data-type modifier can be used with the
data-type modifier volatile or with any of the storage-class
specifiers or modifiers. The following example declares the
variable x to be a constant integer:
int const x;
volatile
The volatile data-type modifier prevents an object from being stored in a machine register, forcing it to be allocated in memory. This data type modifier is useful for declaring data that is to be accessed asynchronously. A device driver application often uses volatile data storage. Like const, you can specify the volatile data-type modifier with any of the storage-class specifiers or modifiers with the exception of the register storage class.
Storage class modifiers
The storage-class modifiers allow individual attributes of a
variable to change without changing the other default attributes
connected with a given storage class. Storage-class keywords and
storage-class modifiers can be specified in either order. The
syntax is as follows:
modifier storage_class_keyword identifier;
The modifiers can be used alone; in this case, the default storage
class is extern.
Additional information available:
noshare
Noshare variables are assigned the PSECT attribute NOSHR. Noshare
variables may not be shared between processes. This modifier is
used when linking variables that are not to be shared within a
shareable image. The noshare modifier can be used with the
storage-class keywords static, [extern], globaldef, and
globaldef{"name"}.
readonly
Readonly variables are assigned the PSECT attribute NOWRT and are
stored in the PSECT $CODE, which is a nonwriteable data area.
Other programs can access the PSECT directly, but none of the
information can be overwritten. The readonly modifier can be used
with the storage-class keywords [extern], static, globaldef, and
globaldef{"name"}.
You can use both the readonly and noshare modifiers with the
[extern] and the globaldef{"name"} specifiers. If you use both
modifiers with either the static or the globaldef specifiers, the
compiler ignores noshare and accepts readonly.
align
The _align modifier allows you to align objects of any of the VAX C data types on a specified storage boundary. You use the _align modifier in a data declaration or defintion. When specifying the boundary of the data alignment, you can use a predefined constant. VAX C predefined alignment constants include BYTE or byte, WORD or word, LONGWORD or longword, QUADWORD or quadword, OCTAWORD or octaword, and PAGE or page. You can also specify an integer value that is a power of two. The power of two tells VAX C the number of bytes to pad in order to align the data.
Link libraries
You are to define the logicals LNK$LIBRARY_n as the libraries
SYS$LIBRARY:VAXCCURSE, SYS$LIBRARY:VAXCRTLG, and
SYS$LIBRARY:VAXCRTL. Depending on the needs of your program, you
may have to access one, two, or all three libraries. In any case,
you must adhere to the following rules for defining libraries for
the linker to search:
o If you do not need to use the Curses Screen Management package
of VAX C RTL functions and macros, and you do not use the
/G_FLOAT qualifier on the CC command line, you must define the
logical as follows:
$ DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCRTL
o If you plan to use the /G_FLOAT qualifier with the CC command
line, but do not plan on using Curses, you must define the
logicals as follows:
$ DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCRTLG
$ DEFINE LNK$LIBRARY_1 SYS$LIBRARY:VAXCRTL
o If you plan to use the Curses Screen Management package, but do
not plan to use the /G_FLOAT qualifier, you must define the
logicals as follows:
$ DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCCURSE
$ DEFINE LNK$LIBRARY_1 SYS$LIBRARY:VAXCRTL
o Finally, if you plan to use both Curses and the /G_FLOAT
qualifier, you must define the three logicals in the following
order:
$ DEFINE LNK$LIBRARY SYS$LIBRARY:VAXCCURSE
$ DEFINE LNK$LIBRARY_1 SYS$LIBRARY:VAXCRTLG
$ DEFINE LNK$LIBRARY_2 SYS$LIBRARY:VAXCRTL
Do not use search lists to define the equivalence names for
LNK$LIBRARY_n. The linker will not resolve external references to
the VAX C RTL functions in the proper manner.
Using the object code of the VAX C RTL functions is one of two
options. You can also use the VAX C RTL as a shared image to
reduce the space your program's image takes on disk and to increase
its execution rate. For more information about the shared-image
option, see the VAX C Run-Time Library Reference Manual.
Run-time functions
In the Curses Screen Management Package, there are pairs of
functions and macros with equivalent functionality. Many Curses
functions and macros are expressed as follows:
[w]addch
[no]echo
The descriptions of the addch macro and the waddch function are
found under the heading, [w]addch. The descriptions of the macros
echo and noecho are found under the heading, [no]echo. For more
information about Curses Screen management functions and macros,
see HELP CC RUN-TIME_FUNCTIONS CURSES and HELP CC LINK_LIBRARIES.
All other VAX C Run-time Library functions are listed under
separate headings.
Additional information available:
VAXC$CALLOC_OPTVAXC$CFREE_OPTVAXC$CRT_INITVAXC$ESTABLISH
VAXC$FREE_OPTVAXC$MALLOC_OPTVAXC$REALLOC_OPT
abortabsaccessacos[w]addch[w]addstralarm
asctimeasinassertatanatan2atexitatof
atoiatolboxbrkbsearchcabscalloc
ceilcfreechdirchmodchown[w]clearclearerr
clearokclockclose[w]clrattr[w]clrtobot[w]clrtoeolcos
coshcreat[no]crmodectermidctimeCursescuserid
[w]delchdelete[w]deletelndelwindifftimedivdup
dup2[no]echoecvtendwin[w]eraseexeclexecle
execlpexecvexecveexecvpexit, exitexpfabs
fclosefcvtfdopenfeofferrorfflushfgetc
fgetnamefgetposfgetsfilenofloorfmodfopen
fprintffputcfputsfreadfreefreopenfrexp
fscanffseekfsetposfstatftellftimefwrite
gcvtgetc[w]getchgetchargetcwdgetegidgetenv
geteuidgetgidgetnamegetpidgetppidgets[w]getstr
getuidgetwgetyxgmtimegsignalhypot[w]inch
initscr[w]insch[w]insertln[w]insstrisalnumisalphaisapipe
isasciiisattyiscntrlisdigitisgraphislowerisprint
ispunctisspaceisupperisxdigitkilllabsldexp
ldivleaveoklocaltimeloglog10longjmplongname
lseekmallocmemchrmemcmpmemcpymemmovememset
mkdirmktempmodf[w]movemv[w]addchmv[w]addstrmvcur
mv[w]delchmv[w]getchmv[w]getstrmv[w]inchmv[w]inschmv[w]insstrmvwin
newwinnice[no]nlopenoverlayoverwritepause
perrorpipepowprintf[w]printwputcputchar
putsputwqsortraiserand[no]rawread
realloc[w]refreshremoverenamerewindsbrkscanf
[w]scanwscrollscrollok[w]setattrsetbufsetgidsetjmp
setuidsetvbufsigblocksignalsigpausesigsetmasksigstack
sigvecsinsinhsleepsprintfsqrtsrand
sscanfssignal[w]standend[w]standoutstatstrcatstrchr
strcmpstrcpystrcspnstrerrorstrlenstrncatstrncmp
strncpystrpbrkstrrchrstrspnstrstrstrtodstrtok
strtolstrtoulstrspnsubwinsystemtantanh
timetimestmpfiletmpnamtoasciitolower, tolower
touchwintoupper, toupperttynameumaskungetcva arg
va countva endva startva start 1vforkvprintf, vfprintf, vsprintf
waitwrapokwrite
abort
Terminates the process.
Syntax:
#include stdlib
void abort(void);
abs
Returns the absolute value of an integer.
Syntax:
#include stdlib
int abs(int integer);
access
Checks a file to see if a specified access mode is allowed.
Syntax:
#include stdio
int access(char *name, int mode);
acos
Returns a value in the range 0 to pi, which is the arc cosine of
the radian argument.
Syntax:
#include math
double acos(double x);
[w]addch
Curses Screen Management function and macro that add the character
ch to the window at the current position of the cursor.
Syntax:
#include curses
addch(char ch)
int waddch(WINDOW *win, char ch);
[w]addstr
Curses Screen management function and macro that add the string
pointed to by str to the window at the current position of the
cursor.
Syntax:
#include curses
addstr(char *str)
int waddstr(WINDOW *win, char *str);
alarm
Sends the signal SIGALRM to the invoking process after the number
of seconds indicated by its argument has elapsed.
Syntax:
#include signal
int alarm(unsigned int seconds);
asctime
Converts a broken-down time into a 26-character string in the
following form:
Sun Sep 16 01:03:52 1984\n\0
All fields have a constant width.
Syntax:
#include time
char *asctime (const tm_t, *timeptr);
asin
Returns a value in the range -pi/2 to pi/2, which is the arc sine
of its radian argument.
Syntax:
#include math
double asin(double x);
assert
Puts diagnostics into programs.
Syntax:
#include assert
void assert (int expression);
atan
Returns a value in the range -pi/2 to pi/2, which is the arc
tangent of its radian argument.
Syntax:
#include math
double atan(double x);
atan2
Returns a value in the range -pi to pi, which is the arc tangent of
x/y, where x and y are the two arguments.
Syntax:
#include math
double atan2(double x, double y);
atexit
Registers a function that is called without arguments at program
termination.
Syntax:
#include stdlib
int atexit (void (*func) (void));
atof
Converts an ASCII string to a numeric value. The ASCII string has
the following form:
[white-spaces][+|-]digits[.digits][e|E[+|-]integer]
The first unrecognized character ends the conversion.
The string is interpreted by the same rules that are used to
interpret floating constants.
Syntax:
#include stdlib
double atof(const char *nptr);
atoi
Converts strings of ASCII characters to the appropriate numeric
values. The ASCII string has the following form:
[white-spaces][+|-]digits
This function does not account for overflow resulting from the
conversion.
atoi is the same as atol in VAX C.
Syntax:
#include stdlib
int atoi(const char *nptr);
atol
Converts strings of ASCII characters to the appropriate numeric
values. The ASCII string has the following form:
[white-spaces][+|-]digits
The function does not account for overflow resulting from the
conversion.
atol is the same as atoi in VAX C.
Syntax:
#include stdlib
long int atol(const char *nptr);
box
Curses Screen Management function that draws a box around the
window using the character vert as the character for drawing the
vertical lines of the rectangle, and hor for drawing the horizontal
lines of the rectangle.
Syntax:
#include curses
box(WINDOW *win, char vert, char hor);
brk
Determines the lowest virtual address that is not used with the
program.
Syntax:
#include stdlib
void *brk(unsigned long int addr);
bsearch
Performs a binary search. It searches an array of sorted objects
for a specified object.
Syntax:
#include stdlib
void *bsearch (const void *key,
const void *base,
size_t nmemb,
size_t size,
int (*compar) (const void *, const void *));
cabs
Computes the Euclidean distance between two points as the square
root of their respective squares. This function returns sqrt(x*x +
y*y).
Syntax:
#include math
double cabs(cabs_t z);
calloc
Allocates an area of memory.
Syntax:
#include stdlib
void *calloc(size_t number, size_t size);
ceil
Returns (as a double) the smallest integer that is greater than or
equal to its argument.
Syntax:
#include math
double ceil(double x);
cfree
Makes available for reallocation the area allocated by a previous
calloc, malloc, or realloc call.
Syntax:
#include stdlib
void cfree(char *pointer);
chdir
Changes the default directory.
Syntax:
#include stdlib
int chdir(char *name);
chmod
Changes the file protection of a file.
Syntax:
#include stdlib
int chmod(char *name, unsigned int mode);
chown
Changes the owner UIC of a file.
Syntax:
#include stdlib
int chown(char *name, unsigned int owner, unsigned int group);
[w]clear
Curses Screen Management function and macro that erase the contents
of the specified window and reset the cursor to coordinates (0,0).
The clear macro acts on the stdscr window.
Syntax:
#include curses
clear()
int wclear(WINDOW *win);
clearerr
Resets the error and end-of-file indicators for a file (so that
ferror and feof will not return a nonzero value).
Syntax:
#include stdio
void clearerr(FILE *file_pointer);
clearok
Sets the clear flag for the window.
Syntax:
#include curses
#define bool int
clearok(WINDOW *win, bool boolf);
clock
Determines the amount of CPU time (in 10-millisecond units) used
since the beginning of program execution. The time reported is the
sum of the user and system times of the calling process and any
terminated child processes for which the calling process has
executed wait or system.
Syntax:
#include time
clock_t clock(void);
close
Closes the file associated with a file descriptor.
Syntax:
#include unixio
int close(int file_descriptor);
[w]clrattr
Curses Screen Management function and macro that deactivate the
video display attributes boldface, blinking, reverse video, and
underlining within a specified window on the terminal screen. The
attributes are represented by _BOLD, _BLINK, _REVERSE, and
_UNDERLINE.
Syntax:
#include curses
clrattr(attr);
int wclrattr(WINDOW *win, int attr);
[w]clrtobot
Curses Screen Management function and macro that erase the contents
of the window from the current position of the cursor to the bottom
of the window. The clrtobot macro acts on the stdscr window.
Syntax:
#include curses
clrtobot(void);
wclrtobot(WINDOW *win);
[w]clrtoeol
Curses Screen Management function and macro that erase the contents
of the window from the current cursor position to the end of the
line on the specified window. The wclrtoeol macro acts on the
stdscr window.
Syntax:
#include curses
clrtoeol();
int wclrtoeol(WINDOW *win);
cos
Returns the cosine of its radian argument.
Syntax:
#include math
double cos(double x);
cosh
Returns the hyperbolic cosine of its argument.
Syntax:
#include math
double cosh(double x);
creat
Creates a new file.
Syntax:
#include unixio
int creat(char *file_spec, unsigned int mode,...);
[no]crmode
Curses Screen Management macros that set and unset the terminal
from cbreak mode. This mode of single-character input is only
supported with the Curses input routine getch. It also applies to
any of the UNIX I/O, Terminal I/O, or Standard I/O routines.
Syntax:
#include curses
crmode()
nocrmode();
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
ctermid
Returns a character string giving the equivalence string of
SYS$COMMAND. This is the name of the controlling terminal.
Syntax:
#include stdlib
char *ctermid(char *str);
ctime
Converts a time in seconds to the following form:
wkd mmm dd hh:mm:ss 19yy\n\0
Syntax:
#include time
char *ctime(const long *bintim);
Curses
Curses, the VAX C Screen Management Package, is comprised of VAX C RTL functions that create and modify defined sections of the terminal screen, and optimize cursor movement. Using a screen management package, you can develop a user interface that is both visually attractive and easy to use. Curses allows you to manipulate the screen without worrying about the intricacies of various types of terminals, the difficulties of moving data to and from sections of the screen, or the problems of efficient cursor movement. Using Curses, the terminal screen may be divided into a number of rectangular regions called windows. The size and location of each window is given in terms of the number of lines, the number of columns, and the starting position -- the upper left corner of the window. A window must fit completely on the terminal screen, being as small as a single character or as large as the entire terminal screen. When modifying windows, changes will not appear on the terminal screen until the window is refreshed. When a window is refreshed, the updated window is placed onto the terminal screen leaving the rest of the terminal screen unaltered.
cuserid
Returns a pointer to a character string containing the name of the
user initiating the current process.
Syntax:
#include stdlib
char *cuserid(char *str);
[w]delch
Curses Screen Management function and macro that delete the
character on the specified window at the current position of the
cursor.
Syntax:
#include curses
delch()
int wdelch(WINDOW *win);
delete
Causes a file to be deleted.
Syntax:
#include stdio
int delete(const char *file_spec);
[w]deleteln
Curses Screen Management function and macro that delete the line at
the end of the current position of the cursor. The deleteln macro
acts on the stdscr window.
Syntax:
#include curses
deleteln()
int wdeleteln(WINDOW *win);
delwin
Deletes the specified window from memory.
Syntax:
#include curses
#define bool int
int delwin(WINDOW *win);
difftime
Computes the difference in seconds between the two times specified
by the time1 and time2 arguments.
Syntax:
#include time
double difftime (time_t time2, time_t time_1);
div
Returns the quotient and remainder after the division of its
arguments.
Syntax:
#include stdlib
div_t div(int numer, int denom);
dup
Allocates a new file descriptor that refers to a file specified by
a file descriptor returned by open, creat, or pipe.
Syntax:
#include unixio
int dup(int file_desc1);
dup2
Makes file_descriptor_2 point to the same file as
file_descriptor_1.
Syntax:
#include unixio
int dup2(int file_descriptor_1, int file_descriptor_2);
[no]echo
Curses Screen Management macros that set the terminal so that
characters may or may not be echoed on the terminal screen. This
mode of single-character input is only supported with Curses.
Syntax:
#include curses
echo()
noecho()
ecvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string. The strings are stored in a
memory location created by the functions.
Syntax:
#include unixlib
char *ecvt(double value, int ndigit,*decpt,int *sign)
endwin
Curses Screen Management function that clears the terminal screen
and frees any virtual memory allocated to Curses data structures.
Syntax:
#include curses
#define bool int
void endwin(void);
[w]erase
Curses Screen Management function and macro that erase the window
by "painting" it with blanks. The erase macro acts on the stdscr
window.
Syntax:
#include curses
erase()
int werase(WINDOW *win);
execl
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execl (char *file-spec, char *argn,...);
execle
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execle (char *file-spec, char *argn,..., char *envp[]);
execlp
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execlp (char *file-spec, char *argn,...);
execv
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execv (char *file-spec, char *argv[]);
execve
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execve (char *file-spec, char *argv[], char *envp[]);
execvp
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execvp (char *file-spec, char *argv[]);
exit, exit
Terminate the calling process. exit flushes and closes all open
files before terminating the process; _exit does not.
Syntax:
#include stdlib
void exit(int status)
void _exit(int status);
exp
Returns the base e raised to the power of the argument.
Syntax:
#include math
double exp(double x);
fabs
Returns the absolute value of a floating-point value.
Syntax:
#include math
double fabs(double x);
fclose
Closes a file by flushing any buffers associated with the file
control block and freeing the file control block and buffers
previously associated with the file pointer.
Syntax:
#include stdio
int fclose(FILE *file_pointer);
fcvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string.
Syntax:
#include unixlib
char *fcvt(double value,int ndigit, int *decpt, int *sign);
fdopen
Associates a file pointer with a file descriptor returned by an
open, creat, dup, dup2, or pipe function.
Syntax:
#include stdio
FILE *fdopen(int file_descriptor,char *a_mode);
feof
Tests a file to see if the end-of-file has been reached.
Syntax:
#include stdio
int feof(FILE *file_pointer);
ferror
Returns a nonzero integer if an error occurred while reading or
writing to a file.
Syntax:
#include stdio
int ferror(FILE *file_pointer);
fflush
Writes out any buffered information for the specified file.
Syntax:
#include stdio
int fflush(FILE *file_pointer);
fgetc
Returns characters from a specified file.
Syntax:
#include stdio
int fgetc(FILE *file_pointer);
fgetname
Returns the file specification associated with a file pointer.
Syntax:
#include stdio
char *fgetname(FILE *file_pointer,char *buffer,...);
fgetpos
Stores the current value of the file position indicator for the
stream pointed to by the stream into the object pointed to by pos.
Syntax:
#include stdio
int fgetpos(FILE *stream, fpos_t *pos);
fgets
Reads a line from a specified file, up to a specified maximum
number of characters or up to and including the newline character,
whichever comes first. This function stores the string in the str
argument.
Syntax:
#include stdio
char *fgets(char *str, int maxchar, FILE *file_ptr);
fileno
Returns an integer file descriptor that identifies the specified
file.
Syntax:
#include stdio
int fileno(FILE *file_pointer);
floor
Returns (as a double) the largest integer that is less than or
equal to its argument.
Syntax:
#include math
double floor(double x);
fmod
Computes the floating-point remainder of the first argument to fmod
divided by the second. If the quotient cannot be represented, the
behavior is undefined.
Syntax:
#include math
double fmod (double x, double y);
fopen
Opens a file by returning the address of a FILE structure.
Syntax:
#include stdio
FILE *fopen(const char *file_spec, const char *a_mode ,...);
fprintf
Performs formatted output to a specified file.
Syntax:
#include stdio
int fprintf(FILE *pointer, const char *format_spec,...);
Additional information available:
Conversion Characters
d Convert to decimal format
o Convert to unsigned octal format
x Convert to unsigned hexadecimal format
u Convert to unsigned decimal format
c Output a single non-NUL character
s Output a string of characters
e Convert float or double to the format
[-]m.nnnnnnE[+|-]xx
f Convert float or double to the format [-]m.nnnnnn
g Convert float or double to the shortest format
of d, e, or f.
l Used with d, o, x, or u, specifies the corresponding
long integer.
% Write out the percent symbol
fputc
Writes characters to a specified file.
Syntax:
#include stdio
int fputc(int character, FILE *file_pointer);
fputs
Writes a character string to a file without copying the string's
null terminator (\0).
Syntax:
#include stdio
int fputs(const char *string, FILE *file_pointer);
fread
Reads a specified number of items from a file.
Syntax:
#include stdio
size_t fread(void *pointer, size_t length size_t nitems,
FILE (*file_pointer);
free
Makes available for reallocation the area allocated by a previous
calloc, malloc, or realloc call.
Syntax:
#include stdlib
void free(void *pointer);
freopen
Substitutes the file, named by a file specification, for the open file addressed by a file pointer. The latter file is closed. Syntax: #include stdio FILE *freopen(const char *spec, const char *access_mode,FILE *file_pointer,...);
frexp
Returns the mantissa of a double value.
Syntax:
#include math
double frexp(double value,int *eptr);
fscanf
Performs formatted input from a specified file.
Syntax:
#include stdio
fscanf(FILE *file_pointer, const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a
conversion character and a number indicating the size of the field.
Additional information available:
Conversion Characters
d Decimal integer
D Decimal long integer
o Octal integer
O Octal long integer
x Hexadecimal integer
X Hexadeciml long integer
hd, ho, hx Short integer of the specified radix
c Single character
s Character string
e,f Floating-point number having the form
[+|-]nnn[.[ddd]][[E|e][+|-]nn]
E,F Double-precision e and f
ld, lo, lx Long decimal, long octal, and long hexadecimal integer
le, lf Double-precision e and f
[..] Brackets enclosing a set of characters. The set is
made up of the characters in the string field. If the
first character is an up-arrow (^), the set is made up
of the delimiters for the field.
fseek
Positions the file to the specified byte offset in the file.
Syntax:
#include stdio
int fseek(FILE *file_pointer,long int *offset,int direction);
fsetpos
Sets the file position indicator for the stream according to the
value of the object pointed to by pos.
Syntax:
#include stdio
int fsetpos (FILE *stream, fpos_t *fpos);
fstat
Accesses information about the file descriptor or the file
specification.
Syntax:
#include stat
int fstat(int file_descriptor, stat_t *buffer);
ftell
Returns the current byte offset to the specified file.
Syntax:
#include stdio
int ftell(FILE *file_pointer);
ftime
Returns the time elasped since 00:00:00 January 1, 1970, in the
structure pointed at by timeptr.
Syntax:
#include time
void ftime(timeb_t *timeptr);
fwrite
Writes a specified number of items to the file. Syntax: #include stdio size_t fwrite(void *pointer, size_t size_of_item, size_t number_items, FILE *file_pointer);
gcvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string. The strings are stored in a
memory location created by the functions.
Syntax:
#include unixlib
char *gcvt(double value, int ndigit, char *buf);
getc
Returns characters from a specified file.
Syntax:
#include stdio
int getc(FILE *file_pointer);
[w]getch
Curses Screen Management function and macro that get a character
from the terminal screen and echo it on the specified window.
Syntax:
#include curses
getch()
char wgetch(WINDOW *win);
getchar
Reads a single character from the standard input (stdin).
Syntax:
#include stdio
int getchar(void);
getcwd
Returns a pointer to the file specification for the current working
directory.
Syntax:
#include unixlib
char *getcwd (char *buffer, unsigned int size,...);
getegid
Returns, in VMS terms, the group number from the user
identification code (UIC). For example, if the UIC is [313,031],
313 is the group number.
Syntax:
#include unixlib
unsigned getegid();
getenv
Searches the environment array for the current process and returns
the value associated with the environment name.
Syntax:
#include unixlib
char *getenv(const char *name);
geteuid
Returns, in VMS terms, the member number from the user
identification code (UIC). For example, if the UIC is [313,031],
313 is the member number.
Syntax:
#include unixlib
unsigned geteuid(void)
getgid
Returns, in VMS terms, the group number from the user
identification code (UIC). For example, if the UIC is [313,031],
313 is the group number.
Syntax:
#include unixlib
unsigned int getgid(void);
getname
Returns the file specification associated with a file descriptor.
Syntax:
#include unixio
char *getname(int file_descriptor,char *buffer,...);
getpid
Returns the process ID of the current process.
Syntax:
#include unixlib
int getpid(void);
getppid
Returns the parent process ID of the calling process.
Syntax:
#include unixlib
int getppid (void);
gets
Reads a line from the standard input (stdin).
Syntax:
#include stdio
char *gets(char *string);
[w]getstr
Curses Screen Management function and macro that get a string from
the terminal screen, store it in the variable string, and echo it
on the specified window. The getstr macro works on the stdscr
window.
Syntax:
#include curses
getstr(str);
int wgetstr(WINDOW *win, char *str);
getuid
Returns, in VMS terms, the member number from the user
identification code (UIC). For example, if the UIC is [313,031],
313 is the member number.
Syntax:
#include unixlib
unsigned int getuid(void);
getw
Returns characters from a specified file.
Syntax:
#include stdio
int getw(FILE *file_pointer);
getyx
Curses Screen Management function that puts the (x,y) coordinates
of the current cursor position on win in the variables y and x.
Syntax:
#include curses
getyx(WINDOW *win, int y, int x);
gmtime
Converts a given calendar time into a broken-down time expressed in
Greenwich Mean Time (GMT).
Syntax:
#include time
struct tm *gmtime (const time_t *timer);
gsignal
Generates a specified software signal. Generating a signal causes
the action established by the ssignal function to be taken.
Syntax:
#include signal
int gsignal(int sig,...);
hypot
Returns the square root of the sum of two squares of two arguments.
For example: sqrt(x*x + y*y).
Syntax:
#include math
double hypot(double x, double y);
[w]inch
Curses Screen Management function and macro that return the
character at the current cursor position on the specified window
without making changes to the window. The inch macro acts on the
stdscr window.
Syntax:
#include curses
inch()
char winch(WINDOW *win);
initscr
Curses Screen Management function that initializes the
terminal-type data and all screen functions. You must call initscr
before using any of the screen functions or macros.
Syntax:
#include curses
void initscr(void);
[w]insch
Curses Screen Management function and macro that insert the
character ch at the current cursor position in the specified
window. The insch macro acts on the stdscr window.
Syntax:
#include curses
insch(char ch)
int winsch(WINDOW *win, char ch);
[w]insertln
Curses Screen Management function and macro that insert a line
above the line containing the current cusor position. The insertln
macro acts on the stdscr window.
Syntax:
#include curses
insertln();
int winsertln(WINDOW *win);
[w]insstr
Curses Screen Management function and macro that insert a string at
the current cursor position on the specified window. The insstr
macro acts on the stdscr window.
Syntax:
#include curses
insstr(char *str);
int winsstr(WINDOW *win, char *str);
isalnum
Returns a nonzero integer if its argument is one of the
alphanumeric ASCII characters. Otherwise, it returns 0.
Syntax:
#include ctype
int isalnum(int character);
isalpha
Returns a nonzero integer if its argument is one of the alphabetic
ASCII characters. Otherwise, it returns 0.
Syntax:
#include ctype
int isalpha(int character);
isapipe
Returns 1 if the specified file descriptor is associated with a
mailbox, and 0 if it is not.
Syntax:
#include unixio
int isapipe(int file_descriptor);
isascii
Returns a nonzero integer if its argument is any ASCII character.
Otherwise, it returns 0.
Syntax:
#include ctype
int isascii(int character);
isatty
Returns 1 if the specified file descriptor is associated with a
terminal, and 0 if it is not.
Syntax:
#include unixio
int isatty(int file_descriptor);
iscntrl
Returns a nonzero integer if its argument is an ASCII DEL character
(177 octal) or any nonprinting ASCII character (a code less than 40
octal). Otherwise, it returns 0.
Syntax:
#include ctype
int iscntrl(int character);
isdigit
Returns a nonzero integer if its argument is a decimal digit (0 to
9). Otherwise, it returns 0.
Syntax:
#include ctype
int isdigit(int character);
isgraph
Returns a nonzero integer if its argument is a graphic ASCII
character. Otherwise, it returns 0.
Syntax:
#include ctype
int isgraph(int character);
islower
Returns a nonzero integer if its argument is a lowercase alphabetic
ASCII character. Otherwise, it returns 0.
Syntax:
#include ctype
int islower(int character);
isprint
Returns a nonzero integer if its argument is any ASCII printing
character (ASCII codes from 40 octal to 176 octal). Otherwise, it
returns 0.
Syntax:
#include ctype
int isprint(int character);
ispunct
Returns a nonzero integer if its argument is an ASCII punctuation
character; that is, if it is nonalphanumeric and greater than 40
octal. Otherwise, it returns 0.
Syntax:
#include ctype
int ispunct(int character);
isspace
Returns a nonzero integer if its argument is a white space; that
is, if it is an ASCII space, tab (horizontal or vertical),
carriage-return, form-feed, or newline character. Otherwise, it
returns 0.
Syntax:
#include ctype
int isspace(int character);
isupper
Returns a nonzero integer if its argument is an uppercase
alphabetic ASCII character. Otherwise, it returns 0.
Syntax:
#include ctype
int isupper(int character);
isxdigit
Returns a nonzero integer if its argument is a hexadecimal digit (0
to 9, A to F, or a to f).
Syntax:
#include ctype
int isxdigit(int character);
kill
Sends a signal to a process specified by a process ID (PID). This
function does not support the same functionality supported by UNIX*
systems.
* UNIX is a registered trademark of American Telephone and
Telegraph Company.
Syntax:
#include signal
int kill(int pid, int sig);
labs
Returns the absolute value of an integer as a long int.
Syntax:
#include stdlib
long int labs(long int j);
ldexp
Returns its first argument multiplied by 2 raised to the power of
its second argument.
Syntax:
#include math
double ldexp(double x, int e);
ldiv
Returns the quotient and remainder after the division of its
arguments.
Syntax:
#include stdlib
ldiv_t ldiv(long int numer, long int denom);
leaveok
Curses Screen Management macro that signals Curses to leave the
cursor at the current coordinates after an update to the window.
Syntax:
#include curses
leaveok(WINDOW *win, bool boolf);
localtime
Converts a time (expressed as the number of seconds elapsed since
00:00:00, January 1, 1970) into hours, minutes, seconds, and so on.
Syntax:
#include time
struct tm *localtime(const time_t *bintim);
log
Returns the natural (base-e) logarithm of its argument.
Syntax:
#include math
double log(double x);
log10
Returns the base-10 logarithm of its argument.
Syntax:
#include math
double log10(double x);
longjmp
Provides a way to transfer control from a nested series of function
invocations back to a predefined point without returning normally;
that is, by not using a series of return statements. The longjmp
function restores the context of the environment buffer.
Syntax:
#include setjmp
void longjmp(jmp_buf env, int val);
longname
Assigns the full terminal name to name, which must be large enough
to hold the character string.
Syntax:
#include curses
void longname(char *termbuf, char *name);
lseek
Positions a file to an arbitrary byte position and returns the new
position as an int.
Syntax:
#include unixio
int lseek(int file_descriptor, int offset, int direction);
malloc
Allocates an area of memory.
Syntax:
#include stdlib
void *malloc(size_t size);
memchr
Locates the first occurrence of the specified byte within the
initial size bytes of a given object.
Syntax:
#include string
void memchr (const void *s1,int c, size_t size);
memcmp
Compares two objects, byte by byte. The compare operation starts
with the first byte in each object. It returns an integer less
than, equal to, or greater than 0, depending on whether the lexical
value of the first object is less than, equal to, or greater than
that of the second object.
Syntax:
#include string
int memcmp (const void *s1, const void *s2, size_t size);
memcpy
Copies a specified number of bytes from one object to another.
Syntax:
#include string
void *memcpy (void *s1, const void *s2, size_t size);
memmove
Copies a specified number of bytes from one object to another.
Syntax:
#include string
void *memmove(void *s1, const void *s2, size_t size);
memset
Sets a specified number of bytes in a given object to a given
value.
Syntax:
#include string
void *memset (void *s, int value, size_t size);
mkdir
Creates a directory.
Syntax:
# include stdlib
int mkdir(char *dir_spec, unsigned mode,...);
mktemp
Creates a unique file name from a template that you supply.
Syntax:
#include unixio
char *mktemp(char *template);
modf
Returns the positive fractional part of its first argument and
assigns the integer part, expressed as an object of type double, to
the object whose address is specified by the second argument.
Syntax:
#include math
double modf(double value, double *iptr);
[w]move
Curses Screen Management function and macro that change the current
cursor position on the specified window to the coordinates (y,x).
The move macro acts on the stdscr window.
Syntax:
#include curses
move(y,x)
int wmove(WINDOW *win, int y, int x);
mv[w]addch
Curses Screen Management macros that move the cursor to coordinates
(y,x) and add the character ch to the specified window. The
mvaddch macro acts on the stdscr window.
Syntax:
#include curses
mvaddch(int y, int x, char ch)
mvwaddch(WINDOW *win, int y, int x, char ch);
mv[w]addstr
Curses Screen Management macros that move the cursor to the
specified string, to which str points, to the specified window.
The mvaddstr macro acts on the stdscr window.
Syntax:
#include curses
mvaddstr(int y, int x, char *str)
mvwaddstr(WINDOW *win, int y, int x, char *str);
mvcur
Curses Screen Management macro that moves the terminal's cursor
from (lasty,lastx) to (newy,newx).
Syntax:
#include curses
mvcur(int lasty, int lastx, int newy, int newx);
mv[w]delch
Curses Screen Management macros that move the cursor to coordinates
(y,x) and delete the character on the specified window. The
mvdelch macro acts on the stdscr window.
Syntax:
#include curses
mvdelch(int y, int x);
mvwdelch(WINDOW *win, int y, int x);
mv[w]getch
Curses Screen Management macros that move the cursor to coordinates
(y,x), get a character from the terminal screen, and echo it on the
specified window. The mvgetch macro works on the stdscr window.
Syntax:
#include curses
mvgetch(int y, int x);
mvwgetch(WINDOW *win, int y, int x);
mv[w]getstr
Curses Screen Management macros that move the cursor to coordinates
(y,x), get a string from the terminal screen, and echo it on the
specified window. The mvgetstr macro acts on the stdscr window.
Syntax:
#include curses
mvgetstr(int y, int x, char *str)
mvwgetstr(WINDOW *win, int y, int x, char *str);
mv[w]inch
Curses Screen Management macros that move the cursor to coordinates
(y,x) and return the character on the specified window without
making changes to the window. The mvinch macro acts on the stdscr
window.
Syntax:
#include curses
mvinch(int y, int x);
mvwinch(WINDOW *win, int y, int x);
mv[w]insch
Curses Screen Management macros that move the cursor to coordinates
(y,x) and insert the character ch in the specified window. The
mvinsch macro acts on the stdscr window.
Syntax:
#include curses
mvinsch(char ch, int y, int x);
mvwinsch(WINDOW *win, int y, int x, char ch);
mv[w]insstr
Curses Screen Management macros that move the cursor to coordinates
(y,x) and insert a string on the specified window. The mvinsstr
macro acts on the stdscr window.
Syntax:
#include curses
mvinsstr(int y, int x, char *str)
mvwinsstr(WINDOW *win, int y, int x, char str);
mvwin
Curses Screen Management macro that moves the starting position of
the window to the specified (y,x) coordinates.
Syntax:
#include curses
wvwin(WINDOW *win, int y, int x);
newwin
Curses Screen Management routine that creates a new window with
numlines lines and numcols columns starting at the coordinates
begin_y, begin_x on the terminal screen.
Syntax:
#include curses
WINDOW newwin(int numlines, int numcols, int begin_y, int
begin_x);
nice
Increases or decreases process priority relative to the process
base priority by the amount of the argument.
Syntax:
#include stdlib
nice(int increment);
[no]nl
Curses Screen Management function and macro that unset and set the
terminal to and from newline mode (they start and stop the system
from mapping <RETURN> to <LINE-FEED>).
Syntax:
#include curses
nl()
nonl()
open
Opens a file for reading, writing, or editing. It positions the
file at its beginning (byte 0).
Syntax:
#include unixio
int open(char *file_spec, int flags, unsigned int mode,...);
overlay
Curses Screen Management routine that superimposes win1 on win2.
The function writes the contents of win1 that will fit onto win2
beginning at the starting coordinates of both windows. Blanks on
win1 leave the contents of the corresponding space on win2
unaltered. The overlay function copies as much of the window's box
as possible.
Syntax:
#include curses
int overlay(WINDOW *win1, WINDOW *win2);
overwrite
Curses Screen Management routine that destructively overwrites the
contents of win1 on win2.
Syntax:
#include curses
int overwrite(WINDOW *win1, WINDOW *win2);
pause
Causes its calling process to stop (hibernate) until the process
receives a signal.
Syntax:
#include signal
int pause(void)
perror
Writes a short message to stderr describing the last error
encountered during a call to the VAX C RTL from a C program.
Syntax:
#include stdio
void perror(const char *string);
pipe
Creates a temporary mailbox. You must use a mailbox to read and
write data between the parent and child. The channels through
which the processes communicate are called a pipe.
Syntax:
#include processes
int pipe(int file_descriptor[2],...);
pow
Returns the first argument raised to the power of the second
argument.
Syntax:
#include math
double pow(double base, double exp);
printf
Performs formatted output to the standard output (stdout).
Syntax:
#include stdio
int printf(const char *format_specification,...);
A format specification is a character string that states the output
format. The string may contain ordinary characters that are copied
to the output, or it may contain a format specification. Format
specifications begin with a percent sign (%), and end with a
conversion character that states the output format. Each format
specification must be paired with an output source. Format
specifications are matched to output sources in left-to-right
order.
Additional information available:
Conversion Characters
d Convert to decimal format
o Convert to unsigned octal format
x Convert to unsigned hexadecimal format
u Convert to unsigned decimal format
c Output a single non-NUL character
s Output a string of characters
e Convert float or double to the format
[-]m.nnnnnnE[+|-]xx
f Convert float or double to the format [-]m.nnnnnn
g Convert float or double to the shortest format
of d, e, or f.
l Used with d, o, x, or u, specifies the corresponding
long integer.
% Write out the percent symbol
[w]printw
Curses Screen Management function and macro that perform a PRINTF
on the window starting at the current position of the cursor. The
printw macro acts on the stdscr window.
Syntax:
#include curses
printw(char *format_spec,...);
int wprintw(WINDOW *win, char *format_spec,...);
putc
Writes characters to a specified file.
Syntax:
#include stdio
int putc(int character, FILE *file_pointer);
putchar
Writes a single character to the standard output (stdout) and
returns the character.
Syntax:
#include stdio
int putchar(int character);
puts
Writes a character string to the standard output (stdout) followed
by a newline.
Syntax:
#include stdio
int puts(char *string);
putw
Writes characters to a specified file.
Syntax:
#include stdio
int putw(int integer, FILE *file_pointer);
qsort
Sorts an array of objects in place. It implements the quick-sort
algorithm.
Syntax:
#include stdlib
void qsort (void *base,
size_t nmemb,
size_t size,
int (*compar) const void *, const void *));
raise
Generates a specified software symbol.
Syntax:
#include signal
int raise(int sig,...);
rand
Returns pseudorandom numbers in the range 0 to (2**31-1).
Syntax:
#include stdlib
int rand(void)
[no]raw
Curses Screen Management functions and macros that set and unset
the terminal to and from raw mode. The RAW function performs the
same task as CRMODE except that it does not imply NONL. These
functions and macros are provided only for portability with
programs running on UNIX* systems. This routine is available only
on VMS Versions 5.0 and above.
Syntax:
#include curses
raw()
noraw()
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
read
Reads bytes from a file and places them in a buffer.
Syntax:
#include unixio
int read(int file_descriptor, char *buffer, int nbytes);
realloc
Changes the size of the area pointed to by the first argument to
the number of bytes given by the second argument.
Syntax:
#include stdlib
void *realloc(char *pointer, size_t size);
[w]refresh
Curses Screen Management function and macro that repaint the
specified window on the terminal screen. The refresh macro acts on
the stdscr window.
Syntax:
#include curses
refresh()
int wrefresh(WINDOW *win);
remove
Causes a file to be deleted.
Syntax:
#include stdio
int remove (const char *file-spec);
rename
Gives a new name to an existing file.
Syntax:
#include stdio
int rename (const char *old_file_spec,
const char *new_file_spec);
rewind
Sets the file to its beginning.
Syntax:
#include stdio
int rewind(FILE *file_pointer);
sbrk
Determines the lowest virtual address that is not used with the
program.
Syntax:
void *sbrk(unsigned long int incr);
scanf
Performs formatted input from the standard input (stdin).
Syntax:
#include stdio
int scanf(const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a
conversion character and a number indicating the size of the field.
Additional information available:
Conversion Characters
d Decimal integer
D Decimal long integer
o Octal integer
O Octal long integer
x Hexadecimal integer
X Hexadeciml long integer
hd, ho, hx Short integer of the specified radix
c Single character
s Character string
e,f Floating-point number having the form
[+|-]nnn[.[ddd]][[E|e][+|-]nn]
E,F Double-precision e and f
ld, lo, lx Long decimal, long octal, and long hexadecimal integer
le, lf Double-precision e and f
[..] Brackets enclosing a set of characters. The set is
made up of the characters in the string field. If the
first character is an up-arrow (^), the set is made up
of the delimiters for the field.
[w]scanw
Curses Screen Management function and macro that perform a scanf on
the window. The scanw macro acts on the stdscr window.
Syntax:
#include curses
scanw(char *format_spec,...);
int wscanw(WINDOW *win, char *format_spec,...);
scroll
Curses Screen Management routine that moves all the lines on the
window up one line. The top line scrolls off the window and the
bottom line becomes blank.
Syntax:
#include curses
int scroll(WINDOW *win);
scrollok
Curses Screen Management macro that sets the scroll flag for the
specified window.
Syntax:
#include curses
#define bool int
scrollok(WINDOW *win, bool boolf);
[w]setattr
Curses Screen Management function and macro that activate the video
display attributes boldface, blinking, reverse video, and
underlining within the window. The attributes are represented by
_BOLD, _BLINK, _REVERSE, and _UNDERLINE. The setattr macro acts on
the stdscr window.
Syntax:
#include curses
setattr(attr);
wsetattr(WINDOW *win, int attr);
setbuf
Associates a buffer with an input or output file.
Syntax:
#include stdio
int setbuf(FILE *file_pointer, char *buffer);
setgid
Implemented for program portability and serves no function. It
returns 0 (to indicate success).
Syntax:
#include unixlib
int setgid(unsigned int group_number);
setjmp
Provides a way to transfer control from a nested series of function
invocations back to a predefined point without returning normally;
that is, by not using a series of return statements. The setjmp
function saves the context of the environment buffer.
Syntax:
#include setjmp
int setjmp(jmp_buf env);
setuid
Implemented for program portability and serves no function. It
returns 0 (to indicate success).
Syntax:
#include unixlib
int setuid(unsigned int member_number);
setvbuf
Associates a buffer with an input or output file.
Syntax:
#include stdio
int setvbuf (FILE *file_ptr, char *buffer, int type,
size_t size);
sigblock
Causes the signals designated in a mask to be added to the current
set of signals being blocked from delivery.
Syntax:
#include signal
int sigblock(int mask);
signal
Allows you to either catch or ignore a signal.
Syntax:
#include signal
int (*signal(int sig,void (*func)(int,...)))(int,...);
sigpause
Assigns mask to the current set of masked signals and then waits
for a signal.
Syntax:
#include signal
int sigpause(int mask);
sigsetmask
Establishes those signals that are blocked from delivery.
Syntax:
#include signal
int sigsetmask(int mask);
sigstack
Defines an alternate stack on which to process. This allows the
processing of signals in a separate environment from that of the
current process.
Syntax:
#include signal
int sigstack(struct sigstack *ss, struct sigstack *oss);
sigvec
Assigns a handler for a specific signal.
Syntax:
#include signal
int sigvec(int sigint, struct sigvec *sv, struct sigvec *osv);
sin
Returns the sine of its radian argument.
Syntax:
#include math
double sin(double x);
sinh
Returns the hyperbolic sine of its argument.
Syntax:
#include math
double sinh(double x);
sleep
Suspends the execution of the current process for at least the
number of seconds indicated by its argument.
Syntax:
#include signal
int sleep(unsigned seconds);
sprintf
Performs formatted output to a string in memory.
Syntax:
#include stdio
int sprintf(char *string, const char *format_spec,...);
A format specification is a character string that states the output
format. The string may contain ordinary characters that are copied
to the output, or it may contain a format specification. Format
specifications begin with a percent sign (%), and end with a
conversion character that states the output format. Each format
specification must be paired with an output source. Format
specifications are matched to output sources in left-to-right
order.
Additional information available:
Conversion Characters
d Convert to decimal format
o Convert to unsigned octal format
x Convert to unsigned hexadecimal format
u Convert to unsigned decimal format
c Output a single non-NUL character
s Output a string of characters
e Convert float or double to the format
[-]m.nnnnnnE[+|-]xx
f Convert float or double to the format [-]m.nnnnnn
g Convert float or double to the shortest format
of d, e, or f.
l Used with d, o, x, or u, specifies the corresponding
long integer.
% Write out the percent symbol
sqrt
Returns the square root of its argument.
Syntax:
#include math
double sqrt(double x);
srand
Returns pseudorandom numbers in the range 0 to (2**31-1).
Syntax:
#include math
int srand(int seed);
sscanf
Performs formatted input from a character string in memory.
Syntax:
#include stdio
int sscanf(char *string, const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a
conversion character and a number indicating the size of the field.
Additional information available:
Conversion Characters
d Decimal integer
D Decimal long integer
o Octal integer
O Octal long integer
x Hexadecimal integer
X Hexadeciml long integer
hd, ho, hx Short integer of the specified radix
c Single character
s Character string
e,f Floating-point number having the form
[+|-]nnn[.[ddd]][[E|e][+|-]nn]
E,F Double-precision e and f
ld, lo, lx Long decimal, long octal, and long hexadecimal integer
le, lf Double-precision e and f
[..] Brackets enclosing a set of characters. The set is
made up of the characters in the string field. If the
first character is an up-arrow (^), the set is made up
of the delimiters for the field.
ssignal
Allows you to specify the action to take when a particular signal
is raised.
Syntax:
#include signal
void (*ssignal (int sig, void (*func) (int,...))) (int,...);
[w]standend
Curses Screen Management function and macro that deactivate the
boldface attribute for the specified window. The standend macro
acts on the stdscr window.
Syntax:
#include curses
standend()
int wstandend(WINDOW *win);
[w]standout
Curses Screen Management function and macro that activate the
boldface attribute of the specified window. The standout macro
acts on the stdscr window.
Syntax:
#include curses
standout()
int wstandout(WINDOW *win);
stat
Accesses information about the file descriptor or the file
specification.
Syntax:
#include stat
#include statbuf;
int stat(int *file_path, stat_t *buffer);
strcat
Concatenates str_2 to the end of str_1.
Syntax:
#include string
char *strcat(char *str_1, const char *str_2);
strchr
Returns the address of the first occurrence of a given character in
a NUL-terminated string.
Syntax:
#include string
char *strchr(const char *string, int character);
strcmp
Compares two ASCII character strings and returns a negative, 0, or
positive integer, indicating that the ASCII values of the
individual characters in the first string are less then, equal to,
or greater than the values in the second string.
Syntax:
#include string
int strcmp(const char *str_1, const char *str_2);
strcpy
Copies all of str_2 into str_1.
Syntax:
#include string
char *strcpy(char *str_1, const char *str_2);
strcspn
Returns the length of the prefix of a string that consists entirely
of characters that are not in a specified set of characters.
Syntax:
#include string
size_t strcspn(const char *str, const char *charset);
strerror
Maps the error number in error_code to an error message string.
Syntax:
#include string
char *strerror (int error_code [,int vms_error_code]);
strlen
Returns the length of a string of ASCII characters. The returned
length does not include the terminating null character (\0).
Syntax:
#include string
size_t strlen(const char *str);
strncat
Concatenates str_2 to the end of str_1.
Syntax:
#include string
char *strncat(char *str_1, const char *str_2, size_t maxchar);
strncmp
Compares two ASCII characters and returns a negative, 0, or
positive integer, indicating that the ASCII values of the
individual characters in the first string are less than, equal to,
or greater than the values in the second string.
Syntax:
#include string
int strncmp(const char *str_1, const char *str_2, size_t
maxchar);
strncpy
Copies all or part of str_2 into str_1.
Syntax:
#include string
char *strncpy(char *str_1, const char *str_2, size_t maxchar);
strpbrk
Searches a string for the occurrence of one of a specified set of
characters.
Syntax:
#include string
char *strpbrk(const char *str, const char *charset);
strrchr
Returns the address of the last occurrence of a given character in
a NUL-terminated string.
Syntax:
#include string
char *strrchr(char *string, char character);
strspn
Searches a string for the occurrence of a character that is not in
a specified set of characters.
Syntax:
#include string
size_t strspn(const char *str, const char charset);
strstr
Locates the first occurrence in the string pointed to by s1 of the
sequence of characters in the string pointed to by s2.
Syntax:
#include string
char *strstr(const char *s1, const char *s2);
strtod
Converts a given string to a double-precision number.
Syntax:
#include stdlib
double strtod (const char *nptr, char **endptr);
strtok
Locates text tokens in a given string.
Syntax:
#include string
char *strtok (char *s1, const char *s2);
strtol
Converts strings of ASCII characters to the appropriate numeric
values.
Syntax:
#include stdlib
long int strtol (const char *nptr, char **endptr, int base);
strtoul
Converts the initial portion of the string pointed to by nptr to an
unsigned long integer.
Syntax:
#include stdlib
unsigned long int strtoul (const char *nptr, char **endptr,
int base);
strspn
Returns the length of the prefix of a string which consists
entirely of characters from a set of characters.
Syntax:
#include string
size_t strspn(const char *str, const char *charset);
subwin
Curses Screen Management routine that creates a new subwindow with
numlines lines and numcols columns starting at the coordinates
(begin_y, begin_x) on the terminal screen.
Syntax:
#include curses
WINDOW *subwin(WINDOW *win, int numlines, int numcols, int
begin_y, int begin_x);
system
Passes a given string to the host environment to be executed by a
command processor.
Syntax:
#include processes
int system (const char *string);
tan
Returns a double value that is the tangent of its radian argument.
Syntax:
#include math
double tan(double x);
tanh
Returns a double value that is the hyperbolic tangent of its double
argument.
Syntax:
#include math
double tanh(double x);
time
Returns the time elasped on the system since 00:00:00 January 1,
1970 in seconds.
Syntax:
#include time
time_t time(time_t *time_location);
times
Passes back the accumulated times of the current process and its
terminated child processes.
Syntax:
#include time
void times (tbuffer_t *buffer);
tmpfile
Creates a temporary file that is opened for update.
Syntax:
#include stdio
FILE *tmpfile(void);
tmpnam
Creates a character string that you can use in place of the
file-name argument in other function calls.
Syntax:
#include stdio
char *tmpnam(char *name);
toascii
Converts its argument, an 8-bit ASCII character, to a 7-bit ASCII
character.
Syntax:
#include ctype
int toascii(char character);
tolower, tolower
Convert their argument, an ASCII character, to lowercase. If the
argument is not an uppercase character, it is returned unchanged.
Syntax:
#include ctype
int tolower(char character);
int _tolower(char character);
touchwin
Curses Screen Management routine that places the most recently
edited version of the specified window on the terminal screen.
Syntax:
#include curses
int touchwin(WINDOW *win);
toupper, toupper
Convert their argument, an ASCII character, to uppercase. If the
argument is not a lowercase character, it is returned unchanged.
Syntax:
#include ctype
int toupper(char character);
int _toupper(char character);
ttyname
Returns a pointer to the NUL-terminated name of the terminal device
associated with file descriptor 0, the default input device
(stdin).
Syntax:
#include unixio
char *ttyname(void);
umask
Creates a file protection mask that is used when a new file is
created and returns the previous mask value.
Syntax:
#include stdlib
int umask(unsigned int mode_complement);
ungetc
Pushes a character back into the input stream and leaves the stream
positioned before the character.
Syntax:
#include stdio
int ungetc(int character, FILE *file_pointer);
va arg
Returns the next item in the argument list.
Syntax:
#include stdarg or #include varargs
type va_arg(va_list ap type);
va count
Returns the number of longwords in the argument list.
Syntax:
#include varargs
void va_count(int count);
va end
Finishes the varargs session.
Syntax:
#include stdarg or #include varargs
void va_end(va_list ap);
va start
Initializes a variable to the beginning of the argument list.
Syntax:
#include varargs
void va_start(va_list ap);
va start 1
Initializes a variable to the beginning of the argument list.
Syntax:
#include varargs
void va_start_1(va_list ap, int offset);
VAXC$CALLOC_OPT
Allocates an area memory.
Syntax:
#include stdlib
void *VAXC$CALLOC_OPT(size_t number, size_t size);
VAXC$CFREE_OPT
Makes available for reallocation the area allocated by a previous
VAXC$CALLOC_OPT, VAXC$MALLOC_OPT, or VAXC$REALLOC_OPT call.
Syntax:
#include stdlib
int VAXC$CFREE_OPT(void *pointer);
VAXC$CRT_INIT
Allows you to call the VAX C RTL from other languages. It initializes the run-time environment and establishes both an exit and condition handler.
VAXC$ESTABLISH
Establishes a special VAX C RTL exception handler that catches all
RTL-related exceptions and passes on all others to your handler.
Syntax:
#include signal
void VAXC$ESTABLISH(int (*exception_handler)(void *mecharr,
void *sigarr));
VAXC$FREE_OPT
Makes available for reallocation the area allocated by a previous
VAXC$CALLOC_OPT, VAXC$MALLOC_OPT, or VAXC$REALLOC_OPT call.
Syntax:
#include stdlib
int VAXC$FREE_OPT(void *pointer);
VAXC$MALLOC_OPT
Allocates an area of memory.
Syntax:
#include stdlib
void *VAXC$MALLOC_OPT(size_t size);
VAXC$REALLOC_OPT
Changes the size of the area pointed to by the first argument to
the number of bytes given by the second argument.
Syntax:
#include stdlib
char *VAXC$REALLOC_OPT(void *pointer, size_t size);
vfork
Creates an independent child process.
Syntax:
#include processes
int vfork(void);
vprintf, vfprintf, vsprintf
Print formatted output based on an argument list. These functions
are the same as the printf functions except that instead of being
called with a variable number of arguments, they are called with an
argument list that has been initialized by the macro va_start.
Syntax:
#include stdio
#include stdarg
int vprintf (const char *format, va_list *arg);
int vfprintf (FILE *file_ptr, const char *format,
va_list *arg);
int vsprintf (char *str, const char *format, va_list arg);
wait
Checks the status of the child process before exiting. A child
process is terminated when the parent process terminates.
Syntax:
#include processes
int wait(int *status);
wrapok
Curses macro which, in the UNIX* system environment, allows the
wrapping of a word from the right border of the window to the
beginning of the next line. This macro is provided only for UNIX
compatibility.
Syntax:
#include curses
#define bool int
wrapok(WINDOW *win, bool boolf);
----------
* UNIX is a registered trademark of American Telephone and Telegraph
Company.
write
Writes a specified number of bytes from a buffer to a file.
Syntax:
#include unixio
int write(int file_descriptor, void *buffer,int nbytes);
Release Notes
The release notes for VAX C are contained in the following file: SYS$HELP:VAXC030.RELEASE_NOTES You can type or print this file to read the release notes information. VAXC$hfile ACCDEF.H VMI$ROOT:[syslib] VAXC$hfile ACEDEF.H VMI$ROOT:[syslib] VAXC$hfile ACLDEF.H VMI$ROOT:[syslib] VAXC$hfile ACRDEF.H VMI$ROOT:[syslib] VAXC$hfile ARGDEF.H VMI$ROOT:[syslib] VAXC$hfile ARMDEF.H VMI$ROOT:[syslib] VAXC$hfile ASSERT.H VMI$ROOT:[syslib] VAXC$hfile ATRDEF.H VMI$ROOT:[syslib] VAXC$hfile BASDEF.H VMI$ROOT:[syslib] VAXC$hfile BRKDEF.H VMI$ROOT:[syslib] VAXC$hfile CHFDEF.H VMI$ROOT:[syslib] VAXC$hfile CHKPNTDEF.H VMI$ROOT:[syslib] VAXC$hfile CHPDEF.H VMI$ROOT:[syslib] VAXC$hfile CLIDEF.H VMI$ROOT:[syslib] VAXC$hfile CLIMSGDEF.H VMI$ROOT:[syslib] VAXC$hfile CLISERVDEF.H VMI$ROOT:[syslib] VAXC$hfile CLIVERBDEF.H VMI$ROOT:[syslib] VAXC$hfile CLSDEF.H VMI$ROOT:[syslib] VAXC$hfile COBDEF.H VMI$ROOT:[syslib] VAXC$hfile CQUALDEF.H VMI$ROOT:[syslib] VAXC$hfile CRDEF.H VMI$ROOT:[syslib] VAXC$hfile CREDEF.H VMI$ROOT:[syslib] VAXC$hfile CRFDEF.H VMI$ROOT:[syslib] VAXC$hfile CRFMSG.H VMI$ROOT:[syslib] VAXC$hfile CTYPE.H VMI$ROOT:[syslib] VAXC$hfile CURSES.H VMI$ROOT:[syslib] VAXC$hfile DCDEF.H VMI$ROOT:[syslib] VAXC$hfile DESCRIP.H VMI$ROOT:[syslib] VAXC$hfile DEVDEF.H VMI$ROOT:[syslib] VAXC$hfile DIBDEF.H VMI$ROOT:[syslib] VAXC$hfile DMPDEF.H VMI$ROOT:[syslib] VAXC$hfile DMTDEF.H VMI$ROOT:[syslib] VAXC$hfile DSTDEF.H VMI$ROOT:[syslib] VAXC$hfile DTK$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile DTKDEF.H VMI$ROOT:[syslib] VAXC$hfile DTKMSG.H VMI$ROOT:[syslib] VAXC$hfile DVIDEF.H VMI$ROOT:[syslib] VAXC$hfile ENVDEF.H VMI$ROOT:[syslib] VAXC$hfile EOMDEF.H VMI$ROOT:[syslib] VAXC$hfile EOMWDEF.H VMI$ROOT:[syslib] VAXC$hfile EPMDEF.H VMI$ROOT:[syslib] VAXC$hfile EPMMDEF.H VMI$ROOT:[syslib] VAXC$hfile EPMVDEF.H VMI$ROOT:[syslib] VAXC$hfile EPMWDEF.H VMI$ROOT:[syslib] VAXC$hfile ERADEF.H VMI$ROOT:[syslib] VAXC$hfile ERRNO.H VMI$ROOT:[syslib] VAXC$hfile ERRNODEF.H VMI$ROOT:[syslib] VAXC$hfile FAB.H VMI$ROOT:[syslib] VAXC$hfile FALDEF.H VMI$ROOT:[syslib] VAXC$hfile FCHDEF.H VMI$ROOT:[syslib] VAXC$hfile FDLDEF.H VMI$ROOT:[syslib] VAXC$hfile FIBDEF.H VMI$ROOT:[syslib] VAXC$hfile FIDDEF.H VMI$ROOT:[syslib] VAXC$hfile FILE.H VMI$ROOT:[syslib] VAXC$hfile FLOAT.H VMI$ROOT:[syslib] VAXC$hfile FMLDEF.H VMI$ROOT:[syslib] VAXC$hfile FORDEF.H VMI$ROOT:[syslib] VAXC$hfile FSCNDEF.H VMI$ROOT:[syslib] VAXC$hfile GPSDEF.H VMI$ROOT:[syslib] VAXC$hfile GSDEF.H VMI$ROOT:[syslib] VAXC$hfile GSYDEF.H VMI$ROOT:[syslib] VAXC$hfile HLPDEF.H VMI$ROOT:[syslib] VAXC$hfile IACDEF.H VMI$ROOT:[syslib] VAXC$hfile IDCDEF.H VMI$ROOT:[syslib] VAXC$hfile IN.H VMI$ROOT:[syslib] VAXC$hfile INET.H VMI$ROOT:[syslib] VAXC$hfile IODEF.H VMI$ROOT:[syslib] VAXC$hfile JBCMSGDEF.H VMI$ROOT:[syslib] VAXC$hfile JPIDEF.H VMI$ROOT:[syslib] VAXC$hfile KGBDEF.H VMI$ROOT:[syslib] VAXC$hfile LADEF.H VMI$ROOT:[syslib] VAXC$hfile LATDEF.H VMI$ROOT:[syslib] VAXC$hfile LBRCTLTBL.H VMI$ROOT:[syslib] VAXC$hfile LBRDEF.H VMI$ROOT:[syslib] VAXC$hfile LCKDEF.H VMI$ROOT:[syslib] VAXC$hfile LEPMDEF.H VMI$ROOT:[syslib] VAXC$hfile LHIDEF.H VMI$ROOT:[syslib] VAXC$hfile LIB$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile LIBCLIDEF.H VMI$ROOT:[syslib] VAXC$hfile LIBDCFDEF.H VMI$ROOT:[syslib] VAXC$hfile LIBDEF.H VMI$ROOT:[syslib] VAXC$hfile LIBDTDEF.H VMI$ROOT:[syslib] VAXC$hfile LIBVMDEF.H VMI$ROOT:[syslib] VAXC$hfile LIMITS.H VMI$ROOT:[syslib] VAXC$hfile LKIDEF.H VMI$ROOT:[syslib] VAXC$hfile LMFDEF.H VMI$ROOT:[syslib] VAXC$hfile LNKDEF.H VMI$ROOT:[syslib] VAXC$hfile LNMDEF.H VMI$ROOT:[syslib] VAXC$hfile LPDEF.H VMI$ROOT:[syslib] VAXC$hfile LPRODEF.H VMI$ROOT:[syslib] VAXC$hfile LSDFDEF.H VMI$ROOT:[syslib] VAXC$hfile LSRFDEF.H VMI$ROOT:[syslib] VAXC$hfile LSYDEF.H VMI$ROOT:[syslib] VAXC$hfile MAILDEF.H VMI$ROOT:[syslib] VAXC$hfile MATH.H VMI$ROOT:[syslib] VAXC$hfile MHDDEF.H VMI$ROOT:[syslib] VAXC$hfile MHDEF.H VMI$ROOT:[syslib] VAXC$hfile MNTDEF.H VMI$ROOT:[syslib] VAXC$hfile MSGDEF.H VMI$ROOT:[syslib] VAXC$hfile MT2DEF.H VMI$ROOT:[syslib] VAXC$hfile MTADEF.H VMI$ROOT:[syslib] VAXC$hfile MTDEF.H VMI$ROOT:[syslib] VAXC$hfile MTHDEF.H VMI$ROOT:[syslib] VAXC$hfile NAM.H VMI$ROOT:[syslib] VAXC$hfile NCS$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile NCSDEF.H VMI$ROOT:[syslib] VAXC$hfile NETDB.H VMI$ROOT:[syslib] VAXC$hfile NFBDEF.H VMI$ROOT:[syslib] VAXC$hfile NSARECDEF.H VMI$ROOT:[syslib] VAXC$hfile OBJRECDEF.H VMI$ROOT:[syslib] VAXC$hfile OPCDEF.H VMI$ROOT:[syslib] VAXC$hfile OPDEF.H VMI$ROOT:[syslib] VAXC$hfile OPRDEF.H VMI$ROOT:[syslib] VAXC$hfile OTS$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile OTSDEF.H VMI$ROOT:[syslib] VAXC$hfile PCCDEF.H VMI$ROOT:[syslib] VAXC$hfile PERROR.H VMI$ROOT:[syslib] VAXC$hfile PLVDEF.H VMI$ROOT:[syslib] VAXC$hfile PPL$DEF.H VMI$ROOT:[syslib] VAXC$hfile PPL$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile PPLDEF.H VMI$ROOT:[syslib] VAXC$hfile PQLDEF.H VMI$ROOT:[syslib] VAXC$hfile PRCDEF.H VMI$ROOT:[syslib] VAXC$hfile PRDEF.H VMI$ROOT:[syslib] VAXC$hfile PROCESSES.H VMI$ROOT:[syslib] VAXC$hfile PRODEF.H VMI$ROOT:[syslib] VAXC$hfile PROMDEF.H VMI$ROOT:[syslib] VAXC$hfile PROVDEF.H VMI$ROOT:[syslib] VAXC$hfile PROWDEF.H VMI$ROOT:[syslib] VAXC$hfile PRTDEF.H VMI$ROOT:[syslib] VAXC$hfile PRVDEF.H VMI$ROOT:[syslib] VAXC$hfile PSLDEF.H VMI$ROOT:[syslib] VAXC$hfile PSMMSGDEF.H VMI$ROOT:[syslib] VAXC$hfile PSWDEF.H VMI$ROOT:[syslib] VAXC$hfile QUIDEF.H VMI$ROOT:[syslib] VAXC$hfile RAB.H VMI$ROOT:[syslib] VAXC$hfile RMEDEF.H VMI$ROOT:[syslib] VAXC$hfile RMS.H VMI$ROOT:[syslib] VAXC$hfile RMSDEF.H VMI$ROOT:[syslib] VAXC$hfile SBKDEF.H VMI$ROOT:[syslib] VAXC$hfile SCRDEF.H VMI$ROOT:[syslib] VAXC$hfile SDFDEF.H VMI$ROOT:[syslib] VAXC$hfile SDFMDEF.H VMI$ROOT:[syslib] VAXC$hfile SDFVDEF.H VMI$ROOT:[syslib] VAXC$hfile SDFWDEF.H VMI$ROOT:[syslib] VAXC$hfile SECDEF.H VMI$ROOT:[syslib] VAXC$hfile SETJMP.H VMI$ROOT:[syslib] VAXC$hfile SFDEF.H VMI$ROOT:[syslib] VAXC$hfile SGPSDEF.H VMI$ROOT:[syslib] VAXC$hfile SHRDEF.H VMI$ROOT:[syslib] VAXC$hfile SIGNAL.H VMI$ROOT:[syslib] VAXC$hfile SJCDEF.H VMI$ROOT:[syslib] VAXC$hfile SMG$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile SMGDEF.H VMI$ROOT:[syslib] VAXC$hfile SMGMSG.H VMI$ROOT:[syslib] VAXC$hfile SMGTRMPTR.H VMI$ROOT:[syslib] VAXC$hfile SMRDEF.H VMI$ROOT:[syslib] VAXC$hfile SOCKET.H VMI$ROOT:[syslib] VAXC$hfile SOR$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile SORDEF.H VMI$ROOT:[syslib] VAXC$hfile SRFDEF.H VMI$ROOT:[syslib] VAXC$hfile SRMDEF.H VMI$ROOT:[syslib] VAXC$hfile SSDEF.H VMI$ROOT:[syslib] VAXC$hfile STARLET.H VMI$ROOT:[syslib] VAXC$hfile STAT.H VMI$ROOT:[syslib] VAXC$hfile STDARG.H VMI$ROOT:[syslib] VAXC$hfile STDDEF.H VMI$ROOT:[syslib] VAXC$hfile STDIO.H VMI$ROOT:[syslib] VAXC$hfile STDLIB.H VMI$ROOT:[syslib] VAXC$hfile STR$ROUTINES.H VMI$ROOT:[syslib] VAXC$hfile STRDEF.H VMI$ROOT:[syslib] VAXC$hfile STRING.H VMI$ROOT:[syslib] VAXC$hfile STSDEF.H VMI$ROOT:[syslib] VAXC$hfile SYIDEF.H VMI$ROOT:[syslib] VAXC$hfile TIME.H VMI$ROOT:[syslib] VAXC$hfile TIMEB.H VMI$ROOT:[syslib] VAXC$hfile TIRDEF.H VMI$ROOT:[syslib] VAXC$hfile TPADEF.H VMI$ROOT:[syslib] VAXC$hfile TRMDEF.H VMI$ROOT:[syslib] VAXC$hfile TT2DEF.H VMI$ROOT:[syslib] VAXC$hfile TTDEF.H VMI$ROOT:[syslib] VAXC$hfile TYPES.H VMI$ROOT:[syslib] VAXC$hfile UAIDEF.H VMI$ROOT:[syslib] VAXC$hfile UICDEF.H VMI$ROOT:[syslib] VAXC$hfile UNIXIO.H VMI$ROOT:[syslib] VAXC$hfile UNIXLIB.H VMI$ROOT:[syslib] VAXC$hfile USGDEF.H VMI$ROOT:[syslib] VAXC$hfile USRIDEF.H VMI$ROOT:[syslib] VAXC$hfile VARARGS.H VMI$ROOT:[syslib] VAXC$hfile XAB.H VMI$ROOT:[syslib] VAXC$hfile XWDEF.H VMI$ROOT:[syslib]
Additional information available:
/*/*/*****************************************************************************
/*/*/*/*/*/*/*
/*/*/*/*/*/*/*
/*/*/*/*/*/*/*
/*/*/**/*/*/*/*
/*/*/*/*/*/*/*
/**/**/*/*/*/*/*
/*/*/*/*/*/*/*
/*/*/*/*/*/*/*
/*/*/*/*/*
/*
*
* this module is the IVP child. after sending back its arguments
* via a pipe, it waits around to be murdered by the parent
* process (VAXCIVPP).
*
*/
#define outpipe 12
globalvalue ss$_normal;
main(argc, argv)
char **argv;
{
char *bufptr, *malloc(), *getenv();
int len, status;
while (argc--) {
len = strlen(*argv);
if (write (outpipe, *argv++, len) != len)
printf ("\nERROR in IVP child arg #%d\n", argc);
}
if ((bufptr = malloc(512)) == 0) printf("\nERROR in IVP child malloc\n");
if ((bufptr = getenv("USER")) == 0) printf("\nERROR in IVP child getenv\n");
if (strcmp(bufptr, cuserid(0)) != 0) printf("\nERROR in IVP child userid\n");
/*
* wait forever until killed by parent
*/
if ((status = pause()) == -1)
abort();
}
$! COPYRIGHT (C) 1988 BY
$! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
$! ALL RIGHTS RESERVED.
$!
$! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
$! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
$! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
$! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
$! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
$! TRANSFERRED.
$!
$! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
$! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
$! CORPORATION.
$!
$! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
$! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
$!
$ !
$ ! Tell user that we are running the IVP.
$ !
$ write sys$output " "
$ write sys$output " "
$ write sys$output " *-------------------------------------------*"
$ write sys$output " * Installation Verification Procedure *"
$ write sys$output " * for VAX C *"
$ write sys$output " *-------------------------------------------*"
$ write sys$output " "
$ write sys$output " "
$ !
$ !
$ ! compile and link parent
$ !
$ cc/object sys$common:[systest.vaxc]vaxcivpp.c
$ link vaxcivpp, sys$input/opt
SYS$SHARE:vaxcrtl.exe/share
$ !
$ ! compile and link child
$ !
$ cc/object sys$common:[systest.vaxc]vaxcivpc.c
$ link vaxcivpc, sys$input/opt
SYS$SHARE:vaxcrtl.exe/share
$ !
$ ! execute ivp
$ !
$ run vaxcivpp
$ !
$ status = $STATUS
$ delete vaxcivp*.obj;, vaxcivp*.exe;
$ !
$ EXIT status
$ !
/*****************************************************************************
* *
* Copyright (c) 1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988 *
* by DIGITAL Equipment Corporation, Maynard, Mass. *
* *
*****************************************************************************
facility: vax C Installation utility
*/
#include limits
#include float
#include ctype
#include errno
#include perror
#include math
#include signal
#include stdio
#include types /* note that types must come before timeb */
#include timeb
#include time
#include accdef
#include chfdef
#include dcdef
#include descrip
#include dvidef
#include errnodef
#include iodef
#include jpidef
#include msgdef
#include opcdef
#include pqldef
#include prvdef
#include psldef
#include rms
#include secdef
#include setjmp
#include sfdef
#include ssdef
#include stsdef
#include ttdef
#define fail 0
#define success 1
#define err 2
char *brk(), *sbrk(), *calloc(), *ecvt(), *fcvt(), *gcvt();
char *fgets(), *malloc(), *realloc(), *strcat(), *strncat();
char *strchr(), *strrchr(), *strcpy(), *strncpy(), *strpbrk(), *tmpnam();
struct tm *localtime();
FILE *tmpfile();
main()
{
putchar ('\n');
if (icpmath() &&
icpio() &&
icpctyp() &&
icpcnv() &&
icpstr() &&
icperrs() &&
icpbrk() &&
icptim() &&
icpjmp() &&
icpsig() &&
icpfork() &&
icpunix1() &&
icpunix2() &&
icppreproc() )
{
puts ("\n****** VAX C Installation Certification Procedure SUCCESSFUL ******\n");
exit (SS$_NORMAL);
}
else
{
puts ("\n****** VAX C Installation Procedure FAILED ******\n");
exit (err);
}
}
#define TRUE 1
icppreproc()
{
#pragma member_alignment
int nxtst,limits_found,float_found;
#pragma nomember_alignment
nxtst = 0;
float_found = 0;
limits_found = 0;
#if defined( FLT_RADIX)
float_found = TRUE;
#elif defined( TRUE)
float_found = 0;
#endif
#if defined( UINT_MAX)
limits_found = TRUE;
#elif defined( TRUE)
limits_found = 0;
#endif
if (limits_found && float_found)
return( success);
else {
printf ("\nERROR from preproc test #%d#%d\n", limits_found, float_found);
return (fail);
}
}
#define NOT_EQ_FUZZ(a,b) (fabs((a)-(b)) > 1e-6)
icpmath()
{
int nxtst, i;
double flt1,flt2;
double mth$dlog(),mth$dlog10(),mth$dexp(),mth$dsin(),mth$dcos(),
mth$dtan(),mth$dasin(),mth$dacos(),mth$datan(),
mth$dsinh(),mth$dcosh(),mth$dtanh(),mth$dsqrt(),
mth$datan2() ;
int i1,i2;
nxtst = 0;
/* abs */
nxtst++;
i1 = -32767;
if (abs(i1) != 32767) goto error;
/* ceil */
nxtst++;
flt1 = -99.1;
if (NOT_EQ_FUZZ(ceil(flt1),-99.0)) goto error;
/* exp */
nxtst++;
flt1 = 2E0;
if (NOT_EQ_FUZZ(exp(flt1),mth$dexp(&flt1))) goto error;
/* floor */
nxtst++;
flt1 = 15E0;
if (NOT_EQ_FUZZ(floor(flt1),flt1)) goto error;
/* log */
nxtst++;
flt1 = 225.5E0;
if (NOT_EQ_FUZZ(log(flt1),mth$dlog(&flt1))) goto error;
/* log10 */
nxtst++;
flt1 = 100E0;
if (NOT_EQ_FUZZ(log10(flt1),2E0)) goto error;
/* sqrt */
nxtst++;
flt1 = 10000E0;
if (NOT_EQ_FUZZ(sqrt(flt1),mth$dsqrt(&flt1))) goto error;
/* acos */
nxtst++;
flt1 = -.5E0;
if (NOT_EQ_FUZZ(acos(flt1),mth$dacos(&flt1))) goto error;
/* asin */
nxtst++;
flt1 = 0e0;
if (NOT_EQ_FUZZ(asin(0E0),mth$dasin(&flt1))) goto error;
/* atan */
nxtst++;
flt1 = 2.00000000E0;
if (NOT_EQ_FUZZ(atan(flt1),mth$datan(&flt1))) goto error;
/* atan2 */
nxtst++;
flt1 = -1.57E0;
flt2 = 0E0;
if (NOT_EQ_FUZZ(atan2(-1.5700000000E0,00000000E0),mth$datan2(&flt1,&flt2)))
goto error;
/* cos */
nxtst++;
flt1 = .7853900000E0;
if (NOT_EQ_FUZZ(cos(flt1),mth$dcos(&flt1))) goto error;
/* cosh */
nxtst++;
flt1 = 1.5707800000;
if (NOT_EQ_FUZZ(cosh(flt1),mth$dcosh(&flt1))) goto error;
/* sin */
nxtst++;
flt1 = 0E0;
if (NOT_EQ_FUZZ(sin(flt1),mth$dsin(&flt1))) goto error;
/* sinh */
nxtst++;
flt1 = .78539E0;
if (NOT_EQ_FUZZ(sinh(flt1),mth$dsinh(&flt1))) goto error;
/* tan */
nxtst++;
flt1 = 3.14159E0;
if (NOT_EQ_FUZZ(tan(flt1),mth$dtan(&flt1))) goto error;
/* tanh */
nxtst++;
flt1 = 0E0;
if (NOT_EQ_FUZZ(tanh(flt1),mth$dtanh(&flt1))) goto error;
/* fabs */
nxtst++;
flt1 = 45678;
if (NOT_EQ_FUZZ(fabs(flt1),flt1)) goto error;
/* frexp & ldexp */
nxtst++;
flt1 = 324.5E0;
flt2 = frexp(flt1, &i);
if (fabs(ldexp(flt2,i) - flt1) > .00001E0) goto error;
/* modf */
nxtst++;
flt1 = -23.45;
flt2 = modf(flt1,&flt1);
if (NOT_EQ_FUZZ(flt1,-23E0)) goto error;
if (fabs(flt2 + .45E0) > .001E0) goto error;
/* hypot */
nxtst++;
if (NOT_EQ_FUZZ(hypot(3E0,4E0),5E0)) goto error;
/* pow */
nxtst++;
if (fabs(pow (2.00000E0, 3.00000E0) - 8.00000E0) > .00001) goto error;
/* rand, srand */
nxtst++;
rand();
srand (5);
return (success);
/** error **/
error:
printf ("\nERROR from math test #%d\n",nxtst);
return (fail);
}
icpio()
{
int nxtst, i, j;
long longoff;
double d1, d2;
FILE *fp;
char filnam [132];
char *lptr, *lptr2;
char buf [512];
typedef struct person {
char first [15];
char last [20];
char nl; } rec6;
static rec6 items6 [15] = {
"Catherine ","Pacy ",'\n',
"Genghis ","Khan ",'\n',
"Marcus ","Cicero ",'\n',
"Ieyasu ","Tokugawa ",'\n',
"Miyamoto ","Musashi ",'\n',
"Savinien ","de Bergerac ",'\n',
"Siddharta ","Gautama ",'\n',
"Lancelot ","du Lac ",'\n',
"Leonardo ","da Vinci ",'\n',
"Sojourner ","Truth ",'\n',
"Lorenzo ","de Medici ",'\n',
"Boadicea ","of the Britons ",'\n',
"Alexander ","the Great ",'\n',
"Carlus ","Magnus ",'\n',
"Omar ","Khayyam ",'\n'
} ;
rec6 *recptr;
rec6 initems6 [15];
static char line1 [] = "In Xanadu did Kublai Khan / A stately pleasure dome decree,\n" ;
static char line2 [] = "Where Alph the sacred river ran / Down to the sunless sea.";
static char line3 [] = "Twas brilling, and the slithy toves/ Did gyre and gimble in the wabe.\n" ;
static char line4 [] = "All mimsy were the borogroves/ And the momey raths outgrabe.\n";
nxtst = 0;
/* check for initialization of FILE blocks */
if (fileno (stdin) != 0) goto error;
if (fileno (stdout) != 1) goto error;
if (fileno (stderr) != 2) goto error;
/* assign stdout to a file, and use the stdout functions (putchar & puts) */
nxtst++;
if (freopen ("icptmp1.tmp", "w ", stdout) == NULL) goto error;
for (i = 0; (j = putchar (line1 [i])) > 0; i++);
if (j) goto error;
if (puts (&line2) == EOF) goto error;
/* restore stdout to sys$output, open file for append and do file output */
nxtst++;
if (freopen ("SYS$OUTPUT", "w ", stdout) == NULL) goto error;
if ((fp = fopen ("icptmp1.tmp", "a+")) == NULL) goto error;
if ((longoff = ftell (fp)) == EOF) goto error; /* save where we begin */
if (fgetname (fp, &filnam) == NULL) goto error;
for (lptr = &line3; (j = putc (*lptr++, fp)) > 0;);
if (j) goto error;
for (i = 0; (j = fputc (line4 [i], fp)) > 0; i++);
if (j) goto error;
if (fputs("This is line #5, output by fputs\n", fp) == EOF) goto error;
if (fwrite (&items6, sizeof(rec6), 15, fp) != 15) goto error;
if (fflush (fp) == EOF) goto error;
/*
if (fp -> _cnt != 512) goto error; */
/* reset to where we began appending and do reads */
nxtst++;
if (fseek (fp, longoff, 0) == EOF) goto error;
j = getc (fp);
ungetc (j, fp);
i = getc (fp);
if (i != j) goto error;
ungetc (i,fp);
for (lptr = &line3; (j = getc (fp)) > 0; )
if (j != *lptr++) goto error;
for (i = 0; (j = fgetc (fp)) > 0; i++)
if (j != line4 [i]) goto error;
if ((int)fgets (&buf, 512, fp) == EOF) goto error;
if (strcmp (&buf, "This is line #5, output by fputs\n") != 0)
goto error;
recptr = &initems6;
if (fread (recptr, sizeof (*recptr), 15, fp) != 15) goto error;
for (i = 0; i < 15; i++) {
if (strcmp (&items6[i].first, &initems6[i].first) != 0)
goto error;
if (strcmp (&items6[i].last, &initems6[i].last) != 0)
goto error;
}
fclose (fp);
/* reopen this file as stdin and read from the beginning */
nxtst++;
if (freopen (&filnam, "r ", stdin) == NULL) goto error;
for (i = 0; (j = getchar()) > 0; i++)
if (j != line1[i]) goto error;
if ((int)gets (&buf) == EOF) goto error;
if (strcmp (&buf, &line2) != 0) goto error;
if (freopen ("SYS$INPUT", "r ", stdin) == NULL) goto error;
if (delete (&filnam) == -1) goto error;
/* open a new file and do integer putw and getw */
nxtst++;
if ((i = creat ("icptmp2.tmp", 0)) == EOF) goto error;
if ((fp = fdopen (i, "w+")) == NULL) goto error;
if (fgetname (fp, &filnam) == NULL) goto error;
for (i = 10; putw (i, fp); i--)
if (ferror(fp)) goto error;
rewind (fp);
for (i = 10; ferror(fp) == 0 && (j = getw (fp)); i--)
if (j != i) goto error;
if (ferror(fp)) goto error;
i = getc (fp);
if (feof(fp) == 0) goto error;
clearerr (fp);
if (feof(fp) != 0) goto error;
fclose (fp);
if (delete (&filnam) == -1) goto error;
/* temporary file stuff, setbuf */
nxtst++;
if ((fp = tmpfile()) == NULL) goto error;
if ((lptr = malloc (BUFSIZ)) == NULL) goto error;
setbuf (fp,lptr);
if ((*fp) -> _base != lptr) goto error;
for (i=0; putc (line1[i++],fp););
if (strcmp (lptr, &line1) != 0) goto error;
fclose (fp);
free (lptr);
/* tmpnam */
nxtst++;
if ((lptr = tmpnam(NULL)) == NULL) goto error;
if ((fp = fopen (lptr, "w+")) == NULL) goto error;
if (fgetname (fp, &filnam) == NULL) goto error;
/* printf and scanf */
nxtst++;
d1=4.000E20;
fprintf (fp,"%x %s %g \n",lptr,"Temujin",d1);
rewind(fp);
if (fscanf (fp, "%x %s %le ", &lptr2, &buf, &d2) != 3) goto error;
if (lptr2 != lptr) goto error;
if (strcmp(&buf, "Temujin") != 0) goto error;
if (d1 != d2) goto error;
fclose (fp);
delete (&filnam);
sprintf (&buf, "char=%c, octal=%o, g=%g\0", 'q', 56, 987E-4);
j=0;
if (sscanf (&buf,"char=%c, octal=%o, g=%le", &j, &i, &d1) != 3)
goto error;
if ((char)j != 'q') goto error;
if (i != 56) goto error;
if (d1 != 987E-4) goto error;
/* undefine putchar and getchar and do the functions */
#undef putchar
#undef getchar
nxtst++;
if (freopen("icptmp4.tmp","w ",stdout) == NULL) goto error;
if (putchar ('z') == EOF) goto error;
for (lptr = "543"; putchar (*lptr++););
if (freopen("SYS$OUTPUT","w ",stdout) == NULL) goto error;
if (freopen("icptmp4.tmp","r",stdin) == NULL) goto error;
if (getchar() != 'z') goto error;
if (scanf(" %d", &i) != 1) goto error;
if (i != 543) goto error;
if (freopen("SYS$INPUT","r",stdin) == NULL) goto error;
delete ("icptmp4.tmp");
return (success);
/** error **/
error:
freopen ("SYS$OUTPUT", "w ",stdout);
freopen ("SYS$INPUT", "r ",stdin);
printf ("\nERROR in I/O test #%d\n",nxtst);
return (fail);
}
#include stdio /* restore getchar and putchar */
icpctyp()
{
int i;
char c;
#define upper 0x1 /* Uppercase letters */
#define lower 0x2 /* Lowercase letters */
#define digit 0x4 /* Decimal digits */
#define space 0x8 /* White space */
#define punct 0x10 /* Punctuation marks */
#define cntrl 0x20 /* Control characters */
#define blank 0x40 /* Blank character */
static char ourctype [128] = {
cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,space|cntrl,space|cntrl,space|cntrl,space|cntrl,space|cntrl,cntrl,cntrl,
cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,cntrl,
blank|space,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,punct,
digit,digit,digit,digit,digit,digit,digit,digit,digit,digit,punct,punct,punct,punct,punct,punct,
punct,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,
upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,upper,punct,punct,punct,punct,punct,
punct,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,
lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,lower,punct,punct,punct,punct,cntrl};
/** test ctype initialization and ctype.h macros */
for (c = 0; c <= 127 && c >= 0; c++) {
i=0;
if ((isalnum(c) == 0) != ((ourctype [c] & (upper | lower |
digit )) == 0)) goto error;
i++;
if ((isalpha(c) == 0) != ((ourctype [c] & (upper | lower)) == 0)) goto error;
i++;
if (isascii (c) == 0) goto error;
i++;
if ((iscntrl (c) == 0) != ((ourctype [c] & cntrl) == 0)) goto error;
i++;
if ((isdigit (c) == 0) != ((ourctype [c] & digit) == 0)) goto error;
i++;
if ((isgraph (c) == 0) != ((ourctype [c] & (upper | lower |
digit | punct)) == 0)) goto error;
i++;
if ((islower (c) == 0) != ((ourctype [c] & lower) == 0)) goto error;
i++;
if ((isprint (c) == 0) != ((ourctype [c] & (upper | lower |
digit | punct | blank)) == 0)) goto error;
i++;
if ((ispunct (c) == 0) != ((ourctype [c] & punct) == 0)) goto error;
i++;
if ((isspace (c) == 0) != ((ourctype [c] & space) == 0)) goto error;
i++;
if ((isupper (c) == 0) != ((ourctype [c] & upper) == 0)) goto error;
i++;
}
return (success);
error:
printf ("\nERROR in ctype test #%d\n",i);
return (fail);
}
icpcnv()
{
double atof();
double dflt;
char *bufptr;
char buf [132];
int nxtst, i, j;
nxtst=0;
/* case conversions */
nxtst++;
if (tolower('A') != 'a') goto error;
if (tolower('[') != '[') goto error;
if (_tolower('B') != 'b') goto error;
if (toupper('a') != 'A') goto error;
if (toupper('~') != '~') goto error;
if (_toupper('a') != 'A') goto error;
/* ascii to float */
nxtst++;
if (atof ("-1.23E+02") != -1.23E+02) goto error;
/* ascii to int and long */
nxtst++;
if (atoi("523") != 523) goto error;
if (atol("-1024") != -1024) goto error;
/* ecvt */
nxtst++;
dflt = -325.E3;
bufptr = ecvt (dflt, 8, &i, &j);
if (strcmp (bufptr, "32500000") != 0) goto error;
if (i != 6) goto error;
if (j = 0) goto error;
/* gcvt */
nxtst++;
bufptr = gcvt (-128E0,5,buf);
if (strcmp (bufptr, "-128") != 0) goto error;
return (success);
error:
printf ("\nERROR in conversion test %d\n",nxtst);
return (fail);
}
icpstr()
{
char str0 [132];
static char *str1 = {"ALPHABET: "};
static char *str2 = {"abcdefghijklmnopqrstuvwxyz "};
static char *str3 = {"ALPHABET: abcdefghijklmnopqrstuvwxyz abc"};
static char *str4 = {"0123456789"};
char str5[2] ={'\x008', '\0'};
char str6[2] ={'\010','\0'};
char *sptr, *p;
int nxtst;
nxtst = 0;
/* concatenate */
nxtst++;
str0 [0] = '\0';
sptr = strcat(&str0, str1);
sptr = strcat(&str0, str2);
sptr = strncat(&str0, str2, 3);
for (p = str3; *p;)
if (*sptr++ != *p++) goto error;
/* strchr, strrchr */
nxtst++;
if (strchr (&str0,'a') != &str0[10]) goto error;
if (strrchr (&str0,'a') != &str0[37]) goto error;
/* strcmp, strncmp */
nxtst++;
if (strcmp (&str0, str3) != 0) goto error;
if (strcmp (&str0, str2) >= 0) goto error;
if (strncmp (str2, "abcxyz", 3) != 0) goto error;
if (strcmp(str5,str6) != 0) goto error;
/* strcpy, strncpy */
nxtst++;
sptr = strcpy(&str0, str4);
if (strcmp (sptr, str4) != 0) goto error;
sptr = calloc(20,1);
if (strcmp (strncpy (sptr, "0123456789abcdef",13), "0123456789abc")
!= 0) goto error;
/* strcspn, strspn */
nxtst++;
if (strcspn ("abc123xyz", str4) != 3) goto error;
if (strspn (sptr, str4) != 10) goto error;
/* strlen */
nxtst++;
if (strlen (&str0) != 10) goto error;
/* strpbrk */
nxtst++;
if (strpbrk (&str0, "345") != &str0[3]) goto error;
cfree(sptr);
return (success);
error:
printf ("\nERROR in string function test %d\n",nxtst);
return (fail);
}
icperrs()
{
double dflt;
char buf [132];
static char msg [132] = "ICPERR";
FILE *fp = 0;
char filnam [132];
if (freopen ("icperr.tmp", "w", stderr) == NULL) goto error;
clearerr (stderr);
dflt = log(-1E0);
if (errno != EDOM) goto error;
perror (&msg);
if (freopen ("SYS$ERROR", "w", stderr) == NULL) goto error;
if ((fp = fopen ("icperr.tmp", "r")) == NULL) goto error;
if (fgets (&buf, 132, fp) == NULL) goto error;
strcat (&msg, ": ");
strcat (&msg, sys_errlist[EDOM]);
strcat (&msg, "\n");
if (strcmp (&buf, &msg) != 0) goto error;
if (fgetname (fp, &filnam) == NULL) goto error;
fclose(fp);
if (delete (&filnam) == -1) goto error;
return (success);
error:
if (fp) fclose(fp);
freopen ("SYS$ERROR", "w ",stderr);
printf ("\nERROR in error test\n");
return (fail);
}
int killflag, alarmflag, quitflag, pid;
icpsig()
{
int catchalarm(), catchquit();
int nxtst, t1, i;
FILE *fp;
struct timeb tb;
nxtst = 0;
pid = getpid();
nxtst++;
if ((int)signal (SIGALRM, catchalarm) == -1)
{
nxtst += 100;
goto error;
}
alarmflag = 0;
t1 = time(0);
alarm (5);
pause ();
ftime (&tb);
if (tb.time - t1 <= 0)
{
nxtst += 200;
goto error;
}
if (alarmflag != 1)
{
nxtst += 300;
goto error;
}
nxtst++;
signal (SIGQUIT, catchquit);
if (ssignal (SIGQUIT, catchquit) == 0) goto error;
nxtst++;
quitflag = 0;
if (gsignal (SIGQUIT) != 1) goto error;
nxtst++;
if (quitflag != 1) goto error;
signal (SIGALRM, SIG_DFL);
signal (SIGQUIT, SIG_DFL);
return (success);
error:
printf ("\nERROR in signal test #%d\n", nxtst);
return (fail);
}
catchalarm()
{
SYS$WAKE (&pid);
alarmflag = 1;
return (1);
}
catchquit()
{
quitflag = 1;
return (1);
}
/*
* this module tests the execv, vfork, pipe, kill (and pause) functions
*
*
*/
#define inpipe 11
#define outpipe 12
#define wait_time 5 * 60
int vfork_flag;
icpfork()
{
/*
* definition of local variables
*/
static char *gargv[] = { "ARGC\n", "ARGC1\n", "icpcc\n", 0 };
int status, cstatus, fd[2], len, nxtst, i, icp_vfork_alarm();
char *bufptr;
static struct time_buffer
{
long process_user_time;
long process_system_time;
long child_user_time;
long child_system_time;
} timbuf = {0, 0, 0, 0};
/*
* now perform setup to create the child process
*/
errno = 0;
nxtst = 0;
if (pipe(fd) == -1) goto error;
nxtst++;
if (dup2(fd[0], inpipe) == -1) goto error;
nxtst++;
if (dup2(fd[1], outpipe) == -1) goto error;
nxtst++;
if (access("vaxcivpc.exe", 0) == -1) goto error;
nxtst++;
if ((status = vfork()) != 0) {
/*
* read the pipe and compare the arguments
*/
nxtst++;
if ((int)signal(SIGALRM, icp_vfork_alarm) == -1) goto error;
vfork_flag = 0;
alarm(wait_time);
nxtst++;
if ((bufptr = calloc(512,1)) == NULL) goto error;
for (i=0; i<3; i++) {
nxtst++;
if ((len = read(inpipe, bufptr, 512)) == -1) goto error;
if (strcmp (bufptr, gargv[i]) != 0) goto error;
}
vfork_flag = 1;
alarm(0);
/*
* now kill the child process
*/
nxtst++;
if (kill(status, SIGKILL) == -1) goto error;
/*
* wait for child process to finish and get information from it
*/
nxtst++;
if (wait(&cstatus) == -1) goto error;
nxtst++;
if (cstatus != SS$_ABORT) goto error;
nxtst++;
times (&timbuf);
if (timbuf.child_user_time == 0) goto error;
signal(SIGALRM, SIG_DFL);
return (success);
}
/*
* vfork was successful, so create the child process
*/
else {
nxtst++;
execv("VAXCIVPC", gargv);
goto error;
}
error:
printf ("\nERROR in vfork/exec test #%d\n", nxtst);
return (fail);
}
icp_vfork_alarm(sig)
{
if (vfork_flag == 0) {
printf ("\nERROR waiting for child to execute - process pipe read time-out\n");
puts ("\n****** VAX C Installation Procedure FAILED ******\n");
exit(err);
}
else
return(success);
}
/*
* this routine tests the following functions:
*
* brk - allocate memory routine to break
* sbrk - allocate specified number of bytes
*
*/
icpbrk()
{
char *begbrk, *endbrk, *start;
start = begbrk = sbrk(0);
if ((endbrk = brk(begbrk + 511)) != begbrk + 512) goto error;
if ((begbrk = sbrk(4)) != endbrk) goto error;
if ((begbrk = sbrk(-1025)) != start) goto error;
return(success);
error:
printf("\nERROR testing brk or sbrk function\n");
return(fail);
}
/*
*
* This routine tests the time functions ctime() and localtime()
*
* ctime(): returns 26 character string
* localtime(): returns pointer to a structure
* containing broken down time
*
*
*/
icptim()
{
char *strptr, date[26];
struct tm *ptr;
int t, nxtst;
static char *nmonth[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
static char *wkday[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
nxtst = 0;
t = time(0);
if ((strptr = ctime(&t)) == NULL) goto error;
nxtst++;
if ((ptr = localtime(&t)) == NULL) goto error;
nxtst++;
if (sprintf(date, "%s %s %2d %02d:%02d:%02d %d\n",
wkday[ptr->tm_wday],
nmonth[ptr->tm_mon],
ptr->tm_mday,
ptr->tm_hour,
ptr->tm_min,
ptr->tm_sec,
(ptr->tm_year+1900)) != 25) goto error;
nxtst++;
if (strcmp(strptr, date) != 0) goto error;
nxtst++;
return(success);
error:
printf("\nError in time test #%d\n", nxtst);
return(fail);
}
/*
*
*
* This routine tests the functions setjmp and longjmp.
*
* setjmp: saves state of calling procedure
* longjmp: restores state of program
*
*
*
*/
#define NORMAL 0
jmp_buf savenv;
icpjmp()
{
int nxtst = 0;
switch (setjmp(savenv))
{
case NORMAL:
level1(&nxtst);
nxtst++;
goto error;
break;
case success:
if (nxtst != 3) goto error;
return(success);
break;
}
error:
printf("\nError in setjmp/longjump test #%d\n", nxtst);
return(fail);
}
level1(n)
int *n;
{
(*n)++;
level2(n);
return;
}
level2(n)
int *n;
{
(*n)++;
level3(n);
return;
}
#pragma noinline level3
level3(n)
int *n;
{
(*n)++;
longjmp(savenv, success);
return;
}
#define PROCESS 2
struct JPI_ITEM_LIST {
short length1;
short type1;
short *grpid;
short *act_length1; /* group uic number */
short length2;
short type2;
int *memid;
short *act_length2; /* member uic */
int terminator; /* end of list indicator */
};
icpunix1()
{
char *p1, *p2;
char *str = "This is something to test with";
int group_id, ret_length1, member_id, ret_length2;
int status, t1 ,nxtst;
struct JPI_ITEM_LIST items;
$DESCRIPTOR(syscmd, "SYS$COMMAND");
$DESCRIPTOR(process_table, "LNM$PROCESS"); /* process logical name table */
char equiv_sys_command[20] = "_TESTNAME";
int crelnm_attributes = 512; /* LNM$M_TERMINAL */
struct {
unsigned short a_buffer_length;
unsigned short a_item_code;
int *a_buffer_address;
short *a_return_length_address;
unsigned short s_buffer_length;
unsigned short s_item_code;
char *s_buffer_address;
short *s_return_length_address;
int end;
} crelnm_itmlst = {4, 3, &crelnm_attributes, 0,
strlen(equiv_sys_command), 2, &equiv_sys_command, 0, 0};
items.type1 = JPI$_GRP, items.length1 = 4, items.grpid = &group_id; items.act_length1 = &ret_length1;
items.type2 = JPI$_MEM, items.length2 = 4, items.memid = &member_id; items.act_length2 = &ret_length2;
items.terminator = 0;
nxtst = 0;
if ((status = SYS$CRELNM(0, &process_table, &syscmd, 0, &crelnm_itmlst)) != SS$_NORMAL) goto error;
nxtst++;
if ((strcmp(ctermid(0), equiv_sys_command)) != 0) goto error;
nxtst++;
if ((status = SYS$GETJPIW(0, 0, 0, &items, 0, 0, 0)) != SS$_NORMAL) goto error;
nxtst++;
if (group_id != getgid()) goto error;
nxtst++;
if (member_id != getuid()) goto error;
nxtst++;
if (setuid() != NULL) goto error;
nxtst++;
if (setgid() != NULL) goto error;
nxtst++;
t1 = time(0);
sleep(5);
if ((time(0) - t1) < 5) goto error;
nxtst++;
if ((status = nice(0)) == -1) goto error;
nxtst++;
if ((p1 = malloc(200)) == NULL) goto error;
strcpy (p1, str);
nxtst++;
if ((p2 = realloc(p1, 600)) == NULL) goto error;
if (strcmp (p2, str) != 0) goto error;
nxtst++;
if (free(p2) != 0) goto error;
return(success);
error:
printf("\nERROR in ICP in routine icpunix1 test #%d\n", nxtst);
return(fail);
}
icpunix2()
{
int nxtst, fd1, fd2;
FILE *fp;
char *buf1 = "A fleeting stop, a momentary taste / Of Being from the well amid the waste \
/ And lo! the phantom caravan moves on -- / Oh make haste!";
char buf2 [512];
nxtst=0;
umask (0111);
nxtst++;
if ((fd1 = creat("icptmp5.tmp",0777)) == -1) goto error2;
nxtst++;
if (access("icptmp5.tmp",001) != -1) goto error;
nxtst++;
if (chmod ("icptmp5.tmp", 0777) == -1) goto error;
nxtst++;
if (access ("icptmp5.tmp", 001) != 0) goto error;
nxtst++;
if (umask(0) != 0111) goto error;
nxtst++;
if ((fd2 = dup(fd1)) == -1) goto error2;
nxtst++;
if ((fp = fdopen (fd1, "w+")) == NULL) goto error2;
if (write (fd1, buf1, strlen(buf1)+1) != strlen(buf1)+1) goto error2;
nxtst++;
rewind (fp);
if (read (fd2, &buf2, 512) == EOF) goto error2;
nxtst++;
if (strcmp (buf1, &buf2) != 0) goto error2;
fclose (fp);
close (fd2);
if (delete ("icptmp5.tmp") == -1) goto error2;
return (success);
error:
umask(0);
error2:
printf ("\nERROR in unix2 test #%d\n",nxtst);
return (fail);
}
/*
*
* This function is a compile-time test that references
* every RTL entry point. It is not meant to be invoked.
*
*
*/
icpchk()
{
double x,y;
cabs_t z;
time_t *t;
timeb_t *tb;
tm_t *tc;
tbuffer_t *tbu;
FILE_TYPE *fp;
JMP_BUF_TYPE jmp;
int i,j,fd;
unsigned ui;
char *a;
void *vp;
double atof();
printf("\nFunction ICPCHK() should not be invoked.\n");
return(success);
/*
ENTRY POINT MODULE FUNCTION */
abort(); /* C$ABORT Aborts the current process */
abs(); /* C$ABS Integer absolute math library function */
access(); /* C$UNIX Checks the accessiblity of a file */
acos(x); /* C$ACOS Arcosine math library function */
alarm(ui); /* C$ALARM Set alarm library function */
asin(x); /* C$ASIN Arcsine math library function */
atan(x); /* C$ATAN Arctangent math library function */
atan2(x,y); /* C$ATAN2 Arctangent math library function */
atof(); /* C$ATOF Converts floating-point ASCII to binary */
atoi(); /* C$ATOI Converts long ASCII to binary */
atol(); /* C$ATOI Converts long ASCII to binary */
brk(); /* C$BREAK Determines the lowest virtual address for the program */
cabs(z); /* C$HPOT Euclidian distance math library function */
calloc(); /* C$MALLOC Allocates and clears storage */
ceil(x); /* C$CEIL Ceiling math library function */
chdir(); /* C$UNIX Changes the default directory */
chmod(); /* C$UNIX Changes a file's access mode */
chown(); /* C$UNIX Changes a file's owner */
close(); /* C$UNIX Closes a file */
cos(x); /* C$COS Cosine math library function */
cosh(x); /* C$COSH Hyperbolic cosine math library function */
creat(); /* C$UNIX Creates a file */
ctermid(); /* C$CTERMID Identifies the controlling terminal */
ctime(tc); /* C$TIMEF Converts time in seconds to a 26 character string */
cuserid(); /* C$CUSERID Identifies the username */
delete(); /* C$UNIX Deletes a file by file name */
dup(); /* C$UNIX Creates a duplicate file descriptor */
dup2(); /* C$UNIX Creates a duplicate file descriptor */
ecvt(); /* C$ECVT Converts a double value to an ASCII string, rounding to the right */
execl(); /* C$UNIX Executes a program image with an argument list */
execle(); /* C$UNIX Executes a program image with an argument list and environment vector */
execv(); /* C$UNIX Executes a program image with an argument vector */
execve(); /* C$UNIX Executes a program image with an argument vector and environment vector */
exit(); /* C$EXIT Closes files and exits */
_exit(); /* C$UNIX Exits the program image */
exp(x); /* C$EXP Base e exponentiation math library function */
fabs(x); /* C$FABS Floating point double absolute math library function */
fclose(fp); /* C$FCLOSE Closes a file */
fcvt(); /* C$ECVT Converts a double value to an ASCII string in FORTRAN F-Format */
fdopen(fd,a); /* C$FDOPEN Opens a file by file descriptor */
fflush(fp); /* C$FFLUSH Flushes a file buffer */
fgetc(fp); /* C$FGETC Gets a character from a file */
fgetname(fp,a); /* C$FGETNAME Gets a filename string */
fgets(a,i,fp); /* C$FGETS Gets a string from a file */
floor(x); /* C$FLOOR Floor math library function */
fopen(a,a); /* C$FOPEN Opens a file by file pointer */
fprintf(fp,a); /* C$PRINTF Formats and writes a string to an output file */
fputc(i,fp); /* C$FPUTC Formats and writes a string to a file */
fputs(a,fp); /* C$FPUTS Writes a string to a file */
fread(vp,i,j,fp); /* C$FREAD Reads items of a specified number and size from a file to a buffer */
free(); /* C$MALLOC Deallocates storage */
freopen(a,a,fp); /* C$FOPEN Closes and reopens a file */
frexp(x,&i); /* C$FREXP Extract fraction and exponent math library function */
fscanf(fp,a); /* C$SCANF Formats input from a file */
fseek(fp,i,j); /* C$FSEEK Positions to a byte offset within a file */
ftell(fp); /* C$FTELL Returns current byte offset within a file */
ftime(tb); /* C$TIME Gets the time of the epoch and the fractional time */
fwrite(vp,i,j,fp); /* C$FWRITE Writes items of a specified number and size from a buffer to a file */
gcvt(); /* C$GCVT Converts a double value to an ASCII string and places the string in a buffer */
getchar(); /* C$GETCHAR Gets a character from standard input */
getenv(); /* C$GETENV Gets the environment */
getegid(); /* C$GETGID Gets the effictive group identification */
getgid(); /* C$GETGID Gets the group identification */
getname(); /* C$UNIX Gets a file name string */
getpid(); /* C$GETPID Gets the process identification */
gets(a); /* C$GETS Gets a string from standard input */
geteuid(); /* C$GETUID Gets the effective user identification */
getuid(); /* C$GETUID Gets the user identification */
getw(fp); /* C$GETW Gets a long word from an input file */
gsignal(i); /* C$SIGNAL Generates a signal */
hypot(x,y); /* C$HYPOT Euclidian distance math library function */
isatty(); /* C$UNIX Checks for a terminal file */
kill(i,j); /* C$KILL Sends signal to process */
ldexp(x,i); /* C$LDEXP Power of 2 math library function */
localtime(t); /* C$TIMEF Converts time in seconds to broken down time */
log(x); /* C$LOG Logrithm base e math library function */
log10(x); /* C$LOG10 logrithm base 10 math library function */
longjmp(jmp,i); /* C$SETJMP Returns to the entry point of its associated setjmp */
lseek(); /* C$UNIX Establishes a position in a file */
malloc(); /* C$MALLOC Allocates an area of contiguous bytes in memory */
mktemp(); /* C$TMPNAM Makes a temporary file name string */
modf(x,&y); /* C$MODF Extract fraction and integer math library function */
nice(); /* C$NICE Sets process priority */
open(); /* C$UNIX Opens a file by file descriptor */
pause(); /* C$PAUSE Suspends the process until a signal is received */
perror(a); /* C$PERROR Prints an error message */
pipe(); /* C$UNIX Allows two processes to exchange data */
pow(x,y); /* C$POW Power math library function */
printf(a); /* C$PRINTF Formats and writes a string to standard output */
putchar(); /* C$PUTCHAR Writes a character to standard output */
puts(a); /* C$PUTS Writes a string to standard output */
putw(i,fp); /* C$PUTW Writes a long word to a file */
rand(); /* C$RAND Computes a random number */
read(); /* C$UNIX Reads a file */
realloc(); /* C$MALLOC Changes the size of an area of storage */
rewind(fp); /* C$REWIND Returns file pointer to the beginning of the file */
sbrk(); /* C$BREAK Adds a number of bytes to the lowest virtual address */
scanf(fp,a); /* C$SCANF Formats input from the standard input */
setbuf(fp,a); /* C$SETBUF Associates a buffer with a file */
setgid(); /* C$SETGID Sets group identification */
setjmp(jmp); /* C$SETJMP Sets up an entry point for a possible longjmp */
setuid(); /* C$SETUID Sets user identification */
signal(i,vp); /* C$SIGNAL Sets a signal */
sin(x); /* C$SIN Sine math library function */
sinh(x); /* C$SINH Hyperbolic sine math library function */
sleep(ui); /* C$SLEEP Suspends the process for a number of seconds */
sprintf(a,a); /* C$PRINTF Formats and writes a string to a memory buffer */
sqrt(x); /* C$SQRT Square root math library function */
srand(); /* C$RAND Reinitializes the random number generator */
sscanf(a,a); /* C$SCANF Formats input from a character string in memory */
ssignal(i,vp); /* C$SIGNAL Sets a signal */
strcat(); /* C$STRCAT Concatenates two strings */
strchr(); /* C$STRCHR Searches for the first occurrence of a given character in a string */
strcmp(); /* C$STRCMP Compares two strings */
strcpy(); /* C$STRCPY Copies a string to another string */
strcspn(); /* C$STRCSPN Searches a string for an occurrance of a character in a set */
strlen(); /* C$STRLEN Determines the length of a string */
strncat(); /* C$STRNCAT Concatenates two strings, up to a maximum number of characters */
strncmp(); /* C$STRNCMP Compares two strings, up to a maximum number of characters */
strncpy(); /* C$STRNCPY Copies a number of characters from one string to another, either padding or
truncating the input string */
strpbrk(); /* C$STRPBRK Searches a string for one of a set of characters */
strrchr(); /* C$STRRCHR Searches a string for the last occurence of a given character */
strspn(); /* C$STRSPN Searches a string for any characters that are not in a set */
tan(x); /* C$TAN Tangent math library function */
tanh(x); /* C$TANH Hyperbolic tangent math library function */
time(t); /* C$TIME Gets the time of the epoch */
times(tbu); /* C$UNIX Gets the process and CPU times */
tmpfile(); /* C$TMPFILE Creates a temporary file */
tmpnam(a); /* C$TMPNAM Generates a file name for a temporary file */
tolower('A'); /* C$TOLOWER Converts uppercase to lowercase */
toupper('a'); /* C$TOUPPER Converts lowercase to uppercase */
ungetc(i,fp); /* C$UNGETC Pushes a character back onto the buffer */
umask(); /* C$UNIX Sets a file's protection mask */
vfork(); /* C$UNIX "virtual fork" */
wait(); /* C$UNIX Suspends process while waiting for a child process */
write(); /* C$UNIX Writes a file */
}
Software Performance Reports for VAX C, Version 3.0-001.
ICA-9236 The compiler might generate an illegal TIR object record
if the source program contained a declaration of an array
of or a pointer to a const or volatile structure. The
problem only occurred if the program was both compiled and
linked using the /DEBUG qualifier. This problem has been
corrected in V2.4 of VAX C.
ICA-10642 Improper error recovery affected code generation when
/DEBUG was specified. Error recovery had a side effect on
the code generator when an old style parameter declaration
following a parameter declaration using the new function.
prototype declaration style was seen This is fixed in
V3.0.
ICA-11129 The optimizer phase of the compiler would sometimes
produce incorrect code when dereferencing pointers within
a loop. The problem would only occur when the pointer was
an element of an array of pointers and there were at least
two similar arrays of pointers being accessed within the
loop. This problem has been corrected in V2.4 of VAX C.
ICA-11659 The compiler would sometimes go into an infinite loop when
/OPTIMIZE is used. This would only happen extremely
rarely, while the compiler was trying to reorder loop
invariants in the code. This problem is fixed in V3.0.
ICA-11691 On encountering a complex array reference within a loop,
the compiler could produce an incorrectly placed
autoincrement operand in the optimized code. For example,
the compiler would produce incorrect code for the
following when /OPTIMIZE was specified:
a() { printf( "a\n"); }
b() { printf( "b\n"); }
c() { printf( "c\n"); }
typedef int (*funcPtr)();
static funcPtr dispatch [3] = { a,b,c};
main()
{ int i;
for ( i = 0; i < 3; i++)
{
printf( "exec: %d %x\n",i,dispatch[i]); /* autoinc here */
( *(dispatch[i]))(); /* would call wrong function */
}
}
This problem is corrected in V3.0 of VAX C.
ICA-11803 An optimizer problem could cause incorrect code to be
generated for some kinds of references to arrays in loops.
Page 2
In particular, when an array index was an expression
including certain combinations of multiply, add, or
subtract operations, the index was computed incorrectly.
This would cause the code to reference the wrong array
element. This problem is corrected in V3.0 of VAX C.
ICA-11904 The VAX C compiler could generate incorrect object code to
evaluate an expression (or subexpression) if:
1. there existed several previous occurrences of the same
subexpression;
2. there existed an assignment somewhere between the
first and last such expression, which affected
subsequent value(s) of the expression; and
3. the right-hand side of the assignment was an
expression whose value is the result of a bitwise AND
(&), OR (|), exclusive OR (^), or complement (~)
operator.
This problem is fixed in V3.0 of VAX C.
ICA-16991 Duplicate of ICA-11691.
ICA-12041 Compilation would fail with a bugcheck during code
generation when the following source program was compiled
with the /DEBUG qualifier:
S_arbitrate (buffer, sender_buffer)
unsigned char buffer [], sender_buffer [];
{
int n, count, found;
strcpy (& buffer [n], "~CTXFR ");
n += 12;
for (count = 3, found = 0;
count < sender_buffer [0] && ! found;
)
if (found = (sender_buffer [count++] == 4));
}
This problem is fixed in V2.4 of VAX C.
ICA-12509 Duplicate of ICA-11691.
ICA-13262 The VAX C compiler would not accept the abstract form of
function prototype declarations within another function
prototype declaration. For example,
int funct (int (*)(int, int), int, int);
would not be accepted. This is corrected in V3.0 of VAX
C.
ICA-13388 The definitions of the types div_t and ldiv_t in the file
___ _
stdlib.h did not match those shown in the VAX C Run-time
Page 3
Library Reference Manual. This is corrected in V2.4 of
VAX C.
ICA-13565 VAX C could generate incorrect object code for certain
references to arrays of pointers occurring within loops.
This is corrected in V3.0 of VAX C.
ICA-13569 VAX C would sometimes generate incorrect machine code
following an if statement. The incorrect code assumed
that a register had always been loaded with a needed value
even though only the then clause or only the else clause
of the if statement loaded the value into the register.
This problem is corrected in V3.0 of VAX C.
ICA-13583 Duplicate of ICA-1129.
ICA-13876 The remove function was declared in the file unixio.h.
However, the current draft of the proposed ANSI C Standard
states that it should be in the header file stdio.h. The
declaration has been moved to stdio.h in V3.0 of VAX C.
ICA-13879 The VAX C definition module descrip.h did not prevent
itself from being included more than once in one
compilation unit. This is changed in V3.0 of VAX C.
ICA-13936 A typedef-name used in a cast within an array bound
specification was not properly recognized by the compiler,
resulting in a series of spurious diagnostic messages.
This is corrected in V3.0 of VAX C.
ICA-13970 When an array of pointers appeared in a loop, and the
array was indexed by the loop counter variable, the
compiler generated incorrect offsets for uses of the
pointer elements of the array. This was only a problem if
the affected code is compiled with /OPTIMIZE qualifier.
This problem is fixed in V3.0 of VAX C.
ICA-14054 The VAX C compiler allowed pointer arithmetic on pointers
to void. This is illegal under the ANSI standard. VAX C
V3.0 now issues an error message for such illegal pointer
arithmetic.
ICA-14350 The VAX C compiler did not detect and diagnose certain
void expressions appearing in contexts that required
values. This generally resulted in the compilation
failing with a bugcheck during code generation. This
problem is fixed in V3.0.
ICA-14534 The VAX C compiler macro definition buffer is not large
enough, and overflows. The old limit for the maximum size
macro definition text was 2027 characters. This limit has
now been extended to approximately 32K characters. The
problem is fixed in V3.0.
ICA-14539 The VAX C compiler did not generate correct Debug Symbol
Page 4
Table records for a type modifier "const" or "volatile"
associated with pointer to struct or array of struct
declaration. This problem surfaced during the link time
and caused DEBUGGER to crash if the affected programs are
compiled and linked with /DEBUG. This problem is fixed in
V2.4.
ICA-14578 Duplicate of MST-04011.
ICA-15037 Duplicate of ICA-09236.
ICA-15045 Duplicate of ICA-09236.
ICA-15118 Duplciate of ICA-11691.
ICA-15206 The V2.4 VAX C compiler generated bad code for certain
loops. The erroneous machine code was characterized by
the following:
o A register was loaded with a value which is used in
subsequent displacement mode addressing in the loop.
The value was held in a register which was erroneously
reused in the loop thus (potentially) altering the
register contents.
o A base address was loaded into R0 or R1 in a loop
which also contains a function call (which will
potentially alter R0 and R1). In another
manifestation of this problem, a base address was
loaded into a register which is overwritten by a later
instruction in the loop.
The source code most likely to generate such problems was
code in which an integer is cast as a pointer. These
problems are corrected in V3.0 of VAX C.
ICA-15208 The ANSI include files shipped with V2.4 are not fully
ANSI conformant. In V3.0, changes were made to the
following include files to move them closer to the
guidelines in the draft ANSI standard: stddef, stdio,
math, and stdlib.
ICA-15255 This SPR pointed out a variety of problems: First, VAX C
did not disallow arithmetic on pointer to void (duplicate
of ICA-14054). Second, the compiler did not complain
about taking the address of a register variable under
/STANDARD=PORT (fixed in V3.0).
ICA-15260 Duplicate of ICA-13936.
ICA-15408 The compiler bugchecked during the codegeneration phase
when compiling the provided program. Any number of
constructs could have provoked this problem; the source
Page 5
code most likely to generate it would be code in which a
register candidate variable was involved as an operand in
a functionally nop operation between the time it was
defined and later used. The bugcheck was caused by a
corruption of internal compiler data structures which kept
track of the lifetimes of register candidates. This
problem is fixed in V3.0 of VAX C.
ICA-15412 The declaration of mktime in the include file time.h did
not match the declaration in the draft ANSI standard.
Instead of
time_t mktime (tm_t timeptr);
It is now:
time_t mktime (tm_t * timeptr);
This declaration is corrected in V3.0 of VAX C.
ICA-15434 Duplicate of ICA-13262.
ICA-16045 Duplicate of ICA-11691.
ICA-16294 The compiler did not always generate correct code when
optimizing uses of arrays of pointers in loops. An error
was made that sometimes caused the pointer to be used
rather than the memory that it points to. This problem is
corrected in V3.0 of VAX C.
ICA-16522. The compiler would corrupt one of its memory allocation
systems if a macro was defined as taking arguments and
later redefined as not taking arguments. The usual
symptom was a bugcheck during code generation. This
problem is corrected in V3.0 of VAX C.
ICA-16789 Duplicate of ICA-16522.
ICA-16958 Duplicate of ICA-17415.
ICA-17005 Duplicate of MST-06047.
ICA-17052 Duplicate of ICA-16294.
ICA-17329 Duplicate of ICA-13569.
ICA-17415 The optimizer would sometimes appear to ignore the value
of a variable resulting from a previous and, or, or not
operation and use an old value of a variable.
For example, in this program, the old value of i is used
in computing the offset into the table array:
extern int table[];
Page 6
func_1(i)
int i;
{
int j;
i = j & ~i; /* i gets new value here */
/* new value of i should be used here */
j = j ? func_2(&table[i]) : j;
return;
}
This problem is fixed in V3.0.
ICA-17507 The compiler failed with a bugcheck during the parser
phase if the source program contained declarations of
objects which were initialized, for which a large number
of the initializers were references to other named
objects, and the /ANALYSIS_DATA qualifier had been
specified on the command line. This problem has been
corrected in V2.4 of VAX C.
ICA-17561 Duplicate of ICA-11691.
ICA-17580 Duplicate of MST-06047.
ICA-17728 The compiler bugchecked during the code-generation phase
for some programs; the bugcheck could be made to disappear
by almost any re-arrangement of the source code. This
problem was caused by a compiler internal error, which
would in rare cases cause the compiler to look beyond the
end of a data structure, and modify adjacent memory. This
would only happen during peephole optimization, when
certain kinds of move or move address instructions occur
and a certain pattern was found in memory adjacent to the
data structure describing those instructions. This is why
small changes to the source would eliminate the problem.
This problem is fixed in V3.0 of VAX C.
ICA-17817 Duplicate of ICA-16522.
ICA-18025 Duplicate of ICA-11691.
ICA-18231 If a variant_struct was declared without a declarator, the
compiler would not generate a warning. If the /DEBUG
qualifier was used on the compilation of the module, a
bugcheck during code-binding was reported. This problem
has been fixed in V2.4 of VAX C.
ICA-18574 When a variable named "const" is used, an illegible error
message is produced, rather than a report of an
inappropriate use of a keyword. This problem has been
fixed in V3.0 of VAX C.
ICA-18630 Duplicate of ICA-16522.
Page 7
ICA-18656 Bad code would be generated if a cast of an expression to
a pointer type was then indexed. This problem has been
fixed in V3.0 of VAX C.
ICA-18963 Duplicate of MST-06047.
ICA-19950 The VAX C include file SMGDEF.H did not include a
definition for the symbols: SMG$M_BLOCK_BORDER and
SMG$V_BLOCK_BORDER. This oversight is fixed in the
SMGDEF.H included with V3.0 of VAX C.
ICA-20666 Duplicate of ICA-16294.
MST-03854 This SPR reported an inconsistency between VAX C and
VAX Fortran concerning the behavior of the compilers when
multiple modules are compiled using a single command line:
The value of $SEVERITY reported by the VAX C compiler
reflects the status of the compilation of the last module
listed on the command line, even if a previous module in
the list completed with a higher severity, whereas that
reported by VAX Fortran reflects the most severe status
encountered among all of the modules listed. The behavior
of V3.0 of VAX C is changed to match that of FORTRAN.
MST-04011 The compiler failed with a BUGCHECK during code binding if
the source program contained a declaration of a
variant_struct or variant_union without a declarator, and
the program was compiled with the /DEBUG command
qualifier. V2.4 will generate an INVVARIANT error
diagnostic against such a construct.
MST-04792 The compiler would erroneously issue a INVCONDEXPR
diagnostic when the second and third operands of a ?:
operator were pointers and one operand was pointer to void
and the other was pointer to non-void. This problem is
fixed in V3.0 of VAX C.
MST-05630 The compiler would bugcheck in the code generation phase
on the provided program. This problem was fixed in V2.4
of VAX C.
MST-05680 The CTYPE.H definition module contained inaccurate
function prototypes of toupper() and tolower(). They are
declared as int instead of char in V3.0 of VAX C.
MST-05751 The compiler bugchecked when encountering a bad function
designator when the macro VAXC$INLINE was defined or
$vaxcelnc was included. This problem is fixed in V3.0 of
VAX C.
MST-05862 The compiler would bugcheck when the second operand of a
conditional operator (?: operator) was a struct
assignment. This problem is fixed in V3.0 of VAX C.
MST-05911 Duplicate of MST-05751.
Page 8
MST-06005 VAX C supplied no .H file containing definitions for the
$SETUAI System Service. In V3.0 of VAX C, the file
UAIDEF.H is provided.
MST-06047 The optimizer phase of the compiler would generate
incorrect code for references to array elements that use
multiple levels of indirection in loops. For example,
this would occur when an element in an array of pointers
is used in a loop.
For instance, in the following program, the compiler would
generate an auto-increment instruction without a necessary
deferred addressing mode:
#include stdio
main()
{
char **pf[2];
char *tmplst[2];
int i;
for (i =0; i< 2;i++)
{
tmplst[i] = "Goodbye";
pf[i] = &tmplst[i];
*pf[i] = "Hello"; /* incorrect addressing mode */
}
for (i=0; i<2;i++)
{
printf("%s\n",tmplst[i]);
}
}
This problem is corrected in V3.0 of VAX C.
MST-06096 Duplicate of ICA-16294 and ICA-13970.
MST-06108 The header file FLOAT.H, which describes the
floating-point properties of the VAX hardware, was in
error. In V3.0 the contents of the file have been
corrected, and the file changed to work correctly when
/GFLOAT is specified.
MST-06165 Duplicate of MST-06047.
MST-06188 IODEF.H does not define IO$_TTY_PORT. This problem is
fixed in VAX C V3.0.
MST-06191 The header file MATH.H did not prevent the compiler from
issuing "duplicate definition errors" if the header was
included multiple times. This problem is fixed in VAX C
V3.0.
MST-06207 The Guide to VAX C does not document limitations on the
use of the _align storage class modifier. The
Page 9
modification will be made in the manuals for the next
major release of VAX C after VAX C V3.0. Until then,
consider the following restrictions on the use of the
align modifier:
The _align storage-class modifier may not be used in conjunction
with the storage-classes auto, register, or globalref, or within
a parameter declaration. If _align is used with the auto storage
class, the alignment boundary cannot be greater than quadword.
It also may not be used with the const data-type modifier or the
noshare storage-class modifier.
MST-06274 Duplicate of ICA-16522.
MST-06319 Bad code could be generated is the name of a static
function was used as if it was a function pointer in a
call expression like "(*functionname)()". This problem is
fixed in VAX C V3.0.
MST-06513 Duplicate of ICA-11691.
MST-06548 The optimizer phase of VAX C would sometimes go into an
infinite loop tring to reorder loop invariants. This is
fixed in version 3.0 of VAX C.
MST-06561 The compiler did not diagnose enum type mismatches for
function calls with prototypes in scope under
/standard=portable. This is fixed in VAX C V3.0.