Codebase list music123 / d71b8c0
Concatenate command and options once at configure time. nicolas.boulenguez 8 years ago
2 changed file(s) with 6 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
9494 Pattern => """") + 1;
9595 O_L := Index (Source => Line, From => O_F, Pattern => """") - 1;
9696 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),
101100 Extension_List => Split_Comma (Line (E_F .. E_L))));
102101 end if;
103102 end;
113112 end Import_Conffile;
114113
115114 Null_Tool : constant Tool := (Program_Length => 9, Program => "/dev/null",
116 Options_Length => 0, Options => "",
117115 Extension_List => UString_List.Empty_Vector);
118116
119117 function Matched_Extension (Extension_List : in Tool_List.Vector;
282280 File_Name,
283281 Option_Ignore_Extension_Case);
284282 System_String : constant String :=
285 This_Program.Program & " " & This_Program.Options & " '"
286 & Shell_Fix (File_Name) & "'"
283 This_Program.Program & " '" & Shell_Fix (File_Name) & "'"
287284 & (if Option_Quiet then " > /dev/null 2> /dev/null" else "");
288285 System_Result : constant int := System (To_C (System_String));
289286 begin
2727
2828 Noted_Error : exception;
2929
30 -- The Program field contains the command and its options.
3031 type Tool
31 (Program_Length : Natural;
32 Options_Length : Natural) is record
32 (Program_Length : Natural) is record
3333 Program : String (1 .. Program_Length);
3434 Extension_List : UString_List.Vector;
35 Options : String (1 .. Options_Length);
3635 end record;
3736
3837 package Tool_List is new Ada.Containers.Indefinite_Vectors (Positive, Tool);