]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
ncurses 6.2 - patch 20200212
[ncurses.git] / Ada95 / src / terminal_interface-curses-forms-field_types-enumeration-ada.adb
index 89972d4f79b5373a6c918f0b9475cbf1d976e383..472aa23918c1f3ec422c8797c2b01707d454a6fd 100644 (file)
@@ -7,7 +7,8 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+-- Copyright 2020 Thomas E. Dickey                                          --
+-- Copyright 1999-2004,2011 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 +35,9 @@
 -- authorization.                                                           --
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
---  Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en
 --  Version Control:
---  $Revision: 1.6 $
+--  $Revision: 1.12 $
+--  $Date: 2020/02/02 23:34:34 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Characters.Handling; use Ada.Characters.Handling;
@@ -55,14 +56,14 @@ package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is
       I.Match_Must_Be_Unique := Must_Be_Unique;
 
       for E in T'Range loop
-         I.Names (J) := new String'(T'Image (T (E)));
+         I.Names (J) := new String'(T'Image (E));
          --  The Image attribute defaults to upper case, so we have to handle
          --  only the other ones...
          if Set /= Upper_Case then
             I.Names (J).all := To_Lower (I.Names (J).all);
             if Set = Mixed_Case then
-               I.Names (J)(I.Names (J).all'First) :=
-                 To_Upper (I.Names (J)(I.Names (J).all'First));
+               I.Names (J).all (I.Names (J).all'First) :=
+                 To_Upper (I.Names (J).all (I.Names (J).all'First));
             end if;
          end if;
          J := J + 1;