Commit | Line | Data |
7ee2227d |
1 | /* mathoms.c |
2 | * |
54ca4ee7 |
3 | * Copyright (C) 2005, 2006, by Larry Wall and others |
7ee2227d |
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 | |
20fac488 |
17 | #ifndef NO_MATHOMS |
18 | |
7ee2227d |
19 | /* |
20 | * This file contains mathoms, various binary artifacts from previous |
f2f0f092 |
21 | * versions of Perl. For binary or source compatibility reasons, though, |
22 | * we cannot completely remove them from the core code. |
7ee2227d |
23 | * |
24 | * SMP - Oct. 24, 2005 |
25 | * |
26 | */ |
27 | |
28 | #include "EXTERN.h" |
29 | #define PERL_IN_MATHOMS_C |
30 | #include "perl.h" |
31 | |
32 | /* ref() is now a macro using Perl_doref; |
33 | * this version provided for binary compatibility only. |
34 | */ |
35 | OP * |
36 | Perl_ref(pTHX_ OP *o, I32 type) |
37 | { |
38 | return doref(o, type, TRUE); |
39 | } |
40 | |
aae9cea0 |
41 | /* |
174c73e3 |
42 | =for apidoc sv_unref |
43 | |
44 | Unsets the RV status of the SV, and decrements the reference count of |
45 | whatever was being referenced by the RV. This can almost be thought of |
46 | as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag> |
47 | being zero. See C<SvROK_off>. |
48 | |
49 | =cut |
50 | */ |
51 | |
52 | void |
53 | Perl_sv_unref(pTHX_ SV *sv) |
54 | { |
55 | sv_unref_flags(sv, 0); |
56 | } |
57 | |
58 | /* |
aae9cea0 |
59 | =for apidoc sv_taint |
60 | |
61 | Taint an SV. Use C<SvTAINTED_on> instead. |
62 | =cut |
63 | */ |
64 | |
65 | void |
66 | Perl_sv_taint(pTHX_ SV *sv) |
67 | { |
68 | sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0); |
69 | } |
70 | |
7ee2227d |
71 | /* sv_2iv() is now a macro using Perl_sv_2iv_flags(); |
72 | * this function provided for binary compatibility only |
73 | */ |
74 | |
75 | IV |
76 | Perl_sv_2iv(pTHX_ register SV *sv) |
77 | { |
78 | return sv_2iv_flags(sv, SV_GMAGIC); |
79 | } |
80 | |
81 | /* sv_2uv() is now a macro using Perl_sv_2uv_flags(); |
82 | * this function provided for binary compatibility only |
83 | */ |
84 | |
85 | UV |
86 | Perl_sv_2uv(pTHX_ register SV *sv) |
87 | { |
88 | return sv_2uv_flags(sv, SV_GMAGIC); |
89 | } |
90 | |
91 | /* sv_2pv() is now a macro using Perl_sv_2pv_flags(); |
92 | * this function provided for binary compatibility only |
93 | */ |
94 | |
95 | char * |
96 | Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp) |
97 | { |
98 | return sv_2pv_flags(sv, lp, SV_GMAGIC); |
99 | } |
100 | |
5abc721d |
101 | /* |
cb2f1b7b |
102 | =for apidoc sv_2pv_nolen |
103 | |
104 | Like C<sv_2pv()>, but doesn't return the length too. You should usually |
105 | use the macro wrapper C<SvPV_nolen(sv)> instead. |
106 | =cut |
107 | */ |
108 | |
109 | char * |
110 | Perl_sv_2pv_nolen(pTHX_ register SV *sv) |
111 | { |
112 | return sv_2pv(sv, 0); |
113 | } |
114 | |
115 | /* |
116 | =for apidoc sv_2pvbyte_nolen |
117 | |
118 | Return a pointer to the byte-encoded representation of the SV. |
119 | May cause the SV to be downgraded from UTF-8 as a side-effect. |
120 | |
121 | Usually accessed via the C<SvPVbyte_nolen> macro. |
122 | |
123 | =cut |
124 | */ |
125 | |
126 | char * |
127 | Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv) |
128 | { |
129 | return sv_2pvbyte(sv, 0); |
130 | } |
131 | |
132 | /* |
133 | =for apidoc sv_2pvutf8_nolen |
134 | |
135 | Return a pointer to the UTF-8-encoded representation of the SV. |
136 | May cause the SV to be upgraded to UTF-8 as a side-effect. |
137 | |
138 | Usually accessed via the C<SvPVutf8_nolen> macro. |
139 | |
140 | =cut |
141 | */ |
142 | |
143 | char * |
144 | Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv) |
145 | { |
146 | return sv_2pvutf8(sv, 0); |
147 | } |
148 | |
149 | /* |
5abc721d |
150 | =for apidoc sv_force_normal |
151 | |
152 | Undo various types of fakery on an SV: if the PV is a shared string, make |
153 | a private copy; if we're a ref, stop refing; if we're a glob, downgrade to |
154 | an xpvmg. See also C<sv_force_normal_flags>. |
155 | |
156 | =cut |
157 | */ |
158 | |
159 | void |
160 | Perl_sv_force_normal(pTHX_ register SV *sv) |
161 | { |
162 | sv_force_normal_flags(sv, 0); |
163 | } |
7ee2227d |
164 | |
165 | /* sv_setsv() is now a macro using Perl_sv_setsv_flags(); |
166 | * this function provided for binary compatibility only |
167 | */ |
168 | |
169 | void |
170 | Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) |
171 | { |
172 | sv_setsv_flags(dstr, sstr, SV_GMAGIC); |
173 | } |
174 | |
175 | /* sv_catpvn() is now a macro using Perl_sv_catpvn_flags(); |
176 | * this function provided for binary compatibility only |
177 | */ |
178 | |
179 | void |
180 | Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen) |
181 | { |
182 | sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC); |
183 | } |
184 | |
b347df82 |
185 | /* |
186 | =for apidoc sv_catpvn_mg |
187 | |
188 | Like C<sv_catpvn>, but also handles 'set' magic. |
189 | |
190 | =cut |
191 | */ |
192 | |
193 | void |
194 | Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) |
195 | { |
196 | sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC); |
197 | } |
198 | |
7ee2227d |
199 | /* sv_catsv() is now a macro using Perl_sv_catsv_flags(); |
200 | * this function provided for binary compatibility only |
201 | */ |
202 | |
203 | void |
204 | Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) |
205 | { |
206 | sv_catsv_flags(dstr, sstr, SV_GMAGIC); |
207 | } |
208 | |
0feed65a |
209 | /* |
b347df82 |
210 | =for apidoc sv_catsv_mg |
211 | |
212 | Like C<sv_catsv>, but also handles 'set' magic. |
213 | |
214 | =cut |
215 | */ |
216 | |
217 | void |
218 | Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) |
219 | { |
220 | sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC); |
221 | } |
222 | |
223 | /* |
0feed65a |
224 | =for apidoc sv_iv |
225 | |
226 | A private implementation of the C<SvIVx> macro for compilers which can't |
227 | cope with complex macro expressions. Always use the macro instead. |
228 | |
229 | =cut |
230 | */ |
231 | |
232 | IV |
233 | Perl_sv_iv(pTHX_ register SV *sv) |
234 | { |
235 | if (SvIOK(sv)) { |
236 | if (SvIsUV(sv)) |
237 | return (IV)SvUVX(sv); |
238 | return SvIVX(sv); |
239 | } |
240 | return sv_2iv(sv); |
241 | } |
242 | |
243 | /* |
244 | =for apidoc sv_uv |
245 | |
246 | A private implementation of the C<SvUVx> macro for compilers which can't |
247 | cope with complex macro expressions. Always use the macro instead. |
248 | |
249 | =cut |
250 | */ |
251 | |
252 | UV |
253 | Perl_sv_uv(pTHX_ register SV *sv) |
254 | { |
255 | if (SvIOK(sv)) { |
256 | if (SvIsUV(sv)) |
257 | return SvUVX(sv); |
258 | return (UV)SvIVX(sv); |
259 | } |
260 | return sv_2uv(sv); |
261 | } |
262 | |
263 | /* |
264 | =for apidoc sv_nv |
265 | |
266 | A private implementation of the C<SvNVx> macro for compilers which can't |
267 | cope with complex macro expressions. Always use the macro instead. |
268 | |
269 | =cut |
270 | */ |
271 | |
272 | NV |
273 | Perl_sv_nv(pTHX_ register SV *sv) |
274 | { |
275 | if (SvNOK(sv)) |
276 | return SvNVX(sv); |
277 | return sv_2nv(sv); |
278 | } |
279 | |
280 | /* |
281 | =for apidoc sv_pv |
282 | |
283 | Use the C<SvPV_nolen> macro instead |
284 | |
285 | =for apidoc sv_pvn |
286 | |
287 | A private implementation of the C<SvPV> macro for compilers which can't |
288 | cope with complex macro expressions. Always use the macro instead. |
289 | |
290 | =cut |
291 | */ |
292 | |
293 | char * |
294 | Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp) |
295 | { |
296 | if (SvPOK(sv)) { |
297 | *lp = SvCUR(sv); |
298 | return SvPVX(sv); |
299 | } |
300 | return sv_2pv(sv, lp); |
301 | } |
302 | |
303 | |
304 | char * |
305 | Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp) |
306 | { |
307 | if (SvPOK(sv)) { |
308 | *lp = SvCUR(sv); |
309 | return SvPVX(sv); |
310 | } |
311 | return sv_2pv_flags(sv, lp, 0); |
312 | } |
313 | |
7ee2227d |
314 | /* sv_pv() is now a macro using SvPV_nolen(); |
315 | * this function provided for binary compatibility only |
316 | */ |
317 | |
318 | char * |
319 | Perl_sv_pv(pTHX_ SV *sv) |
320 | { |
321 | if (SvPOK(sv)) |
322 | return SvPVX(sv); |
323 | |
324 | return sv_2pv(sv, 0); |
325 | } |
326 | |
327 | /* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags(); |
328 | * this function provided for binary compatibility only |
329 | */ |
330 | |
331 | char * |
332 | Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp) |
333 | { |
334 | return sv_pvn_force_flags(sv, lp, SV_GMAGIC); |
335 | } |
336 | |
337 | /* sv_pvbyte () is now a macro using Perl_sv_2pv_flags(); |
338 | * this function provided for binary compatibility only |
339 | */ |
340 | |
341 | char * |
342 | Perl_sv_pvbyte(pTHX_ SV *sv) |
343 | { |
344 | sv_utf8_downgrade(sv,0); |
345 | return sv_pv(sv); |
346 | } |
347 | |
0feed65a |
348 | /* |
349 | =for apidoc sv_pvbyte |
350 | |
351 | Use C<SvPVbyte_nolen> instead. |
352 | |
353 | =for apidoc sv_pvbyten |
354 | |
355 | A private implementation of the C<SvPVbyte> macro for compilers |
356 | which can't cope with complex macro expressions. Always use the macro |
357 | instead. |
358 | |
359 | =cut |
360 | */ |
361 | |
362 | char * |
363 | Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp) |
364 | { |
365 | sv_utf8_downgrade(sv,0); |
366 | return sv_pvn(sv,lp); |
367 | } |
368 | |
7ee2227d |
369 | /* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags(); |
370 | * this function provided for binary compatibility only |
371 | */ |
372 | |
373 | char * |
374 | Perl_sv_pvutf8(pTHX_ SV *sv) |
375 | { |
376 | sv_utf8_upgrade(sv); |
377 | return sv_pv(sv); |
378 | } |
379 | |
0feed65a |
380 | /* |
381 | =for apidoc sv_pvutf8 |
382 | |
383 | Use the C<SvPVutf8_nolen> macro instead |
384 | |
385 | =for apidoc sv_pvutf8n |
386 | |
387 | A private implementation of the C<SvPVutf8> macro for compilers |
388 | which can't cope with complex macro expressions. Always use the macro |
389 | instead. |
390 | |
391 | =cut |
392 | */ |
393 | |
394 | char * |
395 | Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp) |
396 | { |
397 | sv_utf8_upgrade(sv); |
398 | return sv_pvn(sv,lp); |
399 | } |
400 | |
205c02c2 |
401 | /* sv_utf8_upgrade() is now a macro using sv_utf8_upgrade_flags(); |
402 | * this function provided for binary compatibility only |
403 | */ |
404 | |
405 | STRLEN |
406 | Perl_sv_utf8_upgrade(pTHX_ register SV *sv) |
407 | { |
408 | return sv_utf8_upgrade_flags(sv, SV_GMAGIC); |
409 | } |
410 | |
7ee2227d |
411 | int |
412 | Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) |
413 | { |
414 | dTHXs; |
415 | va_list(arglist); |
416 | va_start(arglist, format); |
417 | return PerlIO_vprintf(stream, format, arglist); |
418 | } |
419 | |
420 | int |
421 | Perl_printf_nocontext(const char *format, ...) |
422 | { |
423 | dTHX; |
424 | va_list(arglist); |
425 | va_start(arglist, format); |
426 | return PerlIO_vprintf(PerlIO_stdout(), format, arglist); |
427 | } |
428 | |
429 | #if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)) |
430 | /* |
431 | * This hack is to force load of "huge" support from libm.a |
432 | * So it is in perl for (say) POSIX to use. |
433 | * Needed for SunOS with Sun's 'acc' for example. |
434 | */ |
435 | NV |
436 | Perl_huge(void) |
437 | { |
438 | # if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL) |
439 | return HUGE_VALL; |
440 | # endif |
441 | return HUGE_VAL; |
442 | } |
443 | #endif |
444 | |
f2f0f092 |
445 | /* compatibility with versions <= 5.003. */ |
446 | void |
447 | Perl_gv_fullname(pTHX_ SV *sv, const GV *gv) |
448 | { |
449 | gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); |
450 | } |
451 | |
452 | /* compatibility with versions <= 5.003. */ |
453 | void |
454 | Perl_gv_efullname(pTHX_ SV *sv, const GV *gv) |
455 | { |
456 | gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); |
457 | } |
458 | |
2674aeec |
459 | void |
460 | Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) |
461 | { |
462 | gv_fullname4(sv, gv, prefix, TRUE); |
463 | } |
464 | |
465 | void |
466 | Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix) |
467 | { |
468 | gv_efullname4(sv, gv, prefix, TRUE); |
469 | } |
470 | |
887986eb |
471 | /* |
472 | =for apidoc gv_fetchmethod |
473 | |
474 | See L<gv_fetchmethod_autoload>. |
475 | |
476 | =cut |
477 | */ |
478 | |
479 | GV * |
480 | Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name) |
481 | { |
482 | return gv_fetchmethod_autoload(stash, name, TRUE); |
483 | } |
484 | |
7a7b9979 |
485 | HE * |
486 | Perl_hv_iternext(pTHX_ HV *hv) |
487 | { |
488 | return hv_iternext_flags(hv, 0); |
489 | } |
490 | |
bc5cdc23 |
491 | void |
492 | Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how) |
493 | { |
494 | sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0); |
495 | } |
496 | |
497 | #if 0 /* use the macro from hv.h instead */ |
498 | |
499 | char* |
500 | Perl_sharepvn(pTHX_ const char *sv, I32 len, U32 hash) |
501 | { |
502 | return HEK_KEY(share_hek(sv, len, hash)); |
503 | } |
504 | |
505 | #endif |
506 | |
b966a812 |
507 | AV * |
508 | Perl_av_fake(pTHX_ register I32 size, register SV **strp) |
509 | { |
510 | register SV** ary; |
561b68a9 |
511 | register AV * const av = (AV*)newSV(0); |
b966a812 |
512 | |
513 | sv_upgrade((SV *)av, SVt_PVAV); |
514 | Newx(ary,size+1,SV*); |
515 | AvALLOC(av) = ary; |
516 | Copy(strp,ary,size,SV*); |
517 | AvREIFY_only(av); |
518 | SvPV_set(av, (char*)ary); |
519 | AvFILLp(av) = size - 1; |
520 | AvMAX(av) = size - 1; |
521 | while (size--) { |
522 | assert (*strp); |
523 | SvTEMP_off(*strp); |
524 | strp++; |
525 | } |
526 | return av; |
527 | } |
528 | |
34d367cd |
529 | bool |
e4dba786 |
530 | Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, |
531 | int rawmode, int rawperm, PerlIO *supplied_fp) |
532 | { |
533 | return do_openn(gv, name, len, as_raw, rawmode, rawperm, |
534 | supplied_fp, (SV **) NULL, 0); |
535 | } |
536 | |
537 | bool |
34d367cd |
538 | Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int |
539 | as_raw, |
540 | int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, |
541 | I32 num_svs) |
542 | { |
543 | PERL_UNUSED_ARG(num_svs); |
544 | return do_openn(gv, name, len, as_raw, rawmode, rawperm, |
545 | supplied_fp, &svs, 1); |
546 | } |
547 | |
548 | int |
549 | Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) |
550 | { |
551 | /* The old body of this is now in non-LAYER part of perlio.c |
552 | * This is a stub for any XS code which might have been calling it. |
553 | */ |
554 | const char *name = ":raw"; |
555 | #ifdef PERLIO_USING_CRLF |
556 | if (!(mode & O_BINARY)) |
557 | name = ":crlf"; |
558 | #endif |
559 | return PerlIO_binmode(aTHX_ fp, iotype, mode, name); |
560 | } |
561 | |
a9f96b3f |
562 | #ifndef OS2 |
563 | bool |
564 | Perl_do_aexec(pTHX_ SV *really, register SV **mark, register SV **sp) |
565 | { |
566 | return do_aexec5(really, mark, sp, 0, 0); |
567 | } |
568 | #endif |
569 | |
9555a685 |
570 | #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION |
571 | bool |
572 | Perl_do_exec(pTHX_ const char *cmd) |
573 | { |
574 | return do_exec3(cmd,0,0); |
575 | } |
576 | #endif |
577 | |
f95f476d |
578 | #ifdef HAS_PIPE |
579 | void |
580 | Perl_do_pipe(pTHX_ SV *sv, GV *rgv, GV *wgv) |
581 | { |
97aff369 |
582 | dVAR; |
f95f476d |
583 | register IO *rstio; |
584 | register IO *wstio; |
585 | int fd[2]; |
586 | |
587 | if (!rgv) |
588 | goto badexit; |
589 | if (!wgv) |
590 | goto badexit; |
591 | |
592 | rstio = GvIOn(rgv); |
593 | wstio = GvIOn(wgv); |
594 | |
595 | if (IoIFP(rstio)) |
596 | do_close(rgv,FALSE); |
597 | if (IoIFP(wstio)) |
598 | do_close(wgv,FALSE); |
599 | |
600 | if (PerlProc_pipe(fd) < 0) |
601 | goto badexit; |
602 | IoIFP(rstio) = PerlIO_fdopen(fd[0], "r"PIPE_OPEN_MODE); |
603 | IoOFP(wstio) = PerlIO_fdopen(fd[1], "w"PIPE_OPEN_MODE); |
604 | IoOFP(rstio) = IoIFP(rstio); |
605 | IoIFP(wstio) = IoOFP(wstio); |
606 | IoTYPE(rstio) = IoTYPE_RDONLY; |
607 | IoTYPE(wstio) = IoTYPE_WRONLY; |
608 | if (!IoIFP(rstio) || !IoOFP(wstio)) { |
609 | if (IoIFP(rstio)) PerlIO_close(IoIFP(rstio)); |
610 | else PerlLIO_close(fd[0]); |
611 | if (IoOFP(wstio)) PerlIO_close(IoOFP(wstio)); |
612 | else PerlLIO_close(fd[1]); |
613 | goto badexit; |
614 | } |
615 | |
616 | sv_setsv(sv,&PL_sv_yes); |
617 | return; |
618 | |
619 | badexit: |
620 | sv_setsv(sv,&PL_sv_undef); |
621 | return; |
622 | } |
623 | #endif |
624 | |
89552e80 |
625 | /* Backwards compatibility. */ |
626 | int |
627 | Perl_init_i18nl14n(pTHX_ int printwarn) |
628 | { |
629 | return init_i18nl10n(printwarn); |
630 | } |
631 | |
ad5d783e |
632 | /* XXX kept for BINCOMPAT only */ |
633 | void |
634 | Perl_save_hints(pTHX) |
635 | { |
636 | Perl_croak(aTHX_ "internal error: obsolete function save_hints() called"); |
637 | } |
638 | |
c78ff979 |
639 | #if 0 |
640 | OP * |
641 | Perl_ck_retarget(pTHX_ OP *o) |
642 | { |
643 | Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); |
644 | /* STUB */ |
645 | return o; |
646 | } |
647 | #endif |
648 | |
649 | OP * |
650 | Perl_oopsCV(pTHX_ OP *o) |
651 | { |
652 | Perl_croak(aTHX_ "NOT IMPL LINE %d",__LINE__); |
653 | /* STUB */ |
654 | PERL_UNUSED_ARG(o); |
655 | NORETURN_FUNCTION_END; |
656 | } |
657 | |
658 | PP(pp_padany) |
659 | { |
660 | DIE(aTHX_ "NOT IMPL LINE %d",__LINE__); |
661 | } |
662 | |
663 | PP(pp_threadsv) |
664 | { |
665 | DIE(aTHX_ "tried to access per-thread data in non-threaded perl"); |
666 | } |
667 | |
668 | PP(pp_mapstart) |
669 | { |
670 | DIE(aTHX_ "panic: mapstart"); /* uses grepstart */ |
671 | } |
672 | |
0b612f93 |
673 | /* These ops all have the same body as pp_null. */ |
674 | PP(pp_scalar) |
675 | { |
97aff369 |
676 | dVAR; |
0b612f93 |
677 | return NORMAL; |
678 | } |
679 | |
680 | PP(pp_regcmaybe) |
681 | { |
97aff369 |
682 | dVAR; |
0b612f93 |
683 | return NORMAL; |
684 | } |
685 | |
686 | PP(pp_lineseq) |
687 | { |
97aff369 |
688 | dVAR; |
0b612f93 |
689 | return NORMAL; |
690 | } |
691 | |
692 | PP(pp_scope) |
693 | { |
97aff369 |
694 | dVAR; |
0b612f93 |
695 | return NORMAL; |
696 | } |
697 | |
698 | /* Ops that are calls to do_kv. */ |
699 | PP(pp_values) |
700 | { |
701 | return do_kv(); |
702 | } |
703 | |
704 | PP(pp_keys) |
705 | { |
706 | return do_kv(); |
707 | } |
708 | |
709 | /* Ops that are simply calls to other ops. */ |
710 | PP(pp_dump) |
711 | { |
712 | return pp_goto(); |
713 | /*NOTREACHED*/ |
714 | } |
715 | |
716 | PP(pp_dofile) |
717 | { |
718 | return pp_require(); |
719 | } |
720 | |
721 | PP(pp_dbmclose) |
722 | { |
723 | return pp_untie(); |
724 | } |
725 | |
726 | PP(pp_read) |
727 | { |
728 | return pp_sysread(); |
729 | } |
730 | |
731 | PP(pp_recv) |
732 | { |
733 | return pp_sysread(); |
734 | } |
735 | |
736 | PP(pp_seek) |
737 | { |
738 | return pp_sysseek(); |
739 | } |
740 | |
741 | PP(pp_fcntl) |
742 | { |
743 | return pp_ioctl(); |
744 | } |
745 | |
746 | PP(pp_gsockopt) |
747 | { |
748 | return pp_ssockopt(); |
749 | } |
750 | |
751 | PP(pp_getsockname) |
752 | { |
753 | return pp_getpeername(); |
754 | } |
755 | |
756 | PP(pp_lstat) |
757 | { |
758 | return pp_stat(); |
759 | } |
760 | |
761 | PP(pp_fteowned) |
762 | { |
763 | return pp_ftrowned(); |
764 | } |
765 | |
766 | PP(pp_ftbinary) |
767 | { |
768 | return pp_fttext(); |
769 | } |
770 | |
771 | PP(pp_localtime) |
772 | { |
773 | return pp_gmtime(); |
774 | } |
775 | |
776 | PP(pp_shmget) |
777 | { |
778 | return pp_semget(); |
779 | } |
780 | |
781 | PP(pp_shmctl) |
782 | { |
783 | return pp_semctl(); |
784 | } |
785 | |
786 | PP(pp_shmread) |
787 | { |
788 | return pp_shmwrite(); |
789 | } |
790 | |
791 | PP(pp_msgget) |
792 | { |
793 | return pp_semget(); |
794 | } |
795 | |
796 | PP(pp_msgctl) |
797 | { |
798 | return pp_semctl(); |
799 | } |
800 | |
801 | PP(pp_ghbyname) |
802 | { |
803 | return pp_ghostent(); |
804 | } |
805 | |
806 | PP(pp_ghbyaddr) |
807 | { |
808 | return pp_ghostent(); |
809 | } |
810 | |
811 | PP(pp_gnbyname) |
812 | { |
813 | return pp_gnetent(); |
814 | } |
815 | |
816 | PP(pp_gnbyaddr) |
817 | { |
818 | return pp_gnetent(); |
819 | } |
820 | |
821 | PP(pp_gpbyname) |
822 | { |
823 | return pp_gprotoent(); |
824 | } |
825 | |
826 | PP(pp_gpbynumber) |
827 | { |
828 | return pp_gprotoent(); |
829 | } |
830 | |
831 | PP(pp_gsbyname) |
832 | { |
833 | return pp_gservent(); |
834 | } |
835 | |
836 | PP(pp_gsbyport) |
837 | { |
838 | return pp_gservent(); |
839 | } |
840 | |
841 | PP(pp_gpwnam) |
842 | { |
843 | return pp_gpwent(); |
844 | } |
845 | |
846 | PP(pp_gpwuid) |
847 | { |
848 | return pp_gpwent(); |
849 | } |
850 | |
851 | PP(pp_ggrnam) |
852 | { |
853 | return pp_ggrent(); |
854 | } |
855 | |
856 | PP(pp_ggrgid) |
857 | { |
858 | return pp_ggrent(); |
859 | } |
860 | |
957b0e1d |
861 | PP(pp_ftsize) |
862 | { |
4992681b |
863 | return pp_ftis(); |
957b0e1d |
864 | } |
865 | |
866 | PP(pp_ftmtime) |
867 | { |
4992681b |
868 | return pp_ftis(); |
957b0e1d |
869 | } |
870 | |
871 | PP(pp_ftatime) |
872 | { |
4992681b |
873 | return pp_ftis(); |
957b0e1d |
874 | } |
875 | |
876 | PP(pp_ftctime) |
877 | { |
4992681b |
878 | return pp_ftis(); |
957b0e1d |
879 | } |
880 | |
f1cb2d48 |
881 | PP(pp_ftzero) |
882 | { |
883 | return pp_ftrowned(); |
884 | } |
885 | |
886 | PP(pp_ftsock) |
887 | { |
888 | return pp_ftrowned(); |
889 | } |
890 | |
891 | PP(pp_ftchr) |
892 | { |
893 | return pp_ftrowned(); |
894 | } |
895 | |
896 | PP(pp_ftblk) |
897 | { |
898 | return pp_ftrowned(); |
899 | } |
900 | |
901 | PP(pp_ftfile) |
902 | { |
903 | return pp_ftrowned(); |
904 | } |
905 | |
906 | PP(pp_ftdir) |
907 | { |
908 | return pp_ftrowned(); |
909 | } |
910 | |
911 | PP(pp_ftpipe) |
912 | { |
913 | return pp_ftrowned(); |
914 | } |
915 | |
17ad201a |
916 | PP(pp_ftsuid) |
917 | { |
918 | return pp_ftrowned(); |
919 | } |
920 | |
921 | PP(pp_ftsgid) |
922 | { |
923 | return pp_ftrowned(); |
924 | } |
925 | |
926 | PP(pp_ftsvtx) |
927 | { |
928 | return pp_ftrowned(); |
929 | } |
930 | |
605b9385 |
931 | PP(pp_unlink) |
932 | { |
933 | return pp_chown(); |
934 | } |
935 | |
936 | PP(pp_chmod) |
937 | { |
938 | return pp_chown(); |
939 | } |
940 | |
941 | PP(pp_utime) |
942 | { |
943 | return pp_chown(); |
944 | } |
945 | |
946 | PP(pp_kill) |
947 | { |
948 | return pp_chown(); |
949 | } |
950 | |
ce6987d0 |
951 | PP(pp_symlink) |
952 | { |
953 | return pp_link(); |
954 | } |
955 | |
af9e49b4 |
956 | PP(pp_ftrwrite) |
957 | { |
958 | return pp_ftrread(); |
959 | } |
960 | |
961 | PP(pp_ftrexec) |
962 | { |
963 | return pp_ftrread(); |
964 | } |
965 | |
966 | PP(pp_fteread) |
967 | { |
968 | return pp_ftrread(); |
969 | } |
970 | |
971 | PP(pp_ftewrite) |
972 | { |
973 | return pp_ftrread(); |
974 | } |
975 | |
976 | PP(pp_fteexec) |
977 | { |
978 | return pp_ftrread(); |
979 | } |
980 | |
c9f7ac20 |
981 | PP(pp_msgsnd) |
982 | { |
983 | return pp_shmwrite(); |
984 | } |
985 | |
986 | PP(pp_msgrcv) |
987 | { |
988 | return pp_shmwrite(); |
989 | } |
990 | |
64a1bc8e |
991 | PP(pp_syswrite) |
992 | { |
993 | return pp_send(); |
994 | } |
995 | |
ca563b4e |
996 | PP(pp_semop) |
997 | { |
998 | return pp_shmwrite(); |
999 | } |
1000 | |
25a55bd7 |
1001 | PP(pp_dor) |
1002 | { |
f6a64177 |
1003 | return pp_defined(); |
25a55bd7 |
1004 | } |
1005 | |
c960fc3b |
1006 | PP(pp_andassign) |
1007 | { |
1008 | return pp_and(); |
1009 | } |
1010 | |
1011 | PP(pp_orassign) |
1012 | { |
1013 | return pp_or(); |
1014 | } |
1015 | |
1016 | PP(pp_dorassign) |
1017 | { |
1018 | return pp_defined(); |
1019 | } |
1020 | |
12e9c124 |
1021 | PP(pp_lcfirst) |
1022 | { |
1023 | return pp_ucfirst(); |
1024 | } |
1025 | |
afd9910b |
1026 | PP(pp_slt) |
1027 | { |
1028 | return pp_sle(); |
1029 | } |
1030 | |
1031 | PP(pp_sgt) |
1032 | { |
1033 | return pp_sle(); |
1034 | } |
1035 | |
1036 | PP(pp_sge) |
1037 | { |
1038 | return pp_sle(); |
1039 | } |
1040 | |
038e8d3c |
1041 | U8 * |
1042 | Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) |
1043 | { |
1044 | return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0); |
1045 | } |
1046 | |
814fafa7 |
1047 | bool |
1048 | Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep) |
1049 | { |
1050 | return is_utf8_string_loclen(s, len, ep, 0); |
1051 | } |
1052 | |
7ee2227d |
1053 | /* |
d5b2b27b |
1054 | =for apidoc sv_nolocking |
1055 | |
1056 | Dummy routine which "locks" an SV when there is no locking module present. |
1057 | Exists to avoid test for a NULL function pointer and because it could |
1058 | potentially warn under some level of strict-ness. |
1059 | |
1060 | "Superseded" by sv_nosharing(). |
1061 | |
1062 | =cut |
1063 | */ |
1064 | |
1065 | void |
1066 | Perl_sv_nolocking(pTHX_ SV *sv) |
1067 | { |
1068 | PERL_UNUSED_ARG(sv); |
1069 | } |
1070 | |
1071 | |
1072 | /* |
1073 | =for apidoc sv_nounlocking |
1074 | |
1075 | Dummy routine which "unlocks" an SV when there is no locking module present. |
1076 | Exists to avoid test for a NULL function pointer and because it could |
1077 | potentially warn under some level of strict-ness. |
1078 | |
1079 | "Superseded" by sv_nosharing(). |
1080 | |
1081 | =cut |
1082 | */ |
1083 | |
1084 | void |
1085 | Perl_sv_nounlocking(pTHX_ SV *sv) |
1086 | { |
1087 | PERL_UNUSED_ARG(sv); |
1088 | } |
1089 | |
20fac488 |
1090 | #endif /* NO_MATHOMS */ |
1091 | |
d5b2b27b |
1092 | /* |
7ee2227d |
1093 | * Local variables: |
1094 | * c-indentation-style: bsd |
1095 | * c-basic-offset: 4 |
1096 | * indent-tabs-mode: t |
1097 | * End: |
1098 | * |
1099 | * ex: set ts=8 sts=4 sw=4 noet: |
1100 | */ |