Changeset e102943 in buchla-68k
- Timestamp:
- 07/15/2017 11:33:07 AM (7 years ago)
- Branches:
- master
- Children:
- d18a473
- Parents:
- dade7a0
- Location:
- iolib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
iolib/dofmt.c
rdade7a0 re102943 32 32 #define tonum(x) ((x)-'0') 33 33 #define todigit(x) ((x)+'0') 34 #define max(a,b) ((a)>(b)?(a):(b))35 #define min(a,b) ((a)<(b)?(a):(b))36 34 37 35 int32_t dofmt_(int16_t (*putsub)(int16_t c), int8_t *format, va_list args) … … 71 69 ; 72 70 73 if ( n = (int32_t)format - (int32_t)bp) {71 if ((n = (int32_t)format - (int32_t)bp)) { 74 72 75 73 count += n; … … 168 166 fixed: 169 167 170 if (prec < 0) 168 if (prec < 0) { 171 169 if (flzero AND width > 0) 172 170 prec = width; 173 171 else 174 172 prec = 1; 173 } 175 174 176 175 if (length) … … 265 264 266 265 default: 267 buf[0] = fcode;266 buf[0] = (int8_t)fcode; 268 267 goto c_merge; 269 268 270 269 case 'c': 271 buf[0] = va_arg(args, int16_t);270 buf[0] = (int8_t)va_arg(args, int16_t); 272 271 273 272 c_merge: -
iolib/mdump.c
rdade7a0 re102943 50 50 */ 51 51 52 void mdump(int8_t * begin, int8_t *end, int32_t start)52 void mdump(int8_t *from, int8_t *to, int32_t start) 53 53 { 54 54 int32_t i, ii; … … 60 60 j = 0; 61 61 62 if ( begin GT end)62 if (from GT to) 63 63 return; 64 64 65 while ( begin LE end) {65 while (from LE to) { 66 66 67 c = * begin++;67 c = *from++; 68 68 69 69 if (! (i % PERLINE)) { … … 86 86 } 87 87 88 if ( k = (i % PERLINE)) {88 if ((k = (int16_t)(i % PERLINE))) { 89 89 90 90 k = PERLINE - k; -
iolib/rawio.c
rdade7a0 re102943 75 75 for (i = 0; i < nb; i++) { /* main read loop */ 76 76 77 c = BIOS(B_GETC, unit) & 0xFF; /* get a byte from the unit */77 c = (int8_t)(BIOS(B_GETC, unit) & 0xFF); /* get a byte from the unit */ 78 78 79 79 *bp++ = c; /* add it to the buffer */ … … 104 104 while (bc LT nb) { 105 105 106 c = BIOS(B_GETC, unit) & 0xFF;106 c = (int8_t)(BIOS(B_GETC, unit) & 0xFF); 107 107 108 108 switch (c) { … … 163 163 while (bc LT nb) { 164 164 165 c = BIOS(B_GETC, unit) & 0xFF;165 c = (int8_t)(BIOS(B_GETC, unit) & 0xFF); 166 166 167 167 switch (c) { … … 198 198 bp = buf; /* setup buffer pointer */ 199 199 200 while ( c = *bp++) /* send the string, a byte at a time */200 while ((c = *bp++)) /* send the string, a byte at a time */ 201 201 BIOS(B_PUTC, unit, c); 202 202 } -
iolib/sprintf.c
rdade7a0 re102943 38 38 static int16_t spsub(int16_t c) 39 39 { 40 return((*buff++ = c) & 0xFF);40 return((*buff++ = (int8_t)c) & 0xFF); 41 41 }
Note:
See TracChangeset
for help on using the changeset viewer.