{
dSYS;
FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
- return PerlSIO_get_base(stdio);
+ return (STDCHAR*)PerlSIO_get_base(stdio);
}
Size_t
{
dSYS;
FILE *stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
- return PerlSIO_get_ptr(stdio);
+ return (STDCHAR*)PerlSIO_get_ptr(stdio);
}
SSize_t
dSYS;
if (ptr != NULL) {
#ifdef STDIO_PTR_LVALUE
- PerlSIO_set_ptr(stdio, ptr);
+ PerlSIO_set_ptr(stdio, (void*)ptr); /* LHS STDCHAR* cast non-portable */
#ifdef STDIO_PTR_LVAL_SETS_CNT
if (PerlSIO_get_cnt(stdio) != (cnt)) {
dTHX;
DEBUG_P(PerlIO_printf(Perl_debug_log,
"Screamer: going to getc, ptr=%"UVuf", cnt=%ld\n",
PTR2UV(ptr),(long)cnt));
- PerlIO_set_ptrcnt(fp, ptr, cnt); /* deregisterize cnt and ptr */
+ PerlIO_set_ptrcnt(fp, (STDCHAR*)ptr, cnt); /* deregisterize cnt and ptr */
DEBUG_P(PerlIO_printf(Perl_debug_log,
"Screamer: pre: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n",
PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp),
cnt += shortbuffered;
DEBUG_P(PerlIO_printf(Perl_debug_log,
"Screamer: quitting, ptr=%"UVuf", cnt=%ld\n",PTR2UV(ptr),(long)cnt));
- PerlIO_set_ptrcnt(fp, ptr, cnt); /* put these back or we're in trouble */
+ PerlIO_set_ptrcnt(fp, (STDCHAR*)ptr, cnt); /* put these back or we're in trouble */
DEBUG_P(PerlIO_printf(Perl_debug_log,
"Screamer: end: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n",
PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp),
if (str->str_len <= cnt) /* make sure we have the room */
GROWSTR(&(str->str_ptr), &(str->str_len), cnt+1);
bp = str->str_ptr; /* move these two too to registers */
- ptr = FILE_ptr(fp);
+ ptr = (STDCHAR*)FILE_ptr(fp);
for (;;) {
while (--cnt >= 0) {
if ((*bp++ = *ptr++) == newline) {
}
FILE_cnt(fp) = cnt; /* deregisterize cnt and ptr */
- FILE_ptr(fp) = ptr;
+ FILE_ptr(fp) = (void*)ptr; /* LHS STDCHAR* cast non-portable */
i = getc(fp); /* get more characters */
cnt = FILE_cnt(fp);
ptr = FILE_ptr(fp); /* reregisterize cnt and ptr */
thats_all_folks:
FILE_cnt(fp) = cnt; /* put these back or we're in trouble */
- FILE_ptr(fp) = ptr;
+ FILE_ptr(fp) = (STDCHAR*)ptr;
*bp = '\0';
str->str_cur = bp - str->str_ptr; /* set length */