Changeset 7258c6a in buchla-68k for libcio/blkrd.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/blkrd.c
r0292fbb r7258c6a 40 40 #endif 41 41 42 extern int _nsic(struct fcb *fcp, struct bpb *bpp, char*fp);42 extern int16_t _nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp); 43 43 44 extern long_berrno; /* last file system bios error number */44 extern int32_t _berrno; /* last file system bios error number */ 45 45 46 extern u nsigned_thefat[]; /* current file allocation table */46 extern uint16_t _thefat[]; /* current file allocation table */ 47 47 48 48 extern struct bpb *_thebpb; /* current bios parameter block */ … … 52 52 /* WARNING: this ONLY works for 512 byte sectors, 9 sectors per track */ 53 53 54 extern short _b_tbuf[9][256]; /* the track buffer */54 extern int16_t _b_tbuf[9][256]; /* the track buffer */ 55 55 56 extern short _b_trak; /* current track */57 extern short _b_side; /* current side */58 extern short _b_sect; /* current sector */59 extern short _b_tsec; /* current base sector of current track */56 extern int16_t _b_trak; /* current track */ 57 extern int16_t _b_side; /* current side */ 58 extern int16_t _b_sect; /* current sector */ 59 extern int16_t _b_tsec; /* current base sector of current track */ 60 60 61 61 #endif … … 73 73 */ 74 74 75 long _secrd(char *buf, short rec)75 int32_t _secrd(int8_t *buf, int16_t rec) 76 76 { 77 register short track, side, sector;78 longbrc;77 register int16_t track, side, sector; 78 int32_t brc; 79 79 80 80 if (_thebpb->dspt NE 9) /* make sure we can do this */ … … 118 118 } 119 119 120 memcpy(buf, ( char*)_b_tbuf[sector], 512);120 memcpy(buf, (int8_t *)_b_tbuf[sector], 512); 121 121 return(0L); 122 122 } … … 135 135 */ 136 136 137 int blkrd(struct fcb *fcp, char *buf, int ns)137 int16_t blkrd(struct fcb *fcp, int8_t *buf, int16_t ns) 138 138 { 139 register longbrc; /* bios return code */140 register int rb; /* _nsic return code */139 register int32_t brc; /* bios return code */ 140 register int16_t rb; /* _nsic return code */ 141 141 142 142 if (ns < 0) /* can't read a negative number of sectors */ … … 152 152 153 153 #if TBUFFER 154 if (brc = _secrd(buf, ( short)fcp->curdsn)) {154 if (brc = _secrd(buf, (int16_t)fcp->curdsn)) { 155 155 #else 156 156 if (brc = BIOS(B_RDWR, 0, buf, 1, (short)fcp->curdsn, 0)) {
Note:
See TracChangeset
for help on using the changeset viewer.