Lines Matching defs:p

79 	char *p;		/* scratch pointer */
92 p = strchr(buf, '\n');
94 if (p == NULL) {
98 *p = '\0';
101 p = strchr(buf, COMMENT);
102 if (p)
103 *p = '\0';
112 p = &buf[strlen(buf) - 1];
113 while (*p && isspace(*p))
114 *p-- = '\0';
117 p = bp;
118 while (*p && !isspace(*p))
119 p++;
120 if (*p)
121 *p++ = '\0';
123 p = eatwhite(p);
126 if ((rflag & NOASSIGN) || doassign(p)) {
131 if (dopush(fd, p)) {
136 if (dopop(fd, p)) {
141 if ((rflag & NORUN) || dorun(p, NOWAIT)) {
146 if ((rflag & NORUN) || dorun(p, WAIT)) {
168 * args: p - assignment string
173 doassign(char *p)
181 if (*p == '\0')
183 var = p;
185 while (*p && !isspace(*p) && (*p != '='))
186 p++;
189 if (*p == '\0')
193 if (isspace(*p)) {
194 *p++ = '\0';
195 while (*p && isspace(*p))
196 p++;
197 if (*p == '\0')
199 if (*p == '=')
200 p++;
205 *p = '\0';
206 p++;
210 p = eatwhite(p);
211 if (*p == '\'' || *p == '"') {
213 delim = *p++;
216 if (*p == '\0') {
218 } else if (*p == delim) {
219 if (*(p - 1) != '\\')
222 *(tp - 1) = *p++;
224 *tp++ = *p++;
229 * (values of tp and p
231 tp = ++p;
232 p = val;
234 tp = p;
241 * at this point, p points to the value, and tp points to the
248 (void) snprintf(scratch, sizeof (scratch), "%s=%s", var, p);
264 * p - list of modules to push
269 dopush(int fd, char *p)
275 if (*p == '\0')
279 if (*p == '\0') /* found end of line */
281 p = eatwhite(p);
282 if (*p == '\0')
284 tp = p;
289 if (ioctl(fd, I_PUSH, p) < 0) {
302 p = tp;
311 * p - name of module to pop to or ALL (null means pop top only)
316 dopop(int fd, char *p)
321 if (*p == '\0') {
329 p = eatwhite(p);
330 modp = p;
332 while (*p && !isspace(*p))
333 p++;
335 if (*p) /* if not end of line, extra junk on line */
367 * args: p - command line to run
373 dorun(char *p, int waitflg)
383 if (*p == '\0')
390 for (tp = p; *tp && !isspace(*tp); ++tp)
402 if (strcmp(p, "cd") == 0) {
410 } else if (strcmp(p, "ulimit") == 0) {
427 } else if (strcmp(p, "umask") == 0) {
481 (void) execl("/usr/bin/sh", "sh", "-c", p, NULL);
498 * args: p - string to parse
502 eatwhite(char *p)
504 while (*p && isspace(*p))
505 p++;
506 return (p);