History log of /freebsd-10-stable/games/fortune/unstr/unstr.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 301178 01-Jun-2016 truckman

MFC r300705 (compensating for fortune moving from games to usr.bin)

Avoid buffer overflow when copying the input file name and appending .dat.

Check the return value from fread() to be sure that it was successful.

Reported by: Coverity
CID: 1006709, 1009452


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 227101 05-Nov-2011 ed

Add static keywords to variables and functions where possible in games/.

This allows us to detect unused functions and variables and allows the
compiler to do a better job at optimisation.


# 203926 15-Feb-2010 uqs

fortune(6) switch to 3-clause BSDL; style(9)

This reduces the diff to other *BSD and makes it possible to actually
see the code differences.

Approved by: ed (Co-mentor)


# 201175 29-Dec-2009 ed

Use ANSI C function declarations.


# 142328 23-Feb-2005 ru

Fixed warnings and bump WARNS to 6.


# 142022 17-Feb-2005 ru

Make the on-disk format of .dat files produced by strfile(8)
architecture independent. Besides the fixed-width types in
the header, the offsets are now stored as 64-bit off_t (also
in big endian format).

Tested on: i386, amd64, sparc64, ia64


# 114725 05-May-2003 obrien

Make the __FBSDID usage consistent
and protect copyright[] from Gcc 3.3's whining.


# 97634 30-May-2002 wollman

Add used include of <stdlib.h>, copying style bugs from adjacent lines.


# 90868 18-Feb-2002 mike

o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm


# 81586 13-Aug-2001 ru

Removed duplicate VCS ID tags, as per style(9).


# 53210 16-Nov-1999 billf

Sync our register usage with NetBSD's (non-)usage.


# 53209 16-Nov-1999 billf

Add $FreeBSD$


# 51287 14-Sep-1999 peter

Fix warning: return type of `main' is not `int'


# 15944 27-May-1996 ache

Localize it.
off_t -> long.
Install strfile & unstr
-Wall cleanup
Fix matching bug with offensive database


# 2491 04-Sep-1994 jkh

This commit was generated by cvs2svn to compensate for changes in r2490,
which included commits to RCS files with non-trunk default branches.


# 2490 04-Sep-1994 jkh

Bring in the 4.4 Lite games directory, modulo man page changes and segregation
of the x11 based games. I'm not going to tag the originals with bsd_44_lite
and do this in two stages since it's just not worth it for this collection,
and I've got directory renames to deal with that way. Bleah.
Submitted by: jkh