Lines Matching refs:p

79 	char *p;		/* scratch pointer */  in doconfig()  local
92 p = strchr(buf, '\n'); in doconfig()
94 if (p == NULL) { in doconfig()
98 *p = '\0'; in doconfig()
101 p = strchr(buf, COMMENT); in doconfig()
102 if (p) in doconfig()
103 *p = '\0'; in doconfig()
112 p = &buf[strlen(buf) - 1]; in doconfig()
113 while (*p && isspace(*p)) in doconfig()
114 *p-- = '\0'; in doconfig()
117 p = bp; in doconfig()
118 while (*p && !isspace(*p)) in doconfig()
119 p++; in doconfig()
120 if (*p) in doconfig()
121 *p++ = '\0'; in doconfig()
123 p = eatwhite(p); in doconfig()
126 if ((rflag & NOASSIGN) || doassign(p)) { in doconfig()
131 if (dopush(fd, p)) { in doconfig()
136 if (dopop(fd, p)) { in doconfig()
141 if ((rflag & NORUN) || dorun(p, NOWAIT)) { in doconfig()
146 if ((rflag & NORUN) || dorun(p, WAIT)) { in doconfig()
173 doassign(char *p) in doassign() argument
181 if (*p == '\0') in doassign()
183 var = p; in doassign()
185 while (*p && !isspace(*p) && (*p != '=')) in doassign()
186 p++; in doassign()
189 if (*p == '\0') in doassign()
193 if (isspace(*p)) { in doassign()
194 *p++ = '\0'; in doassign()
195 while (*p && isspace(*p)) in doassign()
196 p++; in doassign()
197 if (*p == '\0') in doassign()
199 if (*p == '=') in doassign()
200 p++; in doassign()
205 *p = '\0'; in doassign()
206 p++; in doassign()
210 p = eatwhite(p); in doassign()
211 if (*p == '\'' || *p == '"') { in doassign()
213 delim = *p++; in doassign()
216 if (*p == '\0') { in doassign()
218 } else if (*p == delim) { in doassign()
219 if (*(p - 1) != '\\') in doassign()
222 *(tp - 1) = *p++; in doassign()
224 *tp++ = *p++; in doassign()
231 tp = ++p; in doassign()
232 p = val; in doassign()
234 tp = p; in doassign()
248 (void) snprintf(scratch, sizeof (scratch), "%s=%s", var, p); in doassign()
269 dopush(int fd, char *p) in dopush() argument
275 if (*p == '\0') in dopush()
279 if (*p == '\0') /* found end of line */ in dopush()
281 p = eatwhite(p); in dopush()
282 if (*p == '\0') in dopush()
284 tp = p; in dopush()
289 if (ioctl(fd, I_PUSH, p) < 0) { in dopush()
302 p = tp; in dopush()
316 dopop(int fd, char *p) in dopop() argument
321 if (*p == '\0') { in dopop()
329 p = eatwhite(p); in dopop()
330 modp = p; in dopop()
332 while (*p && !isspace(*p)) in dopop()
333 p++; in dopop()
335 if (*p) /* if not end of line, extra junk on line */ in dopop()
373 dorun(char *p, int waitflg) in dorun() argument
383 if (*p == '\0') in dorun()
390 for (tp = p; *tp && !isspace(*tp); ++tp) in dorun()
402 if (strcmp(p, "cd") == 0) { in dorun()
410 } else if (strcmp(p, "ulimit") == 0) { in dorun()
427 } else if (strcmp(p, "umask") == 0) { in dorun()
481 (void) execl("/usr/bin/sh", "sh", "-c", p, NULL); in dorun()
502 eatwhite(char *p) in eatwhite() argument
504 while (*p && isspace(*p)) in eatwhite()
505 p++; in eatwhite()
506 return (p); in eatwhite()