Lines Matching refs:lv
515 const JQVAL *lv = left, *rv = right; in _jql_cmp_jqval_pair() local
517 if (lv->type == JQVAL_BINN) { in _jql_cmp_jqval_pair()
518 _jql_binn_to_jqval(lv->vbinn, &sleft); in _jql_cmp_jqval_pair()
519 lv = &sleft; in _jql_cmp_jqval_pair()
526 switch (lv->type) { in _jql_cmp_jqval_pair()
530 int l1 = (int) strlen(lv->vstr); in _jql_cmp_jqval_pair()
535 return strncmp(lv->vstr, rv->vstr, l1); in _jql_cmp_jqval_pair()
538 return !strcmp(lv->vstr, "true") - rv->vbool; in _jql_cmp_jqval_pair()
542 return strcmp(lv->vstr, nbuf); in _jql_cmp_jqval_pair()
548 return strcmp(lv->vstr, nbuf); in _jql_cmp_jqval_pair()
551 return (!lv->vstr || lv->vstr[0] == '\0') ? 0 : 1; in _jql_cmp_jqval_pair()
559 return lv->vi64 > rv->vi64 ? 1 : lv->vi64 < rv->vi64 ? -1 : 0; in _jql_cmp_jqval_pair()
561 return (double) lv->vi64 > rv->vf64 ? 1 : (double) lv->vi64 < rv->vf64 ? -1 : 0; in _jql_cmp_jqval_pair()
564 return lv->vi64 > rval ? 1 : lv->vi64 < rval ? -1 : 0; in _jql_cmp_jqval_pair()
569 return (lv->vi64 != 0) - rv->vbool; in _jql_cmp_jqval_pair()
578 return lv->vf64 > rv->vf64 ? 1 : lv->vf64 < rv->vf64 ? -1 : 0; in _jql_cmp_jqval_pair()
580 return lv->vf64 > (double) rv->vi64 ? 1 : lv->vf64 < rv->vf64 ? -1 : 0; in _jql_cmp_jqval_pair()
583 return lv->vf64 > rval ? 1 : lv->vf64 < rval ? -1 : 0; in _jql_cmp_jqval_pair()
588 return lv->vf64 > (double) rv->vbool ? 1 : lv->vf64 < (double) rv->vbool ? -1 : 0; in _jql_cmp_jqval_pair()
596 return lv->vbool - rv->vbool; in _jql_cmp_jqval_pair()
598 return lv->vbool - (rv->vi64 != 0L); in _jql_cmp_jqval_pair()
600 return lv->vbool - (rv->vf64 != 0.0); // -V550 in _jql_cmp_jqval_pair()
602 return lv->vbool - !strcmp(rv->vstr, "true"); in _jql_cmp_jqval_pair()
604 return lv->vbool; in _jql_cmp_jqval_pair()
621 || ((rv->vnode->type == JBV_ARRAY) && (lv->vbinn->type != BINN_LIST)) in _jql_cmp_jqval_pair()
622 …|| ((rv->vnode->type == JBV_OBJECT) && ((lv->vbinn->type != BINN_OBJECT) && (lv->vbinn->type != BI… in _jql_cmp_jqval_pair()
633 *rcp = _jbl_node_from_binn(lv->vbinn, &lnode, false, pool); in _jql_cmp_jqval_pair()
661 JQVAL *lv = left, *rv = right; in _jql_match_regexp() local
667 if (lv->type == JQVAL_JBLNODE) { in _jql_match_regexp()
668 _jql_node_to_jqval(lv->vnode, &sleft); in _jql_match_regexp()
669 lv = &sleft; in _jql_match_regexp()
670 } else if (lv->type == JQVAL_BINN) { in _jql_match_regexp()
671 _jql_binn_to_jqval(lv->vbinn, &sleft); in _jql_match_regexp()
672 lv = &sleft; in _jql_match_regexp()
674 if (lv->type >= JQVAL_JBLNODE) { in _jql_match_regexp()
743 switch (lv->type) { in _jql_match_regexp()
745 input = (char*) lv->vstr; in _jql_match_regexp()
748 iwitoa(lv->vi64, nbuf, JBNUMBUF_SIZE); in _jql_match_regexp()
753 jbi_ftoa(lv->vf64, nbuf, &osz); in _jql_match_regexp()
758 input = lv->vbool ? "true" : "false"; in _jql_match_regexp()
804 JQVAL *lv = left, *rv = right; in _jql_match_in() local
809 if (lv->type == JQVAL_JBLNODE) { in _jql_match_in()
810 _jql_node_to_jqval(lv->vnode, &sleft); in _jql_match_in()
811 lv = &sleft; in _jql_match_in()
812 } else if (lv->type == JQVAL_BINN) { in _jql_match_in()
813 _jql_binn_to_jqval(lv->vbinn, &sleft); in _jql_match_in()
814 lv = &sleft; in _jql_match_in()
821 if (!_jql_cmp_jqval_pair(lv, &qv, rcp)) { in _jql_match_in()
839 JQVAL *lv = left, *rv = right; in _jql_match_ni() local
846 if (lv->type == JQVAL_JBLNODE) { in _jql_match_ni()
847 _jql_node_to_jqval(lv->vnode, &sleft); in _jql_match_ni()
848 lv = &sleft; in _jql_match_ni()
849 } else if (lv->type == JQVAL_BINN) { in _jql_match_ni()
850 _jql_binn_to_jqval(lv->vbinn, &sleft); in _jql_match_ni()
851 lv = &sleft; in _jql_match_ni()
853 if (lv->type >= JQVAL_JBLNODE) { in _jql_match_ni()
866 if (!_jql_cmp_jqval_pair(&qv, lv, rcp)) { in _jql_match_ni()
883 JQVAL *lv = left, *rv = right; in _jql_match_starts() local
888 if (lv->type == JQVAL_JBLNODE) { in _jql_match_starts()
889 _jql_node_to_jqval(lv->vnode, &sleft); in _jql_match_starts()
890 lv = &sleft; in _jql_match_starts()
891 } else if (lv->type == JQVAL_BINN) { in _jql_match_starts()
892 _jql_binn_to_jqval(lv->vbinn, &sleft); in _jql_match_starts()
893 lv = &sleft; in _jql_match_starts()
895 switch (lv->type) { in _jql_match_starts()
897 input = (char*) lv->vstr; in _jql_match_starts()
900 iwitoa(lv->vi64, nbuf, JBNUMBUF_SIZE); in _jql_match_starts()
905 jbi_ftoa(lv->vf64, nbuf, &osz); in _jql_match_starts()
910 input = lv->vbool ? "true" : "false"; in _jql_match_starts()
1162 JQVAL lv, *rv = _jql_unit_to_jqval(mctx->aux, right, rcp); in _jql_match_node_expr_impl() local
1166 lv.type = JQVAL_STR; in _jql_match_node_expr_impl()
1167 lv.vstr = mctx->key; in _jql_match_node_expr_impl()
1168 bool ret = _jql_match_jqval_pair(mctx->aux, &lv, op, rv, rcp); in _jql_match_node_expr_impl()
1180 JQVAL lv, *rv = _jql_unit_to_jqval(mctx->aux, left->expr.right, rcp); in _jql_match_node_expr_impl() local
1184 lv.type = JQVAL_STR; in _jql_match_node_expr_impl()
1185 lv.vstr = mctx->key; in _jql_match_node_expr_impl()
1186 if (!_jql_match_jqval_pair(mctx->aux, &lv, left->expr.op, rv, rcp)) { in _jql_match_node_expr_impl()
1190 JQVAL lv, *rv = _jql_unit_to_jqval(mctx->aux, right, rcp); in _jql_match_node_expr_impl() local
1194 lv.type = JQVAL_BINN; in _jql_match_node_expr_impl()
1195 lv.vbinn = mctx->bv; in _jql_match_node_expr_impl()
1196 bool ret = _jql_match_jqval_pair(mctx->aux, &lv, expr->op, rv, rcp); in _jql_match_node_expr_impl()