Research V4 development
[unix-history] / man / man3 / nlist.3
CommitLineData
32e2dce8
KT
1.th NLIST III 6/12/72
2.sh NAME
3nlist \*- get entries from name list
4.sh SYNOPSIS
5.ft B
6.lp +6 6
7 jsr r5,nlist; file; list
8.lp +6 6
9 ...
10.lp +6 6
11file: <file name\\0>; .even
12.lp +6 6
13list: <name1xxx>; type1; value1
14.lp +6 6
15 <name2xxx>; type2; value2
16.lp +6 6
17 ...
18.lp +6 6
19 0
20.s3
21.nf
22.i0
23nlist(filename, nl)
24char *filename;
25.dt
26struct {
27 char name[8];
28 int type;
29 int value;
30} nl[ ];
31.fi
32.ft R
33.sh DESCRIPTION
34.it Nlist
35examines the name list in
36the given executable output file
37and selectively extracts a
38list of values.
39The name list consists of
40a list of 8-character names (null padded)
41each followed by two words.
42The list is terminated with a null name.
43Each name is looked up in the name list of
44the file.
45If the name is found, the type and value of the
46name are placed in the two words following
47the name.
48If the name is not found, the type entry is set to \*-1.
49.s3
50This subroutine is useful for
51examining the system name list kept in
52the file
53\fB/usr/sys/unix\fR.
54In this way programs can obtain system addresses
55that are up to date.
56.sh "SEE ALSO"
57a.out(V)
58.sh DIAGNOSTICS
59All
60type entries are set to \*-1 if the file cannot be found
61or if it is not a valid namelist.
62.sh BUGS