Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
- ifdefs around vendor sccsid were left reversed after switching to
__FBSDID().
- vertical whitespace after some of the non-FALLTHROUGH cases was lost.
- too much vertical whitespace before prototypes.
- don't use unusual indentation for 39 lines of declarations when only 2
of the lines benefit from it.
- don't use __DECONST(). This was the one use of it in the tree, and it
was just wrong. It was used to hide the warning about tgetnum() having
the wrong prototype (missing a `const') due to libncurses being
misconfigured. libncurses has been fixed, so the original code now
compiles cleanly with WARNS=4.
fseek -> fseeko
ftell -> ftello
fseek(x, 0L, 0) -> rewind(x)
NOTE: that fseek/ftell not works for >long offsets per POSIX:
[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
[EOVERFLOW] For ftell ( ), the current file offset cannot be represented
correctly in an object of type long.
FreeBSD does not have _POSIX_SAVED_IDS enabled. Thanks to Warner Losh
and Ollivier Robert for pointing this out, and Bruce Evans for explaining
the role of _POSIX_SAVED_IDS.
especially on a new install, where /var/msgs/bounds doesn't exist. I
moved my bounds file out of the way to create this before and after
on a quick 'n' dirty hack, which is probably the 23rd best way to do it,
but it works:
PR: 6963
Submitted by: Matthew Fuller <fullermd@mortis.futuresouth.com>