Lines Matching refs:len
75 exp->args[exp->argsoff]->len = cmdlen;
93 size_t blen, len;
98 len = 0;
100 if (argv_fexp(sp, excp, cmd, cmdlen, bp, &len, &bp, &blen, is_bang)) {
106 if (len != 0) {
107 for (p = bp, t = bp + len; p < t; ++p)
115 (void)argv_exp0(sp, excp, bp, len);
131 size_t blen, len, n;
141 len = SHELLOFFSET;
147 if (argv_fexp(sp, excp, cmd, cmdlen, p, &len, &bp, &blen, 0)) {
153 TRACE(sp, "before shell: %d: {%s}\n", len, bp);
170 n = len - SHELLOFFSET;
190 len -= SHELLOFFSET;
191 rval = argv_exp3(sp, excp, p, len);
194 if (argv_sexp(sp, &bp, &blen, &len)) {
199 rval = argv_exp3(sp, excp, p, len);
218 size_t len;
241 for (ap = cmd, len = 0; cmdlen > 0; ++cmd, --cmdlen, ++len) {
257 argv_alloc(sp, len);
259 exp->args[off]->len = len;
260 for (p = exp->args[off]->bp; len > 0; --len, *p++ = *ap++)
288 size_t len;
293 len = STRLEN(cp->name);
295 (cmdlen > len || MEMCMP(cmd, cp->name, cmdlen)))
299 argv_alloc(sp, len + 1);
300 MEMCPY(exp->args[exp->argsoff]->bp, cp->name, len + 1);
301 exp->args[exp->argsoff]->len = len;
322 size_t len, nlen;
334 len = strlen(pw->pw_name);
336 (nlen > len || memcmp(np, pw->pw_name, nlen)))
340 CHAR2INT(sp, pw->pw_name, len + 1, uname, ulen);
344 exp->args[exp->argsoff]->len = ulen;
365 size_t blen, len, off, tlen;
371 for (bp = *bpp, blen = *blenp, len = *lenp; cmdlen > 0; --cmdlen, ++cmd)
382 len += tlen = STRLEN(exp->lastbcomm);
384 ADD_SPACE_RETW(sp, bp, blen, len);
397 len += tlen;
399 ADD_SPACE_RETW(sp, bp, blen, len);
412 len += tlen = strlen(t);
414 ADD_SPACE_RETW(sp, bp, blen, len);
435 ins_ch: ++len;
437 ADD_SPACE_RETW(sp, bp, blen, len);
443 ++len;
445 ADD_SPACE_RETW(sp, bp, blen, len);
450 *lenp = len - 1;
461 argv_alloc(SCR *sp, size_t len)
494 ap->len = 0;
495 if (ap->blen < len + 1) {
496 ap->blen = len + 1;
515 exp->args[off]->len = 0;
562 size_t dlen, len, nlen;
618 len = dp->d_namlen;
620 len = dp->d_namlen;
621 if (len < nlen || memcmp(dp->d_name, name, nlen))
626 CHAR2INT(sp, dp->d_name, len + 1, wp, wlen);
634 exp->args[exp->argsoff]->len = dlen + 1;
637 exp->args[exp->argsoff]->len += wlen - 1;
671 size_t blen, len;
762 for (p = bp, len = 0, ch = EOF;
763 (ch = GETC(ifp)) != EOF; *p++ = ch, blen-=sizeof(CHAR_T), ++len)
766 p = bp + len;
767 blen = *blenp - len;
773 --len;
776 *lenp = len;
799 for (p = bp; len; ++p, --len)
802 if (len == 0)
818 argv_esc(SCR *sp, EXCMD *excp, CHAR_T *str, size_t len)
824 GET_SPACE_GOTOW(sp, bp, blen, len + 1);
834 for (p = bp; len > 0; ++str, --len) {
881 argv_uesc(SCR *sp, EXCMD *excp, CHAR_T *str, size_t len)
886 GET_SPACE_GOTOW(sp, bp, blen, len + 1);
888 for (p = bp; len > 0; ++str, --len) {
890 if (--len < 1)
894 if (--len < 1)
899 if (*str == '\\' && len > 1)
903 --len;