Home | History | Annotate | Download | only in caesar
History log of /src/games/caesar/caesar.c
RevisionDateAuthorComments
 1.25  18-Sep-2025  rillig caesar: remove lint boilerplate

Lint nowadays knows __dead functions, so it no longer needs the
NOTREACHED comments.
 1.24  16-Nov-2021  rillig games/caesar: fix error handling for I/O

The '!= 0' is needed for an upcoming fix to lint's strict bool mode.

The additional text in the error messages is necessary because errx only
outputs the given string, with no details from errno. Since ferror does
not set errno, no such details are available, so just output a generic
message, which is still better than just "caesar: <stdout>".
 1.23  01-May-2021  rillig caesar: WARNS=6, strict bool mode

The rotation is validated to be nonnegative, therefore use unsigned int
for it.
 1.22  20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
 1.21  19-Nov-2005  christos branches: 1.21.20;
Simplify error checking.
 1.20  19-Nov-2005  rillig Replaced one instance of err() with errx(), as the value of errno might not
be correct at that time.
 1.19  18-Oct-2005  rillig Removed the unnecessary #include <ctype.h>.
 1.18  08-Oct-2005  rillig Added an empty line to conform to KNF.
 1.17  22-Jul-2005  rillig Aligned the usage message from the program with the one mentioned in the
man page.
 1.16  22-Jul-2005  rillig - caesar(6) is not a SETGIDGAME, so we don't need to revoke any privileges.
- replaced direct POSIX read/write with stdio, which made the code simpler.
- added even more error checking.
- restructured the code to make each function fit on one screen
(well, except one).
- now the code reflects the intended purpose of the program.
- return 0 instead of EXIT_FAILURE on success.
 1.15  23-May-2005  rillig * fixed <ctype> bugs
* removed ASCII dependency
* added input data validation
* added bounds checking
* added error checking
* handle short reads (from pipes or sockets) correctly
when trying to decode an encoded stream
* added lint(1) directives
 1.14  27-Jan-2004  jsm Remove uses of __P.
 1.13  01-Jan-2004  jsm Make dot and winnerdot of type double. Patch from Jan Vornberger
<jan@uos.de> in Debian bug 197816.
 1.12  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22269, verified by myself.
 1.11  08-May-2000  mycroft Use setgid(), not setregid().
 1.10  09-Jan-2000  jsm Use err(1, NULL) and warn(NULL) for `out of memory' error messages.
 1.9  08-Sep-1999  jsm Add use of `const' where appropriate to the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
 1.8  21-Jul-1999  hubertf Drop setgid privs early, via OpenBSD
Reported in PR 5970 by Joseph Myers <jsm@octomino.demon.co.uk>
 1.7  13-Sep-1998  hubertf mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)
 1.6  11-Oct-1997  lukem minor KNFify
 1.5  10-Oct-1997  lukem WARNSify
 1.4  06-Feb-1996  jtc Removed "extern int errno"; Added #include <errno.h> if not already present.
 1.3  21-Mar-1995  cgd clean up import
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  21-Mar-1995  cgd from Lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21.20.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.

RSS XML Feed