Repositories » libk0
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

prettyprinting tuned.

Changeset 8dbd824eddc1

Parent 3485cdf86ef9

by Rup Palchowdhury

Changes to one file · Browse files at 8dbd824eddc1 Showing diff from parent 3485cdf86ef9 Diff from another changeset...

Change 1 of 1 Show Entire File khash.c Stacked
 
76
77
78
 
 
 
79
80
81
82
 
83
84
85
 
76
77
78
79
80
81
82
 
83
 
84
85
86
87
@@ -76,10 +76,12 @@
 void fprinthash(FILE *stream, Hash *h, void (*printdata)(FILE*, void*))  {   for (int i = 0; i < h->n; i++) { + if (h->tab[i] == NULL) + continue; + fprintf(stream, "%-8d ", i);   for (Node *np = h->tab[i]; np != NULL; np = np->next) { - fprintf(stream, "%d ", i);   (*printdata)(stream, np->data); - fprintf(stream, " "); + fprintf(stream, "\n%-8s ", " ");   }   fprintf(stream, "\n");   }