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=cbf1d54098c3d3f4ac2eaec4f4939d42ce006762;hb=65ee0f2ca50c827bf271df7a087edd7da49f598d;hpb=a8987e73ec254703634802b4f7ee30d3a485524d diff --git a/Ada95/src/terminal_interface-curses-text_io.adb b/Ada95/src/terminal_interface-curses-text_io.adb index cbf1d540..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 -- @@ -35,7 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.14 $ +-- $Revision: 1.18 $ +-- $Date: 2006/06/25 14:24:40 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Text_IO is @@ -86,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; @@ -107,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; @@ -127,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; @@ -165,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; @@ -199,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; @@ -229,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; @@ -249,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;