Commit Graph

24 Commits

Author SHA1 Message Date
ed
d0367a1471 Add missing static keywords to catman(1) 2011-11-06 08:14:09 +00:00
uqs
2a01964ba4 For POLA reasons, disable SGR sequences in catpages.
See r222647 for a similar change to bsd.doc.mk after SGR was generally
turned on in groff.

Suggested by:	ru
Approved by:	re (kib)
2011-08-05 15:07:28 +00:00
uqs
c121431b65 Unbreak catman(1) by removing calls to col(1).
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
2011-08-03 19:26:57 +00:00
kib
d061de008a Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
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
2010-01-04 15:40:17 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
brooks
ee06a4e9e1 Restore the check against running as root that I accidentally removed in
r194493.
2009-06-20 18:24:29 +00:00
brooks
384550a386 When checking if we can write to a file, use access() instead of a
manual permission check based on stat output.  Also, get rid of the
executability check since it is not used.

MFC after:	2 weeks
2009-06-19 15:52:35 +00:00
ru
6e96e6259d Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.
Reviewed by:	nyan
2005-12-05 14:22:12 +00:00
ru
0491ba1f63 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ru
2d481ce9df Look into machine-specific manpage subdirectories too.
PR:		bin/72243
MFC after:	3 weeks
2004-12-22 16:04:58 +00:00
ru
f8a7e41733 Fixed the only warning and mark as WARNS=6 clean. 2004-12-22 15:25:51 +00:00
ru
d365c98640 - Fixed handling of manpage subdirectories:
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.
2004-12-22 15:24:48 +00:00
ache
a9b19bb5c6 Add (unsigned char) cast to ctype macros 2003-06-10 02:18:00 +00:00
ache
386bc52485 Use setlocale & nl_langinfo to parse locale name 2003-06-10 02:15:00 +00:00
ache
dbd5811216 Remove deprecated locale names 2003-06-10 01:54:10 +00:00
ru
97e3bdab83 Fixed catman(1) so that if the source files are compressed,
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)
2003-05-21 13:26:37 +00:00
ru
311f3f3656 mdoc(7) police: sort xrefs in SEE ALSO. 2002-12-13 16:53:51 +00:00
obrien
aeda7a26a2 Mostly support alternate manpage zipping. 2002-10-29 09:20:22 +00:00
ru
a2b48adeec Revert last delta. SGR support in grotty(1) is disabled system-wide
in /usr/share/tmac/troffrc pending the issue resolution on -arch.
2002-10-18 09:14:17 +00:00
ru
683dd9f551 Groff 1.18.1 comes in with ANSI color support, enabled by default.
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).
2002-10-11 09:16:24 +00:00
dwmalone
abb26c53dd No need to declare optind as an external int. 2002-09-04 21:16:51 +00:00
ru
cd4e93f6df mdoc(7) police: tidy up. 2002-05-30 13:39:43 +00:00
markm
7528001bd0 Add C rewrites of catman and makewhatis. These aren't quite as
the submitter supplied them, as I did some WARNS=n fixups (mostly
const-ification).

Submitted by:	John Rochester <john@jrochester.org>
2002-05-18 09:19:08 +00:00