X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsrc%2Fterminal_interface-curses-text_io.adb;h=255b123dd32314f2c91ef0787bef033cff33a0c6;hp=01076921c6170f0f110a31418a83de58fc53d18b;hb=c13e57306ae5c4431fddd0fe856c3bcae6aeeb2c;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/Ada95/src/terminal_interface-curses-text_io.adb b/Ada95/src/terminal_interface-curses-text_io.adb index 01076921..255b123d 100644 --- a/Ada95/src/terminal_interface-curses-text_io.adb +++ b/Ada95/src/terminal_interface-curses-text_io.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -34,9 +34,9 @@ -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 --- Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en -- Version Control: --- $Revision: 1.13 $ +-- $Revision: 1.18 $ +-- $Date: 2006/06/25 14:24:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Text_IO is @@ -87,9 +87,9 @@ package body Terminal_Interface.Curses.Text_IO is N_Cols : Column_Count; begin Get_Size (Win, N_Lines, N_Cols); - if Natural (N_Cols) > Natural (Count'Last) then - raise Layout_Error; - end if; + -- if Natural (N_Cols) > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; return Count (N_Cols); end Line_Length; @@ -108,9 +108,9 @@ package body Terminal_Interface.Curses.Text_IO is return 0; else Get_Size (Win, N_Lines, N_Cols); - if Natural (N_Lines) > Natural (Count'Last) then - raise Layout_Error; - end if; + -- if Natural (N_Lines) > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; return Count (N_Lines); end if; end Page_Length; @@ -128,7 +128,7 @@ package body Terminal_Interface.Curses.Text_IO is is P_Size : constant Count := Page_Length (Win); begin - if Spacing not in Positive_Count then + if not Spacing'Valid then raise Constraint_Error; end if; @@ -166,7 +166,7 @@ package body Terminal_Interface.Curses.Text_IO is X2 : Column_Position; N : Natural; begin - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -200,7 +200,7 @@ package body Terminal_Interface.Curses.Text_IO is X : Column_Position; N : Natural; begin - if To not in Positive_Count then + if not To'Valid then raise Constraint_Error; end if; @@ -230,9 +230,9 @@ package body Terminal_Interface.Curses.Text_IO is begin Get_Cursor_Position (Win, Y, X); N := Natural (X); N := N + 1; - if N > Natural (Count'Last) then - raise Layout_Error; - end if; + -- if N > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; return Positive_Count (N); end Col; @@ -250,9 +250,9 @@ package body Terminal_Interface.Curses.Text_IO is begin Get_Cursor_Position (Win, Y, X); N := Natural (Y); N := N + 1; - if N > Natural (Count'Last) then - raise Layout_Error; - end if; + -- if N > Natural (Count'Last) then + -- raise Layout_Error; + -- end if; return Positive_Count (N); end Line;