예제 #1
0
파일: dbengine.c 프로젝트: aquirel/athenadb
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);
}
예제 #2
0
파일: euxlFun2.c 프로젝트: Henry/EuLisp
///  euxlPrintDepth - set the maximum depth of nested lists to be printed
euxlValue euxlPrintDepth()
{
    return (setPrint(&printDepth));
}
예제 #3
0
파일: euxlFun2.c 프로젝트: Henry/EuLisp
///  euxlPrintBreadth - set the maximum number of elements to be printed
euxlValue euxlPrintBreadth()
{
    return (setPrint(&printBreadth));
}