Commit 64135693 by Toon Moene Committed by Toon Moene

fio.h: Revert type of url from off_t to int.

2001-07-10  Toon Moene  <toon@moene.indiv.nluug.nl>

	* 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
parent d7624dc0
2001-07-10 Toon Moene <toon@moene.indiv.nluug.nl>
* 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 <toon@moene.indiv.nluug.nl>
* libI77/Makefile.in: Update config.h dependencies.
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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) */
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment