! ! PTD$ macros pulled from OpenVMS Alpha V7.0 SYS$LIBRARY:STARLET.REQ. ! ! Digital did a bad thing and defined the PTD$ macros with the same ! names as the routines, resulting in the compiler seeing recursive ! macro calls. So let's fix it by UNDECLAREing Digital's macros ! and redefining them to start with "$PTD$" instead of "PTD$". ! UNDECLARE %QUOTE PTD$CREATE, %QUOTE PTD$READ, %QUOTE PTD$READW, %QUOTE PTD$WRITE, %QUOTE PTD$SET_EVENT_NOTIFICATION, %QUOTE PTD$CANCEL, %QUOTE PTD$DELETE, %QUOTE PTD$DECTERM_SET_PAGE_SIZE; ! PTD$CREATE ! ! Create a pseudo terminal ! ! PTD$CREATE CHAN, [ACMODE], [CHARBUFF], [BUFLEN], [HANGUP_AST], ! [HANGUP_ASTPRM], [AST_ACMODE], INADR ! ! CHAN = Address of word to receive channel number assigned ! ACMODE = Access mode associated with channel ! CHARBUFF = Address ofa 3 - 5 longword array containing device ! characteristics. ! BUFLEN = Length of characteristics buffer in bytes either ! 12, 16, or 20 ! ASTADR = Address of entry mask of AST routine ! ASTPRM = Value to be passed to AST routine ! AST_ACMODE = Access mode for whjich the AST is to be delivered ! INADR = Address of 2-longword array containing starting and ! ending virtual address of pages to be used as ! I/O buffers KEYWORDMACRO $PTD$CREATE (CHAN,ACMODE=0,CHARBUFF=0,BUFLEN=12,ASTADR=0 ,ASTPRM=0,AST_ACMODE=0,INADR) = BEGIN EXTERNAL ROUTINE PTD$CREATE : BLISS ADDRESSING_MODE (GENERAL); PTD$CREATE (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , ACMODE, CHARBUFF, BUFLEN, ASTADR, ASTPRM, AST_ACMODE, SDL$STARLET_REQ(INADR, %QUOTE INADR) )) END %; ! PTD$READ ! ! Read data from the pseudo terminal ! ! PTD$READ(W) [EFN], CHAN, [ASTADR], [ASTPRM], READBUF, READBUF_LEN ! EFN = Number of event flag to set on completion ! CHAN = Word containing number of channel on which I/O is to be performed ! ASTADR = Address of entry mask of AST routine ! ASTPRM = Value to be passed to AST routine ! READBUF = Address character string to hold characters read ! READBUF_LEN = Number of character to be read from pseudo terminal KEYWORDMACRO $PTD$READ (EFN=0,CHAN,ASTADR=0,ASTPRM=0,READBUF=0 ,READBUF_LEN=0) = BEGIN EXTERNAL ROUTINE PTD$READ : BLISS ADDRESSING_MODE (GENERAL); PTD$READ (SDL$STARLET_CONCAT( EFN, SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , ASTADR, ASTPRM, READBUF, READBUF_LEN)) END %; KEYWORDMACRO $PTD$READW (EFN=0,CHAN,ASTADR=0,ASTPRM=0,READBUF=0 ,READBUF_LEN=0) = BEGIN EXTERNAL ROUTINE PTD$READW : BLISS ADDRESSING_MODE (GENERAL); PTD$READW (SDL$STARLET_CONCAT( EFN, SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , ASTADR, ASTPRM, READBUF, READBUF_LEN)) END %; ! PTD$WRITE ! ! Write data to the pseudo terminal ! ! PTD$WRITE CHAN, [ASTADR], [ASTPRM], WRTBUF, WRTBUF_LEN, ! [ECHOBUF], ECHOBUF_LEN] ! CHAN = Word containing number of channel on which I/O is to be performed ! ASTADR = Address of entry mask of AST routine ! ASTPRM = Value to be passed to AST routine ! WRTBUF = Address of character string containing character to write to ! pseudo terminal ! WRTBUF_LEN = Number of characters to write to pseudo terminal ! ECHOBUF = Address character string to hold characters read ! ECHOBUF_LEN = Number of character to be read from pseudo terminal KEYWORDMACRO $PTD$WRITE (CHAN,ASTADR=0,ASTPRM=0,WRTBUF=0,WRTBUF_LEN=0 ,ECHOBUF=0,ECHOBUF_LEN=0) = BEGIN EXTERNAL ROUTINE PTD$WRITE : BLISS ADDRESSING_MODE (GENERAL); PTD$WRITE (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , ASTADR, ASTPRM, WRTBUF, WRTBUF_LEN, ECHOBUF, ECHOBUF_LEN)) END %; ! PTD$SET_EVENT_NOTIFICATION ! ! Enable or disable terminal event notification ASTs ! ! PTD$SET_EVENT_NOTIFICATION CHAN, ASTADR, [ASTPRM], [ACMODE], ! TYPE ! CHAN = Word containing number of channel on which I/O is to be performed ! ASTADR = Address of entry mask of AST routine ! ASTPRM = Value to be passed to AST routine ! ACMODE = Access mode for whjich the AST is to be delivered ! TYPE = Longword containing KEYWORDMACRO $PTD$SET_EVENT_NOTIFICATION (CHAN,ASTADR=0,ASTPRM=0 ,ACMODE=0,TYPE) = BEGIN EXTERNAL ROUTINE PTD$SET_EVENT_NOTIFICATION : BLISS ADDRESSING_MODE (GENERAL); PTD$SET_EVENT_NOTIFICATION (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , ASTADR, ASTPRM, ACMODE, SDL$STARLET_REQ(TYPE, %QUOTE TYPE) )) END %; ! PTD$CANCEL ! ! Cancel queued control connection read request(s) ! ! PTD$CANCEL CHAN ! ! CHAN = Word containing number of channel on which I/O is to be performed KEYWORDMACRO $PTD$CANCEL (CHAN) = BEGIN EXTERNAL ROUTINE PTD$CANCEL : BLISS ADDRESSING_MODE (GENERAL); PTD$CANCEL (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) )) END %; ! PTD$DELETE ! ! Delete a pseudo terminal ! ! PTD$DELETE CHAN ! ! CHAN = Word containing number of channel on which I/O is to be performed KEYWORDMACRO $PTD$DELETE (CHAN) = BEGIN EXTERNAL ROUTINE PTD$DELETE : BLISS ADDRESSING_MODE (GENERAL); PTD$DELETE (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) )) END %; ! PTD$DECTERM_SET_PAGE_SIZE ! ! Change terminal page length and width ! ! PTD$DECTERM_SET_PAGE_SIZE CHAN, PAGE_LEN, PAGE_WIDTH ! ! CHAN = Word containing number of channel on which I/O is to be performed ! PAGE_LEN = Longword containing new page length of terminal ! PAGE_WIDTH = Longword containing new page width of terminal KEYWORDMACRO $PTD$DECTERM_SET_PAGE_SIZE (CHAN,PAGE_LEN,PAGE_WIDTH) = BEGIN EXTERNAL ROUTINE PTD$DECTERM_SET_PAGE_SIZE : BLISS ADDRESSING_MODE (GENERAL); PTD$DECTERM_SET_PAGE_SIZE (SDL$STARLET_CONCAT( SDL$STARLET_REQ(CHAN, %QUOTE CHAN) , SDL$STARLET_REQ(PAGE_LEN, %QUOTE PAGE_LEN) , SDL$STARLET_REQ(PAGE_WIDTH, %QUOTE PAGE_WIDTH) )) END %;