diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-17 13:12:31 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-17 13:12:31 +0000 |
commit | 14a5cf38cb6bde23aa6e81a63d9807561599a360 (patch) | |
tree | 8bb14484460008d964df1dfa6541cafe0f4b50f7 /perlio.h | |
parent | 9e371ce52563b387ab3a179d3e9ef29da90acdf1 (diff) | |
download | perl-14a5cf38cb6bde23aa6e81a63d9807561599a360.tar.gz |
Reindent the PerlIO files (suggested by NI-S), used
indent -kr -nce -psl -sc -TSV -TAV -THV -TGV -TIV -TUV -TNV -TMAGIC -TFILE -TPerlIO -TPerlIO_list_t -TPerlIO_funcs -TPerlIO_pair_t
(GNU indent). Note that wholesale re-indenting might
be nice, but that would break nice formatting/alignment
of assignments, equality testing, and complex boolean
expressions with lots of &s and |s.
p4raw-id: //depot/perl@12052
Diffstat (limited to 'perlio.h')
-rw-r--r-- | perlio.h | 151 |
1 files changed, 77 insertions, 74 deletions
@@ -70,12 +70,12 @@ #ifdef PERLIO_IS_STDIO /* #define PerlIO_xxxx() as equivalent stdio function */ #include "perlsdio.h" -#else /* PERLIO_IS_STDIO */ +#else /* PERLIO_IS_STDIO */ #ifdef USE_SFIO /* #define PerlIO_xxxx() as equivalent sfio function */ #include "perlsfio.h" -#endif /* USE_SFIO */ -#endif /* PERLIO_IS_STDIO */ +#endif /* USE_SFIO */ +#endif /* PERLIO_IS_STDIO */ #ifndef PerlIO /* ----------- PerlIO implementation ---------- */ @@ -87,12 +87,14 @@ typedef PerlIOl *PerlIO; #define PerlIO PerlIO #define PERLIO_LAYERS 1 -extern void PerlIO_define_layer (pTHX_ PerlIO_funcs *tab); -extern PerlIO_funcs *PerlIO_find_layer (pTHX_ const char *name, STRLEN len, int load); -extern PerlIO * PerlIO_push (pTHX_ PerlIO *f,PerlIO_funcs *tab,const char *mode,SV *arg); -extern void PerlIO_pop (pTHX_ PerlIO *f); +extern void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab); +extern PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name, STRLEN len, + int load); +extern PerlIO *PerlIO_push(pTHX_ PerlIO *f, PerlIO_funcs *tab, + const char *mode, SV *arg); +extern void PerlIO_pop(pTHX_ PerlIO *f); -#endif /* PerlIO */ +#endif /* PerlIO */ /* ----------- End of implementation choices ---------- */ @@ -126,20 +128,20 @@ extern void PerlIO_pop (pTHX_ PerlIO *f); * Case 1: Strong denial of stdio - make all stdio calls (we can think of) errors */ #include "nostdio.h" -#else /* if PERLIO_NOT_STDIO */ +#else /* if PERLIO_NOT_STDIO */ /* * PERLIO_NOT_STDIO #define'd as 0 * Case 2: Declares that both PerlIO and stdio can be used */ -#endif /* if PERLIO_NOT_STDIO */ -#else /* ifdef PERLIO_NOT_STDIO */ +#endif /* if PERLIO_NOT_STDIO */ +#else /* ifdef PERLIO_NOT_STDIO */ /* * PERLIO_NOT_STDIO not defined * Case 3: Try and fake stdio calls as PerlIO calls */ #include "fakesdio.h" -#endif /* ifndef PERLIO_NOT_STDIO */ -#endif /* PERLIO_IS_STDIO */ +#endif /* ifndef PERLIO_NOT_STDIO */ +#endif /* PERLIO_IS_STDIO */ #define specialCopIO(sv) ((sv) != Nullsv) @@ -173,171 +175,173 @@ extern void PerlIO_pop (pTHX_ PerlIO *f); /* --------------------- Now prototypes for functions --------------- */ START_EXTERN_C - #ifndef NEXT30_NO_ATTRIBUTE -#ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */ -#ifdef __attribute__ /* Avoid possible redefinition errors */ +#ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */ +#ifdef __attribute__ /* Avoid possible redefinition errors */ #undef __attribute__ #endif #define __attribute__(attr) #endif #endif - #ifndef PerlIO_init -extern void PerlIO_init (void); +extern void PerlIO_init(void); #endif #ifndef PerlIO_stdoutf -extern int PerlIO_stdoutf (const char *,...) - __attribute__((__format__ (__printf__, 1, 2))); +extern int PerlIO_stdoutf(const char *, ...) + __attribute__ ((__format__(__printf__, 1, 2))); #endif #ifndef PerlIO_puts -extern int PerlIO_puts (PerlIO *,const char *); +extern int PerlIO_puts(PerlIO *, const char *); #endif #ifndef PerlIO_open -extern PerlIO * PerlIO_open (const char *,const char *); +extern PerlIO *PerlIO_open(const char *, const char *); #endif #ifndef PerlIO_openn -extern PerlIO * PerlIO_openn (pTHX_ const char *layers, const char *mode,int fd,int imode,int perm,PerlIO *old,int narg,SV **arg); +extern PerlIO *PerlIO_openn(pTHX_ const char *layers, const char *mode, + int fd, int imode, int perm, PerlIO *old, + int narg, SV **arg); #endif #ifndef PerlIO_close -extern int PerlIO_close (PerlIO *); +extern int PerlIO_close(PerlIO *); #endif #ifndef PerlIO_eof -extern int PerlIO_eof (PerlIO *); +extern int PerlIO_eof(PerlIO *); #endif #ifndef PerlIO_error -extern int PerlIO_error (PerlIO *); +extern int PerlIO_error(PerlIO *); #endif #ifndef PerlIO_clearerr -extern void PerlIO_clearerr (PerlIO *); +extern void PerlIO_clearerr(PerlIO *); #endif #ifndef PerlIO_getc -extern int PerlIO_getc (PerlIO *); +extern int PerlIO_getc(PerlIO *); #endif #ifndef PerlIO_putc -extern int PerlIO_putc (PerlIO *,int); +extern int PerlIO_putc(PerlIO *, int); #endif #ifndef PerlIO_flush -extern int PerlIO_flush (PerlIO *); +extern int PerlIO_flush(PerlIO *); #endif #ifndef PerlIO_ungetc -extern int PerlIO_ungetc (PerlIO *,int); +extern int PerlIO_ungetc(PerlIO *, int); #endif #ifndef PerlIO_fileno -extern int PerlIO_fileno (PerlIO *); +extern int PerlIO_fileno(PerlIO *); #endif #ifndef PerlIO_fdopen -extern PerlIO * PerlIO_fdopen (int, const char *); +extern PerlIO *PerlIO_fdopen(int, const char *); #endif #ifndef PerlIO_importFILE -extern PerlIO * PerlIO_importFILE (FILE *,int); +extern PerlIO *PerlIO_importFILE(FILE *, int); #endif #ifndef PerlIO_exportFILE -extern FILE * PerlIO_exportFILE (PerlIO *,int); +extern FILE *PerlIO_exportFILE(PerlIO *, int); #endif #ifndef PerlIO_findFILE -extern FILE * PerlIO_findFILE (PerlIO *); +extern FILE *PerlIO_findFILE(PerlIO *); #endif #ifndef PerlIO_releaseFILE -extern void PerlIO_releaseFILE (PerlIO *,FILE *); +extern void PerlIO_releaseFILE(PerlIO *, FILE *); #endif #ifndef PerlIO_read -extern SSize_t PerlIO_read (PerlIO *,void *,Size_t); +extern SSize_t PerlIO_read(PerlIO *, void *, Size_t); #endif #ifndef PerlIO_unread -extern SSize_t PerlIO_unread (PerlIO *,const void *,Size_t); +extern SSize_t PerlIO_unread(PerlIO *, const void *, Size_t); #endif #ifndef PerlIO_write -extern SSize_t PerlIO_write (PerlIO *,const void *,Size_t); +extern SSize_t PerlIO_write(PerlIO *, const void *, Size_t); #endif #ifndef PerlIO_setlinebuf -extern void PerlIO_setlinebuf (PerlIO *); +extern void PerlIO_setlinebuf(PerlIO *); #endif #ifndef PerlIO_printf -extern int PerlIO_printf (PerlIO *, const char *,...) - __attribute__((__format__ (__printf__, 2, 3))); +extern int PerlIO_printf(PerlIO *, const char *, ...) + __attribute__ ((__format__(__printf__, 2, 3))); #endif #ifndef PerlIO_sprintf -extern int PerlIO_sprintf (char *, int, const char *,...) - __attribute__((__format__ (__printf__, 3, 4))); +extern int PerlIO_sprintf(char *, int, const char *, ...) + __attribute__ ((__format__(__printf__, 3, 4))); #endif #ifndef PerlIO_vprintf -extern int PerlIO_vprintf (PerlIO *, const char *, va_list); +extern int PerlIO_vprintf(PerlIO *, const char *, va_list); #endif #ifndef PerlIO_tell -extern Off_t PerlIO_tell (PerlIO *); +extern Off_t PerlIO_tell(PerlIO *); #endif #ifndef PerlIO_seek -extern int PerlIO_seek (PerlIO *, Off_t, int); +extern int PerlIO_seek(PerlIO *, Off_t, int); #endif #ifndef PerlIO_rewind -extern void PerlIO_rewind (PerlIO *); +extern void PerlIO_rewind(PerlIO *); #endif #ifndef PerlIO_has_base -extern int PerlIO_has_base (PerlIO *); +extern int PerlIO_has_base(PerlIO *); #endif #ifndef PerlIO_has_cntptr -extern int PerlIO_has_cntptr (PerlIO *); +extern int PerlIO_has_cntptr(PerlIO *); #endif #ifndef PerlIO_fast_gets -extern int PerlIO_fast_gets (PerlIO *); +extern int PerlIO_fast_gets(PerlIO *); #endif #ifndef PerlIO_canset_cnt -extern int PerlIO_canset_cnt (PerlIO *); +extern int PerlIO_canset_cnt(PerlIO *); #endif #ifndef PerlIO_get_ptr -extern STDCHAR * PerlIO_get_ptr (PerlIO *); +extern STDCHAR *PerlIO_get_ptr(PerlIO *); #endif #ifndef PerlIO_get_cnt -extern int PerlIO_get_cnt (PerlIO *); +extern int PerlIO_get_cnt(PerlIO *); #endif #ifndef PerlIO_set_cnt -extern void PerlIO_set_cnt (PerlIO *,int); +extern void PerlIO_set_cnt(PerlIO *, int); #endif #ifndef PerlIO_set_ptrcnt -extern void PerlIO_set_ptrcnt (PerlIO *,STDCHAR *,int); +extern void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, int); #endif #ifndef PerlIO_get_base -extern STDCHAR * PerlIO_get_base (PerlIO *); +extern STDCHAR *PerlIO_get_base(PerlIO *); #endif #ifndef PerlIO_get_bufsiz -extern int PerlIO_get_bufsiz (PerlIO *); +extern int PerlIO_get_bufsiz(PerlIO *); #endif #ifndef PerlIO_tmpfile -extern PerlIO * PerlIO_tmpfile (void); +extern PerlIO *PerlIO_tmpfile(void); #endif #ifndef PerlIO_stdin -extern PerlIO * PerlIO_stdin (void); +extern PerlIO *PerlIO_stdin(void); #endif #ifndef PerlIO_stdout -extern PerlIO * PerlIO_stdout (void); +extern PerlIO *PerlIO_stdout(void); #endif #ifndef PerlIO_stderr -extern PerlIO * PerlIO_stderr (void); +extern PerlIO *PerlIO_stderr(void); #endif #ifndef PerlIO_getpos -extern int PerlIO_getpos (PerlIO *,SV *); +extern int PerlIO_getpos(PerlIO *, SV *); #endif #ifndef PerlIO_setpos -extern int PerlIO_setpos (PerlIO *,SV *); +extern int PerlIO_setpos(PerlIO *, SV *); #endif #ifndef PerlIO_fdupopen -extern PerlIO * PerlIO_fdupopen (pTHX_ PerlIO *); +extern PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *); #endif #if !defined(PerlIO_modestr) && !defined(PERLIO_IS_STDIO) -extern char *PerlIO_modestr (PerlIO *,char *buf); +extern char *PerlIO_modestr(PerlIO *, char *buf); #endif #ifndef PerlIO_isutf8 -extern int PerlIO_isutf8 (PerlIO *); +extern int PerlIO_isutf8(PerlIO *); #endif #ifndef PerlIO_apply_layers -extern int PerlIO_apply_layers (pTHX_ PerlIO *f, const char *mode, const char *names); +extern int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, + const char *names); #endif #ifndef PerlIO_binmode -extern int PerlIO_binmode (pTHX_ PerlIO *f, int iotype, int omode, const char *names); +extern int PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int omode, + const char *names); #endif #ifndef PerlIO_getname -extern char * PerlIO_getname (PerlIO *, char *); +extern char *PerlIO_getname(PerlIO *, char *); #endif extern void PerlIO_destruct(pTHX); @@ -346,10 +350,9 @@ extern void PerlIO_destruct(pTHX); extern void PerlIO_cleanup(void); -extern void PerlIO_debug(const char *fmt,...); +extern void PerlIO_debug(const char *fmt, ...); #endif END_EXTERN_C - -#endif /* _PERLIO_H */ +#endif /* _PERLIO_H */ |