1
-- Topal: GPG/GnuPG and Alpine/Pine integration
2
-- Copyright (C) 2001--2008 Phillip J. Brooke
4
-- This program is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License version 3 as
6
-- published by the Free Software Foundation.
8
-- This program is distributed in the hope that it will be useful,
9
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
-- GNU General Public License for more details.
13
-- You should have received a copy of the GNU General Public License
14
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
6
16
with Ada.Characters.Latin_1;
7
17
with Ada.Strings.Unbounded;
33
30
-- Some renamings of unbounded strings.
34
31
subtype UBS is Ada.Strings.Unbounded.Unbounded_String;
33
NullUBS : UBS renames Ada.Strings.Unbounded.Null_Unbounded_String;
36
35
function ToUBS(S : String) return UBS
37
36
renames Ada.Strings.Unbounded.To_Unbounded_String;
62
61
-- Our home directory.
63
62
Topal_Directory : UBS;
65
(Chmod, Clear, Date, Diff, Dos2Unix, File,
66
Formail, GPGOP, GPGSM, Grep, Iconv, Less, Locale,
67
Md5sum, Metamail, Mimeconstruct, Mimetool,
68
Mkdir, Mkfifo, Mv, Openssl, Rm, Runmailcap,
69
Scp, Sed, Ssh, Stty, Tee, Test);
71
Binary_Name : constant array(Binaries) of UBS :=
72
(Chmod => ToUBS("chmod"),
73
Clear => ToUBS("clear"),
74
Date => ToUBS("date"),
75
Diff => ToUBS("diff"),
76
Dos2Unix => ToUBS("dos2unix"),
77
File => ToUBS("file"),
78
Formail => ToUBS("formail"),
79
GPGOP => ToUBS("gpg"),
80
GPGSM => ToUBS("gpgsm"),
81
Grep => ToUBS("grep"),
82
Iconv => ToUBS("iconv"),
83
Less => ToUBS("less"),
84
Locale => ToUBS("locale"),
85
Md5sum => ToUBS("md5sum"),
86
Metamail => ToUBS("metamail"),
87
Mimeconstruct => ToUBS("mimeconstruct"),
88
Mimetool => ToUBS("mimetool"),
89
Mkdir => ToUBS("mkdir"),
90
Mkfifo => ToUBS("mkfifo"),
92
Openssl => ToUBS("openssl"),
94
Runmailcap => ToUBS("runmailcap"),
98
Stty => ToUBS("stty"),
100
Test => ToUBS("test"));
102
type Binaries_UBS is array (Binaries) of UBS;
65
104
-- Configuration data types.
66
105
type Config_Record is
108
Binary : Binaries_UBS;
91
111
Receiving_Options,
107
127
Verify_Not_Cached,
108
128
Verify_Not_Cached_Use_Cache,
110
Verify_Cached_Use_Cache : Positive;
130
Verify_Cached_Use_Cache,
131
-- MIME_Viewer: 1 ask, 2 use metamail, 3 use run-mailcap,
132
-- 4 save dummy message to ~/mail, 5 skip attachments
133
MIME_Viewer : Positive;
111
134
Decrypt_Cached_Fast_Continue,
112
135
Verify_Cached_Fast_Continue,
113
136
Verify_Not_Cached_Fast_Continue,
115
138
Inline_Separate_Output,
116
139
No_Clean, -- Not preserved in config file.
140
All_Headers, -- Not config file.
141
Read_From, -- Not config file.
142
Ask_Charset, -- Not config file.
118
144
-- A list of keys to be associated with email addresses.
119
145
AKE_Key : UBS_Big_Array;
122
148
-- A list of keys to be excluded from the key list.
123
149
XK_Key : UBS_Big_Array;
124
150
XK_Count : Natural;
151
-- And the same again, this time for the secret key lists.
152
SAKE_Key : UBS_Big_Array;
153
SAKE_Email : UBS_Big_Array;
154
SAKE_Count : Natural;
155
-- A list of keys to be excluded from the key list.
156
SXK_Key : UBS_Big_Array;
127
160
Config : Config_Record;