getcap.c (8870) | getcap.c (11659) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Casey Leedom of Lawrence Livermore National Laboratory. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 178 unchanged lines hidden (view full) --- 187 */ 188static int 189getent(cap, len, db_array, fd, name, depth, nfield) 190 char **cap, **db_array, *name, *nfield; 191 u_int *len; 192 int fd, depth; 193{ 194 DB *capdbp; | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Casey Leedom of Lawrence Livermore National Laboratory. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 178 unchanged lines hidden (view full) --- 187 */ 188static int 189getent(cap, len, db_array, fd, name, depth, nfield) 190 char **cap, **db_array, *name, *nfield; 191 u_int *len; 192 int fd, depth; 193{ 194 DB *capdbp; |
195 DBT key, data; | |
196 register char *r_end, *rp, **db_p; 197 int myfd, eof, foundit, retval, clen; 198 char *record, *cbuf; 199 int tc_not_resolved; 200 char pbuf[_POSIX_PATH_MAX]; 201 202 /* 203 * Return with ``loop detected'' error if we've recursed more than --- 333 unchanged lines hidden (view full) --- 537} 538 539static int 540cdbget(capdbp, bp, name) 541 DB *capdbp; 542 char **bp, *name; 543{ 544 DBT key, data; | 195 register char *r_end, *rp, **db_p; 196 int myfd, eof, foundit, retval, clen; 197 char *record, *cbuf; 198 int tc_not_resolved; 199 char pbuf[_POSIX_PATH_MAX]; 200 201 /* 202 * Return with ``loop detected'' error if we've recursed more than --- 333 unchanged lines hidden (view full) --- 536} 537 538static int 539cdbget(capdbp, bp, name) 540 DB *capdbp; 541 char **bp, *name; 542{ 543 DBT key, data; |
545 char *buf; 546 int st; | |
547 548 key.data = name; 549 key.size = strlen(name); 550 551 for (;;) { 552 /* Get the reference. */ 553 switch(capdbp->get(capdbp, &key, &data, 0)) { 554 case -1: --- 498 unchanged lines hidden --- | 544 545 key.data = name; 546 key.size = strlen(name); 547 548 for (;;) { 549 /* Get the reference. */ 550 switch(capdbp->get(capdbp, &key, &data, 0)) { 551 case -1: --- 498 unchanged lines hidden --- |