/* Returns CR_OK if a prop/decl pair has been found, CR_VALUE_NOT_FOUND_ERROR if not, or an error code if something bad happens.  */
enum CRStatus cr_prop_list_lookup_prop(CRPropList *a_this, CRString *a_prop, CRPropList **a_pair)
/* Returns CR_OK if a prop/decl pair has been found, CR_VALUE_NOT_FOUND_ERROR if not, or an error code if something bad happens.  */
enum CRStatus cr_prop_list_lookup_prop(CRPropList *a_this, CRString *a_prop, CRPropList **a_pair)
{
        CRPropList *cur = NULL;
        g_return_val_if_fail (a_prop && a_pair, CR_BAD_PARAM_ERROR);
        if (!a_this)
                return CR_VALUE_NOT_FOUND_ERROR;
        g_return_val_if_fail (PRIVATE (a_this), CR_BAD_PARAM_ERROR);
        for (cur = a_this; cur; cur = PRIVATE (cur)->next) {
                if (PRIVATE (cur)->prop
		    && PRIVATE (cur)->prop->stryng
                    && PRIVATE (cur)->prop->stryng->str
		    && a_prop->stryng
                    && a_prop->stryng->str
                    && !strcmp (PRIVATE (cur)->prop->stryng->str, 
				a_prop->stryng->str))
                        break;
        }
        if (cur) {
                *a_pair = cur;
                return CR_OK;
        }
        return CR_VALUE_NOT_FOUND_ERROR;
}