------------------------------------------------------------------------ -- These package specifications were extracted from IEEE Std 1003.5-1992, -- IEEE Standard for Information Technology--POSIX Ada Language -- Interfaces--Part 1: Binding System Application Program Interface, -- copyright (c)1992 by the Institute of Electrical and Electronics -- Engineers, Inc. These package specifications represent only a portion -- of the document and are not to be interpreteted as the approved -- consensus standard. The IEEE Std 1003.5-1992 must be used in -- conjunction with these package specifications in order to claim -- conformance. The IEEE takes no responsibility for and will assume no -- liability for damages resulting from the reader's misinpretation of -- said information resulting from its out of context nature. To order -- copies of the IEEE Std 1003.5-1992, please contact the IEEE Service -- Center at 445 Hoes Lane, PO Box 1331, Piscataway, NJ 08855-1331; via -- phone at 1-800-678-IEEE, 908-981-1393; or via fax at 908-981-9667. ------------------------------------------------------------------------ with POSIX, POSIX_IO, POSIX_Process_Identification; package POSIX_Terminal_Functions is -- Special Characters used in terminal input Null_POSIX_Character : constant POSIX.POSIX_Character := POSIX.POSIX_Character'VAL(@P); Flag_POSIX_Character : constant POSIX.POSIX_CHARACTER := POSIX.POSIX_Character'VAL(@P); -- Get and Define Terminal operating characteristics type Terminal_Characteristics is private; Invalid_Terminal_Characteristics : constant Terminal_Characteristics; function Get_Terminal_Characteristics (File : POSIX_IO.File_Descriptor) return Terminal_Characteristics; type Terminal_Action_Times is (Immediately, After_Output, After_Output_And_Input); procedure Set_Terminal_Characteristics (File : in POSIX_IO.File_Descriptor; Characteristics : in Terminal_Characteristics; Apply : in Terminal_Action_Times := Immediately; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); type Terminal_Modes is -- Subtype Input_Modes: (Interrupt_On_Break, Map_CR_To_LF, Ignore_Break, Ignore_CR, Ignore_Parity_Errors, Map_LF_To_CR, Enable_Parity_Check, Strip_Character, Enable_Start_Stop_Input, Enable_Start_Stop_Output, Mark_Parity_Errors, -- Subtype Output_Modes: Perform_Output_Processing, -- Subtype Control_Modes: Ignore_Modem_Status, Enable_Receiver, Send_Two_Stop_Bits, Hang_Up_On_Last_Close, Parity_Enable, Odd_Parity, -- Subtype Local_Modes: Echo, Echo_Erase, Echo_Kill, Echo_LF, Canonical_Input, Extended_Functions, Enable_Signals, No_Flush, Send_Signal_For_BG_Output); subtype Input_Modes is Terminal_Modes range Interrupt_On_Break .. Mark_Parity_Errors; subtype Output_Modes is Terminal_Modes range Perform_Output_Processing .. Perform_Output_Processing; subtype Control_Modes is Terminal_Modes range Ignore_Modem_Status .. Odd_Parity; subtype Local_Modes is Terminal_Modes range Echo .. Send_Signal_For_BG_Output; type Terminal_Modes_Set is array (Terminal_Modes) of Boolean; subtype Bits_Per_Character is Positive range @P; type Baud_Rate is (B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B4800, B9600, B19200, B38400); function Terminal_Modes_Of (Characteristics : Terminal_Characteristics) return Terminal_Modes_Set; procedure Define_Terminal_Modes (Characteristics : in out Terminal_Characteristics; Modes : in Terminal_Modes_Set); function Bits_Per_Character_Of (Characteristics : Terminal_Characteristics) return Bits_Per_Character; procedure Define_Bits_Per_Character (Characteristics : in out Terminal_Characteristics; Bits : in Bits_Per_Character); function Input_Baud_Rate_Of (Characteristics : Terminal_Characteristics) return Baud_Rate; procedure Define_Input_Baud_Rate (Characteristics : in out Terminal_Characteristics; Input_Baud_Rate : in Baud_Rate); function Output_Baud_Rate_Of (Characteristics : Terminal_Characteristics) return Baud_Rate; procedure Define_Output_Baud_Rate (Characteristics : in out Terminal_Characteristics; Output_Baud_Rate : in Baud_Rate); type Control_Character_Selector is (EOF_Char, EOL_Char, Erase_Char, Interrupt_Char, Kill_Char, Quit_Char, Suspend_Char, Start_Char, Stop_Char); function Special_Control_Character_Of (Characteristics : Terminal_Characteristics; Selector : Control_Character_Selector) return POSIX.POSIX_Character; procedure Define_Special_Control_Character (Characteristics : in out Terminal_Characteristics; Selector : in Control_Character_Selector; Char : in POSIX.POSIX_Character); procedure Disable_Control_Character (Characteristics : in out Terminal_Characteristics; Selector : in Control_Character_Selector); function Input_Time_Of (Characteristics: Terminal_Characteristics) return Duration; procedure Define_Input_Time (Characteristics : in out Terminal_Characteristics; Input_Time : in Duration); function Minimum_Input_Count_Of (Characteristics : Terminal_Characteristics) return Natural; procedure Define_Minimum_Input_Count (Characteristics : in out Terminal_Characteristics; Minimum_Input_Count : in Natural); -- Line Control Operations procedure Send_Break (File : in POSIX_IO.File_Descriptor; The_Duration : in Duration := 0.0); procedure Drain (File : in POSIX_IO.File_Descriptor; Masked_Signals : in POSIX.Signal_Masking := POSIX.RTS_Signals); type Queue_Selector is (Received_But_Not_Read, Written_But_Not_Transmitted, Both); procedure Discard_Data (File : in POSIX_IO.File_Descriptor; Selector : in Queue_Selector); type Flow_Action is (Suspend_Output, Restart_Output, Transmit_Stop, Transmit_Start); procedure Flow (File : in POSIX_IO.File_Descriptor; Action : in Flow_Action); -- Foreground Process Group ID function Get_Process_Group_ID (File : POSIX_IO.File_Descriptor) return POSIX_Process_Identification.Process_Group_ID; procedure Set_Process_Group_ID (File : in POSIX_IO.File_Descriptor; Group_ID : in POSIX_Process_Identification.Process_Group_ID); -- Get pathname of current controlling terminal for the current process function Get_Controlling_Terminal_Name return POSIX.Pathname; private type Terminal_Characteristics is @P; Invalid_Terminal_Characteristics : constant Terminal_Characteristics := @P; end POSIX_Terminal_Functions;