Deleted Added
full compact
plist.c (379) plist.c (383)
1#ifndef lint
2static const char *rcsid = "$Id: plist.c,v 1.6 1993/09/04 05:06:52 jkh Exp $";
3#endif
4
5/*
6 * FreeBSD install - a package for the installation and maintainance
7 * of non-core utilities.
8 *

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

89 while (p) {
90 if (p->type == type)
91 return TRUE;
92 p = p->next;
93 }
94 return FALSE;
95}
96
1#ifndef lint
2static const char *rcsid = "$Id: plist.c,v 1.6 1993/09/04 05:06:52 jkh Exp $";
3#endif
4
5/*
6 * FreeBSD install - a package for the installation and maintainance
7 * of non-core utilities.
8 *

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

89 while (p) {
90 if (p->type == type)
91 return TRUE;
92 p = p->next;
93 }
94 return FALSE;
95}
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;
105
106 while (p) {
107 PackingList pnext = p->next;
108
109 if (p->type == type && (!name || !strcmp(name, p->name))) {
110 free(p->name);
111 if (p->prev)
112 p->prev->next = pnext;
113 else
114 pkg->head = pnext;
115 if (pnext)
116 pnext->prev = p->prev;
117 else
118 pkg->tail = p->prev;
119 free(p);
120 if (!all)
121 return;
122 p = pnext;
123 }
124 else
125 p = p->next;
126 }
127}
128
97/* Allocate a new packing list entry */
98PackingList
99new_plist_entry(void)
100{
101 PackingList ret;
102
103 ret = (PackingList)malloc(sizeof(struct _plist));
104 bzero(ret, sizeof(struct _plist));

--- 200 unchanged lines hidden ---
129/* Allocate a new packing list entry */
130PackingList
131new_plist_entry(void)
132{
133 PackingList ret;
134
135 ret = (PackingList)malloc(sizeof(struct _plist));
136 bzero(ret, sizeof(struct _plist));

--- 200 unchanged lines hidden ---