Programming with Judy

Using Judy
Using JudySL
Chapter 3 47
== PPJERR)
{
fprintf(stderr, "File: '%s', line: %d: Judy error: %d\n",
__FILE__, __LINE__, JU_ERRNO(&JError));
exit (1);
}
// To modify the program to output duplication counts, like uniq -d, or to emit
// multiple copies of repeated strings:
#ifdef notdef
++(*((ulong_t *) PPValue));
#endif
}
// PRINT SORTED STRINGS:
//
// To output all strings and not just the unique ones, output Index multiple
// times = *((ulong_t *) PPValue).
Index[0] = '\0'; // start with smallest string.
for (PPValue = JudySLFirst (PJArray, Index, &JError);
PPValue != (PPvoid_t) NULL;
PPValue = JudySLNext (PJArray, Index, &JError))
{
(void) puts (Index); // see comment above.
}
exit (0);
/*NOTREACHED*/
} // main()