void dbPrintSets(FILE *f) { dictIterator *iter = NULL; dictEntry *entry = NULL; if (NULL == f) return; lockRead(sets); if (0 == dictSize(sets)) { unlockRead(sets); fprintf(f, "No sets in db.\r\n"); return; } if (NULL == (iter = dictGetIterator(sets))) { unlockRead(sets); return; } while (NULL != (entry = dictNext(iter))) { fprintf(f, "%s\r\n", dictGetEntryKey(entry)); lockRead(dictGetEntryVal(entry)); setPrint((set *) dictGetEntryVal(entry), f, 1); unlockRead(dictGetEntryVal(entry)); fprintf(f, "\r\n"); } dictReleaseIterator(iter); unlockRead(sets); }
/// euxlPrintDepth - set the maximum depth of nested lists to be printed euxlValue euxlPrintDepth() { return (setPrint(&printDepth)); }
/// euxlPrintBreadth - set the maximum number of elements to be printed euxlValue euxlPrintBreadth() { return (setPrint(&printBreadth)); }