Line -... |
Line 1... |
- |
|
1 |
/*
|
- |
|
2 |
* Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
|
- |
|
3 |
* All rights reserved.
|
- |
|
4 |
*
|
- |
|
5 |
* Redistribution and use in source and binary forms, with or without
|
- |
|
6 |
* modification, are permitted provided that the following conditions are met:
|
- |
|
7 |
*
|
- |
|
8 |
* 1. Redistributions of source code must retain the above copyright notice,
|
- |
|
9 |
* this list of conditions and the following disclaimer.
|
- |
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
- |
|
11 |
* this list of conditions and the following disclaimer in the documentation
|
- |
|
12 |
* and/or other materials provided with the distribution.
|
- |
|
13 |
* 3. Neither the name of The TenDRA Project nor the names of its contributors
|
- |
|
14 |
* may be used to endorse or promote products derived from this software
|
- |
|
15 |
* without specific, prior written permission.
|
- |
|
16 |
*
|
- |
|
17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
- |
|
18 |
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
- |
|
19 |
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
- |
|
20 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
- |
|
21 |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
- |
|
22 |
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
- |
|
23 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
- |
|
24 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
- |
|
25 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
- |
|
26 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
- |
|
27 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
- |
|
28 |
*
|
- |
|
29 |
* $Id$
|
- |
|
30 |
*/
|
1 |
/*
|
31 |
/*
|
2 |
Crown Copyright (c) 1997
|
32 |
Crown Copyright (c) 1997
|
3 |
|
33 |
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
34 |
This TenDRA(r) Computer Program is subject to Copyright
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
35 |
owned by the United Kingdom Secretary of State for Defence
|
6 |
acting through the Defence Evaluation and Research Agency
|
36 |
acting through the Defence Evaluation and Research Agency
|
7 |
(DERA). It is made available to Recipients with a
|
37 |
(DERA). It is made available to Recipients with a
|
8 |
royalty-free licence for its use, reproduction, transfer
|
38 |
royalty-free licence for its use, reproduction, transfer
|
9 |
to other parties and amendment for any purpose not excluding
|
39 |
to other parties and amendment for any purpose not excluding
|
10 |
product development provided that any such use et cetera
|
40 |
product development provided that any such use et cetera
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
41 |
shall be deemed to be acceptance of the following conditions:-
|
12 |
|
42 |
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
43 |
(1) Its Recipients shall ensure that this Notice is
|
14 |
reproduced upon any copies or amended versions of it;
|
44 |
reproduced upon any copies or amended versions of it;
|
15 |
|
45 |
|
16 |
(2) Any amended version of it shall be clearly marked to
|
46 |
(2) Any amended version of it shall be clearly marked to
|
17 |
show both the nature of and the organisation responsible
|
47 |
show both the nature of and the organisation responsible
|
18 |
for the relevant amendment or amendments;
|
48 |
for the relevant amendment or amendments;
|
19 |
|
49 |
|
20 |
(3) Its onward transfer from a recipient to another
|
50 |
(3) Its onward transfer from a recipient to another
|
21 |
party shall be deemed to be that party's acceptance of
|
51 |
party shall be deemed to be that party's acceptance of
|
22 |
these conditions;
|
52 |
these conditions;
|
23 |
|
53 |
|
24 |
(4) DERA gives no warranty or assurance as to its
|
54 |
(4) DERA gives no warranty or assurance as to its
|
25 |
quality or suitability for any purpose and DERA accepts
|
55 |
quality or suitability for any purpose and DERA accepts
|
26 |
no liability whatsoever in relation to any use to which
|
56 |
no liability whatsoever in relation to any use to which
|
27 |
it may be put.
|
57 |
it may be put.
|
28 |
*/
|
58 |
*/
|
Line 63... |
Line 93... |
63 |
* converted to one of the other string types.
|
93 |
* converted to one of the other string types.
|
64 |
*
|
94 |
*
|
65 |
***=== FUNCTIONS ============================================================
|
95 |
***=== FUNCTIONS ============================================================
|
66 |
*
|
96 |
*
|
67 |
** Function: void nstring_init
|
97 |
** Function: void nstring_init
|
68 |
* PROTO_S ((NStringP nstring))
|
98 |
* (NStringP nstring)
|
69 |
** Exceptions:
|
99 |
** Exceptions:
|
70 |
*
|
100 |
*
|
71 |
* This function initialises the specified nstring to be an empty nstring.
|
101 |
* This function initialises the specified nstring to be an empty nstring.
|
72 |
*
|
102 |
*
|
73 |
** Function: void nstring_init_length
|
103 |
** Function: void nstring_init_length
|
74 |
* PROTO_S ((NStringP nstring, unsigned length))
|
104 |
* (NStringP nstring, unsigned length)
|
75 |
** Exceptions: XX_dalloc_no_memory
|
105 |
** Exceptions: XX_dalloc_no_memory
|
76 |
*
|
106 |
*
|
77 |
* This function initialises the specified nstring to be an nstring of the
|
107 |
* This function initialises the specified nstring to be an nstring of the
|
78 |
* specified length. The initial contents are unspecified.
|
108 |
* specified length. The initial contents are unspecified.
|
79 |
*
|
109 |
*
|
80 |
** Function: void nstring_assign
|
110 |
** Function: void nstring_assign
|
81 |
* PROTO_S ((NStringP to, NStringP from))
|
111 |
* (NStringP to, NStringP from)
|
82 |
** Exceptions:
|
112 |
** Exceptions:
|
83 |
*
|
113 |
*
|
84 |
* This function assigns the from nstring to the to nstring. The from nstring
|
114 |
* This function assigns the from nstring to the to nstring. The from nstring
|
85 |
* should not be used afterwards, without reinitialising it.
|
115 |
* should not be used afterwards, without reinitialising it.
|
86 |
*
|
116 |
*
|
87 |
** Function: void nstring_copy_cstring
|
117 |
** Function: void nstring_copy_cstring
|
88 |
* PROTO_S ((NStringP nstring, CStringP cstring))
|
118 |
* (NStringP nstring, CStringP cstring)
|
89 |
** Exceptions: XX_dalloc_no_memory
|
119 |
** Exceptions: XX_dalloc_no_memory
|
90 |
*
|
120 |
*
|
91 |
* This function initialises the specified nstring from the content of the
|
121 |
* This function initialises the specified nstring from the content of the
|
92 |
* specified cstring.
|
122 |
* specified cstring.
|
93 |
*
|
123 |
*
|
94 |
** Function: void nstring_insert_cstring
|
124 |
** Function: void nstring_insert_cstring
|
95 |
* PROTO_S ((NStringP nstring, CStringP cstring))
|
125 |
* (NStringP nstring, CStringP cstring)
|
96 |
** Exceptions:
|
126 |
** Exceptions:
|
97 |
*
|
127 |
*
|
98 |
* This function inserts the specified cstring into the specified nstring.
|
128 |
* This function inserts the specified cstring into the specified nstring.
|
99 |
* Sufficient characters are copied to fill up the nstring.
|
129 |
* Sufficient characters are copied to fill up the nstring.
|
100 |
*
|
130 |
*
|
101 |
** Function: void nstring_copy
|
131 |
** Function: void nstring_copy
|
102 |
* PROTO_S ((NStringP to, NStringP from))
|
132 |
* (NStringP to, NStringP from)
|
103 |
** Exceptions: XX_dalloc_no_memory
|
133 |
** Exceptions: XX_dalloc_no_memory
|
104 |
*
|
134 |
*
|
105 |
* This function copies the specified from nstring into the specified to
|
135 |
* This function copies the specified from nstring into the specified to
|
106 |
* nstring.
|
136 |
* nstring.
|
107 |
*
|
137 |
*
|
108 |
** Function: CStringP nstring_to_cstring
|
138 |
** Function: CStringP nstring_to_cstring
|
109 |
* PROTO_S ((NStringP nstring))
|
139 |
* (NStringP nstring)
|
110 |
** Exceptions: XX_dalloc_no_memory
|
140 |
** Exceptions: XX_dalloc_no_memory
|
111 |
*
|
141 |
*
|
112 |
* This function returns a dynamically allocated cstring copy of the specified
|
142 |
* This function returns a dynamically allocated cstring copy of the specified
|
113 |
* nstring. If the nstring contains null characters, then the characters
|
143 |
* nstring. If the nstring contains null characters, then the characters
|
114 |
* after the first null will be ignored in the cstring (although they will
|
144 |
* after the first null will be ignored in the cstring (although they will
|
115 |
* still be part of it).
|
145 |
* still be part of it).
|
116 |
*
|
146 |
*
|
117 |
** Function: unsigned nstring_hash_value
|
147 |
** Function: unsigned nstring_hash_value
|
118 |
* PROTO_S ((NStringP nstring))
|
148 |
* (NStringP nstring)
|
119 |
** Exceptions:
|
149 |
** Exceptions:
|
120 |
*
|
150 |
*
|
121 |
* This function returns the hash value associated with the specified nstring.
|
151 |
* This function returns the hash value associated with the specified nstring.
|
122 |
* This value is guaranteed to be identical for all nstrings with the same
|
152 |
* This value is guaranteed to be identical for all nstrings with the same
|
123 |
* content.
|
153 |
* content.
|
124 |
*
|
154 |
*
|
125 |
** Function: unsigned nstring_length
|
155 |
** Function: unsigned nstring_length
|
126 |
* PROTO_S ((NStringP nstring))
|
156 |
* (NStringP nstring)
|
127 |
** Exceptions:
|
157 |
** Exceptions:
|
128 |
*
|
158 |
*
|
129 |
* This function returns the length of the specified nstring.
|
159 |
* This function returns the length of the specified nstring.
|
130 |
*
|
160 |
*
|
131 |
** Function: CStringP nstring_contents
|
161 |
** Function: CStringP nstring_contents
|
132 |
* PROTO_S ((NStringP nstring))
|
162 |
* (NStringP nstring)
|
133 |
** Exceptions:
|
163 |
** Exceptions:
|
134 |
*
|
164 |
*
|
135 |
* This function returns the contents of the specified nstring.
|
165 |
* This function returns the contents of the specified nstring.
|
136 |
*
|
166 |
*
|
137 |
** Function: CmpT nstring_compare
|
167 |
** Function: CmpT nstring_compare
|
138 |
* PROTO_S ((NStringP nstring1, NStringP nstring2))
|
168 |
* (NStringP nstring1, NStringP nstring2)
|
139 |
** Exceptions:
|
169 |
** Exceptions:
|
140 |
*
|
170 |
*
|
141 |
* This function returns ``CMP_LT'', ``CMP_EQ'', or ``CMP_GT'', depending on
|
171 |
* This function returns ``CMP_LT'', ``CMP_EQ'', or ``CMP_GT'', depending on
|
142 |
* whether the content of nstring1 is lexicographically less than, equal to,
|
172 |
* whether the content of nstring1 is lexicographically less than, equal to,
|
143 |
* or greater than the content of nstring2.
|
173 |
* or greater than the content of nstring2.
|
144 |
*
|
174 |
*
|
145 |
** Function: BoolT nstring_equal
|
175 |
** Function: BoolT nstring_equal
|
146 |
* PROTO_S ((NStringP nstring1, NStringP nstring2))
|
176 |
* (NStringP nstring1, NStringP nstring2)
|
147 |
** Exceptions:
|
177 |
** Exceptions:
|
148 |
*
|
178 |
*
|
149 |
* This function returns true if the specified nstrings have the same content,
|
179 |
* This function returns true if the specified nstrings have the same content,
|
150 |
* and false otherwise.
|
180 |
* and false otherwise.
|
151 |
*
|
181 |
*
|
152 |
** Function: BoolT nstring_ci_equal
|
182 |
** Function: BoolT nstring_ci_equal
|
153 |
* PROTO_S ((NStringP nstring1, NStringP nstring2))
|
183 |
* (NStringP nstring1, NStringP nstring2)
|
154 |
** Exceptions:
|
184 |
** Exceptions:
|
155 |
*
|
185 |
*
|
156 |
* This function returns true if the specified nstrings have the same content
|
186 |
* This function returns true if the specified nstrings have the same content
|
157 |
* (ignoring differences in case), and false otherwise.
|
187 |
* (ignoring differences in case), and false otherwise.
|
158 |
*
|
188 |
*
|
159 |
** Function: BoolT nstring_contains
|
189 |
** Function: BoolT nstring_contains
|
160 |
* PROTO_S ((NStringP nstring, char c))
|
190 |
* (NStringP nstring, char c)
|
161 |
** Exceptions:
|
191 |
** Exceptions:
|
162 |
*
|
192 |
*
|
163 |
* This function returns true if the specified nstring contains the specified
|
193 |
* This function returns true if the specified nstring contains the specified
|
164 |
* character, and false otherwise.
|
194 |
* character, and false otherwise.
|
165 |
*
|
195 |
*
|
166 |
** Function: BoolT nstring_is_prefix
|
196 |
** Function: BoolT nstring_is_prefix
|
167 |
* PROTO_S ((NStringP nstring1, NStringP nstring2))
|
197 |
* (NStringP nstring1, NStringP nstring2)
|
168 |
** Exceptions:
|
198 |
** Exceptions:
|
169 |
*
|
199 |
*
|
170 |
* This function returns true if the second nstring is a prefix of the first
|
200 |
* This function returns true if the second nstring is a prefix of the first
|
171 |
* nstring, and false otherwise.
|
201 |
* nstring, and false otherwise.
|
172 |
*
|
202 |
*
|
173 |
** Function: void nstring_destroy
|
203 |
** Function: void nstring_destroy
|
174 |
* PROTO_S ((NStringP nstring))
|
204 |
* (NStringP nstring)
|
175 |
** Exceptions:
|
205 |
** Exceptions:
|
176 |
*
|
206 |
*
|
177 |
* This function deallocates the contents of the specified nstring.
|
207 |
* This function deallocates the contents of the specified nstring.
|
178 |
*
|
208 |
*
|
179 |
** Function: void write_nstring
|
209 |
** Function: void write_nstring
|
180 |
* PROTO_S ((OStreamP stream, NStringP nstring))
|
210 |
* (OStreamP stream, NStringP nstring)
|
181 |
** Exceptions: XX_dalloc_no_memory, XX_ostream_write_error
|
211 |
** Exceptions: XX_dalloc_no_memory, XX_ostream_write_error
|
182 |
*
|
212 |
*
|
183 |
* This function writes the content of the specified nstring to the specified
|
213 |
* This function writes the content of the specified nstring to the specified
|
184 |
* ostream.
|
214 |
* ostream.
|
185 |
*
|
215 |
*
|
186 |
** Function: void dstring_init
|
216 |
** Function: void dstring_init
|
187 |
* PROTO_S ((DStringP dstring))
|
217 |
* (DStringP dstring)
|
188 |
** Exceptions: XX_dalloc_no_memory
|
218 |
** Exceptions: XX_dalloc_no_memory
|
189 |
*
|
219 |
*
|
190 |
* This function initialises the specified dstring to be an empty dstring.
|
220 |
* This function initialises the specified dstring to be an empty dstring.
|
191 |
*
|
221 |
*
|
192 |
** Function: unsigned dstring_length
|
222 |
** Function: unsigned dstring_length
|
193 |
* PROTO_S ((DStringP dstring))
|
223 |
* (DStringP dstring)
|
194 |
** Exceptions:
|
224 |
** Exceptions:
|
195 |
*
|
225 |
*
|
196 |
* This function returns the length of the specified dstring.
|
226 |
* This function returns the length of the specified dstring.
|
197 |
*
|
227 |
*
|
198 |
** Function: void dstring_append_char
|
228 |
** Function: void dstring_append_char
|
199 |
* PROTO_S ((DStringP dstring, char c))
|
229 |
* (DStringP dstring, char c)
|
200 |
** Exceptions: XX_dalloc_no_memory
|
230 |
** Exceptions: XX_dalloc_no_memory
|
201 |
*
|
231 |
*
|
202 |
* This function appends the specified character to the specified dstring.
|
232 |
* This function appends the specified character to the specified dstring.
|
203 |
*
|
233 |
*
|
204 |
** Function: void dstring_append_cstring
|
234 |
** Function: void dstring_append_cstring
|
205 |
* PROTO_S ((DStringP dstring, CStringP cstring)
|
235 |
* (DStringP dstring, CStringP cstring)
|
206 |
** Exceptions: XX_dalloc_no_memory
|
236 |
** Exceptions: XX_dalloc_no_memory
|
207 |
*
|
237 |
*
|
208 |
* This function appends the content of the specified cstring to the specified
|
238 |
* This function appends the content of the specified cstring to the specified
|
209 |
* dstring.
|
239 |
* dstring.
|
210 |
*
|
240 |
*
|
211 |
** Function: void dstring_append_nstring
|
241 |
** Function: void dstring_append_nstring
|
212 |
* PROTO_S ((DStringP dstring, NStringP nstring)
|
242 |
* (DStringP dstring, NStringP nstring)
|
213 |
** Exceptions: XX_dalloc_no_memory
|
243 |
** Exceptions: XX_dalloc_no_memory
|
214 |
*
|
244 |
*
|
215 |
* This function appends the content of the specified nstring to the specified
|
245 |
* This function appends the content of the specified nstring to the specified
|
216 |
* dstring.
|
246 |
* dstring.
|
217 |
*
|
247 |
*
|
218 |
** Function: BoolT dstring_last_char_equal
|
248 |
** Function: BoolT dstring_last_char_equal
|
219 |
* PROTO_S ((DStringP dstring, char c))
|
249 |
* (DStringP dstring, char c)
|
220 |
** Exceptions:
|
250 |
** Exceptions:
|
221 |
*
|
251 |
*
|
222 |
* This function returns true if the last character of the specified dstring
|
252 |
* This function returns true if the last character of the specified dstring
|
223 |
* is the same as the specified character, and false otherwise. If the
|
253 |
* is the same as the specified character, and false otherwise. If the
|
224 |
* dstring is empty, then false is always returned.
|
254 |
* dstring is empty, then false is always returned.
|
225 |
*
|
255 |
*
|
226 |
** Function: void dstring_to_nstring
|
256 |
** Function: void dstring_to_nstring
|
227 |
* PROTO_S ((DStringP dstring, NStringP nstring_ref))
|
257 |
* (DStringP dstring, NStringP nstring_ref)
|
228 |
** Exceptions: XX_dalloc_no_memory
|
258 |
** Exceptions: XX_dalloc_no_memory
|
229 |
*
|
259 |
*
|
230 |
* This function copies the content of the specified dstring into the
|
260 |
* This function copies the content of the specified dstring into the
|
231 |
* specified nstring.
|
261 |
* specified nstring.
|
232 |
*
|
262 |
*
|
233 |
** Functions: CStringP dstring_to_cstring
|
263 |
** Functions: CStringP dstring_to_cstring
|
234 |
* PROTO_S ((DStringP dstring))
|
264 |
* (DStringP dstring)
|
235 |
** Exceptions: XX_dalloc_no_memory
|
265 |
** Exceptions: XX_dalloc_no_memory
|
236 |
*
|
266 |
*
|
237 |
* This function copies the content of the specified dstring into a
|
267 |
* This function copies the content of the specified dstring into a
|
238 |
* dynamically allocated cstring, and returns it.
|
268 |
* dynamically allocated cstring, and returns it.
|
239 |
*
|
269 |
*
|
240 |
** Function: CStringP dstring_destroy_to_cstring
|
270 |
** Function: CStringP dstring_destroy_to_cstring
|
241 |
* PROTO_S ((DStringP dstring))
|
271 |
* (DStringP dstring)
|
242 |
** Exceptions: XX_dalloc_no_memory
|
272 |
** Exceptions: XX_dalloc_no_memory
|
243 |
*
|
273 |
*
|
244 |
* This function does the equivalent of a call to ``dstring_to_cstring''
|
274 |
* This function does the equivalent of a call to ``dstring_to_cstring''
|
245 |
* followed by a call to ``dstring_destroy''. It returns a cstring that is
|
275 |
* followed by a call to ``dstring_destroy''. It returns a cstring that is
|
246 |
* normally the internal cstring of the dstring (if there isn't enough room
|
276 |
* normally the internal cstring of the dstring (if there isn't enough room
|
247 |
* for a null character at the end, then the cstring will need to be
|
277 |
* for a null character at the end, then the cstring will need to be
|
248 |
* reallocated).
|
278 |
* reallocated).
|
249 |
*
|
279 |
*
|
250 |
** Function: void dstring_destroy
|
280 |
** Function: void dstring_destroy
|
251 |
* PROTO_S ((DStringP dstring))
|
281 |
* (DStringP dstring)
|
252 |
** Exceptions:
|
282 |
** Exceptions:
|
253 |
*
|
283 |
*
|
254 |
* This function deallocates the contents of the specified dstring.
|
284 |
* This function deallocates the contents of the specified dstring.
|
255 |
*
|
285 |
*
|
256 |
**** Change log:
|
286 |
**** Change log:
|
Line 290... |
Line 320... |
290 |
CStringP contents;
|
320 |
CStringP contents;
|
291 |
} DStringT, *DStringP;
|
321 |
} DStringT, *DStringP;
|
292 |
|
322 |
|
293 |
/*--------------------------------------------------------------------------*/
|
323 |
/*--------------------------------------------------------------------------*/
|
294 |
|
324 |
|
295 |
extern void nstring_init
|
325 |
extern void nstring_init(NStringP);
|
296 |
PROTO_S ((NStringP));
|
- |
|
297 |
extern void nstring_init_length
|
326 |
extern void nstring_init_length(NStringP, unsigned);
|
298 |
PROTO_S ((NStringP, unsigned));
|
- |
|
299 |
extern void nstring_assign
|
327 |
extern void nstring_assign(NStringP, NStringP);
|
300 |
PROTO_S ((NStringP, NStringP));
|
- |
|
301 |
extern void nstring_copy_cstring
|
328 |
extern void nstring_copy_cstring(NStringP, CStringP);
|
302 |
PROTO_S ((NStringP, CStringP));
|
- |
|
303 |
extern void nstring_insert_cstring
|
329 |
extern void nstring_insert_cstring(NStringP, CStringP);
|
304 |
PROTO_S ((NStringP, CStringP));
|
- |
|
305 |
extern void nstring_copy
|
330 |
extern void nstring_copy(NStringP, NStringP);
|
306 |
PROTO_S ((NStringP, NStringP));
|
- |
|
307 |
extern CStringP nstring_to_cstring
|
331 |
extern CStringP nstring_to_cstring(NStringP);
|
308 |
PROTO_S ((NStringP));
|
- |
|
309 |
extern unsigned nstring_hash_value
|
332 |
extern unsigned nstring_hash_value(NStringP);
|
310 |
PROTO_S ((NStringP));
|
- |
|
311 |
extern unsigned nstring_length
|
333 |
extern unsigned nstring_length(NStringP);
|
312 |
PROTO_S ((NStringP));
|
- |
|
313 |
extern CStringP nstring_contents
|
334 |
extern CStringP nstring_contents(NStringP);
|
314 |
PROTO_S ((NStringP));
|
- |
|
315 |
extern CmpT nstring_compare
|
335 |
extern CmpT nstring_compare(NStringP, NStringP);
|
316 |
PROTO_S ((NStringP, NStringP));
|
- |
|
317 |
extern BoolT nstring_equal
|
336 |
extern BoolT nstring_equal(NStringP, NStringP);
|
318 |
PROTO_S ((NStringP, NStringP));
|
- |
|
319 |
extern BoolT nstring_ci_equal
|
337 |
extern BoolT nstring_ci_equal(NStringP, NStringP);
|
320 |
PROTO_S ((NStringP, NStringP));
|
- |
|
321 |
extern BoolT nstring_contains
|
338 |
extern BoolT nstring_contains(NStringP, char);
|
322 |
PROTO_S ((NStringP, char));
|
- |
|
323 |
extern BoolT nstring_is_prefix
|
339 |
extern BoolT nstring_is_prefix(NStringP, NStringP);
|
324 |
PROTO_S ((NStringP, NStringP));
|
- |
|
325 |
extern void nstring_destroy
|
340 |
extern void nstring_destroy(NStringP);
|
326 |
PROTO_S ((NStringP));
|
- |
|
327 |
|
341 |
|
328 |
extern void write_nstring
|
342 |
extern void write_nstring(OStreamP, NStringP);
|
329 |
PROTO_S ((OStreamP, NStringP));
|
- |
|
330 |
|
343 |
|
331 |
extern void dstring_init
|
344 |
extern void dstring_init(DStringP);
|
332 |
PROTO_S ((DStringP));
|
- |
|
333 |
extern unsigned dstring_length
|
345 |
extern unsigned dstring_length(DStringP);
|
334 |
PROTO_S ((DStringP));
|
- |
|
335 |
extern void dstring_append_char
|
346 |
extern void dstring_append_char(DStringP, char);
|
336 |
PROTO_S ((DStringP, char));
|
- |
|
337 |
extern void dstring_append_cstring
|
347 |
extern void dstring_append_cstring(DStringP, CStringP);
|
338 |
PROTO_S ((DStringP, CStringP));
|
- |
|
339 |
extern void dstring_append_nstring
|
348 |
extern void dstring_append_nstring(DStringP, NStringP);
|
340 |
PROTO_S ((DStringP, NStringP));
|
- |
|
341 |
extern BoolT dstring_last_char_equal
|
349 |
extern BoolT dstring_last_char_equal(DStringP, char);
|
342 |
PROTO_S ((DStringP, char));
|
- |
|
343 |
extern void dstring_to_nstring
|
350 |
extern void dstring_to_nstring(DStringP, NStringP);
|
344 |
PROTO_S ((DStringP, NStringP));
|
- |
|
345 |
extern CStringP dstring_to_cstring
|
351 |
extern CStringP dstring_to_cstring(DStringP);
|
346 |
PROTO_S ((DStringP));
|
- |
|
347 |
extern CStringP dstring_destroy_to_cstring
|
352 |
extern CStringP dstring_destroy_to_cstring(DStringP);
|
348 |
PROTO_S ((DStringP));
|
- |
|
349 |
extern void dstring_destroy
|
353 |
extern void dstring_destroy(DStringP);
|
350 |
PROTO_S ((DStringP));
|
- |
|
351 |
|
354 |
|
352 |
/*--------------------------------------------------------------------------*/
|
355 |
/*--------------------------------------------------------------------------*/
|
353 |
|
356 |
|
354 |
#ifdef FS_FAST
|
357 |
#ifdef FS_FAST
|
355 |
#define nstring_length(s) ((s)->length)
|
358 |
#define nstring_length(s) ((s)->length)
|
356 |
#define nstring_contents(s) ((s)->contents)
|
359 |
#define nstring_contents(s) ((s)->contents)
|
357 |
#define dstring_length(s) ((s)->length)
|
360 |
#define dstring_length(s) ((s)->length)
|
358 |
#endif /* defined (FS_FAST) */
|
361 |
#endif /* defined (FS_FAST) */
|
359 |
|
362 |
|
360 |
#endif /* !defined (H_DSTRING) */
|
363 |
#endif /* !defined (H_DSTRING) */
|
361 |
|
364 |
|
362 |
/*
|
365 |
/*
|