Lines Matching refs:v1
878 * expression so far will be kept in 'v1', and 'v2' is the value
881 * resulting in N*M new values (if 'v1' had N values, and 'v2'
884 * For example, if v1 = {"ab", "cd", "ef"}, and v2 = {"gh", "ij", "kl"},
888 * There are special cases when v1->repeat and/or v2->repeat are set.
890 * v1 = {"x="} with repeat on, and v2 = {"1", "2", "3"}, the result
898 explodeValues(__nis_value_t *v1, __nis_value_t *v2) {
904 if (v1 == 0 || v1->numVals <= 0)
907 return (cloneValue(v1, 1));
910 * XXX What should we do if (v1->type != v2->type) ?
919 if (!v1->repeat && !v2->repeat)
920 nv = v1->numVals * v2->numVals;
921 else if (v1->repeat && !v2->repeat)
923 else if (!v1->repeat && v2->repeat)
924 nv = v1->numVals;
925 else /* v1->repeat && v2->repeat */
937 if (!v1->repeat && !v2->repeat) {
938 for (i1 = 0, n = 0; i1 < v1->numVals; i1++) {
940 if (v1->type == vt_string)
941 sbc2buf(myself, v1->val[i1].value,
942 v1->val[i1].length,
945 bc2buf(myself, v1->val[i1].value,
946 v1->val[i1].length,
963 } else if (v1->repeat && !v2->repeat) {
965 for (i1 = 0, n = 0; i1 < v1->numVals; i1++) {
966 if (v1->type == vt_string)
967 sbc2buf(myself, v1->val[i1].value,
968 v1->val[i1].length,
971 bc2buf(myself, v1->val[i1].value,
972 v1->val[i1].length,
989 } else if (!v1->repeat && v2->repeat) {
990 for (i1 = 0, n = 0; i1 < v1->numVals; i1++) {
992 if (v1->type == vt_string)
993 sbc2buf(myself, v1->val[i1].value,
994 v1->val[i1].length,
997 bc2buf(myself, v1->val[i1].value,
998 v1->val[i1].length,
1015 } else { /* v1->repeat && v2->repeat */
1016 for (i1 = 0, n = 0; i1 < v1->numVals; i1++) {
1018 if (v1->type == vt_string)
1019 sbc2buf(myself, v1->val[i1].value,
1020 v1->val[i1].length,
1023 bc2buf(myself, v1->val[i1].value,
1024 v1->val[i1].length,
1049 v->type = (v1->type == vt_string) ?
1602 concatenateValues(__nis_value_t *v1, __nis_value_t *v2) {
1607 if (v1 == 0 || v1->numVals <= 0)
1610 return (cloneValue(v1, 1));
1612 if (v1->type != v2->type)
1615 n = v1->numVals + v2->numVals;
1624 v->type = v1->type;
1628 __nis_single_value_t *val = (a == 0) ? v1->val : v2->val;
1629 int numv = (a == 0) ? v1->numVals :