headerlist.c: indentation fixes
This commit is contained in:
parent
7d07afc0cc
commit
367ba2bf22
@ -432,52 +432,51 @@ struct providedList*
|
|||||||
findOrCreateProvidedListEntry(struct providedList* *idx,
|
findOrCreateProvidedListEntry(struct providedList* *idx,
|
||||||
char* findname, int create, int arch)
|
char* findname, int create, int arch)
|
||||||
{
|
{
|
||||||
struct providedList *newprovided, *currprovided, *prevprovided = NULL;
|
struct providedList *newprovided, *currprovided, *prevprovided = NULL;
|
||||||
int c = 0, i;
|
int c = 0, i;
|
||||||
int idxbot = 0, idxtop;
|
int idxbot = 0, idxtop;
|
||||||
|
|
||||||
if (idx[1]) {
|
if (idx[1]) {
|
||||||
idxtop = PROVIDEDLIST_IDX_SIZE;
|
idxtop = PROVIDEDLIST_IDX_SIZE;
|
||||||
while (idxtop-idxbot > 1) {
|
while (idxtop-idxbot > 1) {
|
||||||
i = (idxtop + idxbot) / 2;
|
i = (idxtop + idxbot) / 2;
|
||||||
if (! idx[i]) idxtop = i;
|
if (! idx[i]) idxtop = i;
|
||||||
else {
|
else {
|
||||||
c = strcmp(idx[i]->name,findname);
|
c = strcmp(idx[i]->name,findname);
|
||||||
if (c < 0) idxbot = i;
|
if (c < 0) idxbot = i;
|
||||||
else if (c > 0) idxtop = i;
|
else if (c > 0) idxtop = i;
|
||||||
else { idxbot = i-1; idxtop = i; }
|
else { idxbot = i-1; idxtop = i; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// printf("idxbot=%d idxtop=%d %s %s\n",idxbot,idxtop,idx[idxbot]->name,findname);
|
//printf("idxbot=%d idxtop=%d %s %s\n",idxbot,idxtop,idx[idxbot]->name,findname);
|
||||||
}
|
}
|
||||||
|
|
||||||
currprovided = idx[idxbot];
|
currprovided = idx[idxbot];
|
||||||
while (currprovided && ((c=strcmp(currprovided->name,findname)) < 0)) {
|
while (currprovided && ((c=strcmp(currprovided->name,findname)) < 0)) {
|
||||||
prevprovided = currprovided;
|
prevprovided = currprovided;
|
||||||
currprovided = currprovided->next;
|
currprovided = currprovided->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!currprovided) || (c > 0)) {
|
if ((!currprovided) || (c > 0)) {
|
||||||
if (!create) return NULL;
|
if (!create) return NULL;
|
||||||
providedListCount[arch]++;
|
providedListCount[arch]++;
|
||||||
newprovided = malloc(sizeof(struct providedList));
|
newprovided = malloc(sizeof(struct providedList));
|
||||||
if (prevprovided) {
|
if (prevprovided) {
|
||||||
newprovided->next = prevprovided->next;
|
newprovided->next = prevprovided->next;
|
||||||
prevprovided->next = newprovided;
|
prevprovided->next = newprovided;
|
||||||
} else {
|
} else {
|
||||||
idx[0]=newprovided;
|
idx[0]=newprovided;
|
||||||
newprovided->next = currprovided;
|
newprovided->next = currprovided;
|
||||||
}
|
}
|
||||||
newprovided->provider = NULL;
|
newprovided->provider = NULL;
|
||||||
newprovided->numproviders = 0;
|
newprovided->numproviders = 0;
|
||||||
newprovided->numbuildproviders = 0;
|
newprovided->numbuildproviders = 0;
|
||||||
newprovided->buildprovider = NULL;
|
newprovided->buildprovider = NULL;
|
||||||
newprovided->name = strdup(findname);
|
newprovided->name = strdup(findname);
|
||||||
newprovided->id = ++providedListId;
|
newprovided->id = ++providedListId;
|
||||||
return newprovided;
|
return newprovided;
|
||||||
}
|
}
|
||||||
|
return currprovided;
|
||||||
return currprovided;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct fileTree*
|
struct fileTree*
|
||||||
|
Loading…
Reference in New Issue
Block a user