From ac27b0f573239284c298fcf96fb6c966551ef207 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Sat, 18 Nov 2000 20:17:22 +0000 Subject: Lexical use open ... support: add ->cop_io to COP structure in cop.h. Make mg.c and gv.c associate it with ${^OPEN}. Make lib/open.pm set it. Have sv.c, perl.c, pp_ctl.c, op.c manipulate it in a manner manner similar to ->cop_warnings. Have doio.c's do_open9 and pp_sys.c's pp_backticks use it as default and call new PerlIO_apply_layers(). Declare latter in perlio.h and define in perlio.c p4raw-id: //depot/perlio@7740 --- perlio.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perlio.h') diff --git a/perlio.h b/perlio.h index fd9aa3bb0b..91e2efa9b0 100644 --- a/perlio.h +++ b/perlio.h @@ -81,7 +81,7 @@ typedef PerlIOl *PerlIO; #define PERLIO_LAYERS 1 extern void PerlIO_define_layer (PerlIO_funcs *tab); -extern SV * PerlIO_find_layer(char *name, STRLEN len); +extern SV * PerlIO_find_layer (const char *name, STRLEN len); extern PerlIO * PerlIO_push (PerlIO *f,PerlIO_funcs *tab,const char *mode); extern void PerlIO_pop (PerlIO *f); @@ -130,6 +130,8 @@ extern void PerlIO_pop (PerlIO *f); #endif /* ifndef PERLIO_NOT_STDIO */ #endif /* PERLIO_IS_STDIO */ +#define specialCopIO(sv) ((sv) != Nullsv) + /* ----------- fill in things that have not got #define'd ---------- */ #ifndef Fpos_t @@ -306,5 +308,8 @@ extern PerlIO * PerlIO_fdupopen (PerlIO *); #ifndef PerlIO_isutf8 extern int PerlIO_isutf8 (PerlIO *); #endif +#ifndef PerlIO_isutf8 +extern int PerlIO_apply_layers (pTHX_ PerlIO *f,const char *mode, const char *names); +#endif #endif /* _PERLIO_H */ -- cgit v1.2.1