Lines Matching refs:vq
94 struct tbl *vp, **vpp = l->vars.tbls, *vq; in popblock() local
102 if ((vq = global(vp->name))->flag & ISSET) in popblock()
103 setspec(vq); in popblock()
105 unsetspec(vq); in popblock()
339 struct tbl *vq; in local() local
341 varsearch(l->next, &vq, vn, h); in local()
342 if (vq != NULL) { in local()
343 vp->flag |= vq->flag & in local()
346 if (vq->flag & INTEGER) in local()
347 vp->type = vq->type; in local()
348 vp->u2.field = vq->u2.field; in local()
437 setstr(struct tbl *vq, const char *s, int error_ok) in setstr() argument
443 if ((vq->flag & RDONLY) && !no_ro_check) { in setstr()
444 warningf(true, Tf_ro, vq->name); in setstr()
449 if (!(vq->flag&INTEGER)) { in setstr()
451 if ((vq->flag&ALLOC)) { in setstr()
454 if (s >= vq->val.s && in setstr()
455 s <= vq->val.s + strlen(vq->val.s)) { in setstr()
458 vq->name, s); in setstr()
461 afree(vq->val.s, vq->areap); in setstr()
463 vq->flag &= ~(ISSET|ALLOC); in setstr()
464 vq->type = 0; in setstr()
465 if (s && (vq->flag & (UCASEV_AL|LCASEV|LJUST|RJUST))) in setstr()
466 s = salloc = formatstr(vq, s); in setstr()
467 if ((vq->flag&EXPORT)) in setstr()
468 exportprep(vq, s); in setstr()
470 strdupx(vq->val.s, s, vq->areap); in setstr()
471 vq->flag |= ALLOC; in setstr()
475 if (!v_evaluate(vq, s, error_ok, true)) in setstr()
478 vq->flag |= ISSET; in setstr()
479 if ((vq->flag&SPECIAL)) in setstr()
480 setspec(vq); in setstr()
487 setint(struct tbl *vq, mksh_ari_t n) in setint() argument
489 if (!(vq->flag&INTEGER)) { in setint()
495 setstr(vq, str_val(vtemp), KSH_RETURN_ERROR); in setint()
497 vq->val.i = n; in setint()
498 vq->flag |= ISSET; in setint()
499 if ((vq->flag&SPECIAL)) in setint()
500 setspec(vq); in setint()
602 setint_v(struct tbl *vq, struct tbl *vp, bool arith) in setint_v() argument
609 setint_n(vq, num.i, 0); in setint_v()
610 if (vq->type == 0) in setint_v()
612 vq->type = base; in setint_v()
613 return (vq); in setint_v()
618 setint_n(struct tbl *vq, mksh_ari_t num, int newbase) in setint_n() argument
620 if (!(vq->flag & INTEGER) && (vq->flag & ALLOC)) { in setint_n()
621 vq->flag &= ~ALLOC; in setint_n()
622 vq->type = 0; in setint_n()
623 afree(vq->val.s, vq->areap); in setint_n()
625 vq->val.i = num; in setint_n()
627 vq->type = newbase; in setint_n()
628 vq->flag |= ISSET|INTEGER; in setint_n()
629 if (vq->flag&SPECIAL) in setint_n()
630 setspec(vq); in setint_n()
1547 struct tbl *vp, *vq; in set_array() local
1580 for (vq = vp; vq; vq = vq->u.array) { in set_array()
1581 if (!(vq->flag & ISSET)) in set_array()
1583 if (arrayindex(vq) >= j) in set_array()
1584 j = arrayindex(vq) + 1; in set_array()
1612 vq = arraysearch(vp, j); in set_array()
1614 setstr(vq, ccp, KSH_RETURN_ERROR); in set_array()