Skip to content

Commit 6224745

Browse files
committed
Rename LINC tape GROUP variable for Windows
Windows SDK headers define GROUP as a typedef, which conflicts with the file-scope GROUP variable in the LINC tape simulator. Rename the private counter to TAPE_GROUP to avoid the namespace collision without changing tape group-transfer behavior.
1 parent 3972b0e commit 6224745

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

simulators/linc/linc_tape.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define DBG_WRITE 0010
4545
#define DBG_POS 0020
4646

47-
static uint16 GROUP;
47+
static uint16 TAPE_GROUP;
4848
static int16 CURRENT_BLOCK;
4949
static int16 WANTED_BLOCK;
5050

@@ -113,15 +113,15 @@ void tape_op(void)
113113
switch (C & 7) {
114114
case RDC: case RDE: case WRC: case WRI: case CHK:
115115
S = 256 * (B >> 9);
116-
GROUP = 0;
116+
TAPE_GROUP = 0;
117117
sim_debug(DBG, &tape_dev, "Single tranfer: S=%04o, BN=%03o\n",
118118
S, WANTED_BLOCK);
119119
break;
120120
case RCG: case WCG:
121121
S = 256 * (B & 7);
122-
GROUP = B >> 9;
122+
TAPE_GROUP = B >> 9;
123123
sim_debug(DBG, &tape_dev, "Group transfer: S=%04o, BN=%03o/%o\n",
124-
S, WANTED_BLOCK, GROUP+1);
124+
S, WANTED_BLOCK, TAPE_GROUP+1);
125125
break;
126126
case MTB:
127127
sim_debug(DBG, &tape_dev, "Move towards block %03o\n", WANTED_BLOCK);
@@ -232,12 +232,12 @@ static void tape_done(UNIT *uptr)
232232
paused = 0;
233233
break;
234234
case RCG: case WCG:
235-
if (GROUP == 0) {
235+
if (TAPE_GROUP == 0) {
236236
sim_debug(DBG, &tape_dev, "Done with group\n");
237237
paused = 0;
238238
} else {
239-
sim_debug(DBG, &tape_dev, "Blocks left in group: %d\n", GROUP);
240-
GROUP--;
239+
sim_debug(DBG, &tape_dev, "Blocks left in group: %d\n", TAPE_GROUP);
240+
TAPE_GROUP--;
241241
}
242242
WANTED_BLOCK = (WANTED_BLOCK + 1) & TMASK;
243243
break;

0 commit comments

Comments
 (0)