mirror of
https://github.com/rcornwell/sims.git
synced 2026-04-30 21:40:14 +00:00
B5500: Removed compiler warnings.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#define LINENUM u3
|
||||
#define POS u4
|
||||
#define CMD u5
|
||||
#define LPP u6
|
||||
|
||||
|
||||
/* std devices. data structures
|
||||
@@ -685,7 +686,7 @@ lpr_setlpp(UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
}
|
||||
if (i < 20 || i > 100)
|
||||
return SCPE_ARG;
|
||||
uptr->capac = i;
|
||||
uptr->LPP = i;
|
||||
uptr->LINENUM = 0;
|
||||
return SCPE_OK;
|
||||
}
|
||||
@@ -695,7 +696,7 @@ lpr_getlpp(FILE *st, UNIT *uptr, int32 v, CONST void *desc)
|
||||
{
|
||||
if (uptr == NULL)
|
||||
return SCPE_IERR;
|
||||
fprintf(st, "linesperpage=%d", uptr->capac);
|
||||
fprintf(st, "linesperpage=%d", uptr->LPP);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -752,7 +753,7 @@ print_line(UNIT * uptr, int unit)
|
||||
case 1:
|
||||
case 2: /* Skip to top of form */
|
||||
case 12:
|
||||
uptr->LINENUM = uptr->capac+1;
|
||||
uptr->LINENUM = uptr->LPP+1;
|
||||
break;
|
||||
|
||||
case 3: /* Even lines */
|
||||
@@ -774,13 +775,13 @@ print_line(UNIT * uptr, int unit)
|
||||
}
|
||||
break;
|
||||
case 5: /* Half page */
|
||||
while((uptr->LINENUM != (uptr->capac/2)) ||
|
||||
(uptr->LINENUM != (uptr->capac))) {
|
||||
while((uptr->LINENUM != (uptr->LPP/2)) ||
|
||||
(uptr->LINENUM != (uptr->LPP))) {
|
||||
sim_fwrite("\r", 1, 1, uptr->fileref);
|
||||
sim_fwrite("\n", 1, 1, uptr->fileref);
|
||||
uptr->pos += 2;
|
||||
uptr->LINENUM++;
|
||||
if (((uint32)uptr->LINENUM) > uptr->capac) {
|
||||
if (uptr->LINENUM > uptr->LPP) {
|
||||
uptr->LINENUM = 1;
|
||||
break;
|
||||
}
|
||||
@@ -788,15 +789,15 @@ print_line(UNIT * uptr, int unit)
|
||||
}
|
||||
break;
|
||||
case 6: /* 1/4 Page */
|
||||
while((uptr->LINENUM != (uptr->capac/4)) ||
|
||||
(uptr->LINENUM != (uptr->capac/2)) ||
|
||||
(uptr->LINENUM != (uptr->capac/2+uptr->capac/4)) ||
|
||||
(uptr->LINENUM != (uptr->capac))) {
|
||||
while((uptr->LINENUM != (uptr->LPP/4)) ||
|
||||
(uptr->LINENUM != (uptr->LPP/2)) ||
|
||||
(uptr->LINENUM != (uptr->LPP/2+uptr->LPP/4)) ||
|
||||
(uptr->LINENUM != (uptr->LPP))) {
|
||||
sim_fwrite("\r", 1, 1, uptr->fileref);
|
||||
sim_fwrite("\n", 1, 1, uptr->fileref);
|
||||
uptr->pos += 2;
|
||||
uptr->LINENUM++;
|
||||
if (((uint32)uptr->LINENUM) > uptr->capac) {
|
||||
if (uptr->LINENUM > uptr->LPP) {
|
||||
uptr->LINENUM = 1;
|
||||
break;
|
||||
}
|
||||
@@ -816,7 +817,7 @@ print_line(UNIT * uptr, int unit)
|
||||
}
|
||||
|
||||
|
||||
if (((uint32)uptr->LINENUM) > uptr->capac) {
|
||||
if (uptr->LINENUM > uptr->LPP) {
|
||||
uptr->LINENUM = 1;
|
||||
uptr->CMD |= URCSTA_EOF;
|
||||
sim_fwrite("\f", 1, 1, uptr->fileref);
|
||||
|
||||
Reference in New Issue
Block a user