summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-tienau.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-24 10:31:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-24 10:31:29 +0000
commite2b938a02f0c303e59374014d8adb51532c5edc6 (patch)
treef5d9993ccdabecbc378aaf6eb3b66c313885bdc5 /gcc/ada/a-tienau.adb
parentbf15119e6c63f70190d31244d6fd4e7223562ed9 (diff)
downloadppe42-gcc-e2b938a02f0c303e59374014d8adb51532c5edc6.tar.gz
ppe42-gcc-e2b938a02f0c303e59374014d8adb51532c5edc6.zip
2011-10-24 Robert Dewar <dewar@adacore.com>
* sem.adb (Initialize): Fix bug that blew up if called a second time. 2011-10-24 Robert Dewar <dewar@adacore.com> * 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 <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma name in error msg. 2011-10-24 Hristian Kirtchev <kirtchev@adacore.com> * gnat_rm.texi Add an entry for restriction No_Finalization. 2011-10-24 Ed Schonberg <schonberg@adacore.com> * 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 <dismukes@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Add recognition of AAMP-specific switches -univ and -aamp_target. 2011-10-24 Robert Dewar <dewar@adacore.com> * a-tienau.adb (Put): Deal properly with limited line length. 2011-10-24 Robert Dewar <dewar@adacore.com> * 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
Diffstat (limited to 'gcc/ada/a-tienau.adb')
-rw-r--r--gcc/ada/a-tienau.adb25
1 files changed, 24 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud