The FORTRANish mess that once was is now mostly idiomatic C. Some issues
remain to be cleaned up:
-* Remaining unstructured gotos in do_command().
-
* The program is still pretty much typeless. Some attempt has been
made to introduce semantic types, but the job is barely started.
/*
- * 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 something much closer
- * to idiomatic C, the following is more appropriate:
- *
- * ESR apologizes for the remaing gotos (now confined to one function
- * in this file - there used to be over 350 of them, *everywhere*).
- * Applying the Structured Program Theorem can be hard.
- *
* Copyright (c) 1977, 2005 by Will Crowther and Don Woods
* Copyright (c) 2017 by Eric S. Raymond
* SPDX-License-Identifier: BSD-2-clause
of Peje Nilsson in restructuring some particularly grotty gotos is
gratefully acknowledged. Petr Voropaev contributed fuzz testing and
code cleanups. Aaron Traas did a lot of painstaking work to improve
-test coverage.
+test coverage, and factored out the last handful of gotos.
== Nomenclature ==
and the choice to refrain will make forward translation into future
languages easier.
-* There are a few gotos left that resist restructuring; all are in the
- principal command interpreter function implementing its state
- machine.
-
* Linked lists (for objects at a location) are implemented using an array
of link indices. This is a surviving FORTRANism that is quite unlike
normal practice in C or any more modern language. We have not tried