-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 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 --
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.9 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
retval.seconds := 0;
retval.microseconds := 0;
else
- retval.seconds := Integer (t.tv_sec);
- retval.microseconds := Integer (t.tv_usec);
+ retval.seconds := Integer (t.all.tv_sec);
+ retval.microseconds := Integer (t.all.tv_usec);
end if;
return retval;
end gettime;
-- pan rightwards
-- if (basex + portx - (pymax > porty) < pxmax)
if basex + portx -
- Column_Position (greater (pymax, porty)) < pxmax then
+ Column_Position (greater (pymax, porty)) < pxmax
+ then
-- if basex + portx < pxmax or
-- (pymax > porty and basex + portx - 1 < pxmax) then
basex := basex + 1;
-- pan downwards
-- same as if (basey + porty - (pxmax > portx) < pymax)
if basey + porty -
- Line_Position (greater (pxmax, portx)) < pymax then
+ Line_Position (greater (pxmax, portx)) < pymax
+ then
-- if (basey + porty < pymax) or
-- (pxmax > portx and basey + porty - 1 < pymax) then
basey := basey + 1;
Update_Screen;
- if timing then declare
- s : String (1 .. 7);
- elapsed : Long_Float;
- begin
- after := gettime;
- elapsed := (Long_Float (after.seconds - before.seconds) +
- Long_Float (after.microseconds - before.microseconds)
- / 1.0e6);
- Move_Cursor (Line => Lines - 1, Column => Columns - 20);
- floatio.Put (s, elapsed, Aft => 3, Exp => 0);
- Add (Str => s);
- Refresh;
- end;
+ if timing then
+ declare
+ s : String (1 .. 7);
+ elapsed : Long_Float;
+ begin
+ after := gettime;
+ elapsed := (Long_Float (after.seconds - before.seconds) +
+ Long_Float (after.microseconds
+ - before.microseconds)
+ / 1.0e6);
+ Move_Cursor (Line => Lines - 1, Column => Columns - 20);
+ floatio.Put (s, elapsed, Aft => 3, Exp => 0);
+ Add (Str => s);
+ Refresh;
+ end;
end if;
c := pgetc (pad);