GLK: ALAN3: Fix gcc errors

This commit is contained in:
Paul Gilbert 2019-07-06 16:14:54 -07:00
parent 54b838cd60
commit f282fbb49b
4 changed files with 23 additions and 18 deletions

View File

@ -125,7 +125,7 @@ void GlkIO::setStyle(int style) {
}
void GlkIO::statusLine(CONTEXT) {
uint32 glkWidth;
uint glkWidth;
char line[100];
int pcol = col;

View File

@ -289,10 +289,13 @@ bool isAt(int instance, int other, ATrans trans) {
switch (trans) {
case DIRECT:
return admin[instance].location == other;
case INDIRECT:
if (curr == other)
return FALSE;
curr = admin[curr].location;
// fall through
case TRANSITIVE:
while (curr != 0) {
if (curr == other)
@ -302,6 +305,7 @@ bool isAt(int instance, int other, ATrans trans) {
}
return FALSE;
}
syserr("Unexpected value in switch in isAt() for location");
return FALSE;
} else if (isALocation(other)) {
@ -309,11 +313,10 @@ bool isAt(int instance, int other, ATrans trans) {
switch (trans) {
case DIRECT:
return admin[instance].location == other;
case INDIRECT: {
case INDIRECT:
if (admin[instance].location == other)
return FALSE; /* Directly, so not Indirectly */
/* Fall through to transitive handling of the location */
}
// fall through
case TRANSITIVE: {
int location = locationOf(instance);
int curr = other;

View File

@ -254,6 +254,8 @@ static void depexec(Aword v) {
break;
case I_DEPCASE:
instructionString = "DEPCASE";
// fall through
case I_DEPELSE:
if (lev == 1) {
if (traceInstructionOption)

View File

@ -31,24 +31,24 @@ namespace Alan3 {
typedef int64 Time;
struct Version {
char *string;
int version;
int revision;
int correction;
const char *string;
int version;
int revision;
int correction;
Time time;
const char *state;
const char *state;
};
struct Product {
const char *name;
const char *slogan;
const char *shortHeader;
const char *longHeader;
const char *date;
const char *time;
const char *user;
const char *host;
const char *ostype;
const char *name;
const char *slogan;
const char *shortHeader;
const char *longHeader;
const char *date;
const char *time;
const char *user;
const char *host;
const char *ostype;
Version version;
};