memcpy() instead. It's probably a bit more optimal in this case
anyway. [1]
The program logic leading up to the creation of the strncpy/memcpy
destination buffer is a bit hairy. Add a call to assert() to make
it clear what is happening here and detect any potential buffer
overruns in the future.
Check a couple syscall error returns. Ignore the EEXIST error from
link() to preserve existing behavior. [2] [3]
Reported by: Coverity
CID: 1009659 [1], 1009349 [2], 1009350 [3]
col(1) was mangling the SGR escapes and is not strictly required.
See r222647, r222648, r222650, and r222653 for more details.
Reported by: delphij
Reviewed by: ru
Approved by: re (kib)
MFC after: 3 weeks
Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions,
so we better follow too (older glibc used old BSDish alphasort prototype
and corresponding type of the comparision function for scandir). While
there, change the definitions of the functions to ANSI C and fix several
style issues nearby.
Remove requirement for "sys/types.h" include for functions from manpage.
POSIX also requires that alphasort(3) sorts as if strcoll(3) was used,
but leave the strcmp(3) call in the function for now.
Adapt in-tree callers of scandir(3) to new declaration. The fact that
select_sections() from catman(1) could modify supplied struct dirent is
a bug.
PR: standards/142255
MFC after: 2 weeks
catman /usr/share/man/man8
cd /usr/share/man; catman man8
- Don't print false warnings about invalid cat pages which are
machine-specific cat page subdirectories (visible with -v).
- Fixed one memory leak.
the preformatted files are compressed with the same program
as the source, and if the source files are uncompressed, the
preformatted files are also uncompressed.
PR: bin/52213
Submitted by: Krister Joas <krister@gazonk.net>, ru
Approved by: re (jhb)
In "nroff" mode, italic font renders as an underlined text, which
makes it indistinguishable from the bold text on color monitors
(cons25 terminal type), yet it requires the less(1)'s -R option.
(Refer to the new grotty(1) manpage for details.)
So turn off the color support for now (when generating catpages),
until we figure out what do we do with this new feature. I have
a patch for grotty(1) that tells it to use the "reverse video"
attribute to render the italic font. Once this is accepted, we
can turn color support back on (if there won't be any objections
from the community).