| version 1.33.4.3, 2002/08/13 00:59:50 |
version 1.34, 2001/06/25 15:34:08 |
| Line 47 __RCSID("$NetBSD$"); |
|
| Line 47 __RCSID("$NetBSD$"); |
|
| |
|
| #include "namespace.h" |
#include "namespace.h" |
| #include <sys/types.h> |
#include <sys/types.h> |
| #include <sys/param.h> |
|
| |
|
| #include <assert.h> |
#include <assert.h> |
| #include <ctype.h> |
#include <ctype.h> |
| Line 252 getent(cap, len, db_array, fd, name, dep |
|
| Line 251 getent(cap, len, db_array, fd, name, dep |
|
| size_t clen; |
size_t clen; |
| char *record, *cbuf, *newrecord; |
char *record, *cbuf, *newrecord; |
| int tc_not_resolved; |
int tc_not_resolved; |
| char pbuf[MAXPATHLEN]; |
char pbuf[_POSIX_PATH_MAX]; |
| |
|
| _DIAGASSERT(cap != NULL); |
_DIAGASSERT(cap != NULL); |
| _DIAGASSERT(len != NULL); |
_DIAGASSERT(len != NULL); |
| Line 823 cgetnext(bp, db_array) |
|
| Line 822 cgetnext(bp, db_array) |
|
| /* |
/* |
| * Line points to a name line. |
* Line points to a name line. |
| */ |
*/ |
| if (len > sizeof(nbuf)) |
|
| return -1; |
|
| done = 0; |
done = 0; |
| np = nbuf; |
np = nbuf; |
| for (;;) { |
for (;;) { |
| Line 856 cgetnext(bp, db_array) |
|
| Line 853 cgetnext(bp, db_array) |
|
| line[len - 1] = '\0'; |
line[len - 1] = '\0'; |
| } |
} |
| } |
} |
| if (len > sizeof(buf)) |
|
| return -1; |
|
| rp = buf; |
rp = buf; |
| for(cp = nbuf; *cp != '\0'; cp++) |
for(cp = nbuf; *cp != '\0'; cp++) |
| if (*cp == '|' || *cp == ':') |
if (*cp == '|' || *cp == ':') |