[comp.unix.misc] How do I get a list of UNIX C functions?

tar@math.ksu.edu (Tim Ramsey) (12/26/90)

anlhille@rose.ucs.indiana.edu (Joseph Hillenburg) writes:

>I know I can type 'man <function>' but how do I get just the huge list of
>C functions?

On most UN*X systems, "ar t /lib/libc.a" will give you a list of all the
functions in the standard C library.

If your man command supports it, "man -k xxxx" will give you a list of
commands that have to do with "xxxx".  For instance, "man -k tty" will
list all of the manual entries that mention "tty" in their NAME section.

Failing that, change directory to wherever your manual pages live (on
BSD systems, /usr/man/cat?; on SYSV systems, /usr/catman/p_man/man?)
and read to your heart's content.

Tim
--
Tim Ramsey (tar@math.ksu.edu)   (913) 532-6750 (voice)  532-7004 (FAX)
Department of Mathematics, Kansas State University, Manhattan KS 66506
-- What does this mean?  07:36:34  * MSG FROM LISTSERV: BITE ME

anlhille@rose.ucs.indiana.edu (Joseph Hillenburg) (12/26/90)

I know I can type 'man <function>' but how do I get just the huge list of
C functions?

=============================================================================
| -jph		     IMHO: The "H" means "honest!"                          |
| INET: anlhille@ucs.indiana.edu	  UUCP: iuvax!prism.decnet!anlhille |
| BITNET: anlhille@iurose.bitnet	  DECNET: PRISM::ANLHILLE           |
=============================================================================

karish@mindcraft.com (Chuck Karish) (12/27/90)

In article <1990Dec26.065038.16148@maverick.ksu.ksu.edu> tar@math.ksu.edu
(Tim Ramsey) writes:
>anlhille@rose.ucs.indiana.edu (Joseph Hillenburg) writes:
>
>>I know I can type 'man <function>' but how do I get just the huge list of
>>C functions?
>
>On most UN*X systems, "ar t /lib/libc.a" will give you a list of all the
>functions in the standard C library.

"ar t" gives a list of the objects in libc.a.  Any of these may
contain several functions, and the name of the object is not necessarily
the same as that of any of the functions it contains.  "nm" is a better bet.

I prefer to look at the lint library sources (/usr/lib/llib-l*.c
or /usr/lib/lint/*.c or something similar).  This provides the calling
conventions, too.
-- 

	Chuck Karish		karish@mindcraft.com
	Mindcraft, Inc.		(415) 323-9000		

harrison@necssd.NEC.COM (Mark Harrison) (12/28/90)

In article <1990Dec26.055716.11975@news.cs.indiana.edu>,
anlhille@rose.ucs.indiana.edu (Joseph Hillenburg) writes:

> I know I can type 'man <function>' but how do I get just the huge list of
> C functions?

Here is one way.  It relies on the fact that the man pages have a NAME
section that looks like:

.SH NAME
function \- description

cat /usr/man/man3/* |awk '
/^\.SH.*NAME/   { p = 1; next }
p == 1          { print; p = 0 }
'
-- 
Mark Harrison             harrison@necssd.NEC.COM
(214)518-5050             {necntc, cs.utexas.edu}!necssd!harrison
standard disclaimers apply...

jms@tardis.Tymnet.COM (Joe Smith) (01/04/91)

In article <1990Dec26.055716.11975@news.cs.indiana.edu> anlhille@rose.ucs.indiana.edu writes:
>I know I can type 'man <function>' but how do I get just the huge list of
>C functions?

I'm not sure if this works unix-under-VMS on a VAX, but
on a Sun (BSD) system, the command "man 3 intro" works.

-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C51    | BIX: smithjoe | CA license plate: "POPJ P," (PDP-10)
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga 3000 speaks for me."