findPresentationCtx(
                    LST_HEAD ** lst, DUL_PRESENTATIONCONTEXTID contextID)
{
    DUL_PRESENTATIONCONTEXT
    * ctx;

    if ((ctx = (DUL_PRESENTATIONCONTEXT*)LST_Head(lst)) == NULL)
        return NULL;

    (void) LST_Position(lst, (LST_NODE*)ctx);
    while (ctx != NULL) {
        if (ctx->presentationContextID == contextID)
            return ctx;

        ctx = (DUL_PRESENTATIONCONTEXT*)LST_Next(lst);
    }
    return NULL;
}
findPresentationCtx(
                    LST_HEAD ** lst, DUL_PRESENTATIONCONTEXTID contextID)
{
    DUL_PRESENTATIONCONTEXT
    * ctx;

    if ((ctx = (DUL_PRESENTATIONCONTEXT*)LST_Head(lst)) == NULL)
        return NULL;

    (void) LST_Position(lst, (LST_NODE*)ctx);
    while (ctx != NULL) {
        if (ctx->presentationContextID == contextID)
            return ctx;

        ctx = (DUL_PRESENTATIONCONTEXT*)LST_Next(lst);
    }
    return NULL;
}