~ubuntu-branches/debian/stretch/adabrowse/stretch

« back to all changes in this revision

Viewing changes to util-execution.ads

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2004-02-14 13:22:40 UTC
  • Revision ID: james.westby@ubuntu.com-20040214132240-cqumhiq1677pkvzo
Tags: upstream-4.0.2
ImportĀ upstreamĀ versionĀ 4.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-------------------------------------------------------------------------------
 
2
--
 
3
--  <STRONG>Copyright &copy; 2001, 2002 by Thomas Wolf.</STRONG>
 
4
--  <BLOCKQUOTE>
 
5
--    This piece of software is free software; you can redistribute it and/or
 
6
--    modify it under the terms of the  GNU General Public License as published
 
7
--    by the Free Software  Foundation; either version 2, or (at your option)
 
8
--    any later version. This software is distributed in the hope that it will
 
9
--    be useful, but <EM>without any warranty</EM>; without even the implied
 
10
--    warranty of <EM>merchantability or fitness for a particular purpose.</EM>
 
11
--    See the GNU General Public License for  more details. You should have
 
12
--    received a copy of the GNU General Public License with this distribution,
 
13
--    see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
 
14
--    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
15
--    USA.
 
16
--  </BLOCKQUOTE>
 
17
--  <BLOCKQUOTE>
 
18
--    As a special exception from the GPL, if other files instantiate generics
 
19
--    from this unit, or you link this unit with other files to produce an
 
20
--    executable, this unit does not by itself cause the resulting executable
 
21
--    to be covered by the GPL. This exception does not however invalidate any
 
22
--    other reasons why the executable file might be covered by the GPL.
 
23
--  </BLOCKQUOTE>
 
24
--
 
25
--  <VERSION ID="DEVELOP">
 
26
--
 
27
--  <AUTHOR>
 
28
--    Thomas Wolf  (TW) <E_MAIL>
 
29
--  </AUTHOR>
 
30
--
 
31
--  <PURPOSE>
 
32
--    Simple operations to execute a command in the OS environment.
 
33
--    Implemented by calling the ISO-C standard function "@system@".
 
34
--
 
35
--    Both versions of @Execute@ should be considered potentially blocking
 
36
--    calls.
 
37
--
 
38
--    Also provided is an interface to the ISO C standard function "@exit@",
 
39
--    which should kill the process.
 
40
--  </PURPOSE>
 
41
--
 
42
--  <NOT_TASK_SAFE>
 
43
--
 
44
--  <NO_STORAGE>
 
45
--
 
46
--  <HISTORY>
 
47
--    21-MAR-2002   TW  Initial version.
 
48
--    25-OCT-2002   TW  Added @Terminate_Process@.
 
49
--  </HISTORY>
 
50
-------------------------------------------------------------------------------
 
51
 
 
52
pragma License (Modified_GPL);
 
53
 
 
54
package Util.Execution is
 
55
 
 
56
   pragma Elaborate_Body;
 
57
 
 
58
   function Execute (Command : in String) return Integer;
 
59
   --  Return whatever the underlying "@system@" returns. The semantics of
 
60
   --  this return value is completely implementation-defined (in the ISO
 
61
   --  C standard). However, typical implementations return zero upon success,
 
62
   --  and a non-zero value upon failure.
 
63
 
 
64
   procedure Execute (Command : in String);
 
65
   --  Use this if you don't care about the return value of "@system@".
 
66
 
 
67
   procedure Terminate_Process
 
68
     (Status : in Integer := 0);
 
69
   --  ISO C's @exit@ function.
 
70
 
 
71
end Util.Execution;
 
72
 
 
73