Natools

Diff
Login

Differences From Artifact [dc49608feb]:

To Artifact [ba9d2b7b2a]:


1450
1451
1452
1453
1454
1455
1456
1457





1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470





1471
1472
1473
1474
1475
1476
1477
1450
1451
1452
1453
1454
1455
1456

1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473

1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485







-
+
+
+
+
+












-
+
+
+
+
+







         raise Ada.Strings.Index_Error;
      end if;

      case (Going) is
      when Ada.Strings.Forward =>
         loop
            Result := Ada.Strings.Fixed.Index
              (Source.Data (Chunk).all, Set, Offset, Test, Going);
              (Source.Data (Chunk).all
                 (1 .. Positive'Min (Source.Size
                                       - (Chunk - 1) * Source.Chunk_Size,
                                     Source.Chunk_Size)),
               Set, Offset, Test, Going);
            if Result /= 0 then
               return (Chunk - 1) * Source.Chunk_Size + Result;
            end if;
            if Chunk = Source.Data'Last then
               return 0;
            end if;
            Chunk := Chunk + 1;
            Offset := 1;
         end loop;
      when Ada.Strings.Backward =>
         loop
            Result := Ada.Strings.Fixed.Index
              (Source.Data (Chunk).all, Set, Offset, Test, Going);
              (Source.Data (Chunk).all
                 (1 .. Positive'Min (Source.Size
                                       - (Chunk - 1) * Source.Chunk_Size,
                                     Source.Chunk_Size)),
               Set, Offset, Test, Going);
            if Result /= 0 then
               return (Chunk - 1) * Source.Chunk_Size + Result;
            end if;
            if Chunk = Source.Data'First then
               return 0;
            end if;
            Chunk := Chunk - 1;