From: Eric S. Raymond Date: Sat, 10 Jun 2017 18:55:48 +0000 (-0400) Subject: Documentaion polishing. X-Git-Tag: 1.1~448 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0e160a665eeb24d4614ff14e779d1c13bec3e778;p=open-adventure.git Documentaion polishing. --- diff --git a/TODO b/TODO index 8db67c4..f8dc544 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,15 @@ = Open Adventure TODO = -* Translate the FORTRANish mess to actual C. +The FORTRANish mess that once was is now mostly idiomatic C. Some issues +remain to be cleaned up: + +* The remaining shared globals: K, SPK, WD1, WD1X, WD2, WD2X. These are used + rather promiscuously to pass around information that ought to be function + arguments in a modern language. K and SPK are particular offenders + +* Remaining unstructured gotos in playermove() and do_command(). + +* The way return values from handlers such as 2012 trigger side effects + based on global state such as K and SPK is nasty. diff --git a/main.c b/main.c index cfad7b0..dd29c92 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,16 @@ /* + * There used to be a note that said this: + * * The author - Don Woods - apologises for the style of the code; it * is a result of running the original Fortran IV source through a * home-brew Fortran-to-C converter.) + * + * Now that the code has been restructured into idiomatic C, the following + * is more appropriate: + * + * ESR apologizes for the remaing gotos (now confined to two functions in this + * file - they used to be *everywhere*), and the offensive globals. Applying + * the Structured Program Theorem can be hard. */ #include #include