Updating
This commit is contained in:
parent
d3631c4e7a
commit
ae721fc657
1 changed files with 2 additions and 4 deletions
|
@ -60,10 +60,9 @@ void _insert_first(List list, double data) {
|
||||||
// head | wwwti
|
// head | wwwti
|
||||||
// ^
|
// ^
|
||||||
List node = malloc(sizeof(struct _dl_list));
|
List node = malloc(sizeof(struct _dl_list));
|
||||||
List head = list;
|
|
||||||
node->data = data;
|
node->data = data;
|
||||||
node->next = head;
|
node->next = list;
|
||||||
node->prev = head;
|
node->prev = list;
|
||||||
list->next = node;
|
list->next = node;
|
||||||
list->prev = node;
|
list->prev = node;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +182,6 @@ void sort_file(const char * filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
generate_file("numbers.txt");
|
generate_file("numbers.txt");
|
||||||
List boss = init();
|
List boss = init();
|
||||||
read_from_file(boss, "numbers.txt");
|
read_from_file(boss, "numbers.txt");
|
||||||
|
|
Loading…
Reference in a new issue