new_body_type doesn't need to subtract the offset, that's what
[p5sagit/p5-mst-13.2.git] / mathoms.c
index 0f82677..3f541f6 100644 (file)
--- a/mathoms.c
+++ b/mathoms.c
@@ -1,6 +1,6 @@
 /*    mathoms.c
  *
- *    Copyright (C) 2005, by Larry Wall and others
+ *    Copyright (C) 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -29,8 +29,6 @@
 #define PERL_IN_MATHOMS_C
 #include "perl.h"
 
-void Perl_mathoms() {}
-
 /* ref() is now a macro using Perl_doref;
  * this version provided for binary compatibility only.
  */
@@ -67,7 +65,7 @@ Taint an SV. Use C<SvTAINTED_on> instead.
 void
 Perl_sv_taint(pTHX_ SV *sv)
 {
-    sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0);
+    sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0);
 }
 
 /* sv_2iv() is now a macro using Perl_sv_2iv_flags();
@@ -437,10 +435,11 @@ Perl_printf_nocontext(const char *format, ...)
 NV
 Perl_huge(void)
 {
-#   if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
+#  if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
     return HUGE_VALL;
-#   endif
+#  else
     return HUGE_VAL;
+#  endif
 }
 #endif
 
@@ -493,7 +492,7 @@ Perl_hv_iternext(pTHX_ HV *hv)
 void
 Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
 {
-    sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0);
+    sv_magic((SV*)hv, (SV*)gv, how, NULL, 0);
 }
 
 #if 0 /* use the macro from hv.h instead */
@@ -510,7 +509,7 @@ AV *
 Perl_av_fake(pTHX_ register I32 size, register SV **strp)
 {
     register SV** ary;
-    register AV * const av = (AV*)NEWSV(9,0);
+    register AV * const av = (AV*)newSV(0);
 
     sv_upgrade((SV *)av, SVt_PVAV);
     Newx(ary,size+1,SV*);
@@ -581,6 +580,7 @@ Perl_do_exec(pTHX_ const char *cmd)
 void
 Perl_do_pipe(pTHX_ SV *sv, GV *rgv, GV *wgv)
 {
+    dVAR;
     register IO *rstio;
     register IO *wstio;
     int fd[2];
@@ -674,21 +674,25 @@ PP(pp_mapstart)
 /* These ops all have the same body as pp_null.  */
 PP(pp_scalar)
 {
+    dVAR;
     return NORMAL;
 }
 
 PP(pp_regcmaybe)
 {
+    dVAR;
     return NORMAL;
 }
 
 PP(pp_lineseq)
 {
+    dVAR;
     return NORMAL;
 }
 
 PP(pp_scope)
 {
+    dVAR;
     return NORMAL;
 }
 
@@ -985,6 +989,56 @@ PP(pp_msgrcv)
     return pp_shmwrite();
 }
 
+PP(pp_syswrite)
+{
+    return pp_send();
+}
+
+PP(pp_semop)
+{
+    return pp_shmwrite();
+}
+
+PP(pp_dor)
+{
+    return pp_defined();
+}
+
+PP(pp_andassign)
+{
+    return pp_and();
+}
+
+PP(pp_orassign)
+{
+    return pp_or();
+}
+
+PP(pp_dorassign)
+{
+    return pp_defined();
+} 
+
+PP(pp_lcfirst)
+{
+    return pp_ucfirst();
+}
+
+PP(pp_slt)
+{
+    return pp_sle();
+}
+
+PP(pp_sgt)
+{
+    return pp_sle();
+}
+
+PP(pp_sge)
+{
+    return pp_sle();
+}
+
 U8 *
 Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
 {