From: Jan Dubois Date: Thu, 22 Apr 2010 01:55:01 +0000 (-0700) Subject: Update PerlStdIOGets() signature X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d6551238e4ff36bc7a56635f493568a7b3ec034;p=p5sagit%2Fp5-mst-13.2.git Update PerlStdIOGets() signature Brings it in line with the rest of the PerlStdIO* functions that accept parameters in the same order as the corresponding PerlSIO_* macros. See also commit ecc880cc. --- diff --git a/iperlsys.h b/iperlsys.h index 1016fe5..4b02cb5 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -77,7 +77,7 @@ typedef STDCHAR* (*LPGetBase)(struct IPerlStdIO*, FILE*); typedef int (*LPGetBufsiz)(struct IPerlStdIO*, FILE*); typedef int (*LPGetCnt)(struct IPerlStdIO*, FILE*); typedef STDCHAR* (*LPGetPtr)(struct IPerlStdIO*, FILE*); -typedef char* (*LPGets)(struct IPerlStdIO*, FILE*, char*, int); +typedef char* (*LPGets)(struct IPerlStdIO*, char*, int, FILE*); typedef int (*LPPutc)(struct IPerlStdIO*, int, FILE*); typedef int (*LPPuts)(struct IPerlStdIO*, const char *, FILE*); typedef int (*LPFlush)(struct IPerlStdIO*, FILE*); @@ -231,8 +231,8 @@ struct IPerlStdIOInfo (*PL_StdIO->pPuts)(PL_StdIO, (s),(f)) #define PerlSIO_fflush(f) \ (*PL_StdIO->pFlush)(PL_StdIO, (f)) -#define PerlSIO_fgets(s, n, fp) \ - (*PL_StdIO->pGets)(PL_StdIO, (fp), s, n) +#define PerlSIO_fgets(s, n, f) \ + (*PL_StdIO->pGets)(PL_StdIO, s, n, (f)) #define PerlSIO_ungetc(c,f) \ (*PL_StdIO->pUngetc)(PL_StdIO, (c),(f)) #define PerlSIO_fileno(f) \ @@ -314,7 +314,7 @@ struct IPerlStdIOInfo #define PerlSIO_fputc(c,f) fputc(c,f) #define PerlSIO_fputs(s,f) fputs(s,f) #define PerlSIO_fflush(f) Fflush(f) -#define PerlSIO_fgets(s, n, fp) fgets(s,n,fp) +#define PerlSIO_fgets(s, n, f) fgets(s,n,f) #if defined(VMS) && defined(__DECC) /* Unusual definition of ungetc() here to accomodate fast_sv_gets()' * belief that it can mix getc/ungetc with reads from stdio buffer */ diff --git a/win32/perlhost.h b/win32/perlhost.h index 1cc7c1f..651a367 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -663,7 +663,7 @@ PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf) } char* -PerlStdIOGets(struct IPerlStdIO* piPerl, FILE* pf, char* s, int n) +PerlStdIOGets(struct IPerlStdIO* piPerl, char* s, int n, FILE* pf) { return win32_fgets(s, n, pf); }