File: externals-simple.ads

package info (click to toggle)
topal 75-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,280 kB
  • ctags: 104
  • sloc: ada: 11,008; ansic: 783; sh: 217; makefile: 148
file content (145 lines) | stat: -rw-r--r-- 4,463 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
-- Topal: GPG/GnuPG and Alpine/Pine integration
-- Copyright (C) 2001--2012  Phillip J. Brooke
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License version 3 as
-- published by the Free Software Foundation.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

package Externals.Simple is

   -- Equivalent of `cat D'.
   procedure Cat (D : in String);

   -- Equivalent of `cat D1 > D2'.
   procedure Cat_Out (D1 : in String;
                      D2 : in String);

   -- Equivalent of `cat > D'.
   procedure Cat_Stdin_Out (D : in String);

   -- Equivalent of `cat D1 >> D2'.
   procedure Cat_Append (D1 : in String;
                         D2 : in String);

   -- Equivalent of `chmod P D'.
   procedure Chmod (P : in String;
                    D : in String);

   -- Equivalent of `clear'.
   procedure Clear;

   -- Equivalent of `date >> D'.
   procedure Date_Append (D : in String);

   -- Date string YmdHMS.
   function Date_String return String;

   -- date A >> D
   procedure Date_1_Append(A, D : in String);

   -- Diff --brief.  Returns true for `there are changes', false for
   -- `no changes'.
   function Diff_Brief (F1 : in String;
                        F2 : in String) return Boolean;

   -- Equivalent of `dos2unix -u D'.  From Unix to DOS.
   procedure Dos2Unix_U (D : in String);

   -- Equivalent of `dos2unix D'.  From DOS to Unix.
   procedure Dos2Unix (D : in String);

   -- Equivalent of `echo E >> D'.
   procedure Echo_Append (E : in String;
                          D : in String);

   -- Equivalent of `echo -n E >> D'.
   procedure Echo_Append_N (E : in String;
                            D : in String);

   -- Equivalent of `echo E > D'.
   procedure Echo_Out (E : in String;
                       D : in String);

   -- Equivalent of `echo -n E > D'.
   procedure Echo_Out_N (E : in String;
                         D : in String);

   -- Equivalent of `grep -i T <D1 >D2'.
   -- If E is True, then add -E flag (extended regexp).
   -- If C is True, then add -c flag (return count).
   function Grep_I_InOut (T : in String;
                          D1 : in String;
                          D2 : in String;
			  E : in Boolean := False;
			  C : in Boolean := False) return Integer;

   -- Equivalent of `mkdir -p D'
   procedure Mkdir_P (D : in String);

   -- Equivalent of `mv -f D1 D2'
   procedure Mv_F (D1 : in String;
                   D2 : in String);

   -- View a file with a pager.
   procedure Pager (F : in String);

   -- Remove a specified file (rm -f F).
   procedure Rm_File (F : in String);

   -- Remove all the temporary files.
   procedure Rm_Tempfiles;

   -- Remove temporary files for this run.
   procedure Rm_Tempfiles_PID;

   -- Remove all the cache files.
   procedure Rm_Cachefiles;

   -- General sed invocation.  Only accepts a SINGLE argument.
   procedure Sed_InOut (A      : in String;
                        Source : in String;
                        Target : in String);

   -- Equivalent of `stty sane'.
   procedure Stty_Sane;

   -- Equivalent of `system'.
   -- _In variant sets up stdin from Source.
   function System (Argv : UBS) return Integer;
   function System (Argv : String) return Integer;
   function System_In (Argv : String; Source : String) return Integer;

   -- Equivalent of `test -d D'
   function Test_D (D : in String) return Boolean;

   -- Equivalent of `test -f D'
   function Test_F (D : in String) return Boolean;

   -- Equivalent of `test -r D'
   function Test_R (D : in String) return Boolean;

   -- Equivalent of `test -p D'
   function Test_P (D : in String) return Boolean;

   -- Equivalent of `test -s D'
   function Test_S (D : in String) return Boolean;

   -- Guess content type of F using `file'.
   function Guess_Content_Type (F : in String) return String;

   -- Use locale charmap to get the current keymap.
   function Get_Charmap return String;

   -- Convert charmaps within a single file (F) from charset CF to
   --  charset CT.
   procedure Convert_Charmap (F, CF, CT : in String);

end Externals.Simple;