diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-30 13:27:40 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-30 13:27:40 +0000 |
commit | ec40265d92e9db6dd4fac77cbe77138c3a5ebc35 (patch) | |
tree | 854f726823e2af6587eb683f740988813fd28f9a /gcc/ada/a-wtedit.adb | |
parent | c6d4a1059abf96f88cbcc63b31b92a12d83b28af (diff) | |
download | gcc-ec40265d92e9db6dd4fac77cbe77138c3a5ebc35.tar.gz |
2009-10-30 Robert Dewar <dewar@adacore.com>
* a-tideio.adb: Minor reformatting
* a-wtdeio.adb, a-ztdeio.adb: Update comments, code clean up.
* a-reatim.adb, a-tideau.adb, a-ngelfu.adb, a-ztdeau.adb, a-ngrear.adb,
a-wtedit.adb, a-ststio.adb, a-ztedit.adb: Minor code reorganization
(use conditional expressions).
2009-10-30 Ed Schonberg <schonberg@adacore.com>
* gnat_ugn.texi: Additional info on gnatw.i and gnatw.I
* sem_case.adb: Improved error message.
2009-10-30 Emmanuel Briot <briot@adacore.com>
* a-direct.adb, gnatcmd.adb, gnatname.adb, makeutl.adb, opt.ads,
osint.adb, prj-ext.adb, switch-m.adb (Follow_Links_For_Dirs): Now
defaults to False, and controlled by -eL.
* a-direct.adb: Add comments.
* osint.adb (File_Stamp): Avoid unneeded duplicate system call
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153744 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-wtedit.adb')
-rw-r--r-- | gcc/ada/a-wtedit.adb | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/gcc/ada/a-wtedit.adb b/gcc/ada/a-wtedit.adb index dbe09a9df15..cc41dc1cd86 100644 --- a/gcc/ada/a-wtedit.adb +++ b/gcc/ada/a-wtedit.adb @@ -477,21 +477,17 @@ package body Ada.Wide_Text_IO.Editing is raise Layout_Error; end if; - if Pic.Radix_Position = Invalid_Position then - Position := Answer'Last; - else - Position := Pic.Radix_Position - 1; - end if; + Position := + (if Pic.Radix_Position = Invalid_Position then Answer'Last + else Pic.Radix_Position - 1); for J in reverse Attrs.Start_Of_Int .. Attrs.End_Of_Int loop - while Answer (Position) /= '9' and then Answer (Position) /= Pic.Floater loop if Answer (Position) = '_' then Answer (Position) := Separator_Character; - elsif Answer (Position) = 'b' then Answer (Position) := ' '; end if; @@ -790,25 +786,22 @@ package body Ada.Wide_Text_IO.Editing is -- No trailing digits, but now J may need to stick in a currency -- symbol or sign. - if Pic.Start_Currency = Invalid_Position then - Position := Answer'Last + 1; - else - Position := Pic.Start_Currency; - end if; + Position := + (if Pic.Start_Currency = Invalid_Position then Answer'Last + 1 + else Pic.Start_Currency); end if; for J in Position .. Answer'Last loop - if Pic.Start_Currency /= Invalid_Position and then Answer (Pic.Start_Currency) = '#' then Currency_Pos := 1; end if; - -- Note: There are some weird cases J can imagine with 'b' or '#' - -- in currency strings where the following code will cause - -- glitches. The trick is to tell when the character in the - -- answer should be checked, and when to look at the original - -- string. Some other time. RIE 11/26/96 ??? + -- Note: There are some weird cases J can imagine with 'b' or '#' in + -- currency strings where the following code will cause glitches. The + -- trick is to tell when the character in the answer should be + -- checked, and when to look at the original string. Some other time. + -- RIE 11/26/96 ??? case Answer (J) is when '*' => @@ -942,8 +935,9 @@ package body Ada.Wide_Text_IO.Editing is -- 1) Expand $, replace '.' with Radix_Point - return Answer (1 .. Currency_Pos - 1) & Currency_Symbol & - Answer (Currency_Pos + 1 .. Answer'Last); + return + Answer (1 .. Currency_Pos - 1) & Currency_Symbol & + Answer (Currency_Pos + 1 .. Answer'Last); else -- 2) No currency expansion, replace '.' with Radix_Point |