Home | History | Annotate | Download | only in ksh

Lines Matching defs:opnd1

144 		const char *opnd1, *opnd2;
150 opnd1 = (*te.getopnd)(&te, TO_NONOP, 1);
153 res = (*te.eval)(&te, op, opnd1, opnd2,
161 /* back up to opnd1 */
165 opnd1 = (*te.getopnd)(&te, TO_NONOP, 1);
170 if (!Flag(FPOSIX) && strcmp(opnd1, "-t") == 0)
172 res = (*te.eval)(&te, TO_STNZE, opnd1,
217 test_eval(te, op, opnd1, opnd2, do_eval)
220 const char *opnd1;
236 return *opnd1 != '\0';
238 return *opnd1 == '\0';
240 if ((not = *opnd1 == '!'))
241 opnd1++;
242 if ((res = option(opnd1)) < 0)
251 return test_eaccess(opnd1, R_OK) == 0;
253 return test_eaccess(opnd1, W_OK) == 0;
255 return test_eaccess(opnd1, X_OK) == 0;
257 return test_stat(opnd1, &b1) == 0;
262 return stat(opnd1, &b1) == 0;
264 return test_stat(opnd1, &b1) == 0 && S_ISREG(b1.st_mode);
266 return test_stat(opnd1, &b1) == 0 && S_ISDIR(b1.st_mode);
269 return test_stat(opnd1, &b1) == 0 && S_ISCHR(b1.st_mode);
275 return test_stat(opnd1, &b1) == 0 && S_ISBLK(b1.st_mode);
281 return test_stat(opnd1, &b1) == 0 && S_ISFIFO(b1.st_mode);
287 return lstat(opnd1, &b1) == 0 && S_ISLNK(b1.st_mode);
293 return test_stat(opnd1, &b1) == 0 && S_ISSOCK(b1.st_mode);
308 int len = strlen(opnd1);
309 char *p = str_nsave(opnd1, len + 1, ATEMP);
320 return test_stat(opnd1, &b1) == 0
327 return test_stat(opnd1, &b1) == 0
333 return test_stat(opnd1, &b1) == 0
336 return test_stat(opnd1, &b1) == 0 && b1.st_size > 0L;
338 if (opnd1 && !bi_getn(opnd1, &res)) {
343 res = isatty(opnd1 ? res : 0);
347 return test_stat(opnd1, &b1) == 0 && b1.st_uid == ksheuid;
349 return test_stat(opnd1, &b1) == 0 && b1.st_gid == getegid();
355 return gmatch(opnd1, opnd2, false);
356 return strcmp(opnd1, opnd2) == 0;
359 return !gmatch(opnd1, opnd2, false);
360 return strcmp(opnd1, opnd2) != 0;
362 return strcmp(opnd1, opnd2) < 0;
364 return strcmp(opnd1, opnd2) > 0;
374 if (!evaluate(opnd1, &v1, KSH_RETURN_ERROR)
403 return stat(opnd1, &b1) == 0
415 && (((s1 = stat(opnd1, &b1)) == 0
420 return stat(opnd1, &b1) == 0 && stat(opnd2, &b2) == 0
525 const char *opnd1, *opnd2;
543 opnd1 = (*te->getopnd)(te, op, do_eval);
544 if (!opnd1) {
549 return (*te->eval)(te, op, opnd1, (const char *) 0, do_eval);
551 opnd1 = (*te->getopnd)(te, TO_NONOP, do_eval);
552 if (!opnd1) {
564 return (*te->eval)(te, op, opnd1, opnd2, do_eval);
570 return (*te->eval)(te, TO_STNZE, opnd1, (const char *) 0, do_eval);
621 ptest_eval(te, op, opnd1, opnd2, do_eval)
624 const char *opnd1;
628 return test_eval(te, op, opnd1, opnd2, do_eval);