From 64135693a576eecf63ce6371359fada79f273230 Mon Sep 17 00:00:00 2001 From: Toon Moene Date: Tue, 10 Jul 2001 22:39:40 +0200 Subject: [PATCH] fio.h: Revert type of url from off_t to int. 2001-07-10 Toon Moene * libI77/fio.h: Revert type of url from off_t to int. * libI77/dfe.c (c_dfe): Cast offset expression in FSEEK to off_t. * libI77/due.c (c_due): Ditto. (e_rdue): Ditto. * libI77/ftell_.c (G77_ftell_0): Cast result of FTELL to integer. (G77_fseek_0): Cast offset argument of FSEEK to off_t. From-SVN: r43910 --- libf2c/ChangeLog | 8 ++++++++ libf2c/libI77/dfe.c | 2 +- libf2c/libI77/due.c | 4 ++-- libf2c/libI77/fio.h | 2 +- libf2c/libI77/ftell_.c | 6 +++--- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 906d430b129..35a7b231af1 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,11 @@ +2001-07-10 Toon Moene + + * libI77/fio.h: Revert type of url from off_t to int. + * libI77/dfe.c (c_dfe): Cast offset expression in FSEEK to off_t. + * libI77/due.c (c_due): Ditto. (e_rdue): Ditto. + * libI77/ftell_.c (G77_ftell_0): Cast result of FTELL to integer. + (G77_fseek_0): Cast offset argument of FSEEK to off_t. + 2001-07-07 Toon Moene * libI77/Makefile.in: Update config.h dependencies. diff --git a/libf2c/libI77/dfe.c b/libf2c/libI77/dfe.c index 5290a96b033..18edabc9cd1 100644 --- a/libf2c/libI77/dfe.c +++ b/libf2c/libI77/dfe.c @@ -82,7 +82,7 @@ c_dfe(cilist *a) f__fmtbuf=a->cifmt; if(a->cirec <= 0) err(a->cierr,130,"dfe"); - FSEEK(f__cf,f__curunit->url * (a->cirec-1),SEEK_SET); + FSEEK(f__cf,(off_t)f__curunit->url * (a->cirec-1),SEEK_SET); f__curunit->uend = 0; return(0); } diff --git a/libf2c/libI77/due.c b/libf2c/libI77/due.c index 0315e7d5dc5..f7d6941935e 100644 --- a/libf2c/libI77/due.c +++ b/libf2c/libI77/due.c @@ -25,7 +25,7 @@ c_due(cilist *a) if(f__curunit->ufd==NULL) err(a->cierr,114,"cdue"); if(a->cirec <= 0) err(a->cierr,130,"due"); - FSEEK(f__cf,(a->cirec-1)*f__curunit->url,SEEK_SET); + FSEEK(f__cf,(off_t)(a->cirec-1)*f__curunit->url,SEEK_SET); f__curunit->uend = 0; return(0); } @@ -60,7 +60,7 @@ integer e_rdue(Void) f__init = 1; if(f__curunit->url==1 || f__recpos==f__curunit->url) return(0); - FSEEK(f__cf,(f__curunit->url-f__recpos),SEEK_CUR); + FSEEK(f__cf,(off_t)(f__curunit->url-f__recpos),SEEK_CUR); if(FTELL(f__cf)%f__curunit->url) err(f__elist->cierr,200,"syserr"); return(0); diff --git a/libf2c/libI77/fio.h b/libf2c/libI77/fio.h index aaeb68dbb87..8c6d274fe49 100644 --- a/libf2c/libI77/fio.h +++ b/libf2c/libI77/fio.h @@ -45,7 +45,7 @@ typedef struct long uinode; int udev; #endif - off_t url; /*0=sequential*/ + int url; /*0=sequential*/ flag useek; /*true=can backspace, use dir, ...*/ flag ufmt; flag urw; /* (1 for can read) | (2 for can write) */ diff --git a/libf2c/libI77/ftell_.c b/libf2c/libI77/ftell_.c index d2b2432eb60..250a0cc9bcd 100644 --- a/libf2c/libI77/ftell_.c +++ b/libf2c/libI77/ftell_.c @@ -14,7 +14,7 @@ unit_chk(integer Unit, char *who) return f__units[Unit].ufd; } - off_t + integer #ifdef KR_headers G77_ftell_0 (Unit) integer *Unit; #else @@ -22,7 +22,7 @@ G77_ftell_0 (integer *Unit) #endif { FILE *f; - return (f = unit_chk(*Unit, "ftell")) ? FTELL(f) : -1L; + return (f = unit_chk(*Unit, "ftell")) ? (integer) FTELL(f) : -1L; } integer @@ -43,5 +43,5 @@ G77_fseek_0 (integer *Unit, integer *offset, integer *xwhence) w = wohin[w]; #endif return !(f = unit_chk(*Unit, "fseek")) - || FSEEK(f, *offset, w) ? 1 : 0; + || FSEEK(f, (off_t) *offset, w) ? 1 : 0; } -- 2.30.2