1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
<head>
|
4
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
5
|
<title>gBase: scol_gbase.c File Reference</title>
|
6
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
7
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
8
|
</head>
|
9
|
<body>
|
10
|
<!-- Generated by Doxygen 1.6.3 -->
|
11
|
<div class="navigation" id="top">
|
12
|
<div class="tabs">
|
13
|
<ul>
|
14
|
<li><a href="main.html"><span>Main Page</span></a></li>
|
15
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
16
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
17
|
</ul>
|
18
|
</div>
|
19
|
<div class="tabs">
|
20
|
<ul>
|
21
|
<li><a href="files.html"><span>File List</span></a></li>
|
22
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
23
|
</ul>
|
24
|
</div>
|
25
|
</div>
|
26
|
<div class="contents">
|
27
|
<h1>scol_gbase.c File Reference</h1>
|
28
|
<p>all functions of this API
|
29
|
<a href="#_details">More...</a></p>
|
30
|
<code>#include "<a class="el" href="scol__gbase_8c.html">../include/scol_gbase.h</a>"</code><br/>
|
31
|
<code>#include "main.h"</code><br/>
|
32
|
<code>#include <glib/gstdio.h></code><br/>
|
33
|
<table border="0" cellpadding="0" cellspacing="0">
|
34
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
35
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a57c4a95e4bbecead5cf1569ad142ea68"></a><!-- doxytag: member="scol_gbase.c::SCSP_MAX_SIZE" ref="a57c4a95e4bbecead5cf1569ad142ea68" args="" -->
|
36
|
#define </td><td class="memItemRight" valign="bottom"><b>SCSP_MAX_SIZE</b> 1024*32</td></tr>
|
37
|
<tr><td colspan="2"><h2>Functions</h2></td></tr>
|
38
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#ae06589d9e391b642628d0ba15e8661cd">SCOL_gbaseUserName</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
39
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseUserName : Returns the user (or real) name <a href="#ae06589d9e391b642628d0ba15e8661cd"></a><br/></td></tr>
|
40
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#abc8e331fb6ca4d59c7640732958e9d5e">SCOL_gBaseHostName</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
41
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBaseHostName : Returns the host name <a href="#abc8e331fb6ca4d59c7640732958e9d5e"></a><br/></td></tr>
|
42
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#a250a714edafd6f4c8d2daf8597f6b563">SCOL_gBaseDirCur</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
43
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBaseDirCur : Returns the current directory (by default on MS Windows "C:\Program Files\Scol Voyager") <a href="#a250a714edafd6f4c8d2daf8597f6b563"></a><br/></td></tr>
|
44
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#ab50a00bb184aca1bdeb31f1bb92bd8ef">SCOL_gBasePathAbsolute</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
45
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBasePathAbsolute : Returns 1 if the given file_name is an absolute file name. <a href="#ab50a00bb184aca1bdeb31f1bb92bd8ef"></a><br/></td></tr>
|
46
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#abb15b4e6f1b8425a9dab60e8d95e6849">SCOL_gBasePathBase</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
47
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBasePathBase : Returns the last component of the filename <a href="#abb15b4e6f1b8425a9dab60e8d95e6849"></a><br/></td></tr>
|
48
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#aa9b76d2154e5ab6676e6eaa7ee2db6f1">SCOL_gBasePathDir</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
49
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBasePathDir : Returns the directory components of a file name. <a href="#aa9b76d2154e5ab6676e6eaa7ee2db6f1"></a><br/></td></tr>
|
50
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#af8e9df385ca666890b577b042a7a6bcb">SCOL_gBasePathBuild</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
51
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBasePathBuild : Creates a filename from a list of elements using the correct separator for filenames. <a href="#af8e9df385ca666890b577b042a7a6bcb"></a><br/></td></tr>
|
52
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#ae5a128e43ee71d4c2dd1e93e926196ff">SCOL_gBaseStringUTF8</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
53
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gBaseStringUTF8 : Converts a string in the current locale into a UTF-8 string or reverse. <a href="#ae5a128e43ee71d4c2dd1e93e926196ff"></a><br/></td></tr>
|
54
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#a6cad133db11dc69e1c86d1eb88a603f7">SCOL_gbaseChecksumS</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
55
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseChecksumS : Computes the checksum of a string. <a href="#a6cad133db11dc69e1c86d1eb88a603f7"></a><br/></td></tr>
|
56
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#a5aac5a3a70d579dfe0d66302b3a6c978">SCOL_gbaseChecksumP</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
57
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseChecksumP : Computes the checksum of a file. <a href="#a5aac5a3a70d579dfe0d66302b3a6c978"></a><br/></td></tr>
|
58
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#af118bcb220b620218887ce88050b2596">SCOL_gbaseSleep</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
59
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseSleep : Pauses the current thread for the given number of milliseconds. <a href="#af118bcb220b620218887ce88050b2596"></a><br/></td></tr>
|
60
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#a388d31b09f21a6f0d13d77655ecc23b4">SCOL_gbaseFileStat</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
61
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseFileStat : it should not be used, at this time <a href="#a388d31b09f21a6f0d13d77655ecc23b4"></a><br/></td></tr>
|
62
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="scol__gbase_8c.html#ae4bf056ba488c50213ae59f75dc53e2e">SCOL_gbaseIsIp</a> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
63
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">_gbaseIsIp : Tests if a string is a form of an IPv4 or IPv6 address (like "123.210.012.231"). fun [S] I <a href="#ae4bf056ba488c50213ae59f75dc53e2e"></a><br/></td></tr>
|
64
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28f7df65132edd8c6ccbc240fb51f9ed"></a><!-- doxytag: member="scol_gbase.c::SCOLinitGbaseClass" ref="a28f7df65132edd8c6ccbc240fb51f9ed" args="(mmachine m)" -->
|
65
|
int </td><td class="memItemRight" valign="bottom"><b>SCOLinitGbaseClass</b> (<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
66
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc4ca957252a25044e75fa89b589cac6"></a><!-- doxytag: member="scol_gbase.c::GBaseRelease" ref="acc4ca957252a25044e75fa89b589cac6" args="()" -->
|
67
|
int </td><td class="memItemRight" valign="bottom"><b>GBaseRelease</b> ()</td></tr>
|
68
|
<tr><td colspan="2"><h2>Variables</h2></td></tr>
|
69
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af15bdac9bbe43b7b1f7d433619dae969"></a><!-- doxytag: member="scol_gbase.c::mm" ref="af15bdac9bbe43b7b1f7d433619dae969" args="" -->
|
70
|
<a class="el" href="structMmachine.html">mmachine</a> </td><td class="memItemRight" valign="bottom"><b>mm</b></td></tr>
|
71
|
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b>gbase_name</b> [GBASE_PKG_NB]</td></tr>
|
72
|
<tr><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><b>gbase_fun</b> [GBASE_PKG_NB])(<a class="el" href="structMmachine.html">mmachine</a> m)</td></tr>
|
73
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>gbase_narg</b> [GBASE_PKG_NB]</td></tr>
|
74
|
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b>gbase_type</b> [GBASE_PKG_NB]</td></tr>
|
75
|
</table>
|
76
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
77
|
<p>all functions of this API </p>
|
78
|
<dl class="author"><dt><b>Author:</b></dt><dd>Stephane Bisaro </dd></dl>
|
79
|
<hr/><h2>Function Documentation</h2>
|
80
|
<a class="anchor" id="ae06589d9e391b642628d0ba15e8661cd"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseUserName" ref="ae06589d9e391b642628d0ba15e8661cd" args="(mmachine m)" -->
|
81
|
<div class="memitem">
|
82
|
<div class="memproto">
|
83
|
<table class="memname">
|
84
|
<tr>
|
85
|
<td class="memname">int SCOL_gbaseUserName </td>
|
86
|
<td>(</td>
|
87
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
88
|
<td class="paramname"> <em>m</em></td>
|
89
|
<td> ) </td>
|
90
|
<td></td>
|
91
|
</tr>
|
92
|
</table>
|
93
|
</div>
|
94
|
<div class="memdoc">
|
95
|
|
96
|
<p>_gbaseUserName : Returns the user (or real) name </p>
|
97
|
<p>fun [] S</p>
|
98
|
<dl><dt><b>Parameters:</b></dt><dd>
|
99
|
<table border="0" cellspacing="2" cellpadding="0">
|
100
|
<tr><td valign="top"></td><td valign="top"><em>:</em> </td><td>nothing </td></tr>
|
101
|
</table>
|
102
|
</dd>
|
103
|
</dl>
|
104
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : this name </dd></dl>
|
105
|
|
106
|
</div>
|
107
|
</div>
|
108
|
<a class="anchor" id="abc8e331fb6ca4d59c7640732958e9d5e"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBaseHostName" ref="abc8e331fb6ca4d59c7640732958e9d5e" args="(mmachine m)" -->
|
109
|
<div class="memitem">
|
110
|
<div class="memproto">
|
111
|
<table class="memname">
|
112
|
<tr>
|
113
|
<td class="memname">int SCOL_gBaseHostName </td>
|
114
|
<td>(</td>
|
115
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
116
|
<td class="paramname"> <em>m</em></td>
|
117
|
<td> ) </td>
|
118
|
<td></td>
|
119
|
</tr>
|
120
|
</table>
|
121
|
</div>
|
122
|
<div class="memdoc">
|
123
|
|
124
|
<p>_gBaseHostName : Returns the host name </p>
|
125
|
<p>fun [] S</p>
|
126
|
<dl><dt><b>Parameters:</b></dt><dd>
|
127
|
<table border="0" cellspacing="2" cellpadding="0">
|
128
|
<tr><td valign="top"></td><td valign="top"><em>:</em> </td><td>nothing </td></tr>
|
129
|
</table>
|
130
|
</dd>
|
131
|
</dl>
|
132
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : this name </dd></dl>
|
133
|
|
134
|
</div>
|
135
|
</div>
|
136
|
<a class="anchor" id="a250a714edafd6f4c8d2daf8597f6b563"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBaseDirCur" ref="a250a714edafd6f4c8d2daf8597f6b563" args="(mmachine m)" -->
|
137
|
<div class="memitem">
|
138
|
<div class="memproto">
|
139
|
<table class="memname">
|
140
|
<tr>
|
141
|
<td class="memname">int SCOL_gBaseDirCur </td>
|
142
|
<td>(</td>
|
143
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
144
|
<td class="paramname"> <em>m</em></td>
|
145
|
<td> ) </td>
|
146
|
<td></td>
|
147
|
</tr>
|
148
|
</table>
|
149
|
</div>
|
150
|
<div class="memdoc">
|
151
|
|
152
|
<p>_gBaseDirCur : Returns the current directory (by default on MS Windows "C:\Program Files\Scol Voyager") </p>
|
153
|
<p>fun [] S</p>
|
154
|
<dl><dt><b>Parameters:</b></dt><dd>
|
155
|
<table border="0" cellspacing="2" cellpadding="0">
|
156
|
<tr><td valign="top"></td><td valign="top"><em>:</em> </td><td>nothing </td></tr>
|
157
|
</table>
|
158
|
</dd>
|
159
|
</dl>
|
160
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : this directory or "unknown" if undefined </dd></dl>
|
161
|
|
162
|
</div>
|
163
|
</div>
|
164
|
<a class="anchor" id="ab50a00bb184aca1bdeb31f1bb92bd8ef"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBasePathAbsolute" ref="ab50a00bb184aca1bdeb31f1bb92bd8ef" args="(mmachine m)" -->
|
165
|
<div class="memitem">
|
166
|
<div class="memproto">
|
167
|
<table class="memname">
|
168
|
<tr>
|
169
|
<td class="memname">int SCOL_gBasePathAbsolute </td>
|
170
|
<td>(</td>
|
171
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
172
|
<td class="paramname"> <em>m</em></td>
|
173
|
<td> ) </td>
|
174
|
<td></td>
|
175
|
</tr>
|
176
|
</table>
|
177
|
</div>
|
178
|
<div class="memdoc">
|
179
|
|
180
|
<p>_gBasePathAbsolute : Returns 1 if the given file_name is an absolute file name. </p>
|
181
|
<p>fun [S] I</p>
|
182
|
<dl><dt><b>Parameters:</b></dt><dd>
|
183
|
<table border="0" cellspacing="2" cellpadding="0">
|
184
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any path </td></tr>
|
185
|
</table>
|
186
|
</dd>
|
187
|
</dl>
|
188
|
<dl class="return"><dt><b>Returns:</b></dt><dd>I : 1 if TRUE,otherwise 0 </dd></dl>
|
189
|
|
190
|
</div>
|
191
|
</div>
|
192
|
<a class="anchor" id="abb15b4e6f1b8425a9dab60e8d95e6849"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBasePathBase" ref="abb15b4e6f1b8425a9dab60e8d95e6849" args="(mmachine m)" -->
|
193
|
<div class="memitem">
|
194
|
<div class="memproto">
|
195
|
<table class="memname">
|
196
|
<tr>
|
197
|
<td class="memname">int SCOL_gBasePathBase </td>
|
198
|
<td>(</td>
|
199
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
200
|
<td class="paramname"> <em>m</em></td>
|
201
|
<td> ) </td>
|
202
|
<td></td>
|
203
|
</tr>
|
204
|
</table>
|
205
|
</div>
|
206
|
<div class="memdoc">
|
207
|
|
208
|
<p>_gBasePathBase : Returns the last component of the filename </p>
|
209
|
<p>fun [S] S</p>
|
210
|
<dl><dt><b>Parameters:</b></dt><dd>
|
211
|
<table border="0" cellspacing="2" cellpadding="0">
|
212
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any path </td></tr>
|
213
|
</table>
|
214
|
</dd>
|
215
|
</dl>
|
216
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : this last component </dd></dl>
|
217
|
|
218
|
</div>
|
219
|
</div>
|
220
|
<a class="anchor" id="aa9b76d2154e5ab6676e6eaa7ee2db6f1"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBasePathDir" ref="aa9b76d2154e5ab6676e6eaa7ee2db6f1" args="(mmachine m)" -->
|
221
|
<div class="memitem">
|
222
|
<div class="memproto">
|
223
|
<table class="memname">
|
224
|
<tr>
|
225
|
<td class="memname">int SCOL_gBasePathDir </td>
|
226
|
<td>(</td>
|
227
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
228
|
<td class="paramname"> <em>m</em></td>
|
229
|
<td> ) </td>
|
230
|
<td></td>
|
231
|
</tr>
|
232
|
</table>
|
233
|
</div>
|
234
|
<div class="memdoc">
|
235
|
|
236
|
<p>_gBasePathDir : Returns the directory components of a file name. </p>
|
237
|
<p>fun [S] S</p>
|
238
|
<dl><dt><b>Parameters:</b></dt><dd>
|
239
|
<table border="0" cellspacing="2" cellpadding="0">
|
240
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any path </td></tr>
|
241
|
</table>
|
242
|
</dd>
|
243
|
</dl>
|
244
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : this directory </dd></dl>
|
245
|
|
246
|
</div>
|
247
|
</div>
|
248
|
<a class="anchor" id="af8e9df385ca666890b577b042a7a6bcb"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBasePathBuild" ref="af8e9df385ca666890b577b042a7a6bcb" args="(mmachine m)" -->
|
249
|
<div class="memitem">
|
250
|
<div class="memproto">
|
251
|
<table class="memname">
|
252
|
<tr>
|
253
|
<td class="memname">int SCOL_gBasePathBuild </td>
|
254
|
<td>(</td>
|
255
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
256
|
<td class="paramname"> <em>m</em></td>
|
257
|
<td> ) </td>
|
258
|
<td></td>
|
259
|
</tr>
|
260
|
</table>
|
261
|
</div>
|
262
|
<div class="memdoc">
|
263
|
|
264
|
<p>_gBasePathBuild : Creates a filename from a list of elements using the correct separator for filenames. </p>
|
265
|
<p>fun [[S r1] I] S</p>
|
266
|
<dl><dt><b>Parameters:</b></dt><dd>
|
267
|
<table border="0" cellspacing="2" cellpadding="0">
|
268
|
<tr><td valign="top"></td><td valign="top"><em>[S</em> </td><td>r1] : a list of elements (typically, a list of directory : a :: b :: c :: file.ext) </td></tr>
|
269
|
<tr><td valign="top"></td><td valign="top"><em>I</em> </td><td>: 1 : OS separator (e.g. "\" on MS Windows, "/" on Linux), otherwise Scol separator ("/") </td></tr>
|
270
|
</table>
|
271
|
</dd>
|
272
|
</dl>
|
273
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : the filename </dd></dl>
|
274
|
|
275
|
</div>
|
276
|
</div>
|
277
|
<a class="anchor" id="ae5a128e43ee71d4c2dd1e93e926196ff"></a><!-- doxytag: member="scol_gbase.c::SCOL_gBaseStringUTF8" ref="ae5a128e43ee71d4c2dd1e93e926196ff" args="(mmachine m)" -->
|
278
|
<div class="memitem">
|
279
|
<div class="memproto">
|
280
|
<table class="memname">
|
281
|
<tr>
|
282
|
<td class="memname">int SCOL_gBaseStringUTF8 </td>
|
283
|
<td>(</td>
|
284
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
285
|
<td class="paramname"> <em>m</em></td>
|
286
|
<td> ) </td>
|
287
|
<td></td>
|
288
|
</tr>
|
289
|
</table>
|
290
|
</div>
|
291
|
<div class="memdoc">
|
292
|
|
293
|
<p>_gBaseStringUTF8 : Converts a string in the current locale into a UTF-8 string or reverse. </p>
|
294
|
<p>fun [S I] S</p>
|
295
|
<dl><dt><b>Parameters:</b></dt><dd>
|
296
|
<table border="0" cellspacing="2" cellpadding="0">
|
297
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any string </td></tr>
|
298
|
<tr><td valign="top"></td><td valign="top"><em>I</em> </td><td>: 1 from locale to UTF8, 0 from UTF-8 to current locale </td></tr>
|
299
|
</table>
|
300
|
</dd>
|
301
|
</dl>
|
302
|
<dl class="return"><dt><b>Returns:</b></dt><dd>: the new string </dd></dl>
|
303
|
|
304
|
</div>
|
305
|
</div>
|
306
|
<a class="anchor" id="a6cad133db11dc69e1c86d1eb88a603f7"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseChecksumS" ref="a6cad133db11dc69e1c86d1eb88a603f7" args="(mmachine m)" -->
|
307
|
<div class="memitem">
|
308
|
<div class="memproto">
|
309
|
<table class="memname">
|
310
|
<tr>
|
311
|
<td class="memname">int SCOL_gbaseChecksumS </td>
|
312
|
<td>(</td>
|
313
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
314
|
<td class="paramname"> <em>m</em></td>
|
315
|
<td> ) </td>
|
316
|
<td></td>
|
317
|
</tr>
|
318
|
</table>
|
319
|
</div>
|
320
|
<div class="memdoc">
|
321
|
|
322
|
<p>_gbaseChecksumS : Computes the checksum of a string. </p>
|
323
|
<p>fun [S I] S</p>
|
324
|
<dl><dt><b>Parameters:</b></dt><dd>
|
325
|
<table border="0" cellspacing="2" cellpadding="0">
|
326
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any string </td></tr>
|
327
|
<tr><td valign="top"></td><td valign="top"><em>I</em> </td><td>: the hashing algorithm to use : 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256 </td></tr>
|
328
|
</table>
|
329
|
</dd>
|
330
|
</dl>
|
331
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : the checksum as an hexadecimal string. </dd></dl>
|
332
|
|
333
|
</div>
|
334
|
</div>
|
335
|
<a class="anchor" id="a5aac5a3a70d579dfe0d66302b3a6c978"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseChecksumP" ref="a5aac5a3a70d579dfe0d66302b3a6c978" args="(mmachine m)" -->
|
336
|
<div class="memitem">
|
337
|
<div class="memproto">
|
338
|
<table class="memname">
|
339
|
<tr>
|
340
|
<td class="memname">int SCOL_gbaseChecksumP </td>
|
341
|
<td>(</td>
|
342
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
343
|
<td class="paramname"> <em>m</em></td>
|
344
|
<td> ) </td>
|
345
|
<td></td>
|
346
|
</tr>
|
347
|
</table>
|
348
|
</div>
|
349
|
<div class="memdoc">
|
350
|
|
351
|
<p>_gbaseChecksumP : Computes the checksum of a file. </p>
|
352
|
<p>fun [P I] S</p>
|
353
|
<dl><dt><b>Parameters:</b></dt><dd>
|
354
|
<table border="0" cellspacing="2" cellpadding="0">
|
355
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any file (read referenced only) </td></tr>
|
356
|
<tr><td valign="top"></td><td valign="top"><em>I</em> </td><td>: the hashing algorithm to use : 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256 </td></tr>
|
357
|
</table>
|
358
|
</dd>
|
359
|
</dl>
|
360
|
<dl class="return"><dt><b>Returns:</b></dt><dd>S : the checksum as an hexadecimal string. </dd></dl>
|
361
|
|
362
|
</div>
|
363
|
</div>
|
364
|
<a class="anchor" id="af118bcb220b620218887ce88050b2596"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseSleep" ref="af118bcb220b620218887ce88050b2596" args="(mmachine m)" -->
|
365
|
<div class="memitem">
|
366
|
<div class="memproto">
|
367
|
<table class="memname">
|
368
|
<tr>
|
369
|
<td class="memname">int SCOL_gbaseSleep </td>
|
370
|
<td>(</td>
|
371
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
372
|
<td class="paramname"> <em>m</em></td>
|
373
|
<td> ) </td>
|
374
|
<td></td>
|
375
|
</tr>
|
376
|
</table>
|
377
|
</div>
|
378
|
<div class="memdoc">
|
379
|
|
380
|
<p>_gbaseSleep : Pauses the current thread for the given number of milliseconds. </p>
|
381
|
<p>fun [I] I</p>
|
382
|
<dl><dt><b>Parameters:</b></dt><dd>
|
383
|
<table border="0" cellspacing="2" cellpadding="0">
|
384
|
<tr><td valign="top"></td><td valign="top"><em>I</em> </td><td>: the number of milliseconds </td></tr>
|
385
|
</table>
|
386
|
</dd>
|
387
|
</dl>
|
388
|
<dl class="return"><dt><b>Returns:</b></dt><dd>I : 0 if success, nil if error </dd></dl>
|
389
|
|
390
|
</div>
|
391
|
</div>
|
392
|
<a class="anchor" id="a388d31b09f21a6f0d13d77655ecc23b4"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseFileStat" ref="a388d31b09f21a6f0d13d77655ecc23b4" args="(mmachine m)" -->
|
393
|
<div class="memitem">
|
394
|
<div class="memproto">
|
395
|
<table class="memname">
|
396
|
<tr>
|
397
|
<td class="memname">int SCOL_gbaseFileStat </td>
|
398
|
<td>(</td>
|
399
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
400
|
<td class="paramname"> <em>m</em></td>
|
401
|
<td> ) </td>
|
402
|
<td></td>
|
403
|
</tr>
|
404
|
</table>
|
405
|
</div>
|
406
|
<div class="memdoc">
|
407
|
|
408
|
<p>_gbaseFileStat : it should not be used, at this time </p>
|
409
|
<p>fun [P] [I I I I]</p>
|
410
|
<dl><dt><b>Parameters:</b></dt><dd>
|
411
|
<table border="0" cellspacing="2" cellpadding="0">
|
412
|
<tr><td valign="top"></td><td valign="top"><em>P</em> </td><td>: a filename (read reference only) </td></tr>
|
413
|
</table>
|
414
|
</dd>
|
415
|
</dl>
|
416
|
<dl class="return"><dt><b>Returns:</b></dt><dd>[I I I I] : size, last access, last modification, last state changed </dd></dl>
|
417
|
|
418
|
</div>
|
419
|
</div>
|
420
|
<a class="anchor" id="ae4bf056ba488c50213ae59f75dc53e2e"></a><!-- doxytag: member="scol_gbase.c::SCOL_gbaseIsIp" ref="ae4bf056ba488c50213ae59f75dc53e2e" args="(mmachine m)" -->
|
421
|
<div class="memitem">
|
422
|
<div class="memproto">
|
423
|
<table class="memname">
|
424
|
<tr>
|
425
|
<td class="memname">int SCOL_gbaseIsIp </td>
|
426
|
<td>(</td>
|
427
|
<td class="paramtype"><a class="el" href="structMmachine.html">mmachine</a> </td>
|
428
|
<td class="paramname"> <em>m</em></td>
|
429
|
<td> ) </td>
|
430
|
<td></td>
|
431
|
</tr>
|
432
|
</table>
|
433
|
</div>
|
434
|
<div class="memdoc">
|
435
|
|
436
|
<p>_gbaseIsIp : Tests if a string is a form of an IPv4 or IPv6 address (like "123.210.012.231"). fun [S] I </p>
|
437
|
<dl><dt><b>Parameters:</b></dt><dd>
|
438
|
<table border="0" cellspacing="2" cellpadding="0">
|
439
|
<tr><td valign="top"></td><td valign="top"><em>S</em> </td><td>: any string </td></tr>
|
440
|
</table>
|
441
|
</dd>
|
442
|
</dl>
|
443
|
<dl class="return"><dt><b>Returns:</b></dt><dd>I : 1 if TRUE (the string is an IP address), 0 if FALSE </dd></dl>
|
444
|
|
445
|
</div>
|
446
|
</div>
|
447
|
<hr/><h2>Variable Documentation</h2>
|
448
|
<a class="anchor" id="a37a82e1b7aad95de82bee2ecb21e0c65"></a><!-- doxytag: member="scol_gbase.c::gbase_name" ref="a37a82e1b7aad95de82bee2ecb21e0c65" args="[GBASE_PKG_NB]" -->
|
449
|
<div class="memitem">
|
450
|
<div class="memproto">
|
451
|
<table class="memname">
|
452
|
<tr>
|
453
|
<td class="memname">char* gbase_name[GBASE_PKG_NB]</td>
|
454
|
</tr>
|
455
|
</table>
|
456
|
</div>
|
457
|
<div class="memdoc">
|
458
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
459
|
{
|
460
|
<span class="stringliteral">"_gbaseUserName"</span>,
|
461
|
<span class="stringliteral">"_gBaseHostName"</span>,
|
462
|
<span class="stringliteral">"_gBaseDirCur"</span>,
|
463
|
<span class="stringliteral">"_gBasePathAbsolute"</span>,
|
464
|
<span class="stringliteral">"_gBasePathBase"</span>,
|
465
|
<span class="stringliteral">"_gBasePathDir"</span>,
|
466
|
<span class="stringliteral">"_gBasePathBuild"</span>,
|
467
|
<span class="stringliteral">"_gBaseStringUTF8"</span>,
|
468
|
<span class="stringliteral">"_gbaseChecksumS"</span>,
|
469
|
<span class="stringliteral">"_gbaseChecksumP"</span>,
|
470
|
<span class="stringliteral">"_gbaseSleep"</span>,
|
471
|
<span class="stringliteral">"_gbaseFileStat"</span>,
|
472
|
<span class="stringliteral">"_gbaseIsIp"</span>
|
473
|
}
|
474
|
</pre></div>
|
475
|
</div>
|
476
|
</div>
|
477
|
<a class="anchor" id="ab62a19b3bc0ab02ea733a3688a8fbeee"></a><!-- doxytag: member="scol_gbase.c::gbase_fun" ref="ab62a19b3bc0ab02ea733a3688a8fbeee" args="[GBASE_PKG_NB])(mmachine m)" -->
|
478
|
<div class="memitem">
|
479
|
<div class="memproto">
|
480
|
<table class="memname">
|
481
|
<tr>
|
482
|
<td class="memname">int(* gbase_fun[GBASE_PKG_NB])(<a class="el" href="structMmachine.html">mmachine</a> m)</td>
|
483
|
</tr>
|
484
|
</table>
|
485
|
</div>
|
486
|
<div class="memdoc">
|
487
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
488
|
{
|
489
|
<a class="code" href="scol__gbase_8c.html#ae06589d9e391b642628d0ba15e8661cd" title="_gbaseUserName : Returns the user (or real) name">SCOL_gbaseUserName</a>,
|
490
|
<a class="code" href="scol__gbase_8c.html#abc8e331fb6ca4d59c7640732958e9d5e" title="_gBaseHostName : Returns the host name">SCOL_gBaseHostName</a>,
|
491
|
<a class="code" href="scol__gbase_8c.html#a250a714edafd6f4c8d2daf8597f6b563" title="_gBaseDirCur : Returns the current directory (by default on MS Windows &quot;C:\Program...">SCOL_gBaseDirCur</a>,
|
492
|
<a class="code" href="scol__gbase_8c.html#ab50a00bb184aca1bdeb31f1bb92bd8ef" title="_gBasePathAbsolute : Returns 1 if the given file_name is an absolute file name.">SCOL_gBasePathAbsolute</a>,
|
493
|
<a class="code" href="scol__gbase_8c.html#abb15b4e6f1b8425a9dab60e8d95e6849" title="_gBasePathBase : Returns the last component of the filename">SCOL_gBasePathBase</a>,
|
494
|
<a class="code" href="scol__gbase_8c.html#aa9b76d2154e5ab6676e6eaa7ee2db6f1" title="_gBasePathDir : Returns the directory components of a file name.">SCOL_gBasePathDir</a>,
|
495
|
<a class="code" href="scol__gbase_8c.html#af8e9df385ca666890b577b042a7a6bcb" title="_gBasePathBuild : Creates a filename from a list of elements using the correct separator...">SCOL_gBasePathBuild</a>,
|
496
|
<a class="code" href="scol__gbase_8c.html#ae5a128e43ee71d4c2dd1e93e926196ff" title="_gBaseStringUTF8 : Converts a string in the current locale into a UTF-8 string or...">SCOL_gBaseStringUTF8</a>,
|
497
|
<a class="code" href="scol__gbase_8c.html#a6cad133db11dc69e1c86d1eb88a603f7" title="_gbaseChecksumS : Computes the checksum of a string.">SCOL_gbaseChecksumS</a>,
|
498
|
<a class="code" href="scol__gbase_8c.html#a5aac5a3a70d579dfe0d66302b3a6c978" title="_gbaseChecksumP : Computes the checksum of a file.">SCOL_gbaseChecksumP</a>,
|
499
|
<a class="code" href="scol__gbase_8c.html#af118bcb220b620218887ce88050b2596" title="_gbaseSleep : Pauses the current thread for the given number of milliseconds.">SCOL_gbaseSleep</a>,
|
500
|
<a class="code" href="scol__gbase_8c.html#a388d31b09f21a6f0d13d77655ecc23b4" title="_gbaseFileStat : it should not be used, at this time">SCOL_gbaseFileStat</a>,
|
501
|
<a class="code" href="scol__gbase_8c.html#ae4bf056ba488c50213ae59f75dc53e2e" title="_gbaseIsIp : Tests if a string is a form of an IPv4 or IPv6 address (like &quot;123...">SCOL_gbaseIsIp</a>
|
502
|
}
|
503
|
</pre></div>
|
504
|
</div>
|
505
|
</div>
|
506
|
<a class="anchor" id="a0f1b763d1d5890dd330c39bcc815ce4a"></a><!-- doxytag: member="scol_gbase.c::gbase_narg" ref="a0f1b763d1d5890dd330c39bcc815ce4a" args="[GBASE_PKG_NB]" -->
|
507
|
<div class="memitem">
|
508
|
<div class="memproto">
|
509
|
<table class="memname">
|
510
|
<tr>
|
511
|
<td class="memname">int gbase_narg[GBASE_PKG_NB]</td>
|
512
|
</tr>
|
513
|
</table>
|
514
|
</div>
|
515
|
<div class="memdoc">
|
516
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
517
|
{
|
518
|
0,
|
519
|
0,
|
520
|
0,
|
521
|
1,
|
522
|
1,
|
523
|
1,
|
524
|
2,
|
525
|
2,
|
526
|
2,
|
527
|
2,
|
528
|
1,
|
529
|
1,
|
530
|
1
|
531
|
}
|
532
|
</pre></div>
|
533
|
</div>
|
534
|
</div>
|
535
|
<a class="anchor" id="a03ccad849e54cb27c8124642b99c333c"></a><!-- doxytag: member="scol_gbase.c::gbase_type" ref="a03ccad849e54cb27c8124642b99c333c" args="[GBASE_PKG_NB]" -->
|
536
|
<div class="memitem">
|
537
|
<div class="memproto">
|
538
|
<table class="memname">
|
539
|
<tr>
|
540
|
<td class="memname">char* gbase_type[GBASE_PKG_NB]</td>
|
541
|
</tr>
|
542
|
</table>
|
543
|
</div>
|
544
|
<div class="memdoc">
|
545
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
546
|
{
|
547
|
<span class="stringliteral">"fun [] S"</span>,
|
548
|
<span class="stringliteral">"fun [] S"</span>,
|
549
|
<span class="stringliteral">"fun [] S"</span>,
|
550
|
<span class="stringliteral">"fun [S] I"</span>,
|
551
|
<span class="stringliteral">"fun [S] S"</span>,
|
552
|
<span class="stringliteral">"fun [S] S"</span>,
|
553
|
<span class="stringliteral">"fun [[S r1] I] S"</span>,
|
554
|
<span class="stringliteral">"fun [S I] S"</span>,
|
555
|
<span class="stringliteral">"fun [S I] S"</span>,
|
556
|
<span class="stringliteral">"fun [P I] S"</span>,
|
557
|
<span class="stringliteral">"fun [I] I"</span>,
|
558
|
<span class="stringliteral">"fun [P] [I I I I]"</span>,
|
559
|
<span class="stringliteral">"fun [S] I"</span>
|
560
|
}
|
561
|
</pre></div>
|
562
|
</div>
|
563
|
</div>
|
564
|
</div>
|
565
|
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Mar 11 15:06:43 2011 for gBase by
|
566
|
<a href="http://www.doxygen.org/index.html">
|
567
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
|
568
|
</body>
|
569
|
</html>
|