Assume all function calls from nonstandard c libraries are helpers that work perfectly. This program is meant to create Node structures to organize make files. 
There's a function that prints the structure in a format to mimic a make file on standard output. 
But when I call on the corresponding print function in my terminal, it just keeps asking for input and I can't exit out (I have to kill terminal). What am I doing wrong?
Rule *parse_file(FILE *fp) {
    Rule *target_cur;
    Rule *target_head = NULL;
    Rule *other_head = NULL;
    char line[MAXLINE];
    fgets(line, MAXLINE, fp);
    while (line != NULL) {
        if (is_comment_or_empty(line) == 1) {
            // line is empty or is a comment
        } else if (strchr(line, ':') != NULL) {
            // line contains start of rule (target & prerequisites)
            // target:
            target_cur = check_target(target_head, other_head, line);

            // dependencies
            check_dependencies(target_cur, target_head, other_head, strchr(line, ':') + 1);
            // curr is still pointed to the same rule (as it should)

        } else if (strncmp(line, "\t", sizeof(char)) == 0) {
            // line starts with tab, AKA contains actions (should mitigate the \r\n issues, I had 'else' before)
            char *tokens = strtok(line, " ");
            int len = 0;
            while (tokens != NULL) {
                len++;
                strtok(NULL, " ");
            }
            check_actions(target_cur, line, len - 1);  // len - 1 cause of the tab = first token
        }
    }
    return target_head;
}