From e2b938a02f0c303e59374014d8adb51532c5edc6 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 24 Oct 2011 10:31:29 +0000 Subject: 2011-10-24 Robert Dewar * sem.adb (Initialize): Fix bug that blew up if called a second time. 2011-10-24 Robert Dewar * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c, tb-ivms.c, tb-gcc.c: Update headers to GPL 3. 2011-10-24 Robert Dewar * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma name in error msg. 2011-10-24 Hristian Kirtchev * gnat_rm.texi Add an entry for restriction No_Finalization. 2011-10-24 Ed Schonberg * sem_ch12.adb (Insert_Freeze_Node_For_Instance): If the current instance is within the one that contains the generic, the freeze node for the current one must appear in the current declarative part. Ditto if the current instance is within another package instance. In both of these cases the freeze node of the previous instance is not relevant. 2011-10-24 Gary Dismukes * switch-m.adb (Normalize_Compiler_Switches): Add recognition of AAMP-specific switches -univ and -aamp_target. 2011-10-24 Robert Dewar * a-tienau.adb (Put): Deal properly with limited line length. 2011-10-24 Robert Dewar * sem_warn.adb, sem_ch12.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180375 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-tienau.adb | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'gcc/ada/a-tienau.adb') diff --git a/gcc/ada/a-tienau.adb b/gcc/ada/a-tienau.adb index f0c1800f9e7..5498ca4f55d 100644 --- a/gcc/ada/a-tienau.adb +++ b/gcc/ada/a-tienau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -126,6 +126,25 @@ package body Ada.Text_IO.Enumeration_Aux is Actual_Width : constant Count := Count'Max (Count (Width), Item'Length); begin + -- Deal with limited line length + + if Line_Length /= 0 then + + -- If actual width exceeds line length, raise Layout_Error + + if Actual_Width > Line_Length then + raise Layout_Error; + end if; + + -- If full width cannot fit on current line move to new line + + if Actual_Width + (Col - 1) > Line_Length then + New_Line (File); + end if; + end if; + + -- Output in lower case if necessary + if Set = Lower_Case and then Item (Item'First) /= ''' then declare Iteml : String (Item'First .. Item'Last); @@ -138,10 +157,14 @@ package body Ada.Text_IO.Enumeration_Aux is Put_Item (File, Iteml); end; + -- Otherwise output in upper case + else Put_Item (File, Item); end if; + -- Fill out item with spaces to width + for J in 1 .. Actual_Width - Item'Length loop Put (File, ' '); end loop; -- cgit v1.2.1