[PEN_CHECKING_STYLE(NONE)] MODULE PASCAL$TPU_ROUTINES; { © Copyright 2005 Hewlett-Packard Development Company, L.P. } { } { Confidential computer software. Valid license from HP and/or } { its subsidiaries required for possession, use, or copying. } { } { Consistent with FAR 12.211 and 12.212, Commercial Computer Software, } { Computer Software Documentation, and Technical Data for Commercial } { Items are licensed to the U.S. Government under vendor's standard } { commercial license. } { } { Neither HP nor any of its subsidiaries shall be liable for technical } { or editorial errors or omissions contained herein. The information } { in this document is provided "as is" without warranty of any kind and } { is subject to change without notice. The warranties for HP products } { are set forth in the express limited warranty statements accompanying } { such products. Nothing herein should be construed as constituting an } { additional warranty. } { } [HIDDEN] TYPE (**** Pre-declared data types ****) $BYTE = [BYTE] -128..127; $WORD = [WORD] -32768..32767; $QUAD = [QUAD,UNSAFE] RECORD L0:UNSIGNED; L1:INTEGER; END; $OCTA = [OCTA,UNSAFE] RECORD L0,L1,L2:UNSIGNED; L3:INTEGER; END; $UBYTE = [BYTE] 0..255; $UWORD = [WORD] 0..65535; $UQUAD = [QUAD,UNSAFE] RECORD L0,L1:UNSIGNED; END; $UOCTA = [OCTA,UNSAFE] RECORD L0,L1,L2,L3:UNSIGNED; END; $PACKED_DEC = [BIT(4),UNSAFE] 0..15; $DEFTYP = [UNSAFE] INTEGER; $DEFPTR = [UNSAFE] ^$DEFTYP; $BOOL = [BIT(1),UNSAFE] BOOLEAN; $BIT = [BIT(1),UNSAFE] BOOLEAN; $BIT2 = [BIT(2),UNSAFE] 0..3; $BIT3 = [BIT(3),UNSAFE] 0..7; $BIT4 = [BIT(4),UNSAFE] 0..15; $BIT5 = [BIT(5),UNSAFE] 0..31; $BIT6 = [BIT(6),UNSAFE] 0..63; $BIT7 = [BIT(7),UNSAFE] 0..127; $BIT8 = [BIT(8),UNSAFE] 0..255; $BIT9 = [BIT(9),UNSAFE] 0..511; $BIT10 = [BIT(10),UNSAFE] 0..1023; $BIT11 = [BIT(11),UNSAFE] 0..2047; $BIT12 = [BIT(12),UNSAFE] 0..4095; $BIT13 = [BIT(13),UNSAFE] 0..8191; $BIT14 = [BIT(14),UNSAFE] 0..16383; $BIT15 = [BIT(15),UNSAFE] 0..32767; $BIT16 = [BIT(16),UNSAFE] 0..65535; $BIT17 = [BIT(17),UNSAFE] 0..131071; $BIT18 = [BIT(18),UNSAFE] 0..262143; $BIT19 = [BIT(19),UNSAFE] 0..524287; $BIT20 = [BIT(20),UNSAFE] 0..1048575; $BIT21 = [BIT(21),UNSAFE] 0..2097151; $BIT22 = [BIT(22),UNSAFE] 0..4194303; $BIT23 = [BIT(23),UNSAFE] 0..8388607; $BIT24 = [BIT(24),UNSAFE] 0..16777215; $BIT25 = [BIT(25),UNSAFE] 0..33554431; $BIT26 = [BIT(26),UNSAFE] 0..67108863; $BIT27 = [BIT(27),UNSAFE] 0..134217727; $BIT28 = [BIT(28),UNSAFE] 0..268435455; $BIT29 = [BIT(29),UNSAFE] 0..536870911; $BIT30 = [BIT(30),UNSAFE] 0..1073741823; $BIT31 = [BIT(31),UNSAFE] 0..2147483647; $BIT32 = [BIT(32),UNSAFE] UNSIGNED; (* MODULE TPU$ROUTINES ; *) (* [HIDDEN] TYPE (**** Pre-declared data types ***?? *) (* $BYTE = [BYTE] -128..127; *) (* $WORD = [WORD] -32768..32767; *) (* $QUAD = [QUAD,UNSAFE] RECORD *) (* L0:UNSIGNED; L1:INTEGER; END; *) (* $OCTA = [OCTA,UNSAFE] RECORD *) (* L0,L1,L2:UNSIGNED; L3:INTEGER; END; *) (* $UBYTE = [BYTE] 0..255; *) (* $UWORD = [WORD] 0..65535; *) (* $UQUAD = [QUAD,UNSAFE] RECORD *) (* L0,L1:UNSIGNED; END; *) (* $UOCTA = [OCTA,UNSAFE] RECORD *) (* L0,L1,L2,L3:UNSIGNED; END; *) (* $UOCTAQUAD = [OCTA(2),UNSAFE] RECORD *) (* L0,L1,L2,L3,L4,L5,L6,L7:UNSIGNED; END; *) (* $PACKED_DEC = [BIT(4),UNSAFE] 0..15; *) (* $DEFTYP = [UNSAFE] INTEGER; *) (* $DEFPTR = [UNSAFE] ^$DEFTYP; *) (* $BOOL = [BIT(1),UNSAFE] BOOLEAN; *) (* $BIT2 = [BIT(2),UNSAFE] 0..3; *) (* $BIT3 = [BIT(3),UNSAFE] 0..7; *) (* $BIT4 = [BIT(4),UNSAFE] 0..15; *) (* $BIT5 = [BIT(5),UNSAFE] 0..31; *) (* $BIT6 = [BIT(6),UNSAFE] 0..63; *) (* $BIT7 = [BIT(7),UNSAFE] 0..127; *) (* $BIT8 = [BIT(8),UNSAFE] 0..255; *) (* $BIT9 = [BIT(9),UNSAFE] 0..511; *) (* $BIT10 = [BIT(10),UNSAFE] 0..1023; *) (* $BIT11 = [BIT(11),UNSAFE] 0..2047; *) (* $BIT12 = [BIT(12),UNSAFE] 0..4095; *) (* $BIT13 = [BIT(13),UNSAFE] 0..8191; *) (* $BIT14 = [BIT(14),UNSAFE] 0..16383; *) (* $BIT15 = [BIT(15),UNSAFE] 0..32767; *) (* $BIT16 = [BIT(16),UNSAFE] 0..65535; *) (* $BIT17 = [BIT(17),UNSAFE] 0..131071; *) (* $BIT18 = [BIT(18),UNSAFE] 0..262143; *) (* $BIT19 = [BIT(19),UNSAFE] 0..524287; *) (* $BIT20 = [BIT(20),UNSAFE] 0..1048575; *) (* $BIT21 = [BIT(21),UNSAFE] 0..2097151; *) (* $BIT22 = [BIT(22),UNSAFE] 0..4194303; *) (* $BIT23 = [BIT(23),UNSAFE] 0..8388607; *) (* $BIT24 = [BIT(24),UNSAFE] 0..16777215; *) (* $BIT25 = [BIT(25),UNSAFE] 0..33554431; *) (* $BIT26 = [BIT(26),UNSAFE] 0..67108863; *) (* $BIT27 = [BIT(27),UNSAFE] 0..134217727; *) (* $BIT28 = [BIT(28),UNSAFE] 0..268435455; *) (* $BIT29 = [BIT(29),UNSAFE] 0..536870911; *) (* $BIT30 = [BIT(30),UNSAFE] 0..1073741823; *) (* $BIT31 = [BIT(31),UNSAFE] 0..2147483647; *) (* $BIT32 = [BIT(32),UNSAFE] UNSIGNED; *) (*** MODULE TPU$ROUTINES IDENT X-1 ***) (* *) (* Text Processing Utility (TPU) Routines *) (* *) (* *) (* TPU$CLEANUP - Free System Resources Used During TPU Session *) (* *) (* status = TPU$CLEANUP (flags) *) (* *) (* flags - Cleanup options *) (* *) [ASYNCHRONOUS] FUNCTION TPU$CLEANUP ( FLAGS : UNSIGNED) : INTEGER; EXTERNAL; (* *) (* TPU$CLIPARSE - Parse a command line *) (* *) (* status = TPU$CLIPARSE (string, fileio, call_user) *) (* *) (* string - Command line to be parsed *) (* fileio - Bound Procedure Value for File I/O routine *) (* call_user - Bound Procedure Value for call-user routine *) (* *) [ASYNCHRONOUS] FUNCTION TPU$CLIPARSE ( STRING : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; %REF FILEIO : [UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %REF CALL_USER : [UNSAFE] ARRAY [$l3..$u3:INTEGER] OF $UBYTE) : INTEGER; EXTERNAL; (* *) (* TPU$CLOSE_TERMINAL - Close Channel to Terminal *) (* *) (* status = TPU$CLOSE_TERMINAL () *) (* *) [ASYNCHRONOUS] FUNCTION TPU$CLOSE_TERMINAL : INTEGER; EXTERNAL; (* *) (* TPU$CONTROL - Pass Control to TPU *) (* *) (* status = TPU$CONTROL () *) (* *) [ASYNCHRONOUS] FUNCTION TPU$CONTROL : INTEGER; EXTERNAL; (* *) (* TPU$EDIT - Edit a file *) (* *) (* status = TPU$EDIT (input, output) *) (* *) (* input - Input file name *) (* output - Output file name *) (* *) [ASYNCHRONOUS] FUNCTION TPU$EDIT ( INPUT : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; OUTPUT : [CLASS_S] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR) : INTEGER; EXTERNAL; (* *) (* TPU$EXECUTE_COMMAND - Execute One or More TPU Statements *) (* *) (* status = TPU$EXECUTE_COMMAND (string) *) (* *) (* string - TPU statement(s) to execute *) (* *) [ASYNCHRONOUS] FUNCTION TPU$EXECUTE_COMMAND ( STRING : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR) : INTEGER; EXTERNAL; (* *) (* TPU$EXECUTE_INIFILE - Execute Initialization Files *) (* *) (* status = TPU$EXECUTE_INIFILE () *) (* *) [ASYNCHRONOUS] FUNCTION TPU$EXECUTE_INIFILE : INTEGER; EXTERNAL; (* *) (* TPU$FILEIO - Perform File Operations *) (* *) (* status = TPU$FILEIO (code, stream, data) *) (* *) (* code - Item code specifying a TPU function *) (* stream - File description *) (* data - Stream data *) (* *) [ASYNCHRONOUS] FUNCTION TPU$FILEIO ( CODE : UNSIGNED; %REF STREAM : [VOLATILE,UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE; %REF DATA : [VOLATILE,UNSAFE] ARRAY [$l3..$u3:INTEGER] OF $UBYTE) : INTEGER; EXTERNAL; (* *) (* TPU$FILE_PARSE - Parse a File Specification *) (* *) (* status = TPU$FILE_PARSE (result_string, flags, filespec, *) (* [default_spec], [related_spec]) *) (* *) (* result_string - Resultant file specification *) (* flags - Specifies components to be returned *) (* filespec - File specification to parse *) (* default_spec - Default file specification *) (* related_spec - Related file specification *) (* *) [ASYNCHRONOUS] FUNCTION TPU$FILE_PARSE ( VAR RESULT_STRING : [CLASS_S,VOLATILE] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; FLAGS : UNSIGNED; FILESPEC : [CLASS_S] PACKED ARRAY [$l3..$u3:INTEGER] OF CHAR; DEFAULT_SPEC : [CLASS_S] PACKED ARRAY [$l4..$u4:INTEGER] OF CHAR := %IMMED 0; RELATED_SPEC : [CLASS_S] PACKED ARRAY [$l5..$u5:INTEGER] OF CHAR := %IMMED 0) : INTEGER; EXTERNAL; (* *) (* TPU$FILE_SEARCH - Search for a File Specification *) (* *) (* status = TPU$FILE_SEARCH (result_string, flags, filespec, *) (* [default_spec], [related_spec]) *) (* *) (* result_string - Resultant file specification *) (* flags - Specifies components to be returned *) (* filespec - File specification to parse *) (* default_spec - Default file specification *) (* related_spec - Related file specification *) (* *) [ASYNCHRONOUS] FUNCTION TPU$FILE_SEARCH ( VAR RESULT_STRING : [CLASS_S,VOLATILE] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR; FLAGS : UNSIGNED; FILESPEC : [CLASS_S] PACKED ARRAY [$l3..$u3:INTEGER] OF CHAR; DEFAULT_SPEC : [CLASS_S] PACKED ARRAY [$l4..$u4:INTEGER] OF CHAR := %IMMED 0; RELATED_SPEC : [CLASS_S] PACKED ARRAY [$l5..$u5:INTEGER] OF CHAR := %IMMED 0) : INTEGER; EXTERNAL; (* *) (* TPU$HANDLER - TPU Condition Handler *) (* *) (* status = TPU$HANDLER (signal_vector, mechanism_vector) *) (* *) (* signal_vector - Signal vector *) (* mechanism_vector - Mechanism vector *) (* *) [ASYNCHRONOUS] FUNCTION TPU$HANDLER ( %REF SIGNAL_VECTOR : [VOLATILE] ARRAY [$l1..$u1:INTEGER] OF UNSIGNED; %REF MECHANISM_VECTOR : [VOLATILE] ARRAY [$l2..$u2:INTEGER] OF UNSIGNED) : INTEGER; EXTERNAL; (* *) (* TPU$INITIALIZE - Initialize TPU for Editing *) (* *) (* status = TPU$INITIALIZE (callback [, user_arg) *) (* *) (* callback - Callback routine bound procedure value *) (* user_arg - User argument *) (* *) [ASYNCHRONOUS] FUNCTION TPU$INITIALIZE ( %REF CALLBACK : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; USER_ARG : UNSIGNED := %IMMED 0) : INTEGER; EXTERNAL; (* *) (* TPU$MESSAGE - Write Message String *) (* *) (* status = TPU$MESSAGE (string) *) (* *) (* string - Formatted message *) (* *) [ASYNCHRONOUS] FUNCTION TPU$MESSAGE ( STRING : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR) : INTEGER; EXTERNAL; (* *) (* TPU$PARSEINFO - Parse Command Line and Build Item List *) (* *) (* status = TPU$PARSEINFO (fileio, call_user) *) (* *) (* fileio - Bound Procedure Value File I/O routine *) (* call_user - Bound Procedure Value for call-user routine *) (* *) [ASYNCHRONOUS] FUNCTION TPU$PARSEINFO ( %REF FILEIO : [UNSAFE] ARRAY [$l1..$u1:INTEGER] OF $UBYTE; %REF CALL_USER : [UNSAFE] ARRAY [$l2..$u2:INTEGER] OF $UBYTE) : INTEGER; EXTERNAL; (* *) (* TPU$SIGNAL - Signal a TPU Status *) (* *) (* status = TPU$SIGNAL (condition_code) *) (* *) (* condition_code - Condition code to signal *) (* *) [ASYNCHRONOUS] FUNCTION TPU$SIGNAL ( %IMMED CONDITION_CODE : UNSIGNED) : INTEGER; EXTERNAL; (* *) (* TPU$SPECIFY_ASYNC_ACTION - Register an Asynchronous Action *) (* *) (* status = TPU$SPECIFY_ASYNC_ACTION (facility_index [, tpu_statement]) *) (* *) (* facility_index - Index number of this action *) (* tpu_statement - TPU statement to execute for action *) (* *) [ASYNCHRONOUS] FUNCTION TPU$SPECIFY_ASYNC_ACTION ( FACILITY_INDEX : UNSIGNED; TPU_STATEMENT : [CLASS_S] PACKED ARRAY [$l2..$u2:INTEGER] OF CHAR := %IMMED 0) : INTEGER; EXTERNAL; (* *) (* TPU$TPU - Invoke TPU *) (* *) (* status = TPU$TPU (command) *) (* *) (* command - Command string *) (* *) [ASYNCHRONOUS] FUNCTION TPU$TPU ( COMMAND : [CLASS_S] PACKED ARRAY [$l1..$u1:INTEGER] OF CHAR) : INTEGER; EXTERNAL; (* *) (* TPU$TRIGGER_ASYNC_ACTION - Trigger an Asynchronous Action *) (* *) (* status = TPU$TRIGGER_ASYNC_ACTION (facility_index) *) (* *) (* facility_index - Index number of this action *) (* *) [ASYNCHRONOUS] FUNCTION TPU$TRIGGER_ASYNC_ACTION ( FACILITY_INDEX : UNSIGNED) : INTEGER; EXTERNAL; (* END. *) END.