From: Gurusamy Sarathy Date: Fri, 29 May 1998 07:22:51 +0000 (+0000) Subject: [asperl] integrate mainline changes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0340efeaf607d2e70273b4fa22e5ee3b358abe8;p=p5sagit%2Fp5-mst-13.2.git [asperl] integrate mainline changes p4raw-id: //depot/asperl@1055 --- d0340efeaf607d2e70273b4fa22e5ee3b358abe8 diff --cc dump.c index b494dbe,9460560..b34b5d4 --- a/dump.c +++ b/dump.c @@@ -15,13 -15,7 +15,9 @@@ #include "EXTERN.h" #include "perl.h" +#ifndef PERL_OBJECT - #ifdef I_STDARG static void dump(char *pat, ...); - #else - static void dump(); - #endif +#endif /* PERL_OBJECT */ void dump_all(void) @@@ -405,33 -399,8 +401,8 @@@ dump_pm(PMOP *pm } - #if !defined(I_STDARG) && !defined(I_VARARGS) - /* VARARGS1 */ - static void dump(arg1,arg2,arg3,arg4,arg5) - char *arg1; - long arg2, arg3, arg4, arg5; - { - #ifdef DEBUGGING - I32 i; - - for (i = dumplvl*4; i; i--) - (void)PerlIO_putc(Perl_debug_log,' '); - PerlIO_printf(Perl_debug_log, arg1, arg2, arg3, arg4, arg5); - #endif /* DEBUGGING */ - } - - #else - - #ifdef I_STDARG -static void +STATIC void dump(char *pat,...) - #else - /*VARARGS0*/ - static void - dump(pat,va_alist) - char *pat; - va_dcl - #endif { #ifdef DEBUGGING I32 i; diff --cc perl.c index e6d8e65,146367d..2006d90 --- a/perl.c +++ b/perl.c @@@ -2866,27 -2813,3 +2866,26 @@@ my_exit_jump(void JMPENV_JUMP(2); } + + +#include "XSUB.h" + +static I32 +#ifdef PERL_OBJECT +read_e_script(CPerlObj *pPerl, int idx, SV *buf_sv, int maxlen) +#else +read_e_script(int idx, SV *buf_sv, int maxlen) +#endif +{ + char *p, *nl; - FILTER_READ(idx+1, buf_sv, maxlen); + p = SvPVX(e_script); + nl = strchr(p, '\n'); + nl = (nl) ? nl+1 : SvEND(e_script); + if (nl-p == 0) + return 0; + sv_catpvn(buf_sv, p, nl-p); + sv_chop(e_script, nl); + return 1; +} + + diff --cc regcomp.c index 6815e13,25e7856..b6d8b01 --- a/regcomp.c +++ b/regcomp.c @@@ -2633,17 -2652,8 +2633,8 @@@ regnext(register regnode *p #endif } - #ifdef I_STDARG -static void +STATIC void re_croak2(const char* pat1,const char* pat2,...) - #else - /*VARARGS0*/ - static void - re_croak2(const char* pat1,const char* pat2, va_alist) - const char* pat1; - const char* pat2; - va_dcl - #endif { va_list args; STRLEN l1 = strlen(pat1); diff --cc run.c index 811e41a,afb7c39..d7133c7 --- a/run.c +++ b/run.c @@@ -16,17 -16,13 +16,18 @@@ * know. Run now! Hope is in speed!" --Gandalf */ +#ifdef PERL_OBJECT +#define CALLOP this->*op +#else +#define CALLOP *op +#endif int - runops_standard(void) { + runops_standard(void) + { dTHR; - while ( op = (*op->op_ppaddr)(ARGS) ) ; + while ( op = (CALLOP->op_ppaddr)(ARGS) ) ; TAINT_NOT; return 0; @@@ -35,10 -33,10 +38,12 @@@ dEXT char **watchaddr = 0; dEXT char *watchok; +#ifndef PERL_OBJECT static void debprof _((OP*o)); +#endif + #endif /* DEBUGGING */ + int runops_debug(void) { @@@ -104,13 -102,13 +109,13 @@@ watch(char **addr watchok = *addr; PerlIO_printf(Perl_debug_log, "WATCHING, %lx is currently %lx\n", (long)watchaddr, (long)watchok); - #endif /* DEBUGGING */ + #endif /* DEBUGGING */ } -#ifdef DEBUGGING -static void +STATIC void debprof(OP *o) { +#ifdef DEBUGGING if (!profiledata) New(000, profiledata, MAXO, U32); ++profiledata[o->op_type]; diff --cc win32/config_H.bc index 2e645a8,540ba95..43755ff --- a/win32/config_H.bc +++ b/win32/config_H.bc @@@ -1743,8 -1772,39 +1772,39 @@@ * in programs that are not prepared to deal with ~ expansion at run-time. */ #define PRIVLIB "c:\\perl5004.5x\\lib" /**/ -#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/ +#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/ + /* SIG_NAME: + * This symbol contains a list of signal names in order of + * signal number. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn, + * etc., where nn is the actual signal number (e.g. NUM37). + * The signal number for sig_name[i] is stored in sig_num[i]. + * The last element is 0 to terminate the list with a NULL. This + * corresponds to the 0 at the end of the sig_num list. + */ + /* SIG_NUM: + * This symbol contains a list of signal numbers, in the same order as the + * SIG_NAME list. It is suitable for static array initialization, as in: + * int sig_num[] = { SIG_NUM }; + * The signals in the list are separated with commas, and the indices + * within that list and the SIG_NAME list match, so it's easy to compute + * the signal name from a number or vice versa at the price of a small + * dynamic linear lookup. + * Duplicates are allowed, but are moved to the end of the list. + * The signal number corresponding to sig_name[i] is sig_number[i]. + * if (i < NSIG) then sig_number[i] == i. + * The last element is 0, corresponding to the 0 at the end of + * the sig_name list. + */ + #define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "USR3", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/ + #define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 18, 0 /**/ + /* SITEARCH: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's diff --cc win32/config_H.gc index 44aafe7,3266ca9..369ac61 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@@ -1743,8 -1772,39 +1772,39 @@@ * in programs that are not prepared to deal with ~ expansion at run-time. */ #define PRIVLIB "c:\\perl5004.5x\\lib" /**/ -#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/ +#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/ + /* SIG_NAME: + * This symbol contains a list of signal names in order of + * signal number. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn, + * etc., where nn is the actual signal number (e.g. NUM37). + * The signal number for sig_name[i] is stored in sig_num[i]. + * The last element is 0 to terminate the list with a NULL. This + * corresponds to the 0 at the end of the sig_num list. + */ + /* SIG_NUM: + * This symbol contains a list of signal numbers, in the same order as the + * SIG_NAME list. It is suitable for static array initialization, as in: + * int sig_num[] = { SIG_NUM }; + * The signals in the list are separated with commas, and the indices + * within that list and the SIG_NAME list match, so it's easy to compute + * the signal name from a number or vice versa at the price of a small + * dynamic linear lookup. + * Duplicates are allowed, but are moved to the end of the list. + * The signal number corresponding to sig_name[i] is sig_number[i]. + * if (i < NSIG) then sig_number[i] == i. + * The last element is 0, corresponding to the 0 at the end of + * the sig_name list. + */ + #define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/ + #define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0 /**/ + /* SITEARCH: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's diff --cc win32/config_H.vc index 07e6e23,9e383f9..4d49a55 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@@ -1743,8 -1772,39 +1772,39 @@@ * in programs that are not prepared to deal with ~ expansion at run-time. */ #define PRIVLIB "c:\\perl5004.5x\\lib" /**/ -#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/ +#define PRIVLIB_EXP (win32_get_stdlib(patchlevel)) /**/ + /* SIG_NAME: + * This symbol contains a list of signal names in order of + * signal number. This is intended + * to be used as a static array initialization, like this: + * char *sig_name[] = { SIG_NAME }; + * The signals in the list are separated with commas, and each signal + * is surrounded by double quotes. There is no leading SIG in the signal + * name, i.e. SIGQUIT is known as "QUIT". + * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn, + * etc., where nn is the actual signal number (e.g. NUM37). + * The signal number for sig_name[i] is stored in sig_num[i]. + * The last element is 0 to terminate the list with a NULL. This + * corresponds to the 0 at the end of the sig_num list. + */ + /* SIG_NUM: + * This symbol contains a list of signal numbers, in the same order as the + * SIG_NAME list. It is suitable for static array initialization, as in: + * int sig_num[] = { SIG_NUM }; + * The signals in the list are separated with commas, and the indices + * within that list and the SIG_NAME list match, so it's easy to compute + * the signal name from a number or vice versa at the price of a small + * dynamic linear lookup. + * Duplicates are allowed, but are moved to the end of the list. + * The signal number corresponding to sig_name[i] is sig_number[i]. + * if (i < NSIG) then sig_number[i] == i. + * The last element is 0, corresponding to the 0 at the end of + * the sig_name list. + */ + #define SIG_NAME "ZERO", "INT", "QUIT", "ILL", "FPE", "KILL", "SEGV", "PIPE", "ALRM", "TERM", "CHLD", "BREAK", "ABRT", "STOP", "CONT", "CLD", 0 /**/ + #define SIG_NUM 0, 2, 3, 4, 8, 9, 11, 13, 14, 15, 20, 21, 22, 23, 25, 20, 0 /**/ + /* SITEARCH: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's