From: Piotr Trojanek Date: Fri, 22 May 2020 11:56:06 +0000 (+0200) Subject: [Ada] Fix typo and layout in comments about matching X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72145c1ee83fc5d7b8f65084442a7397bf154154;p=gcc.git [Ada] Fix typo and layout in comments about matching gcc/ada/ * erroutc.adb (Matches): Fix comments. --- diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 435cb143abe..0c5d98ce146 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -52,7 +52,7 @@ package body Erroutc is ----------------------- function Matches (S : String; P : String) return Boolean; - -- Returns true if the String S patches the pattern P, which can contain + -- Returns true if the String S matches the pattern P, which can contain -- wildcard chars (*). The entire pattern must match the entire string. -- Case is ignored in the comparison (so X matches x). @@ -409,17 +409,17 @@ package body Erroutc is if PPtr = PLast and then P (PPtr) = '*' then return True; - -- Return True if both pattern and string exhausted + -- Return True if both pattern and string exhausted elsif PPtr > PLast and then SPtr > Slast then return True; - -- Return False, if one exhausted and not the other + -- Return False, if one exhausted and not the other elsif PPtr > PLast or else SPtr > Slast then return False; - -- Case where pattern starts with asterisk + -- Case where pattern starts with asterisk elsif P (PPtr) = '*' then @@ -435,13 +435,13 @@ package body Erroutc is return False; - -- Dealt with end of string and *, advance if we have a match + -- Dealt with end of string and *, advance if we have a match elsif Fold_Lower (S (SPtr)) = Fold_Lower (P (PPtr)) then SPtr := SPtr + 1; PPtr := PPtr + 1; - -- If first characters do not match, that's decisive + -- If first characters do not match, that's decisive else return False;