diff options
author | Robert Dewar <dewar@adacore.com> | 2005-09-05 10:07:00 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-09-05 10:07:00 +0200 |
commit | a2cb348ef4d982ff951a398a07e71f7bdff020ab (patch) | |
tree | 4719707ee1466c01c795cf2a027236826eba7d41 /gcc/ada/g-arrspl.adb | |
parent | f67b3771d51db363dc9c6e9d721b71568fceff14 (diff) | |
download | gcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.zip gcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.tar.gz gcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.tar.bz2 |
a-dirval-mingw.adb, [...]: Minor reformatting
2005-09-01 Robert Dewar <dewar@adacore.com>
* a-dirval-mingw.adb, a-direct.adb, a-coinve.adb,
g-dynhta.adb, g-dynhta.ads, cstand.adb, exp_smem.adb, g-debuti.ads,
g-dirope.adb, g-table.adb, lib-sort.adb, sem_maps.adb,
exp_fixd.adb, exp_aggr.adb, a-intnam-mingw.ads, a-intnam-vxworks.ads,
g-arrspl.adb, g-arrspl.ads, g-awk.adb, g-awk.ads, g-boubuf.ads,
g-boubuf.ads, g-boubuf.ads, g-bubsor.ads, g-bubsor.adb, g-busora.adb,
g-busora.ads, g-busorg.adb, g-busorg.ads, g-calend.adb, g-calend.ads,
g-casuti.adb, g-casuti.ads, g-catiio.adb, g-catiio.ads, g-cgi.adb,
g-cgi.ads, g-cgicoo.adb, g-cgicoo.ads, g-cgideb.adb, g-cgideb.ads,
g-comlin.adb, g-comver.ads, g-semaph.ads, g-socthi.ads,
sem_ch7.adb, a-direio.adb, a-caldel.ads, i-cstrea-vms.adb,
a-ztedit.adb, a-ztenau.adb, g-socthi-vms.adb, g-socthi-vms.ads,
g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.ads,
a-intnam-irix.ads, a-intnam-irix.ads, a-intnam-hpux.ads,
a-intnam-os2.ads, a-intnam-os2.ads, a-caldel-vms.adb, a-calend-vms.adb,
a-calend-vms.ads, g-heasor.adb, g-heasor.ads, g-hesora.adb,
g-hesora.ads, g-hesorg.adb, g-hesorg.ads, g-htable.adb, g-htable.ads,
g-io.adb, g-io.ads, g-io_aux.adb, g-io_aux.ads, g-locfil.ads,
g-memdum.adb, g-memdum.ads, g-traceb.adb, g-traceb.ads, i-cobol.adb,
i-cobol.ads, i-cstrea.ads, i-cstrin.adb, a-wtedit.adb, a-tifiio.adb,
a-wtenau.adb, a-wtenau.adb, a-teioed.adb: Minor reformatting
From-SVN: r103894
Diffstat (limited to 'gcc/ada/g-arrspl.adb')
-rw-r--r-- | gcc/ada/g-arrspl.adb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gcc/ada/g-arrspl.adb b/gcc/ada/g-arrspl.adb index b6d62df..0d03664 100644 --- a/gcc/ada/g-arrspl.adb +++ b/gcc/ada/g-arrspl.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2005 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- -- @@ -43,8 +43,7 @@ package body GNAT.Array_Split is function Count (Source : Element_Sequence; - Pattern : Element_Set) - return Natural; + Pattern : Element_Set) return Natural; -- Returns the number of occurences of Pattern elements in Source, 0 is -- returned if no occurence is found in Source. @@ -92,8 +91,7 @@ package body GNAT.Array_Split is function Count (Source : Element_Sequence; - Pattern : Element_Set) - return Natural + Pattern : Element_Set) return Natural is C : Natural := 0; begin @@ -144,8 +142,7 @@ package body GNAT.Array_Split is function Separators (S : Slice_Set; - Index : Slice_Number) - return Slice_Separators + Index : Slice_Number) return Slice_Separators is begin if Index > S.N_Slice then @@ -154,7 +151,7 @@ package body GNAT.Array_Split is elsif Index = 0 or else (Index = 1 and then S.N_Slice = 1) then - -- Whole string, or no separator used. + -- Whole string, or no separator used return (Before => Array_End, After => Array_End); @@ -238,8 +235,10 @@ package body GNAT.Array_Split is loop if K > Count_Sep then - -- No more separator, last slice end at the end of the source + + -- No more separators, last slice ends at the end of the source -- string. + Stop := S.Source'Last; else Stop := S.Indexes (K) - 1; @@ -255,13 +254,17 @@ package body GNAT.Array_Split is case Mode is when Single => + -- In this mode just set start to character next to the -- current separator, advance the separator index. + Start := S.Indexes (K) + 1; K := K + 1; when Multiple => - -- In this mode skip separators following each others + + -- In this mode skip separators following each other + loop Start := S.Indexes (K) + 1; K := K + 1; @@ -282,8 +285,7 @@ package body GNAT.Array_Split is function Slice (S : Slice_Set; - Index : Slice_Number) - return Element_Sequence + Index : Slice_Number) return Element_Sequence is begin if Index = 0 then |