Make extended commands return defined flags
Instead of returning 0 or 1, we'll now use ECMD_OK or ECMD_TURN. These have the same meaning as the hardcoded numbers; ECMD_TURN means the command uses a turn. In future, could add eg. a flag denoting "user cancelled command" or "command failed", and should clear eg. the cmdq. Mostly this was simply replacing return values with the defines in the extended commands, so hopefully I didn't break anything.
This commit is contained in:
@@ -46,6 +46,7 @@ static void zerocomp_bputc(int);
|
||||
#define HUP
|
||||
#endif
|
||||
|
||||
/* the #save command */
|
||||
int
|
||||
dosave(void)
|
||||
{
|
||||
@@ -69,7 +70,7 @@ dosave(void)
|
||||
} else
|
||||
(void) doredraw();
|
||||
}
|
||||
return 0;
|
||||
return ECMD_OK;
|
||||
}
|
||||
|
||||
/* returns 1 if save successful */
|
||||
|
||||
Reference in New Issue
Block a user