/*
* Copyright 1987 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <a.out.h>
/*
* _nlist - retreive attributes from name list (string table version)
*
* Note: This is a modified form of the original nlist() function.
* It takes a file descriptor instead of a filename argument
* and is intended to be called by nlist(3) and kvmnlist(3K).
* The algorithm has been modified from the original to use local
* (rather than stdio) buffering and issues considerably fewer lseeks.
*/
int
{
struct nlist *p, *q;
int soff;
int stroff = 0;
int n, m;
maxlen = 0;
q++, nreq++) {
q->n_type = 0;
q->n_value = 0;
q->n_desc = 0;
q->n_other = 0;
if (n > maxlen)
maxlen = n;
}
return (-1);
while (n) {
break;
sa += m;
n -= m;
continue;
/*
* Read strings into local cache.
* Assumes (maxlen < sizeof (strs)).
*/
}
for (p = list;
p++) {
if (p->n_type != 0)
continue;
while (*s1) {
goto cont;
}
if (*s2)
goto cont;
if (--nreq == 0)
goto alldone;
break;
cont: ;
}
}
}
return (nreq);
}