Concatenate command and options once at configure time.
nicolas.boulenguez
8 years ago
94 | 94 |
Pattern => """") + 1;
|
95 | 95 |
O_L := Index (Source => Line, From => O_F, Pattern => """") - 1;
|
96 | 96 |
Program_List.Append
|
97 | |
((Program_Length => P_L - P_F + 1,
|
98 | |
Program => Line (P_F .. P_L),
|
99 | |
Options_Length => O_L - O_F + 1,
|
100 | |
Options => Line (O_F .. O_L),
|
|
97 |
((Program_Length => P_L - P_F + O_L - O_F + 3,
|
|
98 |
Program => Line (P_F .. P_L) & " "
|
|
99 |
& Line (O_F .. O_L),
|
101 | 100 |
Extension_List => Split_Comma (Line (E_F .. E_L))));
|
102 | 101 |
end if;
|
103 | 102 |
end;
|
|
113 | 112 |
end Import_Conffile;
|
114 | 113 |
|
115 | 114 |
Null_Tool : constant Tool := (Program_Length => 9, Program => "/dev/null",
|
116 | |
Options_Length => 0, Options => "",
|
117 | 115 |
Extension_List => UString_List.Empty_Vector);
|
118 | 116 |
|
119 | 117 |
function Matched_Extension (Extension_List : in Tool_List.Vector;
|
|
282 | 280 |
File_Name,
|
283 | 281 |
Option_Ignore_Extension_Case);
|
284 | 282 |
System_String : constant String :=
|
285 | |
This_Program.Program & " " & This_Program.Options & " '"
|
286 | |
& Shell_Fix (File_Name) & "'"
|
|
283 |
This_Program.Program & " '" & Shell_Fix (File_Name) & "'"
|
287 | 284 |
& (if Option_Quiet then " > /dev/null 2> /dev/null" else "");
|
288 | 285 |
System_Result : constant int := System (To_C (System_String));
|
289 | 286 |
begin
|
27 | 27 |
|
28 | 28 |
Noted_Error : exception;
|
29 | 29 |
|
|
30 |
-- The Program field contains the command and its options.
|
30 | 31 |
type Tool
|
31 | |
(Program_Length : Natural;
|
32 | |
Options_Length : Natural) is record
|
|
32 |
(Program_Length : Natural) is record
|
33 | 33 |
Program : String (1 .. Program_Length);
|
34 | 34 |
Extension_List : UString_List.Vector;
|
35 | |
Options : String (1 .. Options_Length);
|
36 | 35 |
end record;
|
37 | 36 |
|
38 | 37 |
package Tool_List is new Ada.Containers.Indefinite_Vectors (Positive, Tool);
|