-- the beginning, else it is appended.
function Can_Have_Parameter (S : String) return Boolean;
- -- True if S can have a parameter.
+ -- True if S can have a parameter
function Require_Parameter (S : String) return Boolean;
- -- True if S requires a parameter.
+ -- True if S requires a parameter
function Actual_Switch (S : String) return String;
-- Remove any possible trailing '!', ':', '?' and '='
if Command_Line = null then
Parser := new Opt_Parser_Data (CL.Argument_Count);
- Initialize_Option_Scan
- (Switch_Char => Switch_Char,
+ Internal_Initialize_Option_Scan
+ (Parser => Parser,
+ Switch_Char => Switch_Char,
Stop_At_First_Non_Switch => Stop_At_First_Non_Switch,
Section_Delimiters => Section_Delimiters);
else
Parser.In_Expansion := False;
Parser.Switch_Character := Switch_Char;
Parser.Stop_At_First := Stop_At_First_Non_Switch;
+ Parser.Section := (others => 1);
-- If we are using sections, we have to preprocess the command line
-- to delimit them. A section can be repeated, so we just give each
if Separator (Parser) = ASCII.NUL then
Add_Switch
- (Cmd, Sw & Parameter (Parser), "");
+ (Cmd, Sw & Parameter (Parser), "", ASCII.NUL);
else
Add_Switch
(Cmd, Sw, Parameter (Parser), Separator (Parser));
Free (Config.Aliases);
Free (Config.Expansions);
Free (Config.Prefixes);
+ Free (Config.Sections);
+ Free (Config.Switches);
Unchecked_Free (Config);
end if;
end Free;