Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | grumble. | 2012-01-08 | 1 | -1/+2 | ||
| | ||||||
* | Oops, I forgot to actually implement the checksumming code for the new | 2012-01-08 | 3 | -38/+65 | ||
| | | | | savefile format, so any savefiles generated yesterday can be tampered with. Oh well. While here, tidy up the crc code. | |||||
* | Redo save file handling. The old save files were unportable, had no | 2012-01-07 | 1 | -46/+712 | ||
| | | | | | | | | | | | | | | | | | | | | magic number or versioning, relied on random(3) never changing to a different implementation, and were also saving pointers to disk and reading them back again. It *looks* as if the pointers thus loaded were reset before being used, but it's not particularly clear as the main loop of this thing is goto-based FORTRAN translated lightly to C. I've changed the logic to null these pointers instead of saving and loading them, and things seem to still work. The new save files have a header, support versioning, write only sized types in network byte order, and for the toy encryption to discourage cheating do something self-contained instead of using random(3) as a stream cipher. Because between the original import from 4.4 until earlier today trying to save would result in SIGSEGV on most platforms, it's unlikely anyone has a save file, but just in case (since the pointer issue appears to be nonlethal) I've kept compat code for old save files. | |||||
* | Make this not crash on machines that are (a) 64 bit, or (b) have signed | 2012-01-07 | 1 | -9/+4 | ||
| | | | | | | | chars by default (i.e., almost all machines). Makes it possible to save the game. This has been broken since 4.4 and probably ever since the FORTRAN -> C translation. Crash reported by Petri Laakso in private mail. | |||||
* | Per [1] the speed of light in a vaccum is exactly 299792458 m/s. | 2011-12-06 | 1 | -1/+1 | ||
| | | | | | | | | | | | | | | | | | | Per [2] a furlong is 220 yards and a yard is exactly 0.9144 m. Per [3] a fortnight is 14 days. As I didn't find a good authority for what definition of a day a fortnight is measured in, I'll assume here a day is 86400 SI seconds. Thus, the speed of light in a vaccum is approximately 1.80*10^12 furlongs per fortnight. 1.80*10^12 = 299792458*86400*14/(220*0.9144) [1] Resolution 1 of the 17th meeting of the CGPM (1983) http://www.bipm.org/en/CGPM/db/17/1/ [2] Weights and Measures Act 1985 http://www.legislation.gov.uk/ukpga/1985/72 [3] The Concise Oxford Dictionary, 5th Edition, 1964, p. 480 | |||||
* | handle EOF in input | 2011-12-01 | 2 | -7/+12 | ||
| | ||||||
* | grammar fix | 2011-11-19 | 1 | -1/+1 | ||
| | ||||||
* | remove duplicated #defines (in a usually unused part of the code) | 2011-11-09 | 1 | -5/+2 | ||
| | ||||||
* | Use tiparm instead of vtparm. | 2011-10-03 | 3 | -13/+13 | ||
| | ||||||
* | reinstate NULL cast by request, where the NULL was being passed as a vararg | 2011-09-01 | 8 | -26/+26 | ||
| | ||||||
* | NULL does not need a cast | 2011-08-31 | 22 | -78/+77 | ||
| | ||||||
* | No need to cast double to ubig (aka uintmax_t) through int. | 2011-08-30 | 1 | -5/+4 | ||
| | | | | | This change prevents a modulo by zero in a invocation such as: primes 18446744073709551000 18446744073709551615 on a LP64 machine. | |||||
* | Use __dead | 2011-08-29 | 7 | -22/+19 | ||
| | ||||||
* | Mark error() as dead, so that validation for setclipped works correctly. | 2011-08-27 | 1 | -2/+2 | ||
| | ||||||
* | Avoid non-literal format strings. | 2011-08-26 | 2 | -8/+8 | ||
| | ||||||
* | Use __dead and __printflike instead of __attribute__. | 2011-08-26 | 15 | -74/+62 | ||
| | ||||||
* | add printf attributes. | 2011-08-25 | 1 | -4/+4 | ||
| | ||||||
* | Uses non-literal format strings | 2011-08-25 | 1 | -1/+4 | ||
| | ||||||
* | -Wno-shadow is no longer needed for HAVE_PCC, here | 2011-08-24 | 1 | -5/+1 | ||
| | ||||||
* | use const char [] for format. | 2011-08-21 | 1 | -3/+3 | ||
| | ||||||
* | Remove redundant set of prototypes for local functions, exposed by | 2011-08-17 | 1 | -11/+2 | ||
| | | | previous. | |||||
* | Move some things around so declarations appear in a reasonable order. | 2011-08-17 | 1 | -33/+32 | ||
| | ||||||
* | Use __dead instead of __attribute__((__noreturn__)). | 2011-08-16 | 1 | -3/+3 | ||
| | ||||||
* | document non-literal string formats | 2011-08-16 | 1 | -1/+3 | ||
| | ||||||
* | avoid non-literal format string | 2011-08-16 | 1 | -8/+8 | ||
| | ||||||
* | eliminate/document non-literal format strings | 2011-08-16 | 2 | -13/+14 | ||
| | ||||||
* | eliminate non-literal format strings | 2011-08-16 | 3 | -8/+8 | ||
| | ||||||
* | avoid non-literal format strings. | 2011-08-16 | 1 | -7/+4 | ||
| | ||||||
* | kill homebrew error functions | 2011-08-16 | 1 | -43/+24 | ||
| | ||||||
* | document non-literal format strings | 2011-08-16 | 1 | -1/+3 | ||
| | ||||||
* | - document non-literal format strings | 2011-08-16 | 4 | -37/+46 | ||
| | | | - avoid strict aliasing violations, but adding an intermediate function. | |||||
* | Fix up some lint. | 2011-08-07 | 14 | -53/+63 | ||
| | ||||||
* | Fix up still more casts; use NULL instead of (char *)0. | 2011-08-06 | 14 | -55/+55 | ||
| | ||||||
* | Remove *another* set of useless casts. sheesh | 2011-08-06 | 2 | -28/+28 | ||
| | ||||||
* | Remove more silly casts. | 2011-08-06 | 13 | -48/+48 | ||
| | ||||||
* | drop private (and wrong) definition of NULL | 2011-08-06 | 1 | -6/+2 | ||
| | ||||||
* | Use the right type for the malloc wrapper function, and don't cast the | 2011-08-06 | 15 | -49/+48 | ||
| | | | | | | | | return value. (XXX: Except for a pile of allocation macros that produce typed pointer results; there the typechecking of the result assignment is more valuable than the warning if the alloc function isn't declared properly. These macros should go away.) | |||||
* | Remove silly casts. | 2011-08-06 | 5 | -50/+50 | ||
| | ||||||
* | <sys/wait.h> is standard, so just use it instead of fiddling about with | 2011-08-06 | 2 | -23/+4 | ||
| | | | ifdefs for long-dead systems. While here, remove union wait. | |||||
* | abolish references to index/rindex | 2011-08-06 | 2 | -10/+3 | ||
| | ||||||
* | Remove the PYRAMID_BUG code. I don't think Pyramids are coming back, nor | 2011-08-06 | 2 | -12/+3 | ||
| | | | do we care if their compiler vomits trying to decrement a bitfield. | |||||
* | Don't refer to index() in comments; use strchr(). | 2011-08-06 | 1 | -3/+3 | ||
| | ||||||
* | Include system headers before private headers. Avoids various possible | 2011-07-20 | 2 | -8/+8 | ||
| | | | symbol conflicts. | |||||
* | apply some -O0 with gcc 4.5 and vax. | 2011-07-03 | 1 | -1/+5 | ||
| | ||||||
* | use DBL_MIN from <float.h> instead of a hard coded small value (that | 2011-07-03 | 1 | -3/+4 | ||
| | | | becomes zero for vax fp.) | |||||
* | include sys/time.h earlier (rather than implicitly via fcntl.h) so that | 2011-07-02 | 1 | -1/+2 | ||
| | | | | | | | the "u" variable doesn't shadow stuff, found later in time.h inlines. kind of a hack, but i don't want to modify time.h either. XXX: seems kind of annoying | |||||
* | rename a variable from "time" to "stime" (it's a string) | 2011-07-02 | 1 | -5/+5 | ||
| | ||||||
* | apply some -Wno-error and/or -fno-strict-aliasing. | 2011-06-22 | 1 | -1/+6 | ||
| | | | | all of this should be looked at closer, but some of them are not very trivial. | |||||
* | Use consistent sign in compare, the function is only called with | 2011-05-30 | 2 | -5/+5 | ||
| | | | constants as third argument anyway. | |||||
* | Map RCSID to __RCSID | 2011-05-23 | 1 | -4/+3 | ||
| |