02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

nlist(3C)<br />

NAME<br />

nlist - get entries from name list<br />

SYNOPSIS<br />

finclude <br />

int nlist (filename, ni)<br />

char *filename;<br />

struct nlist *nl;<br />

nlist(3C)<br />

DESCRIPTION<br />

nl i s t examines the name list in the executable file whose name<br />

is pointed to by filename; it selectively extracts a list of values and<br />

puts them in the array of nlist structures pointed to by nl. The<br />

name list nl consists of an array of structures containing names of<br />

variables, types, and values. The list is tenninated with a null<br />

name; Le., a null string is in the name position of the structure.<br />

Each variable name is looked up in the name list of the file. If the<br />

name is found, the type and value of the name are inserted in the<br />

next two fields. The type filed will be set to 0 unless the file was<br />

compiled with the -g option. If the name is not found, both entries<br />

are set to O. See a. out(4) for a discussion of the symbol<br />

table structure.<br />

This function is useful for examining the system name list kept in<br />

the file / unix. In this way programs can obtain system addresses<br />

that are up to date.<br />

RETURN VALUE<br />

nlist returns -1 upon error; otherwise it returns O.<br />

All value entries are set to 0 if the file cannot be read or if it does<br />

not contain a valid name list<br />

SEE ALSO<br />

a.out(4).<br />

February, 1990<br />

RevisionC<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!