summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-10-28 21:09:31 +0000
committerSteve Peters <steve@fisharerojo.org>2005-10-28 21:09:31 +0000
commit7ee2227d70915603ee41631de2babf3bbc5737c4 (patch)
tree46651047245714447d9c72e4ccfc8173989f81c9
parent6ea79e1700a40a6dac73786dfa0a911a945bcffb (diff)
downloadperl-7ee2227d70915603ee41631de2babf3bbc5737c4.tar.gz
Add a new file, mathoms.c, to hold old code kept around for binary
compatability with previous versions of Perl. Change also includes various Makefile changes to compile the new file and link it into libperl. p4raw-id: //depot/perl@25866
-rw-r--r--MANIFEST1
-rw-r--r--Makefile.SH4
-rw-r--r--Makefile.micro5
-rw-r--r--NetWare/Makefile1
-rw-r--r--globals.c23
-rw-r--r--mathoms.c302
-rw-r--r--numeric.c16
-rw-r--r--op.c9
-rw-r--r--perlio.c60
-rw-r--r--plan9/mkfile2
-rw-r--r--sv.c118
-rw-r--r--utf8.c50
-rw-r--r--vms/descrip_mms.template4
-rw-r--r--win32/Makefile1
-rw-r--r--win32/makefile.mk1
-rw-r--r--wince/Makefile.ce1
16 files changed, 328 insertions, 270 deletions
diff --git a/MANIFEST b/MANIFEST
index 95c06fd247..1387853cca 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2238,6 +2238,7 @@ Makefile.SH A script that generates Makefile
malloc.c A version of malloc you might not want
malloc_ctl.h A version of malloc you might not want
MANIFEST This list of files
+mathoms.c A home for binary-compatible code artifacts
META.yml Distribution meta-data in YAML
mg.c Magic code
mg.h Magic header
diff --git a/Makefile.SH b/Makefile.SH
index 06fdd3ba9d..12555da8e3 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -344,13 +344,13 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5)
c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c reentr.c
c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c
c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c
-c4 = globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c pp_sort.c
+c4 = globals.c perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
c = $(c1) $(c2) $(c3) $(c4) miniperlmain.c perlmain.c opmini.c
obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT)
obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
-obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
+obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT)
obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
diff --git a/Makefile.micro b/Makefile.micro
index 735215ba28..d3b273c5ea 100644
--- a/Makefile.micro
+++ b/Makefile.micro
@@ -15,7 +15,7 @@ O = uav$(_O) udeb$(_O) udoio$(_O) udoop$(_O) udump$(_O) \
upp_ctl$(_O) upp_hot$(_O) upp_sys$(_O) upp_pack$(_O) upp_sort$(_O) \
uregcomp$(_O) uregexec$(_O) urun$(_O) \
uscope$(_O) usv$(_O) utaint$(_O) utoke$(_O) \
- unumeric$(_O) ulocale$(_O) \
+ unumeric$(_O) ulocale$(_O) umathoms$(_O) \
uuniversal$(_O) uutf8$(_O) uutil$(_O) uperlapi$(_O) uxsutils$(_O)
microperl: $(O)
@@ -142,6 +142,9 @@ ulocale$(_O): $(HE) locale.c
unumeric$(_O): $(HE) numeric.c
$(CC) -c -o $@ $(CFLAGS) numeric.c
+umathoms$(_O): $(HE) mathoms.c
+ $(CC) -c -o $@ $(CFLAGS) mathoms.c
+
uuniversal$(_O): $(HE) universal.c XSUB.h
$(CC) -c -o $@ $(CFLAGS) universal.c
diff --git a/NetWare/Makefile b/NetWare/Makefile
index adadec4bbe..5d6dcb01d6 100644
--- a/NetWare/Makefile
+++ b/NetWare/Makefile
@@ -704,6 +704,7 @@ MICROCORE_SRC = \
..\gv.c \
..\hv.c \
..\locale.c \
+ ..\mathoms.c \
..\mg.c \
..\numeric.c \
..\op.c \
diff --git a/globals.c b/globals.c
index afb3f25158..22e476754b 100644
--- a/globals.c
+++ b/globals.c
@@ -23,35 +23,12 @@
* functions not used by perl itself, but the functions get
* pulled into the perl executable via the refrerence here.
*
- * Two printf() like functions have also found their way here.
- * Most likely by analogy to the API scheme above (as perl doesn't
- * use them) but they probably belong elsewhere the obvious place
- * being in perlio.c
- *
*/
#include "INTERN.h"
#define PERL_IN_GLOBALS_C
#include "perl.h"
-int
-Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
-{
- dTHXs;
- va_list(arglist);
- va_start(arglist, format);
- return PerlIO_vprintf(stream, format, arglist);
-}
-
-int
-Perl_printf_nocontext(const char *format, ...)
-{
- dTHX;
- va_list(arglist);
- va_start(arglist, format);
- return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
-}
-
#include "perlapi.h" /* bring in PL_force_link_funcs */
/*
diff --git a/mathoms.c b/mathoms.c
new file mode 100644
index 0000000000..064acc7ad7
--- /dev/null
+++ b/mathoms.c
@@ -0,0 +1,302 @@
+/* mathoms.c
+ *
+ * Copyright (C) 2005, 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.
+ *
+ */
+
+/*
+ * "Anything that Hobbits had no immediate use for, but were unwilling to
+ * throw away, they called a mathom. Their dwellings were apt to become
+ * rather crowded with mathoms, and many of the presents that passed from
+ * hand to hand were of that sort."
+ */
+
+/*
+ * This file contains mathoms, various binary artifacts from previous
+ * versions of Perl. For binary compatibility reasons, though, we
+ * cannot completely remove them from the core code.
+ *
+ * SMP - Oct. 24, 2005
+ *
+ */
+
+#include "EXTERN.h"
+#define PERL_IN_MATHOMS_C
+#include "perl.h"
+
+/* ref() is now a macro using Perl_doref;
+ * this version provided for binary compatibility only.
+ */
+OP *
+Perl_ref(pTHX_ OP *o, I32 type)
+{
+ return doref(o, type, TRUE);
+}
+
+/* sv_2iv() is now a macro using Perl_sv_2iv_flags();
+ * this function provided for binary compatibility only
+ */
+
+IV
+Perl_sv_2iv(pTHX_ register SV *sv)
+{
+ return sv_2iv_flags(sv, SV_GMAGIC);
+}
+
+/* sv_2uv() is now a macro using Perl_sv_2uv_flags();
+ * this function provided for binary compatibility only
+ */
+
+UV
+Perl_sv_2uv(pTHX_ register SV *sv)
+{
+ return sv_2uv_flags(sv, SV_GMAGIC);
+}
+
+/* sv_2pv() is now a macro using Perl_sv_2pv_flags();
+ * this function provided for binary compatibility only
+ */
+
+char *
+Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
+{
+ return sv_2pv_flags(sv, lp, SV_GMAGIC);
+}
+
+
+/* sv_setsv() is now a macro using Perl_sv_setsv_flags();
+ * this function provided for binary compatibility only
+ */
+
+void
+Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
+{
+ sv_setsv_flags(dstr, sstr, SV_GMAGIC);
+}
+
+/* sv_catpvn() is now a macro using Perl_sv_catpvn_flags();
+ * this function provided for binary compatibility only
+ */
+
+void
+Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen)
+{
+ sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC);
+}
+
+/* sv_catsv() is now a macro using Perl_sv_catsv_flags();
+ * this function provided for binary compatibility only
+ */
+
+void
+Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr)
+{
+ sv_catsv_flags(dstr, sstr, SV_GMAGIC);
+}
+
+/* sv_pv() is now a macro using SvPV_nolen();
+ * this function provided for binary compatibility only
+ */
+
+char *
+Perl_sv_pv(pTHX_ SV *sv)
+{
+ if (SvPOK(sv))
+ return SvPVX(sv);
+
+ return sv_2pv(sv, 0);
+}
+
+/* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags();
+ * this function provided for binary compatibility only
+ */
+
+char *
+Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp)
+{
+ return sv_pvn_force_flags(sv, lp, SV_GMAGIC);
+}
+
+/* sv_pvbyte () is now a macro using Perl_sv_2pv_flags();
+ * this function provided for binary compatibility only
+ */
+
+char *
+Perl_sv_pvbyte(pTHX_ SV *sv)
+{
+ sv_utf8_downgrade(sv,0);
+ return sv_pv(sv);
+}
+
+/* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags();
+ * this function provided for binary compatibility only
+ */
+
+char *
+Perl_sv_pvutf8(pTHX_ SV *sv)
+{
+ sv_utf8_upgrade(sv);
+ return sv_pv(sv);
+}
+
+/*
+=for apidoc A|U8 *|uvchr_to_utf8|U8 *d|UV uv
+
+Adds the UTF-8 representation of the Native codepoint C<uv> to the end
+of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free
+bytes available. The return value is the pointer to the byte after the
+end of the new character. In other words,
+
+ d = uvchr_to_utf8(d, uv);
+
+is the recommended wide native character-aware way of saying
+
+ *(d++) = uv;
+
+=cut
+*/
+
+/* On ASCII machines this is normally a macro but we want a
+ real function in case XS code wants it
+*/
+#undef Perl_uvchr_to_utf8
+U8 *
+Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
+{
+ return Perl_uvuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), 0);
+}
+
+
+/*
+=for apidoc A|UV|utf8n_to_uvchr|U8 *s|STRLEN curlen|STRLEN *retlen|U32
+flags
+
+Returns the native character value of the first character in the string
+C<s>
+which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
+length, in bytes, of that character.
+
+Allows length and flags to be passed to low level routine.
+
+=cut
+*/
+/* On ASCII machines this is normally a macro but we want
+ a real function in case XS code wants it
+*/
+#undef Perl_utf8n_to_uvchr
+UV
+Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen,
+U32 flags)
+{
+ const UV uv = Perl_utf8n_to_uvuni(aTHX_ s, curlen, retlen, flags);
+ return UNI_TO_NATIVE(uv);
+}
+int
+Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
+{
+ dTHXs;
+ va_list(arglist);
+ va_start(arglist, format);
+ return PerlIO_vprintf(stream, format, arglist);
+}
+
+int
+Perl_printf_nocontext(const char *format, ...)
+{
+ dTHX;
+ va_list(arglist);
+ va_start(arglist, format);
+ return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
+}
+
+#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))
+/*
+ * This hack is to force load of "huge" support from libm.a
+ * So it is in perl for (say) POSIX to use.
+ * Needed for SunOS with Sun's 'acc' for example.
+ */
+NV
+Perl_huge(void)
+{
+# if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
+ return HUGE_VALL;
+# endif
+ return HUGE_VAL;
+}
+#endif
+
+#ifndef USE_SFIO
+int
+perlsio_binmode(FILE *fp, int iotype, int mode)
+{
+ /*
+ * This used to be contents of do_binmode in doio.c
+ */
+#ifdef DOSISH
+# if defined(atarist) || defined(__MINT__)
+ if (!fflush(fp)) {
+ if (mode & O_BINARY)
+ ((FILE *) fp)->_flag |= _IOBIN;
+ else
+ ((FILE *) fp)->_flag &= ~_IOBIN;
+ return 1;
+ }
+ return 0;
+# else
+ dTHX;
+#ifdef NETWARE
+ if (PerlLIO_setmode(fp, mode) != -1) {
+#else
+ if (PerlLIO_setmode(fileno(fp), mode) != -1) {
+#endif
+# if defined(WIN32) && defined(__BORLANDC__)
+ /*
+ * The translation mode of the stream is maintained independent
+of
+ * the translation mode of the fd in the Borland RTL (heavy
+ * digging through their runtime sources reveal). User has to
+set
+ * the mode explicitly for the stream (though they don't
+document
+ * this anywhere). GSAR 97-5-24
+ */
+ fseek(fp, 0L, 0);
+ if (mode & O_BINARY)
+ fp->flags |= _F_BIN;
+ else
+ fp->flags &= ~_F_BIN;
+# endif
+ return 1;
+ }
+ else
+ return 0;
+# endif
+#else
+# if defined(USEMYBINMODE)
+ dTHX;
+ if (my_binmode(fp, iotype, mode) != FALSE)
+ return 1;
+ else
+ return 0;
+# else
+ PERL_UNUSED_ARG(fp);
+ PERL_UNUSED_ARG(iotype);
+ PERL_UNUSED_ARG(mode);
+ return 1;
+# endif
+#endif
+}
+#endif /* sfio */
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
diff --git a/numeric.c b/numeric.c
index 0f353cffe8..77e10e330c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -100,22 +100,6 @@ Perl_cast_uv(pTHX_ NV f)
return f > 0 ? UV_MAX : 0 /* NaN */;
}
-#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))
-/*
- * This hack is to force load of "huge" support from libm.a
- * So it is in perl for (say) POSIX to use.
- * Needed for SunOS with Sun's 'acc' for example.
- */
-NV
-Perl_huge(void)
-{
-# if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
- return HUGE_VALL;
-# endif
- return HUGE_VAL;
-}
-#endif
-
/*
=for apidoc grok_bin
diff --git a/op.c b/op.c
index 97f6a7f7b8..4ec189e960 100644
--- a/op.c
+++ b/op.c
@@ -1515,15 +1515,6 @@ Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref)
}
-/* ref() is now a macro using Perl_doref;
- * this version provided for binary compatibility only.
- */
-OP *
-Perl_ref(pTHX_ OP *o, I32 type)
-{
- return doref(o, type, TRUE);
-}
-
STATIC OP *
S_dup_attrlist(pTHX_ OP *o)
{
diff --git a/perlio.c b/perlio.c
index a6d5d2af73..9a7c0bcef5 100644
--- a/perlio.c
+++ b/perlio.c
@@ -112,66 +112,6 @@ int mkstemp(char*);
else \
SETERRNO(EBADF, SS_IVCHAN)
-#ifndef USE_SFIO
-int
-perlsio_binmode(FILE *fp, int iotype, int mode)
-{
- /*
- * This used to be contents of do_binmode in doio.c
- */
-#ifdef DOSISH
-# if defined(atarist) || defined(__MINT__)
- if (!fflush(fp)) {
- if (mode & O_BINARY)
- ((FILE *) fp)->_flag |= _IOBIN;
- else
- ((FILE *) fp)->_flag &= ~_IOBIN;
- return 1;
- }
- return 0;
-# else
- dTHX;
-#ifdef NETWARE
- if (PerlLIO_setmode(fp, mode) != -1) {
-#else
- if (PerlLIO_setmode(fileno(fp), mode) != -1) {
-#endif
-# if defined(WIN32) && defined(__BORLANDC__)
- /*
- * The translation mode of the stream is maintained independent of
- * the translation mode of the fd in the Borland RTL (heavy
- * digging through their runtime sources reveal). User has to set
- * the mode explicitly for the stream (though they don't document
- * this anywhere). GSAR 97-5-24
- */
- fseek(fp, 0L, 0);
- if (mode & O_BINARY)
- fp->flags |= _F_BIN;
- else
- fp->flags &= ~_F_BIN;
-# endif
- return 1;
- }
- else
- return 0;
-# endif
-#else
-# if defined(USEMYBINMODE)
- dTHX;
- if (my_binmode(fp, iotype, mode) != FALSE)
- return 1;
- else
- return 0;
-# else
- PERL_UNUSED_ARG(fp);
- PERL_UNUSED_ARG(iotype);
- PERL_UNUSED_ARG(mode);
- return 1;
-# endif
-#endif
-}
-#endif /* sfio */
-
#ifndef O_ACCMODE
#define O_ACCMODE 3 /* Assume traditional implementation */
#endif
diff --git a/plan9/mkfile b/plan9/mkfile
index e50f93a4d6..06f0a36661 100644
--- a/plan9/mkfile
+++ b/plan9/mkfile
@@ -35,7 +35,7 @@ ext_xs = IO.xs Socket.xs Opcode.xs dl_none.xs Fcntl.xs POSIX.xs
ext_c = ${ext_xs:%.xs=%.c}
ext_obj = ${ext_xs:%.xs=%.$O}
-obj = av.$O deb.$O doio.$O doop.$O dump.$O globals.$O gv.$O hv.$O locale.$O malloc.$O mg.$O numeric.$O op.$O pad.$O perlapi.$O perlio.$O perly.$O pp.$O pp_ctl.$O pp_hot.$O pp_pack.$O pp_sort.$O pp_sys.$O reentr.$O regcomp.$O regexec.$O run.$O scope.$O sv.$O taint.$O toke.$O universal.$O utf8.$O util.$O xsutils.$O
+obj = av.$O deb.$O doio.$O doop.$O dump.$O globals.$O gv.$O hv.$O locale.$O malloc.$O mathoms.$O mg.$O numeric.$O op.$O pad.$O perlapi.$O perlio.$O perly.$O pp.$O pp_ctl.$O pp_hot.$O pp_pack.$O pp_sort.$O pp_sys.$O reentr.$O regcomp.$O regexec.$O run.$O scope.$O sv.$O taint.$O toke.$O universal.$O utf8.$O util.$O xsutils.$O
OBJS = perl.$O plan9.$O $obj
diff --git a/sv.c b/sv.c
index f18950276e..690dbe50bd 100644
--- a/sv.c
+++ b/sv.c
@@ -2069,16 +2069,6 @@ S_sv_2iuv_non_preserve(pTHX_ register SV *sv, I32 numtype)
}
#endif /* !NV_PRESERVES_UV*/
-/* sv_2iv() is now a macro using Perl_sv_2iv_flags();
- * this function provided for binary compatibility only
- */
-
-IV
-Perl_sv_2iv(pTHX_ register SV *sv)
-{
- return sv_2iv_flags(sv, SV_GMAGIC);
-}
-
/*
=for apidoc sv_2iv_flags
@@ -2975,16 +2965,6 @@ S_uiv_2buf(char *buf, IV iv, UV uv, int is_uv, char **peob)
return ptr;
}
-/* sv_2pv() is now a macro using Perl_sv_2pv_flags();
- * this function provided for binary compatibility only
- */
-
-char *
-Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
-{
- return sv_2pv_flags(sv, lp, SV_GMAGIC);
-}
-
/*
=for apidoc sv_2pv_flags
@@ -3409,23 +3389,24 @@ Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv)
}
/*
-=for apidoc sv_2pvutf8
-
-Return a pointer to the UTF-8-encoded representation of the SV, and set *lp
-to its length. May cause the SV to be upgraded to UTF-8 as a side-effect.
-
-Usually accessed via the C<SvPVutf8> macro.
-
-=cut
-*/
+ * =for apidoc sv_2pvutf8
+ *
+ * Return a pointer to the UTF-8-encoded representation of the SV, and set *lp
+ * to its length. May cause the SV to be upgraded to UTF-8 as a side-effect.
+ *
+ * Usually accessed via the C<SvPVutf8> macro.
+ *
+ * =cut
+ * */
char *
Perl_sv_2pvutf8(pTHX_ register SV *sv, STRLEN *lp)
{
- sv_utf8_upgrade(sv);
- return lp ? SvPV(sv,*lp) : SvPV_nolen(sv);
+ sv_utf8_upgrade(sv);
+ return lp ? SvPV(sv,*lp) : SvPV_nolen(sv);
}
+
/*
=for apidoc sv_2bool
@@ -3674,16 +3655,6 @@ Perl_sv_utf8_decode(pTHX_ register SV *sv)
return TRUE;
}
-/* sv_setsv() is now a macro using Perl_sv_setsv_flags();
- * this function provided for binary compatibility only
- */
-
-void
-Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
-{
- sv_setsv_flags(dstr, sstr, SV_GMAGIC);
-}
-
/*
=for apidoc sv_setsv
@@ -4676,16 +4647,6 @@ Perl_sv_chop(pTHX_ register SV *sv, register const char *ptr)
SvIV_set(sv, SvIVX(sv) + delta);
}
-/* sv_catpvn() is now a macro using Perl_sv_catpvn_flags();
- * this function provided for binary compatibility only
- */
-
-void
-Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen)
-{
- sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC);
-}
-
/*
=for apidoc sv_catpvn
@@ -4737,16 +4698,6 @@ Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRL
SvSETMAGIC(sv);
}
-/* sv_catsv() is now a macro using Perl_sv_catsv_flags();
- * this function provided for binary compatibility only
- */
-
-void
-Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr)
-{
- sv_catsv_flags(dstr, sstr, SV_GMAGIC);
-}
-
/*
=for apidoc sv_catsv
@@ -7821,19 +7772,6 @@ Perl_sv_nv(pTHX_ register SV *sv)
return sv_2nv(sv);
}
-/* sv_pv() is now a macro using SvPV_nolen();
- * this function provided for binary compatibility only
- */
-
-char *
-Perl_sv_pv(pTHX_ SV *sv)
-{
- if (SvPOK(sv))
- return SvPVX(sv);
-
- return sv_2pv(sv, 0);
-}
-
/*
=for apidoc sv_pv
@@ -7868,16 +7806,6 @@ Perl_sv_pvn_nomg(pTHX_ register SV *sv, STRLEN *lp)
return sv_2pv_flags(sv, lp, 0);
}
-/* sv_pvn_force() is now a macro using Perl_sv_pvn_force_flags();
- * this function provided for binary compatibility only
- */
-
-char *
-Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp)
-{
- return sv_pvn_force_flags(sv, lp, SV_GMAGIC);
-}
-
/*
=for apidoc sv_pvn_force
@@ -7946,17 +7874,6 @@ Perl_sv_pvn_force_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags)
return SvPVX_mutable(sv);
}
-/* sv_pvbyte () is now a macro using Perl_sv_2pv_flags();
- * this function provided for binary compatibility only
- */
-
-char *
-Perl_sv_pvbyte(pTHX_ SV *sv)
-{
- sv_utf8_downgrade(sv,0);
- return sv_pv(sv);
-}
-
/*
=for apidoc sv_pvbyte
@@ -7997,17 +7914,6 @@ Perl_sv_pvbyten_force(pTHX_ SV *sv, STRLEN *lp)
return SvPVX(sv);
}
-/* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags();
- * this function provided for binary compatibility only
- */
-
-char *
-Perl_sv_pvutf8(pTHX_ SV *sv)
-{
- sv_utf8_upgrade(sv);
- return sv_pv(sv);
-}
-
/*
=for apidoc sv_pvutf8
diff --git a/utf8.c b/utf8.c
index 743dea4b5c..de9028cc1e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1832,34 +1832,6 @@ Perl_swash_fetch(pTHX_ SV *sv, const U8 *ptr, bool do_utf8)
return 0;
}
-
-/*
-=for apidoc A|U8 *|uvchr_to_utf8|U8 *d|UV uv
-
-Adds the UTF-8 representation of the Native codepoint C<uv> to the end
-of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free
-bytes available. The return value is the pointer to the byte after the
-end of the new character. In other words,
-
- d = uvchr_to_utf8(d, uv);
-
-is the recommended wide native character-aware way of saying
-
- *(d++) = uv;
-
-=cut
-*/
-
-/* On ASCII machines this is normally a macro but we want a
- real function in case XS code wants it
-*/
-#undef Perl_uvchr_to_utf8
-U8 *
-Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
-{
- return Perl_uvuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), 0);
-}
-
U8 *
Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
{
@@ -1867,28 +1839,6 @@ Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
}
/*
-=for apidoc A|UV|utf8n_to_uvchr|U8 *s|STRLEN curlen|STRLEN *retlen|U32 flags
-
-Returns the native character value of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-Allows length and flags to be passed to low level routine.
-
-=cut
-*/
-/* On ASCII machines this is normally a macro but we want
- a real function in case XS code wants it
-*/
-#undef Perl_utf8n_to_uvchr
-UV
-Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
-{
- const UV uv = Perl_utf8n_to_uvuni(aTHX_ s, curlen, retlen, flags);
- return UNI_TO_NATIVE(uv);
-}
-
-/*
=for apidoc A|char *|pv_uni_display|SV *dsv|U8 *spv|STRLEN len|STRLEN pvlim|UV flags
Build to the scalar dsv a displayable version of the string spv,
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 88f3bc1f7e..4e30ae04a5 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -268,13 +268,13 @@ FULLLIBS2 = $(LIBS2)|$(THRLIBS1)|$(THRLIBS2)
#### End of system configuration section. ####
c0 = $(MALLOC_C) $(SOCKC) av.c deb.c doio.c doop.c dump.c globals.c gv.c hv.c
-c1 = mg.c locale.c miniperlmain.c numeric.c op.c pad.c perl.c perlapi.c perlio.c
+c1 = mg.c locale.c mathoms.c miniperlmain.c numeric.c op.c pad.c perl.c perlapi.c perlio.c
c2 = perly.c pp.c pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c reentr.c
c3 = run.c scope.c sv.c taint.c toke.c universal.c utf8.c util.c vms.c xsutils.c
c = $(c0) $(c1) $(c2) $(c3)
obj0 = $(MALLOC_O) $(SOCKO) av$(O) deb$(O) doio$(O) doop$(O) dump$(O)
-obj1 = globals$(O) gv$(O) hv$(O) locale$(O) mg$(O) miniperlmain$(O) numeric$(O) op$(O) pad$(O)
+obj1 = globals$(O) gv$(O) hv$(O) locale$(O) mathoms$(O) mg$(O) miniperlmain$(O) numeric$(O) op$(O) pad$(O)
obj2 = perl$(O) perlapi$(O) perlio$(O) perly$(O) pp$(O) pp_ctl$(O) pp_hot$(O) reentr$(O)
obj3 = pp_pack$(O) pp_sort$(O) pp_sys$(O) regcomp$(O) regexec$(O) run$(O) scope$(O) sv$(O) taint$(O) toke$(O)
obj4 = universal$(O) utf8$(O) util$(O) vms$(O) xsutils$(O)
diff --git a/win32/Makefile b/win32/Makefile
index c4c41d8202..d9be141092 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -590,6 +590,7 @@ MICROCORE_SRC = \
..\gv.c \
..\hv.c \
..\locale.c \
+ ..\mathoms.c \
..\mg.c \
..\numeric.c \
..\op.c \
diff --git a/win32/makefile.mk b/win32/makefile.mk
index c05b4a1f5a..ece395db32 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -760,6 +760,7 @@ MICROCORE_SRC = \
..\gv.c \
..\hv.c \
..\locale.c \
+ ..\mathoms.c \
..\mg.c \
..\numeric.c \
..\op.c \
diff --git a/wince/Makefile.ce b/wince/Makefile.ce
index 842df4a8dc..10b80a245f 100644
--- a/wince/Makefile.ce
+++ b/wince/Makefile.ce
@@ -801,6 +801,7 @@ $(DLLDIR)\globals.obj \
$(DLLDIR)\gv.obj \
$(DLLDIR)\hv.obj \
$(DLLDIR)\locale.obj \
+$(DLLDIR)\mathoms.obj \
$(DLLDIR)\mg.obj \
$(DLLDIR)\numeric.obj \
$(DLLDIR)\op.obj \