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

« back to all changes in this revision

Viewing changes to command_line_wrapper.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 Globals; use Globals;
7
17
 
8
18
package Command_Line_Wrapper is
9
 
   
 
19
 
10
20
   Argument_Overrun : exception;
11
 
   
 
21
 
12
22
   -- Three functions for working through the command line.
13
23
   -- The first only advances the pointer if the test was true.
14
24
   -- Two forms, one taking a string, one taking a UBS_Array.
15
25
   function Match (A : in String) return Boolean;
16
 
   
 
26
 
17
27
   function Match (A : in UBS_Array) return Boolean;
18
28
 
19
29
   -- This second function always advances.
20
30
   function Eat return UBS;
21
 
   
 
31
 
22
32
   -- This last function returns true if there is still something to read.
23
33
   function More (Needed : Positive := 1) return Boolean;
24
 
   
 
34
 
25
35
   -- Given J, the index of the first command line argument to drop into an
26
36
   -- array, drop J, J+1, etc. into an array and return it.
27
37
   function Eat_Remaining_Arguments return UBS_Array_Pointer;