~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/unixutil.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="ISO8859-1"?>
2
 
<fpdoc-descriptions>
3
 
<package name="rtl">
4
 
 
5
 
<!--
6
 
  ====================================================================
7
 
    unixutil
8
 
  ====================================================================
9
 
-->
10
 
 
11
 
<module name="unixutil">
12
 
<short>Unix utility routines.</short>
13
 
<descr>
14
 
<p>
15
 
The <file>UnixUtil</file> unit contains some of the routines that were
16
 
present in the old <file>Linux</file> unit, but which do not really belong
17
 
in the <link id="#rtl.unix">unix</link> or <link id="#rtl.baseunix">baseunix</link> 
18
 
units.
19
 
</p>
20
 
<p>
21
 
Most of the functions described here have cross-platform counterparts in the 
22
 
<link id="#rtl.sysutils">SysUtils</link> unit. It is therefore recommended
23
 
to use that unit.
24
 
</p>
25
 
</descr>
26
 
 
27
 
<!-- variable Visibility: default -->
28
 
<element name="tzseconds">
29
 
<short>Seconds west of GMT</short>
30
 
</element>
31
 
 
32
 
<element name="ComStr">
33
 
<short>Command-line string type.</short>
34
 
</element>
35
 
 
36
 
<element name="PathStr">
37
 
<short>Filename full path string type.</short>
38
 
</element>
39
 
 
40
 
<element name="DirStr">
41
 
<short>Filename directory part string type.</short>
42
 
</element>
43
 
 
44
 
<element name="NameStr">
45
 
<short>Filename name part string type.</short>
46
 
</element>
47
 
 
48
 
<element name="ExtStr">
49
 
<short>Filename extension part string type.</short>
50
 
</element>
51
 
 
52
 
<!-- function Visibility: default -->
53
 
<element name="Dirname">
54
 
<short>Extract directory part from filename</short>
55
 
<descr>
56
 
<p>
57
 
Returns the directory part of <var>Path</var>.
58
 
The directory is the part of <var>Path</var> before the last slash,
59
 
or empty if there is no slash.
60
 
The last character of the result is not a slash, unless the directory is the
61
 
root directory.
62
 
</p>
63
 
</descr>
64
 
<errors>
65
 
None.
66
 
</errors>
67
 
<seealso>
68
 
<link id="BaseName"/>
69
 
</seealso>
70
 
<example file="unutilex/ex47"/>
71
 
</element>
72
 
 
73
 
<!-- function Visibility: default -->
74
 
<element name="StringToPPChar">
75
 
<short>Split string in list of null-terminated strings</short>
76
 
<descr>
77
 
<p>
78
 
<var>StringToPPChar</var> splits the string <var>S</var> in words, replacing any
79
 
whitespace with zero characters. It returns a pointer to an array of pchars
80
 
that point to the first letters of the words in <var>S</var>. This array is terminated
81
 
by a <var>Nil</var> pointer.
82
 
</p>
83
 
<p>
84
 
The function does <em> not</em> add a zero character to the end of the string
85
 
unless it ends on whitespace.
86
 
</p>
87
 
<p>
88
 
The function reserves memory on the heap to store the array of <var>PChar</var>;
89
 
The caller is responsible for freeing this memory. 
90
 
</p>
91
 
<p>
92
 
This function can be called to create arguments for the various <var>Exec</var>
93
 
calls.
94
 
</p>
95
 
</descr>
96
 
<errors>
97
 
None.
98
 
</errors>
99
 
<seealso>
100
 
<link id="ArrayStringToPPchar"/>
101
 
<link id="#rtl.baseunix.FpExecve"/>
102
 
</seealso>
103
 
<example file="unutilex/ex70"/>
104
 
</element>
105
 
 
106
 
<!-- function Visibility: default -->
107
 
<element name="ArrayStringToPPchar">
108
 
<short>Concert an array of string to an array of null-terminated strings</short>
109
 
<descr>
110
 
<p>
111
 
<var>ArrayStringToPPchar</var> creates an array of null-terminated strings
112
 
that point to strings which are the same as the strings in the array
113
 
<var>S</var>. The function returns a pointer to this array. The array and
114
 
the strings it contains must be disposed of after being used, because it 
115
 
they are allocated on the heap.
116
 
</p>
117
 
<p>
118
 
The <var>ReserveEntries</var> parameter tells <var>ArrayStringToPPchar</var>
119
 
to allocate room at the end of the array for another <var>ReserveEntries</var>
120
 
entries.
121
 
</p>
122
 
</descr>
123
 
<errors>
124
 
If not enough memory is available, an error may occur.
125
 
</errors>
126
 
<seealso>
127
 
<link id="StringToPPChar"/>
128
 
</seealso>
129
 
</element>
130
 
 
131
 
<!-- function Visibility: default -->
132
 
<element name="Basename">
133
 
<short>Return basename of a file</short>
134
 
<descr>
135
 
<p>
136
 
Returns the filename part of <var>Path</var>, stripping off <var>Suf</var> if it
137
 
exists.
138
 
The filename part is the whole name if <var>Path</var> contains no slash,
139
 
or the part of <var>Path</var> after the last slash.
140
 
The last character of the result is not a slash, unless the directory is the
141
 
root directory.
142
 
</p>
143
 
</descr>
144
 
<errors>
145
 
None.
146
 
</errors>
147
 
<seealso>
148
 
<link id="DirName"/>
149
 
</seealso>
150
 
<example file="unutilex/ex48"/>
151
 
</element>
152
 
 
153
 
<!-- function Visibility: default -->
154
 
<element name="FNMatch">
155
 
<short>Check whether filename matches wildcard specification</short>
156
 
<descr>
157
 
<p>
158
 
<var>FNMatch</var> returns <var>True</var> if the filename in <var>Name</var>
159
 
matches the wildcard pattern in <var>Pattern</var>, <var>False</var> otherwise.
160
 
</p>
161
 
<p>
162
 
<var>Pattern</var> can contain the wildcards <var>*</var> (match zero or more 
163
 
arbitrary characters) or <var>?</var> (match a single character).
164
 
</p>
165
 
</descr>
166
 
<errors>
167
 
None.
168
 
</errors>
169
 
<seealso>
170
 
<link id="#rtl.unix.FSearch"/>
171
 
</seealso>
172
 
<example file="unutilex/ex69"/>
173
 
</element>
174
 
 
175
 
<!-- function Visibility: default -->
176
 
<element name="GetFS">
177
 
<short>Return file selector</short>
178
 
<descr>
179
 
<var>GetFS</var> returns the file selector that the kernel provided for your
180
 
file. In principle you don' need this file selector. Only for some calls
181
 
it is needed, such as the <link id="#rtl.baseunix.fpSelect"/> call or so.
182
 
</descr>
183
 
<errors>
184
 
In case the file was not opened, then -1 is returned.
185
 
</errors>
186
 
<seealso>
187
 
<link id="#rtl.baseunix.fpSelect"/>
188
 
</seealso>
189
 
<example file="unutilex/ex34"/>
190
 
</element>
191
 
 
192
 
<!-- procedure Visibility: default -->
193
 
<element name="FSplit">
194
 
<short>Split filename into path, name and extension</short>
195
 
<descr>
196
 
<var>FSplit</var> splits a full file name into 3 parts : A <var>Path</var>, a
197
 
<var>Name</var> and an extension  (in <var>ext</var>).
198
 
The extension is taken to be all letters after the last dot (.).
199
 
</descr>
200
 
<errors>
201
 
None.
202
 
</errors>
203
 
<seealso>
204
 
<link id="#rtl.unix.FSearch"/>
205
 
</seealso>
206
 
<example file="unutilex/ex67"/>
207
 
</element>
208
 
 
209
 
<!-- function Visibility: default -->
210
 
<element name="LocalToEpoch">
211
 
<short>Convert local time to epoch (unix) time</short>
212
 
<descr>
213
 
Converts the Local time to epoch time (=Number of seconds since 00:00:00 , January 1,
214
 
1970 ).
215
 
</descr>
216
 
<errors>
217
 
None
218
 
</errors>
219
 
<seealso>
220
 
<link id="EpochToLocal"/>
221
 
</seealso>
222
 
<example file="unutilex/ex4"/>
223
 
</element>
224
 
 
225
 
<!-- procedure Visibility: default -->
226
 
<element name="EpochToLocal">
227
 
<short>Convert epoch time to local time</short>
228
 
<descr>
229
 
<p>
230
 
Converts the epoch time (=Number of seconds since 00:00:00 , January 1,
231
 
1970, corrected for your time zone ) to local date and time.
232
 
</p>
233
 
<p>
234
 
This function takes into account the timzeone settings of your system.
235
 
</p>
236
 
</descr>
237
 
<errors>
238
 
None
239
 
</errors>
240
 
<seealso>
241
 
<link id="LocalToEpoch"/>
242
 
</seealso>
243
 
<example file="unutilex/ex3"/>
244
 
</element>
245
 
 
246
 
<!-- procedure Visibility: default -->
247
 
<element name="JulianToGregorian">
248
 
<short>Converts a julian date to a gregorian date</short>
249
 
<descr>
250
 
<var>JulianToGregorian</var> takes a julian day and converts it to a
251
 
gregorian date. (Start of the Julian Date count is from 0 at 12 noon 1 JAN -4712
252
 
(4713 BC),)
253
 
</descr>
254
 
<errors>
255
 
None.
256
 
</errors>
257
 
<seealso>
258
 
<link id="GregorianToJulian"/>
259
 
</seealso>
260
 
</element>
261
 
 
262
 
<!-- function Visibility: default -->
263
 
<element name="GregorianToJulian">
264
 
<short>Converts a gregorian date to a julian date</short>
265
 
<descr>
266
 
<var>GregorianToJulian</var> takes a gregorian date and converts it to a
267
 
Julian day.
268
 
</descr>
269
 
<errors>
270
 
None.
271
 
</errors>
272
 
<seealso>
273
 
<link id="JulianToGregorian"/>
274
 
</seealso>
275
 
</element>
276
 
 
277
 
</module> <!-- unixutil -->
278
 
</package>
279
 
</fpdoc-descriptions>