Some of the entry points in libc are missing manpages
in section 3, or at least, can't be looked up according
to the name of the function. For example, the getspnam(3)
function cannot be accessed using "man 3 getspnam", but
rather as "man 3 shadow". This is happening because whoever
built the manpages forgot to make proper links.
This is an excerpt of the problems:
shadow(3): No entry for getspent in section 3 of the manual
shadow(3): No entry for getspnam in section 3 of the manual
shadow(3): No entry for setspent in section 3 of the manual
shadow(3): No entry for endspent in section 3 of the manual
shadow(3): No entry for fgetspent in section 3 of the manual
shadow(3): No entry for sgetspent in section 3 of the manual
shadow(3): No entry for putspent in section 3 of the manual
shadow(3): No entry for lckpwdf in section 3 of the manual
shadow(3): No entry for ulckpwdf in section 3 of the manual
endhostent(3): No entry for hstrerror in section 3 of the manual
get_current_dir_name(3): No entry for get_current_working_dir_name in
section 3 of the manual
getcwd(3): No entry for get_current_working_dir_name in section 3 of the
manual
gethostbyaddr(3): No entry for hstrerror in section 3 of the manual
gethostbyname(3): No entry for hstrerror in section 3 of the manual
getwd(3): No entry for get_current_working_dir_name in section 3 of the
manual
glob(3): No entry for errfunc in section 3 of the manual
globfree(3): No entry for errfunc in section 3 of the manual
herror(3): No entry for hstrerror in section 3 of the manual
sethostent(3): No entry for hstrerror in section 3 of the manual
hosts_access(3): No entry for request_init in section 3 of the manual
hosts_access(3): No entry for request_set in section 3 of the manual
hosts_access(3): No entry for hosts_ctl in section 3 of the manual
curs_addch(3): No entry for addch in section 3 of the manual
curs_addch(3): No entry for waddch in section 3 of the manual
curs_addch(3): No entry for mvaddch in section 3 of the manual
curs_addch(3): No entry for mvwaddch in section 3 of the manual
curs_addch(3): No entry for echochar in section 3 of the manual
curs_addch(3): No entry for wechochar in section 3 of the manual
curs_addchstr(3): No entry for addchstr in section 3 of the manual
curs_addchstr(3): No entry for addchnstr in section 3 of the manual
curs_addchstr(3): No entry for waddchstr in section 3 of the manual
curs_addchstr(3): No entry for waddchnstr in section 3 of the manual
curs_addchstr(3): No entry for mvaddchstr in section 3 of the manual
panel(3): No entry for new_panel in section 3 of the manual
panel(3): No entry for bottom_panel in section 3 of the manual
panel(3): No entry for top_panel in section 3 of the manual
panel(3): No entry for show_panel in section 3 of the manual
panel(3): No entry for update_panels in section 3 of the manual
Yes, I have a little program that figures this out. This
is just a quick hack version, but it seems tohave done the trick.
I also thought of parsing nm(1) output on all the libraries
and making sure their exposed functions were properly documented.
The Winix developers would just get embarrassed though if I
did that. Sigh.
#!/usr/bin/perl -w
#
# no3man - identify which library calls aren't mannable
# tchrist@perl.com
use strict;
my $MAN3DIR = '/usr/man/man3';
chdir($MAN3DIR) || die "can't chdir to $MAN3DIR: $!";
opendir(DIR, ".") || die "can't opendir $MAN3DIR: $!";
my %warned;
$| = 1;
while (my $manpage = readdir(DIR)) {
next if $manpage =~ /^\./;
$manpage =~ s/\.3.*//;
print "$manpage\n";
my $kid = open(MANPIPE, "man 3 $manpage 2>&1 | col -b |")
|| die "can't run man 3 $manpage";
while(<MANPIPE>) {
last if $recno =~ /e/i;
while (/(\w+)\(/g) {
my $func = $1;
my $path = `man -w 3 $func 2>&1`;
print "$manpage(3): $path" if $?;
}
}
}
close MANPIPE;
}