text stringlengths 0 234 |
|---|
else |
Skip_Value; |
end if; |
end loop; |
Expect (Character'Pos ('e')); |
end Parse_File; |
----------------- |
-- Parse_Files -- |
----------------- |
procedure Parse_Files (Value : out File_Vectors.Vector) is |
Path : League.String_Vectors.Universal_String_Vector; |
Length : Ada.Streams.Stream_Element_Count; |
begin |
Value.Clear; |
Expect (Character'Pos ('l')); |
while Buffer (Next) /= Character'Pos ('e') loop |
Parse_File (Path, Length); |
Value.Append ((Length, Path)); |
end loop; |
Expect (Character'Pos ('e')); |
end Parse_Files; |
---------------- |
-- Parse_Info -- |
---------------- |
procedure Parse_Info |
(Name : out League.Strings.Universal_String; |
Piece_Len : out Ada.Streams.Stream_Element_Count; |
Files : out File_Vectors.Vector; |
Pieces : out League.Stream_Element_Vectors.Stream_Element_Vector) |
is |
Key : League.Strings.Universal_String; |
Length : Ada.Streams.Stream_Element_Count := 0; |
begin |
Files.Clear; |
SHA_From := Next; -- Activate SHA1 calculation |
Expect (Character'Pos ('d')); |
while Buffer (Next) /= Character'Pos ('e') loop |
Parse_String (Key); |
if Key = Constants.Name then |
declare |
Path : League.String_Vectors.Universal_String_Vector; |
begin |
Parse_String (Name); |
if Length > 0 then |
-- There is a key length or a key files, but not both |
-- or neither. If length is present then the download |
-- represents a single file, otherwise it represents a |
-- set of files which go in a directory structure. |
Path.Append (Name); |
Files.Append ((Length, Path)); |
end if; |
Function Definition: procedure Parse_String_List |
Function Body: (Value : out League.String_Vectors.Universal_String_Vector) |
is |
Text : League.Strings.Universal_String; |
begin |
Value.Clear; |
Expect (Character'Pos ('l')); |
while Buffer (Next) /= Character'Pos ('e') loop |
Parse_String (Text); |
Value.Append (Text); |
end loop; |
Expect (Character'Pos ('e')); |
end Parse_String_List; |
-------------------------------- |
-- Parse_String_Vector_Vector -- |
-------------------------------- |
procedure Parse_String_Vector_Vector |
(Value : out String_Vector_Vectors.Vector) |
is |
Item : League.String_Vectors.Universal_String_Vector; |
begin |
Value.Clear; |
Expect (Character'Pos ('l')); |
while Buffer (Next) /= Character'Pos ('e') loop |
Parse_String_List (Item); |
Value.Append (Item); |
end loop; |
Expect (Character'Pos ('e')); |
end Parse_String_Vector_Vector; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.