X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fsample-my_field_type.adb;h=0dacfc3a5681fbd23724ed821a211378fddb39a1;hp=11e422684e6afcbf1836df452a6726725a8daf79;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/Ada95/samples/sample-my_field_type.adb b/Ada95/samples/sample-my_field_type.adb index 11e42268..0dacfc3a 100644 --- a/Ada95/samples/sample-my_field_type.adb +++ b/Ada95/samples/sample-my_field_type.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- Copyright (c) 1998,2004 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 -- @@ -33,9 +33,10 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Juergen Pfeifer 1996 +-- Author: Juergen Pfeifer, 1996 -- Version Control --- $Revision: 1.7 $ +-- $Revision: 1.13 $ +-- $Date: 2004/08/21 21:37:00 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; @@ -45,11 +46,14 @@ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; -- package body Sample.My_Field_Type is - -- That's simple. There are no field validity checks. + -- That's simple. There are minimal field validity checks. function Field_Check (Fld : Field; Typ : My_Data) return Boolean is begin + if Fld = Null_Field or Typ.Ch = Character'Val (0) then + return False; + end if; return True; end Field_Check;