~ubuntu-branches/ubuntu/precise/topal/precise

« back to all changes in this revision

Viewing changes to globals.ads

  • Committer: Bazaar Package Importer
  • Author(s): Phil Brooke
  • Date: 2008-07-18 07:57:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080718075738-i1szqvmxz0evz32p
Tags: upstream-62
ImportĀ upstreamĀ versionĀ 62

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--
2
 
--
3
 
--
4
 
--
 
1
-- Topal: GPG/GnuPG and Alpine/Pine integration
 
2
-- Copyright (C) 2001--2008  Phillip J. Brooke
 
3
--
 
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.
 
7
--
 
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.
 
12
--
 
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/>.
5
15
 
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;
35
32
 
 
33
   NullUBS : UBS renames Ada.Strings.Unbounded.Null_Unbounded_String;
 
34
 
36
35
   function ToUBS(S : String) return UBS
37
36
     renames Ada.Strings.Unbounded.To_Unbounded_String;
38
37
 
62
61
   -- Our home directory.
63
62
   Topal_Directory : UBS;
64
63
 
 
64
   type Binaries is
 
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);
 
70
 
 
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"),
 
91
      Mv => ToUBS("mv"),
 
92
      Openssl => ToUBS("openssl"),
 
93
      Rm => ToUBS("rm"),
 
94
      Runmailcap => ToUBS("runmailcap"),
 
95
      Scp => ToUBS("scp"),
 
96
      Sed => ToUBS("sed"),
 
97
      Ssh => ToUBS("ssh"),
 
98
      Stty => ToUBS("stty"),
 
99
      Tee => ToUBS("tee"),
 
100
      Test => ToUBS("test"));
 
101
 
 
102
   type Binaries_UBS is array (Binaries) of UBS;
 
103
 
65
104
   -- Configuration data types.
66
105
   type Config_Record is
67
106
      record
68
107
         My_Key : UBS;
69
 
         Chmod_Binary,
70
 
           Clear_Binary,
71
 
           Date_Binary,
72
 
           Diff_Binary,
73
 
           Dos2Unix_Binary,
74
 
           Formail_Binary,
75
 
           Gpg_Binary,
76
 
           Grep_Binary,
77
 
           Less_Binary,
78
 
           Md5sum_Binary,
79
 
           Metamail_Binary,
80
 
           Mimeconstruct_Binary,
81
 
           Mkdir_Binary,
82
 
           Mv_Binary,
83
 
           Rm_Binary,
84
 
           Sed_Binary,
85
 
           Stty_Binary,
86
 
           Tee_Binary,
87
 
           Test_Binary
88
 
           : UBS;
 
108
         Binary : Binaries_UBS;
89
109
         General_Options,
90
110
           Gpg_Options,
91
111
           Receiving_Options,
107
127
           Verify_Not_Cached,
108
128
           Verify_Not_Cached_Use_Cache,
109
129
           Verify_Cached,
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,
114
137
           FE_Simple,
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.
117
143
           Debug : Boolean;
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;
 
157
         SXK_Count : Natural;
125
158
      end record;
126
159
 
127
160
   Config : Config_Record;