Commit | Line | Data |
---|---|---|
e3064a43 NC |
1 | /* mathoms.c |
2 | * | |
ae53e38e | 3 | * Copyright (C) 2005, 2006, by Larry Wall and others |
e3064a43 NC |
4 | * |
5 | * You may distribute under the terms of either the GNU General Public | |
6 | * License or the Artistic License, as specified in the README file. | |
7 | * | |
8 | */ | |
9 | ||
10 | /* | |
11 | * "Anything that Hobbits had no immediate use for, but were unwilling to | |
12 | * throw away, they called a mathom. Their dwellings were apt to become | |
13 | * rather crowded with mathoms, and many of the presents that passed from | |
14 | * hand to hand were of that sort." | |
15 | */ | |
16 | ||
4fbce521 NC |
17 | #ifndef NO_MATHOMS |
18 | ||
e3064a43 NC |
19 | /* |
20 | * This file contains mathoms, various binary artifacts from previous | |
05b233af NC |
21 | * versions of Perl. For binary or source compatibility reasons, though, |
22 | * we cannot completely remove them from the core code. | |
e3064a43 NC |
23 | * |
24 | * SMP - Oct. 24, 2005 | |
25 | * | |
26 | */ | |
27 | ||
28 | #include "EXTERN.h" | |
29 | #define PERL_IN_MATHOMS_C | |
30 | #include "perl.h" | |
31 | ||
0bfdb59a NC |
32 | PERL_CALLCONV OP * Perl_ref(pTHX_ OP *o, I32 type); |
33 | PERL_CALLCONV void Perl_sv_unref(pTHX_ SV *sv); | |
34 | PERL_CALLCONV void Perl_sv_taint(pTHX_ SV *sv); | |
35 | PERL_CALLCONV IV Perl_sv_2iv(pTHX_ register SV *sv); | |
36 | PERL_CALLCONV UV Perl_sv_2uv(pTHX_ register SV *sv); | |
37 | PERL_CALLCONV char * Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp); | |
38 | PERL_CALLCONV char * Perl_sv_2pv_nolen(pTHX_ register SV *sv); | |
39 | PERL_CALLCONV char * Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv); | |
40 | PERL_CALLCONV char * Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv); | |
41 | PERL_CALLCONV void Perl_sv_force_normal(pTHX_ register SV *sv); | |
42 | PERL_CALLCONV void Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr); | |
43 | PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen); | |
44 | PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len); | |
45 | PERL_CALLCONV void Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr); | |
46 | PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv); | |
47 | PERL_CALLCONV char * Perl_sv_pv(pTHX_ SV *sv); | |
48 | PERL_CALLCONV char * Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp); | |
49 | PERL_CALLCONV char * Perl_sv_pvbyte(pTHX_ SV *sv); | |
50 | PERL_CALLCONV char * Perl_sv_pvutf8(pTHX_ SV *sv); | |
51 | PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade(pTHX_ register SV *sv); | |
52 | PERL_CALLCONV NV Perl_huge(void); | |
53 | PERL_CALLCONV void Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix); | |
54 | PERL_CALLCONV void Perl_gv_efullname3(pTHX_ SV *sv, GV *gv, const char *prefix); | |
55 | PERL_CALLCONV GV * Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name); | |
56 | PERL_CALLCONV HE * Perl_hv_iternext(pTHX_ HV *hv); | |
57 | PERL_CALLCONV void Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how); | |
58 | PERL_CALLCONV bool Perl_do_open(pTHX_ GV *gv, register char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp); | |
59 | PERL_CALLCONV bool Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp); | |
60 | PERL_CALLCONV bool Perl_do_exec(pTHX_ char *cmd); | |
61 | PERL_CALLCONV U8 * Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv); | |
62 | PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ U8 *s, STRLEN len, U8 **ep); | |
63 | PERL_CALLCONV void Perl_sv_nolocking(pTHX_ SV *sv); | |
64 | PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len); | |
65 | PERL_CALLCONV void Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len); | |
66 | PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...); | |
67 | PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...); | |
5336c895 AL |
68 | |
69 | ||
e3064a43 NC |
70 | /* ref() is now a macro using Perl_doref; |
71 | * this version provided for binary compatibility only. | |
72 | */ | |
73 | OP * | |
74 | Perl_ref(pTHX_ OP *o, I32 type) | |
75 | { | |
76 | return doref(o, type, TRUE); | |
77 | } | |
78 | ||
05b233af NC |
79 | /* |
80 | =for apidoc sv_unref | |
81 | ||
82 | Unsets the RV status of the SV, and decrements the reference count of | |
83 | whatever was being referenced by the RV. This can almost be thought of | |
84 | as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag> | |
85 | being zero. See C<SvROK_off>. | |
86 | ||
87 | =cut | |
88 | */ | |
89 | ||
90 | void | |
91 | Perl_sv_unref(pTHX_ SV *sv) | |
92 | { | |
93 | sv_unref_flags(sv, 0); | |
94 | } | |
95 | ||
96 | /* | |
97 | =for apidoc sv_taint | |
98 | ||
99 | Taint an SV. Use C<SvTAINTED_on> instead. | |
100 | =cut | |
101 | */ | |
102 | ||
103 | void | |
104 | Perl_sv_taint(pTHX_ SV *sv) | |
105 | { | |
0e2d6244 | 106 | sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0); |
05b233af NC |
107 | } |
108 | ||
e3064a43 NC |
109 | /* sv_2iv() is now a macro using Perl_sv_2iv_flags(); |
110 | * this function provided for binary compatibility only | |
111 | */ | |
112 | ||
113 | IV | |
114 | Perl_sv_2iv(pTHX_ register SV *sv) | |
115 | { | |
116 | return sv_2iv_flags(sv, SV_GMAGIC); | |
117 | } | |
118 | ||
119 | /* sv_2uv() is now a macro using Perl_sv_2uv_flags(); | |
120 | * this function provided for binary compatibility only | |
121 | */ | |
122 | ||
123 | UV | |
124 | Perl_sv_2uv(pTHX_ register SV *sv) | |
125 | { | |
126 | return sv_2uv_flags(sv, SV_GMAGIC); | |
127 | } | |
128 | ||
129 | /* sv_2pv() is now a macro using Perl_sv_2pv_flags(); | |
130 | * this function provided for binary compatibility only | |
131 | */ | |
132 | ||
133 | char * | |
134 | Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp) | |
135 | { | |
136 | return sv_2pv_flags(sv, lp, SV_GMAGIC); | |
137 | } | |
138 | ||
05b233af | 139 | /* |
66067514 NC |
140 | =for apidoc sv_2pv_nolen |
141 | ||
142 | Like C<sv_2pv()>, but doesn't return the length too. You should usually | |
143 | use the macro wrapper C<SvPV_nolen(sv)> instead. | |
144 | =cut | |
145 | */ | |
146 | ||
147 | char * | |
148 | Perl_sv_2pv_nolen(pTHX_ register SV *sv) | |
149 | { | |
5336c895 | 150 | return sv_2pv(sv, NULL); |
66067514 NC |
151 | } |
152 | ||
153 | /* | |
154 | =for apidoc sv_2pvbyte_nolen | |
155 | ||
156 | Return a pointer to the byte-encoded representation of the SV. | |
157 | May cause the SV to be downgraded from UTF-8 as a side-effect. | |
158 | ||
159 | Usually accessed via the C<SvPVbyte_nolen> macro. | |
160 | ||
161 | =cut | |
162 | */ | |
163 | ||
164 | char * | |
165 | Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv) | |
166 | { | |
5336c895 | 167 | return sv_2pvbyte(sv, NULL); |
66067514 NC |
168 | } |
169 | ||
170 | /* | |
171 | =for apidoc sv_2pvutf8_nolen | |
172 | ||
173 | Return a pointer to the UTF-8-encoded representation of the SV. | |
174 | May cause the SV to be upgraded to UTF-8 as a side-effect. | |
175 | ||
176 | Usually accessed via the C<SvPVutf8_nolen> macro. | |
177 | ||
178 | =cut | |
179 | */ | |
180 | ||
181 | char * | |
182 | Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv) | |
183 | { | |
5336c895 | 184 | return sv_2pvutf8(sv, NULL); |
66067514 NC |
185 | } |
186 | ||
187 | /* | |
05b233af NC |
188 | =for apidoc sv_force_normal |
189 | ||
190 | Undo various types of fakery on an SV: if the PV is a shared string, make | |
191 | a private copy; if we're a ref, stop refing; if we're a glob, downgrade to | |
192 | an xpvmg. See also C<sv_force_normal_flags>. | |
193 | ||
194 | =cut | |
195 | */ | |
196 | ||
197 | void | |
198 | Perl_sv_force_normal(pTHX_ register SV *sv) | |
199 | { | |
200 | sv_force_normal_flags(sv, 0); | |
201 | } | |
e3064a43 NC |
202 | |
203 | /* sv_setsv() is now a macro using Perl_sv_setsv_flags(); | |
204 | * this function provided for binary compatibility only | |
205 | */ | |
206 | ||
207 | void | |
208 | Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) | |
209 | { | |
210 | sv_setsv_flags(dstr, sstr, SV_GMAGIC); | |
211 | } | |
212 | ||
213 | /* sv_catpvn() is now a macro using Perl_sv_catpvn_flags(); | |
214 | * this function provided for binary compatibility only | |
215 | */ | |
216 | ||
217 | void | |
218 | Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen) | |
219 | { | |
220 | sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC); | |
221 | } | |
222 | ||
66067514 NC |
223 | /* |
224 | =for apidoc sv_catpvn_mg | |
225 | ||
226 | Like C<sv_catpvn>, but also handles 'set' magic. | |
227 | ||
228 | =cut | |
229 | */ | |
230 | ||
231 | void | |
232 | Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) | |
233 | { | |
234 | sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC); | |
235 | } | |
236 | ||
e3064a43 NC |
237 | /* sv_catsv() is now a macro using Perl_sv_catsv_flags(); |
238 | * this function provided for binary compatibility only | |
239 | */ | |
240 | ||
241 | void | |
242 | Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) | |
243 | { | |
244 | sv_catsv_flags(dstr, sstr, SV_GMAGIC); | |
245 | } | |
246 | ||
05b233af | 247 | /* |
66067514 NC |
248 | =for apidoc sv_catsv_mg |
249 | ||
250 | Like C<sv_catsv>, but also handles 'set' magic. | |
251 | ||
252 | =cut | |
253 | */ | |
254 | ||
255 | void | |
256 | Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) | |
257 | { | |
258 | sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC); | |
259 | } | |
260 | ||
261 | /* | |
05b233af NC |
262 | =for apidoc sv_iv |
263 | ||
264 | A private implementation of the C<SvIVx> macro for compilers which can't | |
265 | cope with complex macro expressions. Always use the macro instead. | |
266 | ||
267 | =cut | |
268 | */ | |
269 | ||
270 | IV | |
271 | Perl_sv_iv(pTHX_ register SV *sv) | |
272 | { | |
273 | if (SvIOK(sv)) { | |
274 | if (SvIsUV(sv)) | |
275 | return (IV)SvUVX(sv); | |
276 | return SvIVX(sv); | |
277 | } | |
278 | return sv_2iv(sv); | |
279 | } | |
280 | ||
281 | /* | |
282 | =for apidoc sv_uv | |
283 | ||
284 | A private implementation of the C<SvUVx> macro for compilers which can't | |
285 | cope with complex macro expressions. Always use the macro instead. | |
286 | ||
287 | =cut | |
288 | */ | |
289 | ||
290 | UV | |
291 | Perl_sv_uv(pTHX_ register SV *sv) | |
292 | { | |
293 | if (SvIOK(sv)) { | |
294 | if (SvIsUV(sv)) | |
295 | return SvUVX(sv); | |
296 | return (UV)SvIVX(sv); | |
297 | } | |
298 | return sv_2uv(sv); | |
299 | } | |
300 | ||
301 | /* | |
302 | =for apidoc sv_nv | |
303 | ||
304 | A private implementation of the C<SvNVx> macro for compilers which can't | |
305 | cope with complex macro expressions. Always use the macro instead. | |
306 | ||
307 | =cut | |
308 | */ | |
309 | ||
310 | NV | |
311 | Perl_sv_nv(pTHX_ register SV *sv) | |
312 | { | |
313 | if (SvNOK(sv)) | |
314 | return SvNVX(sv); | |
315 | return sv_2nv(sv); | |
316 | } | |
317 | ||
318 | /* | |
319 | =for apidoc sv_pv | |
320 | ||
321 | Use the C<SvPV_nolen> macro instead | |
322 | ||
323 | =for apidoc sv_pvn | |
324 | ||
325 | A private implementation of the C<SvPV> macro for compilers which can't | |
326 | cope with complex macro expressions. Always use the macro instead. | |
327 | ||
328 | =cut | |
329 | */ | |
330 | ||
331 | char * | |
332 | Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp) | |
333 | { | |
334 | if (SvPOK(sv)) { | |
335 | *lp = SvCUR(sv); | |
336 | return SvPVX(sv); | |
337 | } | |
338 | return sv_2pv(sv, lp); | |
339 | } | |
340 | ||
341 | ||
342 | char * | |
343 | Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp) | |
344 | { | |
345 | if (SvPOK(sv)) { | |
346 | *lp = SvCUR(sv); | |
347 | return SvPVX(sv); | |
348 | } | |
349 | return sv_2pv_flags(sv, lp, 0); | |
350 | } | |
351 | ||
e3064a43 NC |
352 | /* sv_pv() is now a macro using SvPV_nolen(); |
353 | * this function provided for binary compatibility only | |
354 | */ | |
355 | ||
356 | char * | |
357 | Perl_sv_pv(pTHX_ SV *sv) | |
358 | { | |
359 | if (SvPOK(sv)) | |
360 | return SvPVX(sv); | |
361 | ||
5336c895 | 362 | return sv_2pv(sv, NULL); |
e3064a43 NC |
363 | } |
364 | ||
365 | /* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags(); | |
366 | * this function provided for binary compatibility only | |
367 | */ | |
368 | ||
369 | char * | |
370 | Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp) | |
371 | { | |
372 | return sv_pvn_force_flags(sv, lp, SV_GMAGIC); | |
373 | } | |
374 | ||
375 | /* sv_pvbyte () is now a macro using Perl_sv_2pv_flags(); | |
376 | * this function provided for binary compatibility only | |
377 | */ | |
378 | ||
379 | char * | |
380 | Perl_sv_pvbyte(pTHX_ SV *sv) | |
381 | { | |
5336c895 | 382 | sv_utf8_downgrade(sv, FALSE); |
e3064a43 NC |
383 | return sv_pv(sv); |
384 | } | |
385 | ||
05b233af NC |
386 | /* |
387 | =for apidoc sv_pvbyte | |
388 | ||
389 | Use C<SvPVbyte_nolen> instead. | |
390 | ||
391 | =for apidoc sv_pvbyten | |
392 | ||
393 | A private implementation of the C<SvPVbyte> macro for compilers | |
394 | which can't cope with complex macro expressions. Always use the macro | |
395 | instead. | |
396 | ||
397 | =cut | |
398 | */ | |
399 | ||
400 | char * | |
401 | Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) | |
402 | { | |
5336c895 | 403 | sv_utf8_downgrade(sv, FALSE); |
05b233af NC |
404 | return sv_pvn(sv,lp); |
405 | } | |
406 | ||
e3064a43 NC |
407 | /* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags(); |
408 | * this function provided for binary compatibility only | |
409 | */ | |
410 | ||
411 | char * | |
412 | Perl_sv_pvutf8(pTHX_ SV *sv) | |
413 | { | |
414 | sv_utf8_upgrade(sv); | |
415 | return sv_pv(sv); | |
416 | } | |
417 | ||
418 | /* | |
05b233af NC |
419 | =for apidoc sv_pvutf8 |
420 | ||
421 | Use the C<SvPVutf8_nolen> macro instead | |
422 | ||
423 | =for apidoc sv_pvutf8n | |
424 | ||
425 | A private implementation of the C<SvPVutf8> macro for compilers | |
426 | which can't cope with complex macro expressions. Always use the macro | |
427 | instead. | |
428 | ||
429 | =cut | |
430 | */ | |
431 | ||
432 | char * | |
433 | Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp) | |
434 | { | |
435 | sv_utf8_upgrade(sv); | |
436 | return sv_pvn(sv,lp); | |
437 | } | |
438 | ||
439 | /* sv_utf8_upgrade() is now a macro using sv_utf8_upgrade_flags(); | |
440 | * this function provided for binary compatibility only | |
441 | */ | |
442 | ||
443 | STRLEN | |
444 | Perl_sv_utf8_upgrade(pTHX_ register SV *sv) | |
445 | { | |
446 | return sv_utf8_upgrade_flags(sv, SV_GMAGIC); | |
447 | } | |
448 | ||
e3064a43 NC |
449 | int |
450 | Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) | |
451 | { | |
452 | dTHXs; | |
453 | va_list(arglist); | |
454 | va_start(arglist, format); | |
455 | return PerlIO_vprintf(stream, format, arglist); | |
456 | } | |
457 | ||
458 | int | |
459 | Perl_printf_nocontext(const char *format, ...) | |
460 | { | |
461 | dTHX; | |
462 | va_list(arglist); | |
463 | va_start(arglist, format); | |
464 | return PerlIO_vprintf(PerlIO_stdout(), format, arglist); | |
465 | } | |
466 | ||
467 | #if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)) | |
468 | /* | |
469 | * This hack is to force load of "huge" support from libm.a | |
470 | * So it is in perl for (say) POSIX to use. | |
471 | * Needed for SunOS with Sun's 'acc' for example. | |
472 | */ | |
473 | NV | |
474 | Perl_huge(void) | |
475 | { | |
c01caf97 | 476 | # if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL) |
e3064a43 | 477 | return HUGE_VALL; |
c01caf97 | 478 | # else |
e3064a43 | 479 | return HUGE_VAL; |
c01caf97 | 480 | # endif |
e3064a43 NC |
481 | } |
482 | #endif | |
483 | ||
05b233af NC |
484 | /* compatibility with versions <= 5.003. */ |
485 | void | |
486 | Perl_gv_fullname(pTHX_ SV *sv, GV *gv) | |
487 | { | |
488 | gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); | |
489 | } | |
490 | ||
491 | /* compatibility with versions <= 5.003. */ | |
492 | void | |
493 | Perl_gv_efullname(pTHX_ SV *sv, GV *gv) | |
494 | { | |
495 | gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); | |
496 | } | |
497 | ||
498 | void | |
499 | Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix) | |
500 | { | |
501 | gv_fullname4(sv, gv, prefix, TRUE); | |
502 | } | |
503 | ||
504 | void | |
505 | Perl_gv_efullname3(pTHX_ SV *sv, GV *gv, const char *prefix) | |
506 | { | |
507 | gv_efullname4(sv, gv, prefix, TRUE); | |
508 | } | |
509 | ||
5082993f NC |
510 | /* |
511 | =for apidoc gv_fetchmethod | |
512 | ||
513 | See L<gv_fetchmethod_autoload>. | |
514 | ||
515 | =cut | |
516 | */ | |
517 | ||
518 | GV * | |
519 | Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) | |
520 | { | |
521 | return gv_fetchmethod_autoload(stash, name, TRUE); | |
522 | } | |
523 | ||
524 | HE * | |
525 | Perl_hv_iternext(pTHX_ HV *hv) | |
526 | { | |
527 | return hv_iternext_flags(hv, 0); | |
528 | } | |
529 | ||
530 | void | |
531 | Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) | |
532 | { | |
0e2d6244 | 533 | sv_magic((SV*)hv, (SV*)gv, how, NULL, 0); |
5082993f NC |
534 | } |
535 | ||
536 | #if 0 /* use the macro from hv.h instead */ | |
537 | ||
538 | char* | |
539 | Perl_sharepvn(pTHX_ const char *sv, I32 len, U32 hash) | |
540 | { | |
541 | return HEK_KEY(share_hek(sv, len, hash)); | |
542 | } | |
543 | ||
544 | #endif | |
545 | ||
05b233af NC |
546 | AV * |
547 | Perl_av_fake(pTHX_ register I32 size, register SV **strp) | |
548 | { | |
549 | register SV** ary; | |
133cdda0 | 550 | register AV * const av = (AV*)newSV(0); |
05b233af NC |
551 | |
552 | sv_upgrade((SV *)av, SVt_PVAV); | |
553 | Newx(ary,size+1,SV*); | |
554 | AvALLOC(av) = ary; | |
555 | Copy(strp,ary,size,SV*); | |
556 | AvFLAGS(av) = AVf_REIFY; | |
557 | SvPV_set(av, (char*)ary); | |
558 | AvFILLp(av) = size - 1; | |
559 | AvMAX(av) = size - 1; | |
560 | while (size--) { | |
561 | assert (*strp); | |
562 | SvTEMP_off(*strp); | |
563 | strp++; | |
564 | } | |
565 | return av; | |
566 | } | |
567 | ||
568 | bool | |
66067514 NC |
569 | Perl_do_open(pTHX_ GV *gv, register char *name, I32 len, int as_raw, |
570 | int rawmode, int rawperm, PerlIO *supplied_fp) | |
571 | { | |
572 | return do_openn(gv, name, len, as_raw, rawmode, rawperm, | |
573 | supplied_fp, (SV **) NULL, 0); | |
574 | } | |
575 | ||
576 | bool | |
05b233af NC |
577 | Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw, |
578 | int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, | |
579 | I32 num_svs) | |
580 | { | |
581 | PERL_UNUSED_ARG(num_svs); | |
582 | return do_openn(gv, name, len, as_raw, rawmode, rawperm, | |
583 | supplied_fp, &svs, 1); | |
584 | } | |
585 | ||
586 | int | |
587 | Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) | |
588 | { | |
589 | /* The old body of this is now in non-LAYER part of perlio.c | |
590 | * This is a stub for any XS code which might have been calling it. | |
591 | */ | |
592 | const char *name = ":raw"; | |
593 | #ifdef PERLIO_USING_CRLF | |
594 | if (!(mode & O_BINARY)) | |
595 | name = ":crlf"; | |
596 | #endif | |
597 | return PerlIO_binmode(aTHX_ fp, iotype, mode, name); | |
598 | } | |
599 | ||
66067514 NC |
600 | #ifndef OS2 |
601 | bool | |
602 | Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp) | |
603 | { | |
604 | return do_aexec5(really, mark, sp, 0, 0); | |
605 | } | |
606 | #endif | |
607 | ||
608 | #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION | |
609 | bool | |
610 | Perl_do_exec(pTHX_ char *cmd) | |
611 | { | |
612 | return do_exec3(cmd,0,0); | |
613 | } | |
614 | #endif | |
615 | ||
616 | #ifdef HAS_PIPE | |
617 | void | |
618 | Perl_do_pipe(pTHX_ SV *sv, GV *rgv, GV *wgv) | |
619 | { | |
620 | register IO *rstio; | |
621 | register IO *wstio; | |
622 | int fd[2]; | |
623 | ||
624 | if (!rgv) | |
625 | goto badexit; | |
626 | if (!wgv) | |
627 | goto badexit; | |
628 | ||
629 | rstio = GvIOn(rgv); | |
630 | wstio = GvIOn(wgv); | |
631 | ||
632 | if (IoIFP(rstio)) | |
633 | do_close(rgv,FALSE); | |
634 | if (IoIFP(wstio)) | |
635 | do_close(wgv,FALSE); | |
636 | ||
637 | if (PerlProc_pipe(fd) < 0) | |
638 | goto badexit; | |
639 | IoIFP(rstio) = PerlIO_fdopen(fd[0], "r"PIPE_OPEN_MODE); | |
640 | IoOFP(wstio) = PerlIO_fdopen(fd[1], "w"PIPE_OPEN_MODE); | |
641 | IoOFP(rstio) = IoIFP(rstio); | |
642 | IoIFP(wstio) = IoOFP(wstio); | |
643 | IoTYPE(rstio) = IoTYPE_RDONLY; | |
644 | IoTYPE(wstio) = IoTYPE_WRONLY; | |
645 | if (!IoIFP(rstio) || !IoOFP(wstio)) { | |
646 | if (IoIFP(rstio)) PerlIO_close(IoIFP(rstio)); | |
647 | else PerlLIO_close(fd[0]); | |
648 | if (IoOFP(wstio)) PerlIO_close(IoOFP(wstio)); | |
649 | else PerlLIO_close(fd[1]); | |
650 | goto badexit; | |
651 | } | |
652 | ||
653 | sv_setsv(sv,&PL_sv_yes); | |
654 | return; | |
655 | ||
656 | badexit: | |
657 | sv_setsv(sv,&PL_sv_undef); | |
658 | return; | |
659 | } | |
660 | #endif | |
661 | ||
5082993f NC |
662 | /* Backwards compatibility. */ |
663 | int | |
664 | Perl_init_i18nl14n(pTHX_ int printwarn) | |
665 | { | |
666 | return init_i18nl10n(printwarn); | |
667 | } | |
668 | ||
669 | /* XXX kept for BINCOMPAT only */ | |
670 | void | |
671 | Perl_save_hints(pTHX) | |
672 | { | |
673 | Perl_croak(aTHX_ "internal error: obsolete function save_hints() called"); | |
674 | } | |
675 | ||
676 | #if 0 | |
677 | OP * | |
678 | Perl_ck_retarget(pTHX_ OP *o) | |
679 | { | |
680 | Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); | |
681 | /* STUB */ | |
682 | return o; | |
683 | } | |
684 | #endif | |
685 | ||
686 | OP * | |
687 | Perl_oopsCV(pTHX_ OP *o) | |
688 | { | |
689 | Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); | |
690 | /* STUB */ | |
691 | PERL_UNUSED_ARG(o); | |
692 | NORETURN_FUNCTION_END; | |
693 | } | |
694 | ||
695 | PP(pp_padany) | |
696 | { | |
697 | DIE(aTHX_ "NOT IMPL LINE %d",__LINE__); | |
698 | } | |
699 | ||
700 | PP(pp_threadsv) | |
701 | { | |
702 | #ifdef USE_5005THREADS | |
703 | dSP; | |
704 | EXTEND(SP, 1); | |
705 | if (PL_op->op_private & OPpLVAL_INTRO) | |
706 | PUSHs(*save_threadsv(PL_op->op_targ)); | |
707 | else | |
708 | PUSHs(THREADSV(PL_op->op_targ)); | |
709 | RETURN; | |
710 | #else | |
711 | DIE(aTHX_ "tried to access per-thread data in non-threaded perl"); | |
712 | #endif /* USE_5005THREADS */ | |
713 | } | |
714 | ||
715 | PP(pp_mapstart) | |
716 | { | |
717 | DIE(aTHX_ "panic: mapstart"); /* uses grepstart */ | |
718 | } | |
719 | ||
4f922d08 AL |
720 | /* These ops all have the same body as pp_null. */ |
721 | PP(pp_scalar) | |
5082993f | 722 | { |
4f922d08 AL |
723 | return NORMAL; |
724 | } | |
725 | ||
726 | PP(pp_regcmaybe) | |
727 | { | |
728 | return NORMAL; | |
729 | } | |
730 | ||
731 | PP(pp_lineseq) | |
732 | { | |
733 | return NORMAL; | |
734 | } | |
735 | ||
736 | PP(pp_scope) | |
737 | { | |
738 | return NORMAL; | |
739 | } | |
740 | ||
741 | /* Ops that are calls to do_kv. */ | |
742 | PP(pp_values) | |
743 | { | |
744 | return do_kv(); | |
745 | } | |
746 | ||
747 | PP(pp_keys) | |
748 | { | |
749 | return do_kv(); | |
750 | } | |
751 | ||
752 | /* Ops that are simply calls to other ops. */ | |
753 | PP(pp_dump) | |
754 | { | |
755 | return pp_goto(); | |
756 | /*NOTREACHED*/ | |
757 | } | |
758 | ||
759 | PP(pp_dofile) | |
760 | { | |
761 | return pp_require(); | |
762 | } | |
763 | ||
764 | PP(pp_dbmclose) | |
765 | { | |
766 | return pp_untie(); | |
767 | } | |
768 | ||
769 | PP(pp_read) | |
770 | { | |
771 | return pp_sysread(); | |
772 | } | |
773 | ||
774 | PP(pp_recv) | |
775 | { | |
776 | return pp_sysread(); | |
777 | } | |
778 | ||
779 | PP(pp_seek) | |
780 | { | |
781 | return pp_sysseek(); | |
782 | } | |
783 | ||
784 | PP(pp_fcntl) | |
785 | { | |
786 | return pp_ioctl(); | |
787 | } | |
788 | ||
789 | PP(pp_gsockopt) | |
790 | { | |
791 | return pp_ssockopt(); | |
792 | } | |
793 | ||
794 | PP(pp_getsockname) | |
795 | { | |
796 | return pp_getpeername(); | |
797 | } | |
798 | ||
799 | PP(pp_lstat) | |
800 | { | |
801 | return pp_stat(); | |
802 | } | |
803 | ||
804 | PP(pp_fteowned) | |
805 | { | |
806 | return pp_ftrowned(); | |
807 | } | |
808 | ||
809 | PP(pp_ftbinary) | |
810 | { | |
811 | return pp_fttext(); | |
812 | } | |
813 | ||
814 | PP(pp_localtime) | |
815 | { | |
816 | return pp_gmtime(); | |
817 | } | |
818 | ||
819 | PP(pp_shmget) | |
820 | { | |
821 | return pp_semget(); | |
822 | } | |
823 | ||
824 | PP(pp_shmctl) | |
825 | { | |
826 | return pp_semctl(); | |
827 | } | |
828 | ||
829 | PP(pp_shmread) | |
830 | { | |
831 | return pp_shmwrite(); | |
832 | } | |
833 | ||
834 | PP(pp_msgget) | |
835 | { | |
836 | return pp_semget(); | |
837 | } | |
838 | ||
839 | PP(pp_msgctl) | |
840 | { | |
841 | return pp_semctl(); | |
842 | } | |
843 | ||
844 | PP(pp_ghbyname) | |
845 | { | |
846 | return pp_ghostent(); | |
847 | } | |
848 | ||
849 | PP(pp_ghbyaddr) | |
850 | { | |
851 | return pp_ghostent(); | |
852 | } | |
853 | ||
854 | PP(pp_gnbyname) | |
855 | { | |
856 | return pp_gnetent(); | |
857 | } | |
858 | ||
859 | PP(pp_gnbyaddr) | |
860 | { | |
861 | return pp_gnetent(); | |
862 | } | |
863 | ||
864 | PP(pp_gpbyname) | |
865 | { | |
866 | return pp_gprotoent(); | |
867 | } | |
868 | ||
869 | PP(pp_gpbynumber) | |
870 | { | |
871 | return pp_gprotoent(); | |
872 | } | |
873 | ||
874 | PP(pp_gsbyname) | |
875 | { | |
876 | return pp_gservent(); | |
877 | } | |
878 | ||
879 | PP(pp_gsbyport) | |
880 | { | |
881 | return pp_gservent(); | |
882 | } | |
883 | ||
884 | PP(pp_gpwnam) | |
885 | { | |
886 | return pp_gpwent(); | |
887 | } | |
888 | ||
889 | PP(pp_gpwuid) | |
890 | { | |
891 | return pp_gpwent(); | |
892 | } | |
893 | ||
894 | PP(pp_ggrnam) | |
895 | { | |
896 | return pp_ggrent(); | |
897 | } | |
898 | ||
899 | PP(pp_ggrgid) | |
900 | { | |
901 | return pp_ggrent(); | |
902 | } | |
903 | ||
904 | PP(pp_ftsize) | |
905 | { | |
906 | return pp_ftis(); | |
907 | } | |
908 | ||
909 | PP(pp_ftmtime) | |
910 | { | |
911 | return pp_ftis(); | |
912 | } | |
913 | ||
914 | PP(pp_ftatime) | |
915 | { | |
916 | return pp_ftis(); | |
917 | } | |
918 | ||
919 | PP(pp_ftctime) | |
920 | { | |
921 | return pp_ftis(); | |
922 | } | |
923 | ||
924 | PP(pp_ftzero) | |
925 | { | |
926 | return pp_ftrowned(); | |
927 | } | |
928 | ||
929 | PP(pp_ftsock) | |
930 | { | |
931 | return pp_ftrowned(); | |
932 | } | |
933 | ||
934 | PP(pp_ftchr) | |
935 | { | |
936 | return pp_ftrowned(); | |
937 | } | |
938 | ||
939 | PP(pp_ftblk) | |
940 | { | |
941 | return pp_ftrowned(); | |
942 | } | |
943 | ||
944 | PP(pp_ftfile) | |
945 | { | |
946 | return pp_ftrowned(); | |
947 | } | |
948 | ||
949 | PP(pp_ftdir) | |
950 | { | |
951 | return pp_ftrowned(); | |
952 | } | |
953 | ||
954 | PP(pp_ftpipe) | |
955 | { | |
956 | return pp_ftrowned(); | |
957 | } | |
958 | ||
959 | PP(pp_ftsuid) | |
960 | { | |
961 | return pp_ftrowned(); | |
962 | } | |
963 | ||
964 | PP(pp_ftsgid) | |
965 | { | |
966 | return pp_ftrowned(); | |
967 | } | |
968 | ||
969 | PP(pp_ftsvtx) | |
970 | { | |
971 | return pp_ftrowned(); | |
972 | } | |
973 | ||
974 | PP(pp_unlink) | |
975 | { | |
976 | return pp_chown(); | |
977 | } | |
978 | ||
979 | PP(pp_chmod) | |
980 | { | |
981 | return pp_chown(); | |
982 | } | |
983 | ||
984 | PP(pp_utime) | |
985 | { | |
986 | return pp_chown(); | |
987 | } | |
988 | ||
989 | PP(pp_kill) | |
990 | { | |
991 | return pp_chown(); | |
992 | } | |
993 | ||
994 | PP(pp_symlink) | |
995 | { | |
996 | return pp_link(); | |
5082993f NC |
997 | } |
998 | ||
4fbce521 NC |
999 | PP(pp_ftrwrite) |
1000 | { | |
1001 | return pp_ftrread(); | |
1002 | } | |
1003 | ||
1004 | PP(pp_ftrexec) | |
1005 | { | |
1006 | return pp_ftrread(); | |
1007 | } | |
1008 | ||
1009 | PP(pp_fteread) | |
1010 | { | |
1011 | return pp_ftrread(); | |
1012 | } | |
1013 | ||
1014 | PP(pp_ftewrite) | |
1015 | { | |
1016 | return pp_ftrread(); | |
1017 | } | |
1018 | ||
1019 | PP(pp_fteexec) | |
1020 | { | |
1021 | return pp_ftrread(); | |
1022 | } | |
1023 | ||
1024 | PP(pp_msgsnd) | |
1025 | { | |
1026 | return pp_shmwrite(); | |
1027 | } | |
1028 | ||
1029 | PP(pp_msgrcv) | |
1030 | { | |
1031 | return pp_shmwrite(); | |
1032 | } | |
1033 | ||
1034 | PP(pp_syswrite) | |
1035 | { | |
1036 | return pp_send(); | |
1037 | } | |
1038 | ||
1039 | PP(pp_semop) | |
1040 | { | |
1041 | return pp_shmwrite(); | |
1042 | } | |
1043 | ||
35273943 AL |
1044 | PP(pp_andassign) |
1045 | { | |
1046 | return pp_and(); | |
1047 | } | |
1048 | ||
1049 | PP(pp_orassign) | |
1050 | { | |
1051 | return pp_or(); | |
1052 | } | |
1053 | ||
1054 | PP(pp_lcfirst) | |
1055 | { | |
1056 | return pp_ucfirst(); | |
1057 | } | |
1058 | ||
c01caf97 NC |
1059 | PP(pp_slt) |
1060 | { | |
1061 | return pp_sle(); | |
1062 | } | |
1063 | ||
1064 | PP(pp_sgt) | |
1065 | { | |
1066 | return pp_sle(); | |
1067 | } | |
1068 | ||
1069 | PP(pp_sge) | |
1070 | { | |
1071 | return pp_sle(); | |
1072 | } | |
1073 | ||
1074 | PP(pp_rindex) | |
1075 | { | |
1076 | return pp_index(); | |
1077 | } | |
1078 | ||
1079 | PP(pp_hex) | |
1080 | { | |
1081 | return pp_oct(); | |
1082 | } | |
1083 | ||
1084 | PP(pp_pop) | |
1085 | { | |
1086 | return pp_shift(); | |
1087 | } | |
1088 | ||
1089 | PP(pp_cos) | |
1090 | { | |
1091 | return pp_sin(); | |
1092 | } | |
1093 | ||
1094 | PP(pp_exp) | |
1095 | { | |
1096 | return pp_sin(); | |
1097 | } | |
1098 | ||
1099 | PP(pp_log) | |
1100 | { | |
1101 | return pp_sin(); | |
1102 | } | |
1103 | ||
1104 | PP(pp_sqrt) | |
1105 | { | |
1106 | return pp_sin(); | |
1107 | } | |
1108 | ||
b21e3693 NC |
1109 | PP(pp_bit_xor) |
1110 | { | |
1111 | return pp_bit_or(); | |
1112 | } | |
1113 | ||
5082993f NC |
1114 | U8 * |
1115 | Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) | |
1116 | { | |
1117 | return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0); | |
1118 | } | |
1119 | ||
4f922d08 AL |
1120 | bool |
1121 | Perl_is_utf8_string_loc(pTHX_ U8 *s, STRLEN len, U8 **ep) | |
1122 | { | |
1123 | return is_utf8_string_loclen(s, len, (const U8 **)ep, 0); | |
1124 | } | |
1125 | ||
5082993f NC |
1126 | /* |
1127 | =for apidoc sv_nolocking | |
1128 | ||
1129 | Dummy routine which "locks" an SV when there is no locking module present. | |
1130 | Exists to avoid test for a NULL function pointer and because it could | |
1131 | potentially warn under some level of strict-ness. | |
1132 | ||
1133 | "Superseded" by sv_nosharing(). | |
1134 | ||
1135 | =cut | |
1136 | */ | |
1137 | ||
1138 | void | |
1139 | Perl_sv_nolocking(pTHX_ SV *sv) | |
1140 | { | |
1e7ed80e | 1141 | PERL_UNUSED_CONTEXT; |
5082993f NC |
1142 | PERL_UNUSED_ARG(sv); |
1143 | } | |
1144 | ||
1145 | ||
1146 | /* | |
1147 | =for apidoc sv_nounlocking | |
1148 | ||
1149 | Dummy routine which "unlocks" an SV when there is no locking module present. | |
1150 | Exists to avoid test for a NULL function pointer and because it could | |
1151 | potentially warn under some level of strict-ness. | |
1152 | ||
1153 | "Superseded" by sv_nosharing(). | |
1154 | ||
1155 | =cut | |
1156 | */ | |
1157 | ||
1158 | void | |
1159 | Perl_sv_nounlocking(pTHX_ SV *sv) | |
1160 | { | |
1e7ed80e | 1161 | PERL_UNUSED_CONTEXT; |
5082993f NC |
1162 | PERL_UNUSED_ARG(sv); |
1163 | } | |
1164 | ||
c01caf97 NC |
1165 | void |
1166 | Perl_save_long(pTHX_ long int *longp) | |
1167 | { | |
1168 | SSCHECK(3); | |
1169 | SSPUSHLONG(*longp); | |
1170 | SSPUSHPTR(longp); | |
1171 | SSPUSHINT(SAVEt_LONG); | |
1172 | } | |
1173 | ||
1174 | void | |
1175 | Perl_save_I16(pTHX_ I16 *intp) | |
1176 | { | |
1177 | SSCHECK(3); | |
1178 | SSPUSHINT(*intp); | |
1179 | SSPUSHPTR(intp); | |
1180 | SSPUSHINT(SAVEt_I16); | |
1181 | } | |
1182 | ||
1183 | void | |
c01caf97 NC |
1184 | Perl_save_iv(pTHX_ IV *ivp) |
1185 | { | |
1186 | SSCHECK(3); | |
1187 | SSPUSHIV(*ivp); | |
1188 | SSPUSHPTR(ivp); | |
1189 | SSPUSHINT(SAVEt_IV); | |
1190 | } | |
1191 | ||
1192 | void | |
1193 | Perl_save_nogv(pTHX_ GV *gv) | |
1194 | { | |
1195 | SSCHECK(2); | |
1196 | SSPUSHPTR(gv); | |
1197 | SSPUSHINT(SAVEt_NSTAB); | |
1198 | } | |
1199 | ||
1200 | void | |
1201 | Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg) | |
1202 | { | |
1203 | register I32 i; | |
1204 | ||
1205 | for (i = 1; i <= maxsarg; i++) { | |
1206 | register SV * const sv = newSV(0); | |
1207 | sv_setsv(sv,sarg[i]); | |
1208 | SSCHECK(3); | |
1209 | SSPUSHPTR(sarg[i]); /* remember the pointer */ | |
1210 | SSPUSHPTR(sv); /* remember the value */ | |
1211 | SSPUSHINT(SAVEt_ITEM); | |
1212 | } | |
1213 | } | |
1214 | ||
820b8518 | 1215 | /* |
26623adb NC |
1216 | =for apidoc sv_usepvn_mg |
1217 | ||
1218 | Like C<sv_usepvn>, but also handles 'set' magic. | |
1219 | ||
1220 | =cut | |
1221 | */ | |
1222 | ||
1223 | void | |
1224 | Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len) | |
1225 | { | |
1226 | sv_usepvn_flags(sv,ptr,len, SV_SMAGIC); | |
1227 | } | |
1228 | ||
1229 | /* | |
1230 | =for apidoc sv_usepvn | |
1231 | ||
1232 | Tells an SV to use C<ptr> to find its string value. Implemented by | |
1233 | calling C<sv_usepvn_flags> with C<flags> of 0, hence does not handle 'set' | |
1234 | magic. See C<sv_usepvn_flags>. | |
1235 | ||
1236 | =cut | |
1237 | */ | |
1238 | ||
1239 | void | |
1240 | Perl_sv_usepvn(pTHX_ SV *sv, char *ptr, STRLEN len) | |
1241 | { | |
1242 | sv_usepvn_flags(sv,ptr,len, 0); | |
1243 | } | |
1244 | ||
34a11f14 NC |
1245 | void |
1246 | Perl_cv_ckproto(pTHX_ CV *cv, GV *gv, char *p) | |
1247 | { | |
1248 | cv_ckproto_len(cv, gv, p, p ? strlen(p) : 0); | |
1249 | } | |
1250 | ||
26623adb | 1251 | /* |
820b8518 NC |
1252 | =for apidoc unpack_str |
1253 | ||
1254 | The engine implementing unpack() Perl function. Note: parameters strbeg, new_s | |
1255 | and ocnt are not used. This call should not be used, use unpackstring instead. | |
1256 | ||
1257 | =cut */ | |
1258 | ||
1259 | I32 | |
970ba7cf NC |
1260 | Perl_unpack_str(pTHX_ char *pat, char *patend, char *s, char *strbeg, |
1261 | char *strend, char **new_s, I32 ocnt, U32 flags) | |
820b8518 NC |
1262 | { |
1263 | PERL_UNUSED_ARG(strbeg); | |
1264 | PERL_UNUSED_ARG(new_s); | |
1265 | PERL_UNUSED_ARG(ocnt); | |
1266 | ||
1267 | return unpackstring(pat, patend, s, strend, flags); | |
1268 | } | |
145ab0cc | 1269 | |
85f565a8 NC |
1270 | /* |
1271 | =for apidoc pack_cat | |
1272 | ||
1273 | The engine implementing pack() Perl function. Note: parameters next_in_list and | |
1274 | flags are not used. This call should not be used; use packlist instead. | |
1275 | ||
1276 | =cut | |
1277 | */ | |
1278 | ||
1279 | void | |
1280 | Perl_pack_cat(pTHX_ SV *cat, char *pat, char *patend, register SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) | |
1281 | { | |
1282 | PERL_UNUSED_ARG(next_in_list); | |
1283 | PERL_UNUSED_ARG(flags); | |
1284 | ||
1285 | packlist(cat, pat, patend, beglist, endlist); | |
1286 | } | |
1287 | ||
6c3d4c35 | 1288 | bool |
145ab0cc NC |
1289 | /* Whilst this should really be STATIC, it was not in 5.8.7, hence something |
1290 | may have linked against it. */ | |
145ab0cc NC |
1291 | S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8) |
1292 | { | |
6c3d4c35 | 1293 | return FALSE; |
145ab0cc | 1294 | } |
4fbce521 NC |
1295 | #endif /* NO_MATHOMS */ |
1296 | ||
e3064a43 NC |
1297 | /* |
1298 | * Local variables: | |
1299 | * c-indentation-style: bsd | |
1300 | * c-basic-offset: 4 | |
1301 | * indent-tabs-mode: t | |
1302 | * End: | |
1303 | * | |
1304 | * ex: set ts=8 sts=4 sw=4 noet: | |
1305 | */ |