Lines Matching defs:cp
63 char *cp;
102 herein(t->ioact[0], &cp) == 0 && cp && *cp) {
103 char *sp = cp, *dp;
111 z = strlen(cp);
124 afree(cp, APERM);
501 const char *cp;
546 if ((cp = *++ap) == NULL ||
547 (!strcmp(cp, "--") && (cp = *++ap) == NULL)) {
551 if ((tp = findcom(cp, FC_BI)) == NULL)
552 errorf("%s: %s: %s", Tbuiltin, cp, "not a builtin");
670 cp = evalstr(t->vars[i], DOASNTILDE | DOSCALAR);
675 ccp = skip_varname(cp, true);
680 shf_write(cp, ccp - cp, shl_xtrace);
685 typeset(cp, type_flags, 0, 0, 0);
701 if ((cp = *ap) == NULL) {
705 if (Flag(FRESTRICTED) && vstrchr(cp, '/')) {
706 warningf(true, "%s: %s", cp, "restricted");
710 tp = findcom(cp, fcflags);
736 warningf(true, "%s: %s %s: %s", cp,
742 if (!strcmp(cp, Tcat)) {
748 if (!strcmp(cp, Tprintf)) {
754 warningf(true, "%s: %s %s %s: %s", cp,
760 if (!(ftp = findfunc(cp, hash(cp), false)) ||
762 if (!strcmp(cp, Tcat))
765 if (!strcmp(cp, Tprintf))
768 warningf(true, "%s: %s %s", cp,
861 warningf(true, "%s: %s", cp, "not found");
864 warningf(true, "%s: %s: %s", cp, "can't execute",
928 unsigned char *cp;
942 cp = buf + (n = ((buf[0] == 0xEF) && (buf[1] == 0xBB) &&
946 while (*cp && *cp != '\n')
947 ++cp;
949 if (!*cp)
952 *cp = '\0';
955 cp = buf + n;
957 if (cp[0] == '#' && cp[1] == '!')
958 cp += 2;
960 else if (!strncmp(cp, Textproc, 7) &&
961 (cp[7] == ' ' || cp[7] == '\t'))
962 cp += 8;
967 while (*cp == ' ' || *cp == '\t')
968 ++cp;
970 if (*cp == '\0')
973 sh = (char *)cp;
975 while (*cp != ' ' && *cp != '\t' && *cp != '\0')
976 ++cp;
978 if (*cp) {
979 *cp++ = '\0';
981 while (*cp == ' ' || *cp == '\t')
982 ++cp;
984 if (*cp)
985 *tp->args-- = (char *)cp;
1364 char *cp = iop->ioname;
1372 cp = evalonestr(cp, DOTILDE|(Flag(FTALKING_I) ? DOGLOB : 0));
1374 /* Used for tracing and error messages to print expanded cp */
1376 iotmp.ioname = (iotype == IOHERE) ? NULL : cp;
1397 if (stat(cp, &statb)) {
1426 /* cp may have wrong name */
1433 if (ksh_isdash(cp)) {
1437 } else if ((u = check_fd(cp,
1456 warningf(true, "%s: %s", cp, "restricted");
1459 u = binopen3(cp, flags, 0666);
1477 "open" : "create", cp, cstrerror(u));
1564 ccp = evalstr(yylval.cp, DOSCALAR | DOHEREDOC);