diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:28:23 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:28:23 +0100 |
commit | e64e5f7438497707a97da41a07ca787e04d5f311 (patch) | |
tree | 31ebe42337e32d1a1265944b1ae6957ba684600f /gcc/ada/s-fileio.adb | |
parent | ff149a358cd46b8e54a0080e8c714103a8def136 (diff) | |
download | gcc-e64e5f7438497707a97da41a07ca787e04d5f311.zip gcc-e64e5f7438497707a97da41a07ca787e04d5f311.tar.gz gcc-e64e5f7438497707a97da41a07ca787e04d5f311.tar.bz2 |
[multiple changes]
2009-11-30 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Update gnatcheck doc.
2009-11-30 Robert Dewar <dewar@adacore.com>
make.adb, prj-makr.adb, g-sothco.ads: Minor reformattting
* s-taprop-dummy.adb: Minor code reorganization (raise with msgs start
with lower case).
* i-vxwoio.adb, g-dirope.adb, g-sercom-linux.adb,
g-enblsp-vms-alpha.adb, g-regist.adb, s-imgcha.adb, s-tarest.adb,
s-taprop-mingw.adb, g-exctra.adb, g-expect.adb, g-comlin.adb,
g-debpoo.adb, g-expect-vms.adb, g-pehage.adb, g-trasym-vms-alpha.adb,
g-enblsp-vms-ia64.adb, s-fatgen.adb, s-fileio.adb: Minor code
reorganization (use conditional expressions).
From-SVN: r154773
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index a384d40..60a96e4 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -519,27 +519,17 @@ package body System.File_IO is end if; when Inout_File | Append_File => - if Creat then - Fopstr (1) := 'w'; - else - Fopstr (1) := 'r'; - end if; - + Fopstr (1) := (if Creat then 'w' else 'r'); Fopstr (2) := '+'; Fptr := 3; end case; - -- If text_translation_required is true then we need to append - -- either a t or b to the string to get the right mode + -- If text_translation_required is true then we need to append either a + -- "t" or "b" to the string to get the right mode. if text_translation_required then - if Text then - Fopstr (Fptr) := 't'; - else - Fopstr (Fptr) := 'b'; - end if; - + Fopstr (Fptr) := (if Text then 't' else 'b'); Fptr := Fptr + 1; end if; |