Home | History | Annotate | Download | only in ksh

Lines Matching refs:xp

50 static	int	varsub ARGS((Expand *xp, char *sp, char *word, int *stypep, int *slenp));
51 static int comsub ARGS((Expand *xp, char *cp));
697 varsub(xp, sp, word, stypep, slenp)
698 Expand *xp;
714 xp->var = NULL;
745 xp->str = str_save(ulton((unsigned long)c, 10), ATEMP);
783 xp->u.strv = NULL;
784 xp->str = null;
788 xp->u.strv = (void *)(uintptr_t)t;
789 xp->str = *xp->u.strv++;
790 xp->split = c == '@'; /* $@ */
811 xp->str = null;
816 xp->u.strv = (const char **) XPptrv(wv);
817 xp->str = *xp->u.strv++;
818 xp->split = p[1] == '@'; /* ${foo[@]} */
826 xp->var = global(sp);
827 xp->str = str_val(xp->var);
835 (((stype&0x80) ? *xp->str=='\0' : xp->str==null) ? /* undef? */
838 if (Flag(FNOUNSET) && xp->str == null
848 comsub(xp, cp)
849 Expand *xp;
878 xp->split = 0; /* no waitlast() */
891 xp->split = 1; /* waitlast() */
894 xp->u.shf = shf;
986 char *xp;
988 Xinit(xs, xp, 256, ATEMP);
989 globit(&xs, &xp, cp, wp, markdirs ? GF_MARKDIR : GF_NONE);
990 Xfree(xs, xp);
1004 char *xp = *xpp;
1022 (stat_done = stat(Xstring(*xs, xp), &statb) < 0 \
1027 if (lstat(Xstring(*xs, xp), &lstatb) < 0)
1033 if ((check & GF_EXCHECK) && xp > Xstring(*xs, xp)
1034 && ISDIRSEP(xp[-1]) && !S_ISDIR(lstatb.st_mode)
1047 && xp > Xstring(*xs, xp) && !ISDIRSEP(xp[-1])
1056 *xp++ = DIRSEP;
1057 *xp = '\0';
1061 XPput(*wp, str_nsave(Xstring(*xs, xp), Xlength(*xs, xp)
1066 if (xp > Xstring(*xs, xp))
1067 *xp++ = DIRSEP;
1069 Xcheck(*xs, xp);
1070 *xp++ = *sp++;
1090 XcheckN(*xs, xp, se - sp + 1);
1091 debunk(xp, sp, Xnleft(*xs, xp));
1092 xp += strlen(xp);
1093 *xpp = xp;
1102 /* xp = *xpp; copy_non_glob() may have re-alloc'd xs */
1103 *xp = '\0';
1104 prefix_len = Xlength(*xs, xp);
1105 dirp = ksh_opendir(prefix_len ? Xstring(*xs, xp) : ".");
1115 XcheckN(*xs, xp, len);
1116 memcpy(xp, name, len);
1117 *xpp = xp + len - 1;
1121 xp = Xstring(*xs, xp) + prefix_len;
1133 * returned; if not, p is copied into xs/xp after stripping any MAGICs
1142 char *xp;
1146 xp = *xpp;
1167 *xp++ = *p;
1169 *xp = '\0';
1170 *xpp = xp;