Changeset 7258c6a in buchla-68k for libcio/fsinit.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/fsinit.c
r0292fbb r7258c6a 14 14 #include "stddefs.h" 15 15 16 extern int _bpbin, _dirin, _fatin, _dirmod, _fatmod;16 extern int16_t _bpbin, _dirin, _fatin, _dirmod, _fatmod; 17 17 18 int _badfd(void);19 int _noper(void);18 int16_t _badfd(void); 19 int16_t _noper(void); 20 20 21 char*Stdbufs; /* buffer chain pointer */21 int8_t *Stdbufs; /* buffer chain pointer */ 22 22 23 charWrkbuf[BPSEC]; /* sector work buffer */23 int8_t Wrkbuf[BPSEC]; /* sector work buffer */ 24 24 25 longStdbuf[MAXDFILE][BUFSIZL]; /* standard buffers */25 int32_t Stdbuf[MAXDFILE][BUFSIZL]; /* standard buffers */ 26 26 27 27 FILE Cbuffs[NSTREAMS]; /* stream file control table */ … … 35 35 /* WARNING: this ONLY works for 512 byte sectors, 9 sectors per track */ 36 36 37 short _b_tbuf[9][256]; /* the track buffer */37 int16_t _b_tbuf[9][256]; /* the track buffer */ 38 38 39 short _b_trak; /* current track */40 short _b_side; /* current side */41 short _b_sect; /* current sector */42 short _b_tsec; /* current base sector of current track */39 int16_t _b_trak; /* current track */ 40 int16_t _b_side; /* current side */ 41 int16_t _b_sect; /* current sector */ 42 int16_t _b_tsec; /* current base sector of current track */ 43 43 44 44 #endif … … 54 54 */ 55 55 56 int _badfd(void)56 int16_t _badfd(void) 57 57 { 58 58 errno = EBADF; /* set bad fd code */ … … 66 66 */ 67 67 68 int _noper(void)68 int16_t _noper(void) 69 69 { 70 70 return(SUCCESS); /* return with a non-error indication */ … … 81 81 */ 82 82 83 void InitCH(struct channel *cp, char rdi, char wri, char ioi, char ski, int (*cfp)(), io_arg charg)83 void InitCH(struct channel *cp, int8_t rdi, int8_t wri, int8_t ioi, int8_t ski, int16_t (*cfp)(), io_arg charg) 84 84 { 85 85 cp->c_read = rdi; … … 97 97 */ 98 98 99 void Init_CB(FILE *fp, char unit, char flags, long *bufad, int bufsize)99 void Init_CB(FILE *fp, int8_t unit, int8_t flags, int32_t *bufad, int16_t bufsize) 100 100 { 101 fp->_bp = ( char*)0L;102 fp->_bend = ( char*)0L;103 fp->_buff = ( char*)bufad;101 fp->_bp = (int8_t *)0L; 102 fp->_bend = (int8_t *)0L; 103 fp->_buff = (int8_t *)bufad; 104 104 fp->_flags = flags; 105 105 fp->_unit = unit; … … 120 120 void InitFS(void) 121 121 { 122 register int i;122 register int16_t i; 123 123 124 124 memset(_fcbtab, 0, sizeof _fcbtab); /* clear fcb table */ 125 125 memsetw(Stdbuf, 0, sizeof Stdbuf / 2); /* clear buffers */ 126 126 127 Init_CB(stdin, _BUSY, 0, ( char*)0L, BUFSIZ); /* stdin */128 Init_CB(stdout, _BUSY, 1, ( char*)0L, 1); /* stdout */129 Init_CB(stderr, _BUSY, 2, ( char*)0L, 1); /* stderr */127 Init_CB(stdin, _BUSY, 0, (int8_t *)0L, BUFSIZ); /* stdin */ 128 Init_CB(stdout, _BUSY, 1, (int8_t *)0L, 1); /* stdout */ 129 Init_CB(stderr, _BUSY, 2, (int8_t *)0L, 1); /* stderr */ 130 130 131 131 for (i = 3; i < NSTREAMS; i++) 132 Init_CB(&Cbuffs[i], 0, 0, ( char*)0L, 0);132 Init_CB(&Cbuffs[i], 0, 0, (int8_t *)0L, 0); 133 133 134 134 Stdbuf[0][0] = 0L; /* initialize the buffer list */ 135 135 136 136 for (i = 1; i < MAXDFILE; i++) 137 Stdbuf[i][0] = ( long)Stdbuf[i-1];137 Stdbuf[i][0] = (int32_t)Stdbuf[i-1]; 138 138 139 139 Stdbufs = Stdbuf[MAXDFILE-1];
Note:
See TracChangeset
for help on using the changeset viewer.