]> 4ch.mooo.com Git - 16.git/blobdiff - src/palllist.c
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / src / palllist.c
index f6949c1a69db70c84fc916c0102db2b547b64521..eb428c1d6b9ba81ea78a72755601e29ea6f0828c 100755 (executable)
@@ -64,31 +64,29 @@ main(int argc, char *argv[])
 {\r
        int i;\r
        node_t * head = NULL;           node_t * heao = NULL;\r
-       node_t * nx = NULL;\r
        head = malloc(sizeof(node_t));  heao = malloc(sizeof(node_t));\r
        head->val = 0;                  heao->val = 9;\r
        head->next=NULL;                heao->next=NULL;\r
+       head->id=0;                             heao->id=0;\r
 \r
-       nx = head;\r
        for(i=1; i<\r
                //PAL_SIZE\r
-               5\r
+               7\r
                ; i++)\r
        {\r
-               printf("        i=%d\n", i);\r
-               pushe(nx, i);\r
-               nx = nx->next;\r
+               if(!(i%3)) printf("\n   ");\r
+               printf("%d,", i);\r
+               pushe(head, i);\r
        }\r
-       nx->next = NULL;\r
 \r
-       nx = heao;\r
+       printf("\n");\r
+\r
        for(i=8; i>0; i--)\r
        {\r
-               printf("        i=%d\n", i);\r
-               pushe(nx, i);\r
-               nx = nx->next;\r
+               if(!(i%3)) printf("\n   ");\r
+               printf("%d,", i);\r
+               pushe(heao, i);\r
        }\r
-       nx->next = NULL;\r
        print_list(head);\r
        printf("\n");\r
        print_list(heao);\r