This commit is contained in:
Denis Nuțiu 2016-06-22 18:30:19 +03:00
parent d3631c4e7a
commit ae721fc657

View file

@ -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");