The current local time, in TIME_$CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
This is the number of 4-microsecond periods that have elapsed since January 1, 1980, 00:00.
CAL $REMOVE _ LOCAL OFFSET
CAL $REMOVE_LOCAL OFFSET Computes the UTC time from local time.
FORMAT
CAL_$APPLY_LOCAL_OFFSET (clock) INPUT/OUTPUT PARAMETERS clock
Upon input
Upon output
Local time from which the local time offset will be removed, in TIME _ $CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
Adjusted clock value, representing the UTC equivalent of the input parameter, in TIME_$CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
USAGE
CAL
CAL $REMOVE_LOCAL OFFSET subtracts the local time zone offset from the supplied clock value.
To set the local time zone offset, you may either execute the Shell command TZ
(TIME_ZONE) as described in the DOMAIN System Command Reference, or you may use the CAL_$WRITE_ TIMEZONE procedure.
CAL-20
'-"
... , / 'o
o o o
o
CAL $SEC TO CLOCK
CAL $SEC TO CLOCK
Converts seconds to system clock units.
FORMAT
INPUT PARAMETERS seconds
The value to be converted. This is a 4-byte integer.
OUTPUT PARAMETERS clock
The computed equivalent of seconds, in TIME_$CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
USAGE
CAL _ $SEC _ TO _ CLOCK converts a value representing seconds to an equivalent value in 4-microsecond units.
No overflow detection is performed.
CAL $SUB CLOCK
CAL $SUB CLOCK
Subtracts the values oC two times.
FORMAT
value
=
CAL_$SUB_CLOCK (clockl. clock2) RETURN VALUEvalue
The Boolean result oC the subtraction oC clock2 Crom clockl. The returned value is TRUE if the result is
> = o.
INPUT/OUTPUT PARAMETERS clock!
Upon input
Upon output
The Coordinated Universal Time clock value from which clock2 is subtracted, in TIME_$CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
The difference between clockl and clock2, in TIME_$CLOCK_ T format. This data type is 6 bytes long. See the CAL Data Types section Cor more inCormation.
INPUT PARAMETERS clock2
CAL
The Coordinated Universal Time clock value to be subtracted from clock!, in
TIME $CLOCK T format. This data type is 6 bytes long. See the CAL Data Types section for more information.
CAL-22
o
o
o o
o
CAL $WEEKDAY
CAL $WEEKDAY
Computes the day of the week given a year, month, and day.
FORMAT
weekday = CAL_$WEEKDAY (year, month, day) RETURN VALUE
weekday
The computed day of the week, in CAL _ $WEEKDA Y _ T format. This is a 2-byte integer. Returns one of the following predefined values:
CAL $SUN, CAL $MON, CAL $TUE. CAL $ WED , CAL=$THU, CAL=$FRI, CAL=$SAT. -Their ordinal values are 0 through 6.
INPUT PARAMETERS year
The year for which the weekday is desired. This is a 2-byte integer.
month
The month for which the weekday is desired. This is a 2-byte integer.
day
The day of the month for which the weekday is desired. This is a 2-byte integer.
USAGE
CAL _ $WEEKDA Y computes the day of the week for any Gregorian date.
CAL $ WRITE _ TIMEZONE
CAL $WRITE TIMEZONE
Writes local time zone information onto the boot volume.
FORMAT
INPUT PARAMETERS timezone _ info
The time zone information to be recorded, in CAL_$TIMEZONE_REC _ T format. This data type is 12 bytes long. See the CAL Data Types section for more information.
The supplied time zone information includes the name of the time zone and its offset form UTC.
OUTPUT PARAMETERS status
Completion status, in STATUS _ $T format. This data type is 4 bytes long. See the CAL Data Types section for more information.
USAGE
CAL
CAL _ $WRITE _ TIMEZONE writes the supplied time zone information onto the logical disk volume from which the operating system was started.
This procedure is invalid on a diskless node, and returns a nonzero status.
The time zone information written by this procedure is used by subsequent calls to CAL _ $DECODE _LOCAL _ TIME, CAL _ $GET _LOCAL _ TIME,
CAL _ $APPL Y _ LOCAL _ OFFSET, and CAL _ $GET _ INFO.
A nonzero status indicates a system problem in reading or writing the volume.
CAL-24
o
o o o
L)
ERRORS
STATUS $OK
Successful completion.
CAL $BAD SYNTAX
Invalid syntax for date or time specification.
CAL $E1v1PTY STRING
An empty string was passed to a decode routine.
CAL $INVALID TZDIF
Invalid time-zone difference.
CAL $OUT OF RANGE
Date or time specification invalid.
CAL $UNKNOWN TIMEZONE Timezone specified is unknown.
CAL ERRORS
Data Types
CTM_$ALLOC PV CTM_ $FIND_COLOR CTM...;.. $INC _ USE _ COUNT CTM_$MARK_READ ONLY CTM_$RELEASE PV
Errors
CTM
Table of Contents
CTM-2 CTM-4 CTM-8 .CTM-9 CTM-I0 CTM-l1 CTM-12
o
o
o
o
o
o
o
o
o
CTM
The CTM (Color Table Manager) programming calls allow different GPR applications running on the same node to share the color map without interfering with each other. This section describes their data types, call syntax, and error codes. Refer to the Introduction at the beginning of this manual for a description of data type diagrams and call syntax format.
CTM DATA TYPES
A 4-byte integer. Defines an index into the color map to identify the color of an individual pixel.
An array of GPR_$PIXEL_ VALUE_ T that stores multiple pixel values.
A 2-byte integer. Identifies the type of pixel values that can be affected by a CTM call. Specify only one of the following predefined values:
NONE
If you specify 0 for FORTRAN/C or [ ] for Pascal, then any available pixel value is returned.
CTM $CONTIGUOUS
The allocated pixel values must be contiguous.
In this case, only the smallest pixel value in the range is returned.
CTM $ZERO ONLY
Only pixel values with zero in a given plane will be allocated. If the plane is greater than or equal to zero, then this parameter specifies which plane must have zero bits. If the plane is less than 0, then the CTM package will choose a plane and return it
CTM $ONE ONLY
This is similar to CTM _ $ZERO _ ONLY except that the plane in question must contain only ones.
CTM_$BOTH
Pairs of pixel values will be allocated where the two members of each pair differ only in the given plane. If the plane is less than zero, the CTM package selects a plane for you.
CTM-2
~\