viewph(3) display all the phfig_lists and their elements


#include "mph.h"
void viewph();


viewph scans all the elements of the entire phfig_list loaded in ram, and displays a textual output of the data strcuture contents. All the figures are treated, the first one beeing pointed to by HEAD_PHFIG, the global variable that points to the head of all phfigs.
Its use is mostly for debugging purposes, and educational ones, since the output is quite verbose, even if very easy to understand.


#include <stdio.h>
#include "mph.h"
void view_all_to_file(name)
char *name;
FILE *file = freopen(name, WRITE_TEXT, stdout);
   if (!file) {
      (void)fputs("Can't reopen stdout!\n", stderr);
   viewph(); /* to file called name */