More formatting updates. Reduced whitespace, looks even better.
This commit is contained in:
-15
@@ -112,7 +112,6 @@ LL_node_DestroyData (LL_node * node)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Returns to the beginning of the list...
|
||||
int
|
||||
@@ -186,7 +185,6 @@ LL_Prev (LL * list)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Data manipulation
|
||||
void *
|
||||
@@ -214,7 +212,6 @@ LL_Put (LL * list, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
LL_node *
|
||||
LL_GetNode (LL * list)
|
||||
@@ -240,7 +237,6 @@ LL_PutNode (LL * list, LL_node * node)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void *
|
||||
LL_GetFirst (LL * list) // gets data from first node
|
||||
@@ -308,7 +304,6 @@ LL_AddNode (LL * list, void *add) // Adds node AFTER current one
|
||||
|
||||
//LL_dprint(list);
|
||||
|
||||
|
||||
node = malloc (sizeof (LL_node));
|
||||
if (!node)
|
||||
return -1;
|
||||
@@ -408,7 +403,6 @@ LL_DeleteNode (LL * list)
|
||||
LL_dprint (list);
|
||||
#endif
|
||||
|
||||
|
||||
next = list->current->next;
|
||||
prev = list->current->prev;
|
||||
data = list->current->data;
|
||||
@@ -457,7 +451,6 @@ LL_Remove (LL * list, void *data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Stack operations
|
||||
int
|
||||
@@ -613,8 +606,6 @@ LL_UnRoll (LL * list) // Roll the other way...
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Add an item to the end of its "priority group"
|
||||
// The list is assumed to be sorted already...
|
||||
@@ -652,8 +643,6 @@ LL_PriorityEnqueue (LL * list, void *add, int compare (void *, void *))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
int
|
||||
LL_SwapNodes (LL_node * one, LL_node * two) // Switch two nodes positions...
|
||||
@@ -694,7 +683,6 @@ LL_SwapNodes (LL_node * one, LL_node * two) // Switch two nodes positions...
|
||||
if (secondnext == one)
|
||||
two->prev = one;
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
@@ -755,7 +743,6 @@ LL_Find (LL * list, int compare (void *, void *), void *value)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Sorts the list, then rewinds it...
|
||||
//
|
||||
@@ -767,7 +754,6 @@ LL_Sort (LL * list, int compare (void *, void *))
|
||||
LL_node *best, *last; // best match and last node in the list
|
||||
LL_node *current;
|
||||
|
||||
|
||||
if (!list)
|
||||
return -1;
|
||||
if (!compare)
|
||||
@@ -781,7 +767,6 @@ LL_Sort (LL * list, int compare (void *, void *))
|
||||
if (numnodes < 2)
|
||||
return 0;
|
||||
|
||||
|
||||
for (i = numnodes - 1; i > 0; i--) {
|
||||
LL_Rewind (list); // get the first node again
|
||||
best = last; // reset our "best" node
|
||||
|
||||
Reference in New Issue
Block a user