Last active
August 29, 2015 14:26
-
-
Save ravelll/cdc0b0c9b2584ffa5692 to your computer and use it in GitHub Desktop.
Part of test.c in Bash source codes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case 't': /* File fd is a terminal? */ | |
| if (legal_number (arg, &r) == 0) | |
| return (FALSE); | |
| return ((r == (int)r) && isatty ((int)r)); | |
| case 'n': /* True if arg has some length. */ | |
| return (arg[0] != '\0'); | |
| case 'z': /* True if arg has no length. */ | |
| return (arg[0] == '\0'); | |
| case 'o': /* True if option `arg' is set. */ | |
| return (minus_o_option_value (arg) == 1); | |
| case 'v': | |
| v = find_variable (arg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment