Changeset 7258c6a in buchla-68k for libcio/blkwr.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/blkwr.c
r0292fbb r7258c6a 24 24 #include "fspars.h" 25 25 26 extern int _nsic(struct fcb *fcp, struct bpb *bpp, char*fp);27 extern int _alcnew(struct fcb *fcp);28 extern int _newcls(void);29 30 extern long_berrno; /* last file system bios error number */26 extern int16_t _nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp); 27 extern int16_t _alcnew(struct fcb *fcp); 28 extern int16_t _newcls(void); 29 30 extern int32_t _berrno; /* last file system bios error number */ 31 31 32 32 extern struct bpb *_thebpb; /* current bios parameter block */ 33 33 34 extern u nsigned_thefat[]; /* current file allocation table */35 36 extern int _fatmod; /* FAT modified flag */34 extern uint16_t _thefat[]; /* current file allocation table */ 35 36 extern int16_t _fatmod; /* FAT modified flag */ 37 37 38 38 #if DEBUGIT … … 44 44 /* WARNING: this ONLY works for 512 byte sectors, 9 sectors per track */ 45 45 46 extern short _b_tbuf[9][256]; /* the track buffer */47 48 extern short _b_trak; /* current track */49 extern short _b_side; /* current side */50 extern short _b_sect; /* current sector */51 extern short _b_tsec; /* base sector for current track */46 extern int16_t _b_tbuf[9][256]; /* the track buffer */ 47 48 extern int16_t _b_trak; /* current track */ 49 extern int16_t _b_side; /* current side */ 50 extern int16_t _b_sect; /* current sector */ 51 extern int16_t _b_tsec; /* base sector for current track */ 52 52 53 53 #endif … … 65 65 */ 66 66 67 long _secwr(char *buf, short rec)67 int32_t _secwr(int8_t *buf, int16_t rec) 68 68 { 69 register short track, side, sector;69 register int16_t track, side, sector; 70 70 71 71 if (_thebpb->dspt NE 9) /* make sure we can do this */ … … 101 101 return(0L); 102 102 103 memcpy(( char*)_b_tbuf[sector], buf, 512); /* update the buffer */103 memcpy((int8_t *)_b_tbuf[sector], buf, 512); /* update the buffer */ 104 104 105 105 #if DEBUGIT … … 124 124 */ 125 125 126 int blkwr(struct fcb *fcp, char *buf, int ns)126 int16_t blkwr(struct fcb *fcp, int8_t *buf, int16_t ns) 127 127 { 128 longrc;129 short clustr;128 int32_t rc; 129 int16_t clustr; 130 130 131 131 while (ns > 0) { /* write a sector at a time */ … … 141 141 #endif 142 142 143 if (rc = BIOS(B_RDWR, 1, buf, 1, ( short)fcp->curdsn, 0)) {143 if (rc = BIOS(B_RDWR, 1, buf, 1, (int16_t)fcp->curdsn, 0)) { 144 144 145 145 #if DEBUGIT … … 154 154 155 155 #if TBUFFER 156 _secwr(buf, ( short)fcp->curdsn);156 _secwr(buf, (int16_t)fcp->curdsn); 157 157 #endif 158 158 … … 193 193 #endif 194 194 195 if (rc = BIOS(B_RDWR, 1, buf, 1, ( short)fcp->curdsn, 0)) {195 if (rc = BIOS(B_RDWR, 1, buf, 1, (int16_t)fcp->curdsn, 0)) { 196 196 197 197 #if DEBUGIT … … 206 206 207 207 #if TBUFFER 208 _secwr(buf, ( short)fcp->curdsn);208 _secwr(buf, (int16_t)fcp->curdsn); 209 209 #endif 210 210 … … 246 246 #endif 247 247 248 if (rc = BIOS(B_RDWR, 1, buf, 1, ( short)fcp->curdsn, 0)) {248 if (rc = BIOS(B_RDWR, 1, buf, 1, (int16_t)fcp->curdsn, 0)) { 249 249 250 250 #if DEBUGIT … … 259 259 260 260 #if TBUFFER 261 _secwr(buf, ( short)fcp->curdsn);261 _secwr(buf, (int16_t)fcp->curdsn); 262 262 #endif 263 263
Note:
See TracChangeset
for help on using the changeset viewer.