This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add perldelta for Indented Here-docs
[perl5.git] / pod / perliol.pod
index ab600bd..55aaf14 100644 (file)
@@ -135,45 +135,51 @@ member of C<PerlIOl>. The functions (methods of the layer "class") are
 fixed, and are defined by the C<PerlIO_funcs> type. They are broadly the
 same as the public C<PerlIO_xxxxx> functions:
 
-  struct _PerlIO_funcs
-  {
-   Size_t              fsize;
-   char *              name;
-   Size_t              size;
-   IV          kind;
-   IV          (*Pushed)(pTHX_ PerlIO *f,const char *mode,SV *arg, PerlIO_funcs *tab);
-   IV          (*Popped)(pTHX_ PerlIO *f);
-   PerlIO *    (*Open)(pTHX_ PerlIO_funcs *tab,
-                       PerlIO_list_t *layers, IV n,
-                       const char *mode,
-                       int fd, int imode, int perm,
-                       PerlIO *old,
-                       int narg, SV **args);
-   IV          (*Binmode)(pTHX_ PerlIO *f);
-   SV *                (*Getarg)(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags)
-   IV          (*Fileno)(pTHX_ PerlIO *f);
-   PerlIO *     (*Dup)(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
-   /* Unix-like functions - cf sfio line disciplines */
-   SSize_t     (*Read)(pTHX_ PerlIO *f, void *vbuf, Size_t count);
-   SSize_t     (*Unread)(pTHX_ PerlIO *f, const void *vbuf, Size_t count);
-   SSize_t     (*Write)(pTHX_ PerlIO *f, const void *vbuf, Size_t count);
-   IV          (*Seek)(pTHX_ PerlIO *f, Off_t offset, int whence);
-   Off_t       (*Tell)(pTHX_ PerlIO *f);
-   IV          (*Close)(pTHX_ PerlIO *f);
-   /* Stdio-like buffered IO functions */
-   IV          (*Flush)(pTHX_ PerlIO *f);
-   IV          (*Fill)(pTHX_ PerlIO *f);
-   IV          (*Eof)(pTHX_ PerlIO *f);
-   IV          (*Error)(pTHX_ PerlIO *f);
-   void                (*Clearerr)(pTHX_ PerlIO *f);
-   void                (*Setlinebuf)(pTHX_ PerlIO *f);
-   /* Perl's snooping functions */
-   STDCHAR *   (*Get_base)(pTHX_ PerlIO *f);
-   Size_t      (*Get_bufsiz)(pTHX_ PerlIO *f);
-   STDCHAR *   (*Get_ptr)(pTHX_ PerlIO *f);
-   SSize_t     (*Get_cnt)(pTHX_ PerlIO *f);
-   void                (*Set_ptrcnt)(pTHX_ PerlIO *f,STDCHAR *ptr,SSize_t cnt);
-  };
+ struct _PerlIO_funcs
+ {
+  Size_t     fsize;
+  char *     name;
+  Size_t     size;
+  IV         kind;
+  IV         (*Pushed)(pTHX_ PerlIO *f,
+                             const char *mode,
+                             SV *arg,
+                             PerlIO_funcs *tab);
+  IV         (*Popped)(pTHX_ PerlIO *f);
+  PerlIO *   (*Open)(pTHX_ PerlIO_funcs *tab,
+                           PerlIO_list_t *layers, IV n,
+                           const char *mode,
+                           int fd, int imode, int perm,
+                           PerlIO *old,
+                           int narg, SV **args);
+  IV         (*Binmode)(pTHX_ PerlIO *f);
+  SV *       (*Getarg)(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags)
+  IV         (*Fileno)(pTHX_ PerlIO *f);
+  PerlIO *   (*Dup)(pTHX_ PerlIO *f,
+                          PerlIO *o,
+                          CLONE_PARAMS *param,
+                          int flags)
+  /* Unix-like functions - cf sfio line disciplines */
+  SSize_t    (*Read)(pTHX_ PerlIO *f, void *vbuf, Size_t count);
+  SSize_t    (*Unread)(pTHX_ PerlIO *f, const void *vbuf, Size_t count);
+  SSize_t    (*Write)(pTHX_ PerlIO *f, const void *vbuf, Size_t count);
+  IV         (*Seek)(pTHX_ PerlIO *f, Off_t offset, int whence);
+  Off_t      (*Tell)(pTHX_ PerlIO *f);
+  IV         (*Close)(pTHX_ PerlIO *f);
+  /* Stdio-like buffered IO functions */
+  IV         (*Flush)(pTHX_ PerlIO *f);
+  IV         (*Fill)(pTHX_ PerlIO *f);
+  IV         (*Eof)(pTHX_ PerlIO *f);
+  IV         (*Error)(pTHX_ PerlIO *f);
+  void       (*Clearerr)(pTHX_ PerlIO *f);
+  void       (*Setlinebuf)(pTHX_ PerlIO *f);
+  /* Perl's snooping functions */
+  STDCHAR *  (*Get_base)(pTHX_ PerlIO *f);
+  Size_t     (*Get_bufsiz)(pTHX_ PerlIO *f);
+  STDCHAR *  (*Get_ptr)(pTHX_ PerlIO *f);
+  SSize_t    (*Get_cnt)(pTHX_ PerlIO *f);
+  void       (*Set_ptrcnt)(pTHX_ PerlIO *f,STDCHAR *ptr,SSize_t cnt);
+ };
 
 The first few members of the struct give a function table size for
 compatibility check "name" for the layer, the  size to C<malloc> for the per-instance data,
@@ -443,7 +449,7 @@ flag is used it's up to the layer to validate the args.
 
 =item Pushed
 
      IV      (*Pushed)(pTHX_ PerlIO *f,const char *mode, SV *arg);
IV    (*Pushed)(pTHX_ PerlIO *f,const char *mode, SV *arg);
 
 The only absolutely mandatory method. Called when the layer is pushed
 onto the stack.  The C<mode> argument may be NULL if this occurs
@@ -837,8 +843,9 @@ The following table summarizes the behaviour:
     Unread      PerlIOBase_unread
     Write       FAILURE
 
- FAILURE        Set errno (to EINVAL in Unixish, to LIB$_INVARG in VMS) and
-                return -1 (for numeric return values) or NULL (for pointers)
+ FAILURE        Set errno (to EINVAL in Unixish, to LIB$_INVARG in VMS)
+                and return -1 (for numeric return values) or NULL (for
+                pointers)
  INHERITED      Inherited from the layer below
  SUCCESS        Return 0 (for numeric return values) or a pointer