diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 10:28:23 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 10:28:23 +0000 |
commit | 8d1e3745fc7dcd77f68e7e3841209bb73e284aa6 (patch) | |
tree | 31ebe42337e32d1a1265944b1ae6957ba684600f /gcc/ada/g-dirope.adb | |
parent | c2fb68ac9fbebf56a2aa00b7ec47c950642e9b2d (diff) | |
download | gcc-8d1e3745fc7dcd77f68e7e3841209bb73e284aa6.tar.gz |
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).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-dirope.adb')
-rw-r--r-- | gcc/ada/g-dirope.adb | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/gcc/ada/g-dirope.adb b/gcc/ada/g-dirope.adb index c7670ef558b..294aa7031ee 100644 --- a/gcc/ada/g-dirope.adb +++ b/gcc/ada/g-dirope.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2008, AdaCore -- +-- Copyright (C) 1998-2009, AdaCore -- -- -- -- 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- -- @@ -97,12 +97,7 @@ package body GNAT.Directory_Operations is begin -- Cut_Start point to the first basename character - if Cut_Start = 0 then - Cut_Start := Path'First; - - else - Cut_Start := Cut_Start + 1; - end if; + Cut_Start := (if Cut_Start = 0 then Path'First else Cut_Start + 1); -- Cut_End point to the last basename character @@ -580,11 +575,8 @@ package body GNAT.Directory_Operations is begin Local_Get_Current_Dir (Buffer'Address, Path_Len'Address); - if Dir'Length > Path_Len then - Last := Dir'First + Path_Len - 1; - else - Last := Dir'Last; - end if; + Last := + (if Dir'Length > Path_Len then Dir'First + Path_Len - 1 else Dir'Last); Dir (Buffer'First .. Last) := Buffer (Buffer'First .. Last); @@ -683,11 +675,9 @@ package body GNAT.Directory_Operations is return; end if; - if Str'Length > Filename_Len then - Last := Str'First + Filename_Len - 1; - else - Last := Str'Last; - end if; + Last := + (if Str'Length > Filename_Len then Str'First + Filename_Len - 1 + else Str'Last); declare subtype Path_String is String (1 .. Filename_Len); |