Lines Matching defs:v2

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
893 * The result if v2 also had repeat on would be {"x=1x=2x=3"}. It's
898 explodeValues(__nis_value_t *v1, __nis_value_t *v2) {
905 return (cloneValue(v2, 1));
906 if (v2 == 0 || v2->numVals <= 0)
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)
922 nv = v2->numVals;
923 else if (!v1->repeat && v2->repeat)
925 else /* v1->repeat && v2->repeat */
937 if (!v1->repeat && !v2->repeat) {
939 for (i2 = 0; i2 < v2->numVals; i2++) {
948 if (v2->type == vt_string)
949 sbc2buf(myself, v2->val[i2].value,
950 v2->val[i2].length,
953 bc2buf(myself, v2->val[i2].value,
954 v2->val[i2].length,
963 } else if (v1->repeat && !v2->repeat) {
964 for (i2 = 0; i2 < v2->numVals; i2++) {
974 if (v2->type == vt_string)
975 sbc2buf(myself, v2->val[i2].value,
976 v2->val[i2].length,
979 bc2buf(myself, v2->val[i2].value,
980 v2->val[i2].length,
989 } else if (!v1->repeat && v2->repeat) {
991 for (i2 = 0; i2 < v2->numVals; i2++) {
1000 if (v2->type == vt_string)
1001 sbc2buf(myself, v2->val[i2].value,
1002 v2->val[i2].length,
1005 bc2buf(myself, v2->val[i2].value,
1006 v2->val[i2].length,
1015 } else { /* v1->repeat && v2->repeat */
1017 for (i2 = 0; i2 < v2->numVals; i2++) {
1026 if (v2->type == vt_string)
1027 sbc2buf(myself, v2->val[i2].value,
1028 v2->val[i2].length,
1031 bc2buf(myself, v2->val[i2].value,
1032 v2->val[i2].length,
1050 ((v2->type == vt_string) ?
1602 concatenateValues(__nis_value_t *v1, __nis_value_t *v2) {
1608 return (cloneValue(v2, 1));
1609 if (v2 == 0 || v2->numVals <= 0)
1612 if (v1->type != v2->type)
1615 n = v1->numVals + v2->numVals;
1628 __nis_single_value_t *val = (a == 0) ? v1->val : v2->val;
1630 v2->numVals;