nlist.c (292623) | nlist.c (298120) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#if defined(LIBC_SCCS) && !defined(lint) 31static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93"; 32#endif /* LIBC_SCCS and not lint */ 33#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#if defined(LIBC_SCCS) && !defined(lint) 31static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93"; 32#endif /* LIBC_SCCS and not lint */ 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/lib/libc/gen/nlist.c 292623 2015-12-22 20:36:14Z emaste $"); | 34__FBSDID("$FreeBSD: head/lib/libc/gen/nlist.c 298120 2016-04-16 17:52:00Z pfg $"); |
35 36#include "namespace.h" 37#include <sys/param.h> 38#include <sys/mman.h> 39#include <sys/stat.h> 40#include <sys/file.h> 41#include <arpa/inet.h> 42 --- 45 unchanged lines hidden (view full) --- 88}; 89 90int 91__fdnlist(int fd, struct nlist *list) 92{ 93 int n = -1; 94 unsigned int i; 95 | 35 36#include "namespace.h" 37#include <sys/param.h> 38#include <sys/mman.h> 39#include <sys/stat.h> 40#include <sys/file.h> 41#include <arpa/inet.h> 42 --- 45 unchanged lines hidden (view full) --- 88}; 89 90int 91__fdnlist(int fd, struct nlist *list) 92{ 93 int n = -1; 94 unsigned int i; 95 |
96 for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) { | 96 for (i = 0; i < nitems(nlist_fn); i++) { |
97 n = (nlist_fn[i].fn)(fd, list); 98 if (n != -1) 99 break; 100 } 101 return (n); 102} 103 104#define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) --- 300 unchanged lines hidden --- | 97 n = (nlist_fn[i].fn)(fd, list); 98 if (n != -1) 99 break; 100 } 101 return (n); 102} 103 104#define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) --- 300 unchanged lines hidden --- |