Changeset 7258c6a in buchla-68k for libcio/blkrd.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcio/blkrd.c

    r0292fbb r7258c6a  
    4040#endif
    4141
    42 extern  int     _nsic(struct fcb *fcp, struct bpb *bpp, char *fp);
     42extern  int16_t _nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp);
    4343
    44 extern  long    _berrno;                /* last file system bios error number */
     44extern  int32_t _berrno;                /* last file system bios error number */
    4545
    46 extern  unsigned        _thefat[];              /* current file allocation table */
     46extern  uint16_t        _thefat[];              /* current file allocation table */
    4747
    4848extern  struct  bpb     *_thebpb;       /* current bios parameter block */
     
    5252/* WARNING:  this ONLY works for 512 byte sectors, 9 sectors per track */
    5353
    54 extern  short   _b_tbuf[9][256];        /* the track buffer */
     54extern  int16_t _b_tbuf[9][256];        /* the track buffer */
    5555
    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 */
     56extern  int16_t _b_trak;                /* current track */
     57extern  int16_t _b_side;                /* current side */
     58extern  int16_t _b_sect;                /* current sector */
     59extern  int16_t _b_tsec;                /* current base sector of current track */
    6060
    6161#endif
     
    7373*/
    7474
    75 long _secrd(char *buf, short rec)
     75int32_t _secrd(int8_t *buf, int16_t rec)
    7676{
    77         register short  track, side, sector;
    78         long brc;
     77        register int16_t        track, side, sector;
     78        int32_t brc;
    7979
    8080        if (_thebpb->dspt NE 9)                 /* make sure we can do this */
     
    118118        }
    119119
    120         memcpy(buf, (char *)_b_tbuf[sector], 512);
     120        memcpy(buf, (int8_t *)_b_tbuf[sector], 512);
    121121        return(0L);
    122122}
     
    135135*/
    136136
    137 int blkrd(struct fcb *fcp, char *buf, int ns)
     137int16_t blkrd(struct fcb *fcp, int8_t *buf, int16_t ns)
    138138{
    139         register long   brc;            /* 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 */
    141141
    142142        if (ns < 0)             /* can't read a negative number of sectors */
     
    152152
    153153#if     TBUFFER
    154                 if (brc = _secrd(buf, (short)fcp->curdsn)) {
     154                if (brc = _secrd(buf, (int16_t)fcp->curdsn)) {
    155155#else
    156156                if (brc = BIOS(B_RDWR, 0, buf, 1, (short)fcp->curdsn, 0)) {
Note: See TracChangeset for help on using the changeset viewer.