Deleted Added
full compact
getnetgrent.c (33278) getnetgrent.c (33950)
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 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 272 unchanged lines hidden (view full) ---

281{
282 char *ptr = list, *cptr;
283 int glen = strlen(group);
284
285 /* skip possible leading whitespace */
286 while(isspace(*ptr))
287 ptr++;
288
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 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 272 unchanged lines hidden (view full) ---

281{
282 char *ptr = list, *cptr;
283 int glen = strlen(group);
284
285 /* skip possible leading whitespace */
286 while(isspace(*ptr))
287 ptr++;
288
289 if (strchr(list, ',') == NULL) {
290 if (strncmp(ptr, group, glen) == 0) {
289 while (ptr < list + len) {
290 cptr = ptr;
291 while(*ptr != ',' && *ptr != '\0' && !isspace(*ptr))
292 ptr++;
293 if (strncmp(cptr, group, glen) == 0 && glen == (ptr - cptr))
291 return(1);
294 return(1);
292 }
293 } else {
294 while (ptr < list + len) {
295 cptr = ptr;
296 while(*ptr != ',' && !isspace(*ptr))
297 ptr++;
298 if (strncmp(cptr, group, glen) == 0 &&
299 glen == (ptr - cptr))
300 return(1);
301 while(*ptr == ',' || isspace(*ptr))
302 ptr++;
303 }
295 while(*ptr == ',' || isspace(*ptr))
296 ptr++;
304 }
305
306 return(0);
307}
308
309static int _buildkey(key, str, dom, rotation)
310char *key, *str, *dom;
311int *rotation;

--- 328 unchanged lines hidden ---
297 }
298
299 return(0);
300}
301
302static int _buildkey(key, str, dom, rotation)
303char *key, *str, *dom;
304int *rotation;

--- 328 unchanged lines hidden ---