Changeset 7258c6a in buchla-68k for libcio/ftell.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/ftell.c
r0292fbb r7258c6a 17 17 #endif 18 18 19 extern int _filecl(struct fcb *fp);19 extern int16_t _filecl(struct fcb *fp); 20 20 21 21 /* … … 25 25 */ 26 26 27 longftell(FILE *fp)27 int32_t ftell(FILE *fp) 28 28 { 29 29 register struct fcb *fcp; 30 30 register struct channel *chp; 31 register longdpos, pos, diff;31 register int32_t dpos, pos, diff; 32 32 33 33 if (fp EQ (FILE *)0L) { /* see if we point at a FILE */ … … 69 69 70 70 if (fp->_flags & _DIRTY) /* adjust for the buffering */ 71 pos = dpos + (diff = (( long)fp->_bp - (long)fp->_buff));71 pos = dpos + (diff = ((int32_t)fp->_bp - (int32_t)fp->_buff)); 72 72 else if (fp->_bp) 73 pos = dpos - (diff = (( long)fp->_bend - (long)fp->_bp));73 pos = dpos - (diff = ((int32_t)fp->_bend - (int32_t)fp->_bp)); 74 74 else 75 75 pos = dpos;
Note:
See TracChangeset
for help on using the changeset viewer.