Preface

The VOS Standard C User's Guide (R364) documents how to compile and bind a VOS Standard C program. It also describes how to use VOS Standard C to perform file I/O and to call programs written in other VOS languages.

This manual is intended for experienced application programmers who may or may not be knowledgeable C programmers.

Before using the VOS Standard C User's Guide (R364), you should be familiar with the Introduction to VOS  and the VOS Reference Manual .

Manual Version

This manual is a revision. Change bars, which appear in the margin, note the specific changes to text since the previous publication of this manual. Note, however, that change bars are not used in new chapters or appendixes.

This revision incorporates the following changes.

  • Chapter 2 includes new preprocessor macros that are automatically defined for processors in the PA-RISC processor family.
  • Chapter 3 describes a new optimization that reduces the size of stack frames, thereby improving the efficiency of data-cache utilization. It also describes paging partition and space requirements for compiling, on a non-Continuum-series module, programs targeted for Continuum-series modules.
  • Chapter 4 includes descriptions of new arguments to the bind command that enable you to move the process heap and the process stack.

Note: VOS Release 14.0.0 does not support XA2000-series modules. However, to maintain cross-development on networked XA2000-series modules and to support firmware running on UCOMM line adapter cards, all VOS compilers still support cross-compiling and binding for XA2000-series modules from XA/R-series and Continuum-series modules.

Related Manuals

Refer to the following Stratus manuals for related documentation.

  • VOS Standard C Reference Manual
  • VOS C Subroutines Manual
  • VOS C Transaction Processing Facility Reference Manual
  • VOS C Forms Management System
  • VOS Commands Reference Manual

Notation Conventions

This manual uses the following notation conventions.

  • Italics introduces or defines new terms. For example:

The master disk is the name of the member disk from which the module was booted.

  • Boldface emphasizes words in text. For example:

Every module must have a copy of the module_start_up.cm file.

  • Monospace represents text that would appear on your terminal's screen (such as commands, subroutines, code fragments, and names of files and directories). For example:
change_current_dir (master_disk)>system>doc 

  • Monospace italic represents terms that are to be replaced by literal values. In the following example, the user must replace the monospace-italic term with a literal value.
list_users -module module_name 

  • Monospace bold represents user input in examples and figures that contain both user input and system output (which appears in monospace). For example:
display_access_list system_default

%dev#m1>system>acl>system_default

w  *.*

Key Mappings for VOS Functions

VOS provides several command-line and display-form functions. Each function is mapped to a particular key or combination of keys on the terminal keyboard. To perform a function, you press the appropriate key(s) from the command-line or display form. For an explanation of the command-line and display-form functions, see the manual Introduction to VOS .

The keys that perform specific VOS functions vary depending on the terminal. For example, on a V103 ASCII terminal, you press the and keys simultaneously to perform the INTERRUPT function; on a V105 PC/+ 106 terminal, you press the key on the numeric keypad to perform the INTERRUPT function.

Note: Certain applications may define these keys differently. Refer to the documentation for the application for the specific key mappings.

The following table lists several VOS functions and the keys to which they are mapped on commonly used Stratus terminals and on an IBM PC® or compatible PC that is running the Stratus PC/Connect-2 software. (If your PC is running another type of software to connect to a Stratus host computer, the key mappings may be different.) For information about the key mappings for a terminal that is not listed in this table, refer to the documentation for that terminal.

 
 
VOS Function
 
V103
ASCII
 
V103
EPC
IBM PC or Compatible PC
 
V105
PC/+ 106
 
V105
ANSI
CANCEL
* 
* 
or * 
CYCLE
-
 
CYCLE BACK
-
-
-
-
DISPLAY FORM
- 
- 
  or - 
or -
HELP
-
-
-
-
INSERT DEFAULT
-
-
-
-
INSERT SAVED
INTERRUPT
-
-
-
 
-
NO PAUSE
-
- * 
-
 
-
Numeric-keypad key

Syntax Notation

A language format shows the syntax of a VOS Standard C statement, portion of a statement, declaration, or definition. When VOS Standard C allows more than one format for a language construct, the documentation presents each format consecutively. For complex language constructs, the text may supply additional information about the syntax.

The following table explains the notation used in language formats.

The Notation Used in Language Formats

Notation
Meaning
element
Required element.
element...
Required element that can be repeated.
{element_1 element_2}
List of required elements.
{element_1 element_2}...
List of required elements that can be repeated.
 
 
Set of elements that are mutually exclusive; you must specify one of these elements.
[element]
Optional element.
[element]...
Optional element that can be repeated.
[element_1 element_2]
List of optional elements.
[element_1 element_2]...
List of optional elements that can be repeated.
 
 
Set of optional elements that are mutually exclusive; you can specify only one of these elements.
Note: Dots, brackets, and braces are not literal characters; you should not type them. Any list or set of elements can contain more than two elements. Brackets and braces are sometimes nested.

In the preceding table, element represents one of the following VOS Standard C language constructs.

  • reserved words (which appear in monospace)
  • generic terms (which appear in monospace italic) that are to be replaced by items such as expressions, identifiers, literals, constants, or statements
  • statements or portions of statements

The elements in a list of elements must be entered in the order shown, unless the text specifies otherwise. An element or a list of elements followed by a set of three dots indicates that the element(s) can be repeated.

The following example shows a sample language format.

cc source_file_name [argument] . . . 

In examples, a set of three vertically aligned dots indicates that a portion of a language construct or program has been omitted. For example:

main(void)
{
	sex = female;

   	age = mature;

   	if (sex == young)					/* Diagnosed by -check_enumeration */
      		stage = age + 1;				/* Diagnosed by -check_enumeration */

   	age = neuter;	 				/* Diagnosed by -check_enumeration */
      .
      .
      .
} 

Format for Commands and Requests

Stratus manuals use the following format conventions for documenting commands and requests. (A request is typically a command used within a subsystem, such as analyze_system.) Note that the command and request descriptions do not necessarily include each of the following sections.

name
The name of the command or request is at the top of the first page of the description.

Privileged
This notation appears after the name of a command or request that can be issued only from a privileged process. (See the online glossary, which is located in the file >system>doc>glossary.doc, for the definition of privileged process.)

Purpose
Explains briefly what the command or request does.

Display Form
Shows the form that is displayed when you type the command or request name followed by -form or when you press the key that performs the DISPLAY FORM function. Each field in the form represents a command or request argument. If an argument has a default value, that value is displayed in the form. (See the online glossary for the definition of default value.)

The following table explains the notation used in display forms.

The Notation Used in Display Forms

Notation
Meaning

Required field with no default value.

The cursor, which indicates the current position on the screen. For example, the cursor may be positioned on the first character of a value, as in ll.
current_user
current_module
current_system
current_disk
The default value is the current user, module, system, or disk. The actual name is displayed in the display form of the command or request.

Command-Line Form
Shows the syntax of the command or request with its arguments. You can display an online version of the command-line form of a command or request by typing the command or request name followed by -usage.

The following table explains the notation used in command-line forms. In the table, the term multiple values refers to explicitly stated separate values, such as two or more object names. Specifying multiple values is not the same as specifying a star name. (See the online glossary for the definition of star name.) When you specify multiple values, you must separate each value with a space.

The Notation Used in Command-Line Forms

Notation
Meaning
argument_1
Required argument.
argument_1...
Required argument for which you can specify multiple values.
 
 
Set of arguments that are mutually exclusive; you must specify one of these arguments.
[argument_1]
Optional argument.
[argument_1]...
Optional argument for which you can specify multiple values.
 
 
Set of optional arguments that are mutually exclusive; you can specify only one of these arguments.
Note: Dots, brackets, and braces are not literal characters; you should not type them. Any list or set of arguments can contain more than two elements. Brackets and braces are sometimes nested.

Arguments
Describes the command or request arguments. The following table explains the notation used in argument descriptions.

The Notation Used in Argument Descriptions

Notation
Meaning
There are predefined values for this argument. In the display form, you display these values in sequence by pressing the key that performs the CYCLE function.
Required
You cannot issue the command or request without specifying a value for this argument.
 
If an argument is required but has a default value, it is not labeled Required since you do not need to specify it in the command-line form. However, in the display form, a required field must have a value—either the displayed default value or a value that you specify.
(Privileged)
Only a privileged process can specify a value for this argument.

Explanation
Explains how to use the command or request and provides supplementary information.

Error Messages
Lists common error messages with a short explanation.

Examples
Illustrates uses of the command or request.

Related Information
Refers you to related information (in this manual or other manuals), including descriptions of commands, subroutines, and requests that you can use with or in place of this command or request.

Online Documentation

Stratus provides the following types of online documentation.

  • The directory >system>doc provides supplemental online documentation. It contains the latest information available, including updates and corrections to Stratus manuals and a glossary of terms.
  • Stratus offers some of its manuals online, via StrataDOC, an online-documentation product that consists of online manuals and StrataDOC Viewer, delivered on a CD-ROM (note that you must order StrataDOC separately). StrataDOC Viewer allows you to access online manuals from an IBM PC or compatible PC, a Sun® or Hewlett-PackardTM workstation, or an Apple® Macintosh® computer. StrataDOC provides such features as hypertext links and, on the workstations and PCs, text search and retrieval across the manual collection. The online and printed versions of a manual are identical.

If you have StrataDOC, you can view this manual online.

For a complete list of the manuals that are available online as well as more information about StrataDOC, contact your Stratus account representative.

Ordering Manuals

You can order manuals in the following ways.

  • If your system is connected to the Remote Service Network (RSN), issue the maint_request command at the system prompt. Complete the on-screen form with all of the information necessary to process your manual order.
  • Customers in North America can call the Stratus Customer Assistance Center (CAC) at (800) 221-6588 or (800) 828-8513, 24 hours a day, 7 days a week. All other customers can contact their nearest Stratus sales office, CAC office, or distributor; see the file cac_phones.doc in the directory >system>doc for CAC phone numbers outside the U.S.

Manual orders will be forwarded to Order Administration.

Commenting on This Manual

You can comment on this manual by using the command comment_on_manual or by completing the customer survey that appears at the end of this manual. To use the comment_on_manual command, your system must be connected to the RSN. If your system is not connected to the RSN, you must use the customer survey to comment on this manual.

The comment_on_manual command is documented in the manual VOS System Administration: Administering and Customizing a System and the VOS Commands Reference Manual . There are two ways you can use this command to send your comments.

  • If your comments are brief, type comment_on_manual, press or , and complete the data-entry form that appears on your screen. When you have completed the form, press .
  • If your comments are lengthy, save them in a file before you issue the command. Type comment_on_manual followed by -form, then press or . Enter this manual's part number, R364, then enter the name of your comments file in the -comments_path field. Press the key that performs the CYCLE function to change the value of -use_form to no and then press .

Note: If comment_on_manual does not accept the part number of this manual (which may occur if the manual is not yet registered in the manual_info.table file), you can use the mail request of the maint_request command to send your comments.

Your comments (along with your name) are sent to Stratus over the RSN.

Stratus welcomes any corrections and suggestions for improving this manual.