perl.c.ed   [plain text]


/^S_init_perllib(/-1i
#if defined(PERL_PREPENDTOPATH) || defined(PERL_APPENDTOPATH)
#define	_incpushfile(path)					\
{								\
    PerlIO *fp;							\
								\
    if ((fp = PerlIO_open(path, "r")) != NULL) {		\
	char buf[1024];						\
	char *cp;						\
	int res;						\
	SV *sv = newSVpvn("", 0);				\
								\
	while ((res = PerlIO_read(fp, buf, sizeof(buf))) > 0)	\
	    sv_catpvn(sv, buf, res);				\
	PerlIO_close(fp);					\
	if (res == 0 && SvCUR(sv) > 0) {			\
	    cp = SvPV_nolen(sv);				\
	    while ((cp = strchr(cp, '\n')) != NULL)		\
		*cp = ':';					\
	    incpush(SvPV_nolen(sv), TRUE, TRUE, TRUE);		\
	}							\
	SvREFCNT_dec(sv);					\
    }								\
}
#endif /* defined(PERL_PREPENDTOPATH) || defined(PERL_APPENDTOPATH) */

.
/APPLLIB/i
#ifdef PERL_PREPENDTOPATH
    _incpushfile(PERL_PREPENDTOPATH);
#endif /* PERL_PREPENDTOPATH */

.
/incpush("\."/-1i
#ifdef PERL_APPENDTOPATH
    _incpushfile(PERL_APPENDTOPATH);
#endif /* PERL_APPENDTOPATH */

.
w