plist.c (479) | plist.c (1547) |
---|---|
1#ifndef lint | 1#ifndef lint |
2static const char *rcsid = "$Id: plist.c,v 1.4 1993/09/12 20:45:53 jkh Exp $"; | 2static const char *rcsid = "$Id: plist.c,v 1.5 1993/09/18 03:39:50 jkh Exp $"; |
3#endif 4 5/* 6 * FreeBSD install - a package for the installation and maintainance 7 * of non-core utilities. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions --- 64 unchanged lines hidden (view full) --- 75 PackingList p = pkg->head; 76 77 while (p) { 78 p->marked = TRUE; 79 p = p->next; 80 } 81} 82 | 3#endif 4 5/* 6 * FreeBSD install - a package for the installation and maintainance 7 * of non-core utilities. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions --- 64 unchanged lines hidden (view full) --- 75 PackingList p = pkg->head; 76 77 while (p) { 78 p->marked = TRUE; 79 p = p->next; 80 } 81} 82 |
83/* Return whether or not there is an item of 'type' in the list */ 84Boolean 85in_plist(Package *pkg, plist_t type) | 83/* Find a given item in a packing list and, if so, return it (else NULL) */ 84PackingList 85find_plist(Package *pkg, plist_t type) |
86{ 87 PackingList p = pkg->head; 88 89 while (p) { 90 if (p->type == type) | 86{ 87 PackingList p = pkg->head; 88 89 while (p) { 90 if (p->type == type) |
91 return TRUE; | 91 return p; |
92 p = p->next; 93 } | 92 p = p->next; 93 } |
94 return FALSE; | 94 return NULL; |
95} | 95} |
96 | 96 |
97/* 98 * Delete plist item 'type' in the list (if 'name' is non-null, match it 99 * too.) If 'all' is set, delete all items, not just the first occurance. 100 */ 101void 102delete_plist(Package *pkg, Boolean all, plist_t type, char *name) 103{ 104 PackingList p = pkg->head; --- 250 unchanged lines hidden --- | 97/* 98 * Delete plist item 'type' in the list (if 'name' is non-null, match it 99 * too.) If 'all' is set, delete all items, not just the first occurance. 100 */ 101void 102delete_plist(Package *pkg, Boolean all, plist_t type, char *name) 103{ 104 PackingList p = pkg->head; --- 250 unchanged lines hidden --- |