Mirror of git://git.busybox.net/busybox with our patches on top
Source
xxxxxxxxxx
/* Copyright (C) 2003 Manuel Novoa III
*
* Licensed under GPL v2, or later. See file LICENSE in this tarball.
*/
/* Nov 6, 2003 Initial version.
*
* NOTE: This implementation is quite strict about requiring all
* field seperators. It also does not allow leading whitespace
* except when processing the numeric fields. glibc is more
* lenient. See the various glibc difference comments below.
*
* TODO:
* Move to dynamic allocation of (currently staticly allocated)
* buffers; especially for the group-related functions since
* large group member lists will cause error returns.
*
*/
/**********************************************************************/
/* Sizes for staticly allocated buffers. */
/* If you change these values, also change _SC_GETPW_R_SIZE_MAX and
* _SC_GETGR_R_SIZE_MAX in libc/unistd/sysconf.c to match */
/**********************************************************************/
/* Prototypes for internal functions. */
extern int __parsepwent(void *pw, char *line);
extern int __parsegrent(void *gr, char *line);
extern int __parsespent(void *sp, char *line);
extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
char *__restrict line_buff, size_t buflen, FILE *f);