//enQueue.c //John T. Rine //November 3,, 2011 #include #include #include"queue.h" void enQueue(node **head, node **tail, int data) { int i; node *temp, *temp2; temp = temp2 = NULL; temp = *head; while(temp != NULL) { temp = temp->next; } if (*head == NULL) { *head = (node *) malloc(sizeof(node)); *tail = *head; (*head)->prev = NULL; (*head)->next = NULL; (*head)->data = data; } else// if (*tail == temp) { temp2 = (node *) malloc (sizeof(node)); temp2->prev = *tail; temp2->next = NULL; (*tail)->next = temp2; *tail = temp2; (*tail)->data = data; } }