1
-------------------------------------------------------------------------------
3
-- This file is part of AdaBrowse.
5
-- <STRONG>Copyright (c) 2002 by Thomas Wolf.</STRONG>
7
-- AdaBrowse is free software; you can redistribute it and/or modify it
8
-- under the terms of the GNU General Public License as published by the
9
-- Free Software Foundation; either version 2, or (at your option) any
10
-- later version. AdaBrowse is distributed in the hope that it will be
11
-- useful, but <EM>without any warranty</EM>; without even the implied
12
-- warranty of <EM>merchantability or fitness for a particular purpose.</EM>
13
-- See the GNU General Public License for more details. You should have
14
-- received a copy of the GNU General Public License with this distribution,
15
-- see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
16
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21
-- Author:</STRONG><DD>
23
-- <ADDRESS><A HREF="mailto:twolf@acm.org">twolf@acm.org</A></ADDRESS></DL>
26
-- Purpose:</STRONG><DD>
27
-- Global storage of file names.</DL>
32
-- 09-AUG-2002 TW Initial version.
34
-------------------------------------------------------------------------------
38
with Ada.Strings.Unbounded;
42
package body AD.Options is
44
package ASU renames Ada.Strings.Unbounded;
46
Do_Private_Parts : Boolean := False;
48
procedure Set_Private_Too
52
Do_Private_Parts := Flag;
59
return Do_Private_Parts;
62
Overwrite : Boolean := True;
63
Mode : File_Handling := Single_File;
64
Out_File, Out_Dir : ASU.Unbounded_String;
66
procedure Set_Output_Name
70
if Util.Pathes.Name (Name) /= "" then
71
Out_File := ASU.To_Unbounded_String (Name);
73
Out_File := ASU.Null_Unbounded_String;
76
S : constant String := Util.Pathes.Path (Name);
78
if S'Last >= S'First then
79
Out_Dir := ASU.To_Unbounded_String (S);
81
Out_Dir := ASU.Null_Unbounded_String;
86
procedure Set_Output_Directory
90
Out_Dir := ASU.To_Unbounded_String (Util.Pathes.Path (Name));
91
end Set_Output_Directory;
97
return ASU.To_String (Out_File);
100
function Output_Directory
104
return ASU.To_String (Out_Dir);
105
end Output_Directory;
107
procedure Set_Processing_Mode
108
(To : in File_Handling)
112
end Set_Processing_Mode;
114
function Processing_Mode
121
procedure Set_Overwrite
122
(Allowed : in Boolean)
125
Overwrite := Allowed;
128
function Allow_Overwrite