| version 1.20, 1998/07/21 13:36:54 |
version 1.21, 1998/07/27 07:41:53 |
| Line 84 static size_t topreclen; /* toprec leng |
|
| Line 84 static size_t topreclen; /* toprec leng |
|
| static char *toprec; /* Additional record specified by cgetset() */ |
static char *toprec; /* Additional record specified by cgetset() */ |
| static int gottoprec; /* Flag indicating retrieval of toprecord */ |
static int gottoprec; /* Flag indicating retrieval of toprecord */ |
| |
|
| static int cdbget __P((DB *, char **, char *)); |
static int cdbget __P((DB *, char **, const char *)); |
| static int getent __P((char **, size_t *, char **, int, char *, int, char *)); |
static int getent __P((char **, size_t *, char **, int, const char *, int, char *)); |
| static int nfcmp __P((char *, char *)); |
static int nfcmp __P((char *, char *)); |
| |
|
| /* |
/* |
| Line 95 static int nfcmp __P((char *, char *)); |
|
| Line 95 static int nfcmp __P((char *, char *)); |
|
| */ |
*/ |
| int |
int |
| cgetset(ent) |
cgetset(ent) |
| char *ent; |
const char *ent; |
| { |
{ |
| if (ent == NULL) { |
if (ent == NULL) { |
| if (toprec) |
if (toprec) |
|
|
| */ |
*/ |
| char * |
char * |
| cgetcap(buf, cap, type) |
cgetcap(buf, cap, type) |
| char *buf, *cap; |
char *buf; |
| |
const char *cap; |
| int type; |
int type; |
| { |
{ |
| char *bp, *cp; |
char *bp; |
| |
const char *cp; |
| |
|
| bp = buf; |
bp = buf; |
| for (;;) { |
for (;;) { |
| Line 180 cgetcap(buf, cap, type) |
|
| Line 182 cgetcap(buf, cap, type) |
|
| */ |
*/ |
| int |
int |
| cgetent(buf, db_array, name) |
cgetent(buf, db_array, name) |
| char **buf, **db_array, *name; |
char **buf, **db_array; |
| |
const char *name; |
| { |
{ |
| size_t dummy; |
size_t dummy; |
| |
|
| Line 207 cgetent(buf, db_array, name) |
|
| Line 210 cgetent(buf, db_array, name) |
|
| */ |
*/ |
| static int |
static int |
| getent(cap, len, db_array, fd, name, depth, nfield) |
getent(cap, len, db_array, fd, name, depth, nfield) |
| char **cap, **db_array, *name, *nfield; |
char **cap, **db_array, *nfield; |
| |
const char *name; |
| size_t *len; |
size_t *len; |
| int fd, depth; |
int fd, depth; |
| { |
{ |
|
|
| static int |
static int |
| cdbget(capdbp, bp, name) |
cdbget(capdbp, bp, name) |
| DB *capdbp; |
DB *capdbp; |
| char **bp, *name; |
char **bp; |
| |
const char *name; |
| { |
{ |
| DBT key, data; |
DBT key, data; |
| |
|
| key.data = name; |
key.data = (char *)name; |
| key.size = strlen(name); |
key.size = strlen(name); |
| |
|
| for (;;) { |
for (;;) { |
| Line 618 cdbget(capdbp, bp, name) |
|
| Line 623 cdbget(capdbp, bp, name) |
|
| */ |
*/ |
| int |
int |
| cgetmatch(buf, name) |
cgetmatch(buf, name) |
| char *buf, *name; |
const char *buf, *name; |
| { |
{ |
| char *np, *bp; |
const char *np, *bp; |
| |
|
| /* |
/* |
| * Start search at beginning of record. |
* Start search at beginning of record. |
| Line 815 cgetnext(bp, db_array) |
|
| Line 820 cgetnext(bp, db_array) |
|
| */ |
*/ |
| int |
int |
| cgetstr(buf, cap, str) |
cgetstr(buf, cap, str) |
| char *buf, *cap; |
char *buf; |
| |
const char *cap; |
| char **str; |
char **str; |
| { |
{ |
| u_int m_room; |
u_int m_room; |
| char *bp, *mp; |
const char *bp; |
| |
char *mp; |
| int len; |
int len; |
| char *mem; |
char *mem; |
| |
|
| Line 940 cgetstr(buf, cap, str) |
|
| Line 947 cgetstr(buf, cap, str) |
|
| */ |
*/ |
| int |
int |
| cgetustr(buf, cap, str) |
cgetustr(buf, cap, str) |
| char *buf, *cap, **str; |
char *buf; |
| |
const char *cap; |
| |
char **str; |
| { |
{ |
| u_int m_room; |
u_int m_room; |
| char *bp, *mp; |
const char *bp; |
| |
char *mp; |
| int len; |
int len; |
| char *mem; |
char *mem; |
| |
|
| Line 1009 cgetustr(buf, cap, str) |
|
| Line 1019 cgetustr(buf, cap, str) |
|
| */ |
*/ |
| int |
int |
| cgetnum(buf, cap, num) |
cgetnum(buf, cap, num) |
| char *buf, *cap; |
char *buf; |
| |
const char *cap; |
| long *num; |
long *num; |
| { |
{ |
| long n; |
long n; |
| int base, digit; |
int base, digit; |
| char *bp; |
const char *bp; |
| |
|
| /* |
/* |
| * Find numeric capability cap |
* Find numeric capability cap |