BSD 4_3 release
[unix-history] / usr / man / man3 / nlist.3
CommitLineData
6cb100dd
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
95f51977 5.\" @(#)nlist.3 6.1 (Berkeley) 5/15/85
6cb100dd 6.\"
95f51977 7.TH NLIST 3 "May 15, 1985"
6cb100dd
KM
8.UC 4
9.SH NAME
10nlist \- get entries from name list
11.SH SYNOPSIS
12.nf
13.B #include <nlist.h>
a6d97bad 14.PP
6cb100dd
KM
15.B nlist(filename, nl)
16.B char *filename;
17.B struct nlist nl[];
18.fi
19.SH DESCRIPTION
20.I Nlist
a6d97bad
KM
21examines the name list in the given executable output file
22and selectively extracts a list of values.
23The name list consists of an array of structures containing names,
6cb100dd
KM
24types and values.
25The list is terminated with a null name.
a6d97bad 26Each name is looked up in the name list of the file.
6cb100dd
KM
27If the name is found, the type and value of the
28name are inserted in the next two fields.
29If the name is not found, both entries are set to 0.
30See
31.IR a.out (5)
32for the structure declaration.
33.PP
a6d97bad 34This subroutine is useful for examining the system name list kept in the file
6cb100dd 35.BR /vmunix .
a6d97bad 36In this way programs can obtain system addresses that are up to date.
6cb100dd
KM
37.SH "SEE ALSO"
38a.out(5)
39.SH DIAGNOSTICS
56af27bc
KM
40If the file cannot be found or if it is not a valid namelist \-1 is returned;
41otherwise, the number of unfound namelist entries is returned.
42.PP
43The type entry is set to 0 if the symbol is not found.