For $20 dollars, I'll post all 10,000 lines of this engineering wonder. The question comes on how the node gets allocated.

Code:
struct node {
 int scores;
 int *next;
};

typedef N_TYPE n_type;

/*skip 500 lines */

node ->next = malloc(sizeof *node->next);
Maybe I'm being dense, but why not go something like:

node->next = malloc(sizeof(struct node));