PrevNextAll


Debugging data structures

Write a structure display function

void showasylist(NODE *head, char *title)
{
 printf("asylist(%s):\n", title);
 for (; head; head = head->next) {
 	printf("\t->%s\n", head->name);
 }
}
	.
	.
	.

		// jobs is full initialised, ready to run
	asy_insert(&jobq, job);
	checkasylist(&jobq);
	.
	.
	.
	showasylist(jobq, "job queue");
	.
	.
	.