| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/builtins/read.def |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | struct ttsave | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | struct termios attrs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | static void reset_attempted_completion_function (char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | static int set_itext (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | static char *edit_line (char *, char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | static void set_eol_delim (int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | static void reset_eol_delim (char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | static SHELL_VAR *bind_read_variable (char *, char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | static int read_mbchar (int, char *, int, int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | static void ttyrestore (struct ttsave *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | static void sigalrm (int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | static void reset_alarm (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | sigjmp_buf alrmbuf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | int sigalrm_seen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | static int reading, tty_modified; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | static SigHandler *old_alrm; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | static unsigned char delim; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | static struct ttsave termsave; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | sigalrm (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | int s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | sigalrm_seen = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | reset_alarm () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | falarm (0, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | set_signal_handler ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 14 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | , old_alrm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | read_builtin (list) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | register char *varname; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | int size, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2, nflag; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | volatile int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | int raw, edit, nchars, silent, have_timeout, ignore_delim, fd, lastsig, t_errno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | int mb_cur_max; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | unsigned int tmsec, tmusec; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | long ival, uval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | intmax_t intval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | char c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | char *e, *t, *t1, *ps2, *tofree; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | struct stat tsb; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | struct termios ttattrs, ttset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | WORD_LIST *alist; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | char *rlbuf, *itext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | int rlind; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | ((void) &(size)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | ((void) &(i)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | ((void) &(pass_next)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | ((void) &(print_ps2)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | ((void) &(saw_escape)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | ((void) &(input_is_pipe)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | ((void) &(edit)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | ((void) &(tmsec)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | ((void) &(tmusec)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | ((void) &(nchars)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | ((void) &(silent)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | ((void) &(ifs_chars)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | ((void) &(prompt)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | ((void) &(arrayname)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | ((void) &(rlbuf)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | ((void) &(rlind)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | ((void) &(itext)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | ((void) &(list)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | ((void) &(ps2)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | ((void) &(lastsig)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | sigalrm_seen = reading = tty_modified = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | i = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | raw = edit = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | silent = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | arrayname = prompt = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | fd = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | rlbuf = itext = (char *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | rlind = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | mb_cur_max = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | (__ctype_get_mb_cur_max ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | tmsec = tmusec = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | nr = nchars = input_is_tty = input_is_pipe = unbuffered_read = have_timeout = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | delim = '\n'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | ignore_delim = nflag = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | reset_internal_getopt (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | while ((
| 1322721-2642512 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | switch (opt) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | case executed 1321231 times by 1 test: 'r':case 'r':Executed by:
executed 1321231 times by 1 test: case 'r':Executed by:
| 1321231 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | raw = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | break; executed 1321231 times by 1 test: break;Executed by:
| 1321231 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | case executed 9 times by 1 test: 'p':case 'p':Executed by:
executed 9 times by 1 test: case 'p':Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | prompt = list_optarg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | break; executed 9 times by 1 test: break;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | case never executed: 's':case 's':never executed: case 's': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | silent = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | case never executed: 'e':case 'e':never executed: case 'e': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | edit = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | case never executed: 'i':case 'i':never executed: case 'i': | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | itext = list_optarg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | case executed 27 times by 1 test: 'a':case 'a':Executed by:
executed 27 times by 1 test: case 'a':Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | arrayname = list_optarg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | break; executed 27 times by 1 test: break;Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | case executed 6 times by 1 test: 't':case 't':Executed by:
executed 6 times by 1 test: case 't':Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | code = uconvert (list_optarg, &ival, &uval); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | if (code == 0
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | "%s: invalid timeout specification" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | , list_optarg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | return executed 1 time by 1 test: (1);return (1);Executed by:
executed 1 time by 1 test: return (1);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | have_timeout = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | tmsec = ival; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | tmusec = uval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | break; executed 5 times by 1 test: break;Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | case executed 1 time by 1 test: 'N':case 'N':Executed by:
executed 1 time by 1 test: case 'N':Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | ignore_delim = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | delim = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | case executed 11 times by 1 test: 'n':case 'n':Executed by:
executed 11 times by 1 test: case 'n':Executed by:
code before this statement executed 1 time by 1 test: case 'n':Executed by:
| 1-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | nflag = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | code = legal_number (list_optarg, &intval); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | if (code == 0
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | sh_invalidnum (list_optarg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | return executed 7 times by 1 test: (1);return (1);Executed by:
executed 7 times by 1 test: return (1);Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | nchars = intval; executed 5 times by 1 test: nchars = intval;Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | break; executed 5 times by 1 test: break;Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | case executed 1321221 times by 1 test: 'u':case 'u':Executed by:
executed 1321221 times by 1 test: case 'u':Executed by:
| 1321221 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | code = legal_number (list_optarg, &intval); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | if (code == 0
| 0-1321221 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | "%s: invalid file descriptor specification" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | , list_optarg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | fd = intval; executed 1321221 times by 1 test: fd = intval;Executed by:
| 1321221 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | if (sh_validfd (fd) == 0
| 1-1321220 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | "%d: invalid file descriptor: %s" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | , fd, strerror ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | )); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | return executed 1 time by 1 test: (1);return (1);Executed by:
executed 1 time by 1 test: return (1);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | break; executed 1321220 times by 1 test: break;Executed by:
| 1321220 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | case executed 6 times by 1 test: 'd':case 'd':Executed by:
executed 6 times by 1 test: case 'd':Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | delim = *list_optarg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | break; executed 6 times by 1 test: break;Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | case never executed: -99:case -99:never executed: builtin_help (); returncase -99:never executed: (258);return (258);never executed: return (258); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | builtin_usage (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | return never executed: (258);return (258);never executed: return (258); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | list = loptend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | if (have_timeout
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | return executed 3 times by 1 test: (input_avail (fd) ? 0 : 1);return (input_avail (fd) ? 0 : 1);Executed by:
executed 3 times by 1 test: return (input_avail (fd) ? 0 : 1);Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | if (list
| 2-1322643 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | sh_invalidid (list->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | return executed 2 times by 1 test: (1);return (1);Executed by:
executed 2 times by 1 test: return (1);Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | if (ignore_delim
| 1-1322715 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | delim = -1; executed 1 time by 1 test: delim = -1;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | ifs_chars = getifs (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | if (ifs_chars == 0
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | ifs_chars = ""; never executed: ifs_chars = ""; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | if (ignore_delim
| 1-1322715 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | ifs_chars = ""; executed 1 time by 1 test: ifs_chars = "";Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *
| 1322716-3967306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | skip_ctlesc |= *e == '\001', skip_ctlnul |= *e == '\177'; executed 3967306 times by 1 test: skip_ctlesc |= *e == '\001', skip_ctlnul |= *e == '\177';Executed by:
| 3967306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | input_string = (char *)sh_xmalloc((size = 112), "./read.def", 362); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | input_string[0] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | if (nflag == 1
| 0-1322711 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | retval = read (fd, &c, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | retval = (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | goto never executed: assign_vars;goto assign_vars;never executed: goto assign_vars; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | if (have_timeout == 0
| 0-1322714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | code = uconvert (e, &ival, &uval); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | if (code == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | tmsec = tmusec = 0; never executed: tmsec = tmusec = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | tmsec = ival; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | tmusec = uval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | begin_unwind_frame ("read_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | if (interactive == 0
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | sync_buffered_stream (default_buffered_input); never executed: sync_buffered_stream (default_buffered_input); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | input_is_tty = isatty (fd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | if (input_is_tty == 0
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | input_is_pipe = (
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 478-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | 1
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 478-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | ) < 0)
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 1-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | (*__errno_location ())
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 1-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | ==
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 1-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 29
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 1-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | )
executed 1322716 times by 1 test: input_is_pipe = (lseek (fd, 0L, 1 ) < 0) && ( (*__errno_location ()) == 29 );Executed by:
| 1-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | if ((prompt
| 0-1322707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | prompt = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | itext = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | edit = silent = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | if (edit
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | add_unwind_protect (xfree, rlbuf); never executed: add_unwind_protect (xfree, rlbuf); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | pass_next = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | saw_escape = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | if (tmsec > 0
| 0-1322714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | if ((
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | ((((
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | tsb.st_mode
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | )) & 0170000) == (0100000))
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | tmsec = tmusec = 0; never executed: tmsec = tmusec = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | if (tmsec > 0
| 0-1322714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | code = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | (alrmbuf) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | if (code
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | sigalrm_seen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | orig_input_string = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | input_string[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | if (i == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | t = (char *)sh_xmalloc((1), "./read.def", 446); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | t[0] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | t = (char *)strcpy (sh_xmalloc((1 + strlen (input_string)), "./read.def", 450), (input_string)); never executed: t = (char *)strcpy (sh_xmalloc((1 + strlen (input_string)), "./read.def", 450), (input_string)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | run_unwind_frame ("read_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | input_string = t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | retval = 128+ | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 14 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | goto executed 1 time by 1 test: assign_vars;goto assign_vars;Executed by:
executed 1 time by 1 test: goto assign_vars;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | if (interactive_shell == 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | initialize_terminating_signals (); executed 2 times by 1 test: initialize_terminating_signals ();Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | old_alrm = set_signal_handler ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 14 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | , sigalrm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | add_unwind_protect (reset_alarm, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | if (edit
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | add_unwind_protect (reset_attempted_completion_function, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | add_unwind_protect (bashline_reset_event_hook, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | falarm (tmsec, tmusec); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | if (nchars > 0
| 4-1322711 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | if (edit
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | if (nchars > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | unwind_protect_mem ((char *)&(rl_num_chars_to_read), sizeof (rl_num_chars_to_read)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | rl_num_chars_to_read = nchars; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | if (delim != '\n'
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | set_eol_delim (delim); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | add_unwind_protect (reset_eol_delim, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | if (input_is_tty
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | termsave.fd = fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | ttgetattr (fd, &ttattrs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | termsave.attrs = ttattrs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | ttset = ttattrs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | i = silent
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | if (i < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | sh_ttyerror (1); never executed: sh_ttyerror (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | tty_modified = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | if (interactive_shell == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | initialize_terminating_signals (); never executed: initialize_terminating_signals (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | else if (silent
| 0-1322707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | termsave.fd = fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | ttgetattr (fd, &ttattrs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | termsave.attrs = ttattrs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | ttset = ttattrs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | i = ttfd_noecho (fd, &ttset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | if (i < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | sh_ttyerror (1); never executed: sh_ttyerror (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | tty_modified = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | if (interactive_shell == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | initialize_terminating_signals (); never executed: initialize_terminating_signals (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | add_unwind_protect (xfree, input_string); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | do { if (sigalrm_seen
never executed: } while (0);siglongjmp((alrmbuf), (1)); | 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | if ((
| 0-1322711 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | unbuffered_read = 2; executed 1 time by 1 test: unbuffered_read = 2;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | else if ((
| 4-1322711 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | unbuffered_read = 1; executed 1322239 times by 1 test: unbuffered_read = 1;Executed by:
| 1322239 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | if (prompt
| 0-1322716 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | , "%s", prompt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | ps2 = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | for (print_ps2 = eof = retval = 0;;) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | do { if (sigalrm_seen
never executed: } while (0);siglongjmp((alrmbuf), (1)); | 0-1992911 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | if (edit
| 0-1992911 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | if (rlbuf
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | sh_xfree((rlbuf), "./read.def", 557); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | rlbuf = (char *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | if (rlbuf == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | reading = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | rlbuf = edit_line (prompt ? prompt : "", itext); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | reading = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | rlind = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | if (rlbuf == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | eof = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | c = rlbuf[rlind++]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | if (print_ps2
| 0-1992911 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | if (ps2 == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | ps2 = get_string_value ("PS2"); never executed: ps2 = get_string_value ("PS2"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | , "%s", ps2 ? ps2 : ""); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | print_ps2 = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | reading = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | do { if (sigalrm_seen
never executed: } while (0);siglongjmp((alrmbuf), (1)); | 0-1992911 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | if (unbuffered_read == 2
| 4-1992907 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | retval = posixly_correct
executed 4 times by 1 test: retval = posixly_correct ? zreadintr (fd, &c, 1) : zreadn (fd, &c, nchars - nr);Executed by:
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | else if (unbuffered_read
| 4530-1988377 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | retval = posixly_correct
executed 1988377 times by 1 test: retval = posixly_correct ? zreadintr (fd, &c, 1) : zread (fd, &c, 1);Executed by:
| 0-1988377 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | retval = posixly_correct
executed 4530 times by 1 test: retval = posixly_correct ? zreadcintr (fd, &c) : zreadc (fd, &c);Executed by:
| 0-4530 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | reading = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | if (retval <= 0
| 660676-1332234 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | if (retval < 0
| 1-660675 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | (*
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | ==
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | 4
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | check_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | lastsig = (terminating_signal
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | : 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | if (lastsig == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | lastsig = trapped_signal_received; never executed: lastsig = trapped_signal_received; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | lastsig = 0; executed 660676 times by 1 test: lastsig = 0;Executed by:
| 660676 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | if (terminating_signal
| 0-660676 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | ttyrestore (&termsave); never executed: ttyrestore (&termsave); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | do { if (terminating_signal
never executed: } while (0);termsig_handler (terminating_signal); | 0-660676 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | eof = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | break; executed 660676 times by 1 test: break;Executed by:
| 660676 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-1332234 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | } executed 1332234 times by 1 test: end of blockExecuted by:
| 1332234 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | if (retval <= 0
| 0-1332234 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | do { if (sigalrm_seen
never executed: }siglongjmp((alrmbuf), (1));never executed: while (0);end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | if (i + (mb_cur_max > 4
| 0-1332234 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | char *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | t = (char *)sh_xrealloc((input_string), (size += 128), "./read.def", 628); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | if (t != input_string
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | input_string = t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | remove_unwind_protect (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | add_unwind_protect (xfree, input_string); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | if (pass_next
| 3-1332231 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | pass_next = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | if (c == '\n'
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | if (skip_ctlesc == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | i--; executed 1 time by 1 test: i--;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | if (interactive
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | print_ps2 = 1; never executed: print_ps2 = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | goto executed 2 times by 1 test: add_char;goto add_char;Executed by:
executed 2 times by 1 test: goto add_char;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | continue; executed 1 time by 1 test: continue;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | if (c == '\\'
| 3-1332218 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | pass_next++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | if (skip_ctlesc == 0
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | saw_escape++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | input_string[i++] = '\001'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | continue; executed 3 times by 1 test: continue;Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | if (ignore_delim == 0
| 4-1332224 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | break; executed 662035 times by 1 test: break;Executed by:
| 662035 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | if (c == '\0'
| 0-670193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | if ((skip_ctlesc == 0
| 4-670171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | saw_escape++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | input_string[i++] = '\001'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | add_char: code before this statement executed 670193 times by 1 test: add_char:Executed by:
| 670193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | input_string[i++] = c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | do { if (sigalrm_seen
never executed: } while (0);siglongjmp((alrmbuf), (1)); | 0-670195 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | if (mb_cur_max > 1
| 90-643740 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | input_string[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | if (edit
| 0-90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | size_t clen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | clen = mbrlen (rlbuf + rlind - 1, mb_cur_max, (mbstate_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | memcpy (input_string+i, rlbuf+rlind, clen-1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | i += clen - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | rlind += clen - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | i += read_mbchar (fd, input_string, i, c, unbuffered_read); executed 90 times by 1 test: i += read_mbchar (fd, input_string, i, c, unbuffered_read);Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | nr++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | if (nchars > 0
| 4-670180 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | break; executed 4 times by 1 test: break;Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | } executed 670191 times by 1 test: end of blockExecuted by:
| 670191 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | input_string[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | do { if (sigalrm_seen
never executed: } while (0);siglongjmp((alrmbuf), (1)); | 0-1322715 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | if (edit
| 0-1322715 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | sh_xfree((rlbuf), "./read.def", 722); never executed: sh_xfree((rlbuf), "./read.def", 722); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | if (retval < 0
| 1-1322714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | t_errno = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | if ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | (*
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | !=
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | 4
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | builtin_error ( executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | dcgettext (((void *)0), executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | "read error: %d: %s" executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | , 5) executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | , fd, strerror ( executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | (*__errno_location ()) executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | )); executed 1 time by 1 test: builtin_error ( dcgettext (((void *)0), "read error: %d: %s" , 5) , fd, strerror ( (*__errno_location ()) ));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | run_unwind_frame ("read_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | return executed 1 time by 1 test: ((t_errno != return ((t_errno != 4 ) ? 1 : 128+lastsig);Executed by:
executed 1 time by 1 test: return ((t_errno != 4 ) ? 1 : 128+lastsig);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | 4 executed 1 time by 1 test: return ((t_errno != 4 ) ? 1 : 128+lastsig);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | ) ? 1 : 128+lastsig); executed 1 time by 1 test: return ((t_errno != 4 ) ? 1 : 128+lastsig);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | if (tmsec > 0
| 0-1322713 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | reset_alarm (); executed 1 time by 1 test: reset_alarm ();Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | if (nchars > 0
| 4-1322709 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | if (edit
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | if (nchars > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | rl_num_chars_to_read = 0; never executed: rl_num_chars_to_read = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | if (delim != '\n'
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | reset_eol_delim ((char *) never executed: reset_eol_delim ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | ((void *)0) never executed: reset_eol_delim ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | ); never executed: reset_eol_delim ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | if (input_is_tty
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | ttyrestore (&termsave); never executed: ttyrestore (&termsave); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | else if (silent
| 0-1322705 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | ttyrestore (&termsave); never executed: ttyrestore (&termsave); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | if (unbuffered_read == 0
| 475-1322239 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | zsyncfd (fd); executed 475 times by 1 test: zsyncfd (fd);Executed by:
| 475 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | discard_unwind_frame ("read_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | retval = eof
| 660675-662039 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | assign_vars: code before this statement executed 1322714 times by 1 test: assign_vars:Executed by:
| 1322714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | if (arrayname
| 27-1322688 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | if (legal_identifier (arrayname) == 0
| 0-27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | sh_invalidid (arrayname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | sh_xfree((input_string), "./read.def", 772); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | var = find_or_make_array_variable (arrayname, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | if (var == 0
| 2-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | sh_xfree((input_string), "./read.def", 779); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | return executed 2 times by 1 test: 1;return 1;Executed by:
executed 2 times by 1 test: return 1;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | if (((((
| 0-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | "%s: cannot convert associative to indexed array" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | , arrayname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | sh_xfree((input_string), "./read.def", 785); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | else if (((((
| 2-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | (( executed 2 times by 1 test: var)->attributes &= ~(0x0001000));((var)->attributes &= ~(0x0001000));Executed by:
executed 2 times by 1 test: ((var)->attributes &= ~(0x0001000));Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | array_flush ((ARRAY *)((var)->value)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | alist = list_string (input_string, ifs_chars, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | if (alist
| 0-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | if (saw_escape
| 0-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | dequote_list (alist); never executed: dequote_list (alist); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | word_list_remove_quoted_nulls (alist); executed 25 times by 1 test: word_list_remove_quoted_nulls (alist);Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | assign_array_var_from_word_list (var, alist, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | dispose_words (alist); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | } executed 25 times by 1 test: end of blockExecuted by:
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | sh_xfree((input_string), "./read.def", 802); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | return executed 25 times by 1 test: (retval);return (retval);Executed by:
executed 25 times by 1 test: return (retval);Executed by:
| 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | if (list == 0
| 48-1322640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | if (saw_escape
| 3-45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | t = dequote_string (input_string); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | var = bind_variable ("REPLY", t, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | sh_xfree((t), "./read.def", 829); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | var = bind_variable ("REPLY", input_string, 0); executed 45 times by 1 test: var = bind_variable ("REPLY", input_string, 0);Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | if (var == 0
| 0-48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | retval = 1; never executed: retval = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | (( executed 48 times by 1 test: var)->attributes &= ~(0x0001000));((var)->attributes &= ~(0x0001000));Executed by:
executed 48 times by 1 test: ((var)->attributes &= ~(0x0001000));Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | sh_xfree((input_string), "./read.def", 838); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | return executed 48 times by 1 test: (retval);return (retval);Executed by:
executed 48 times by 1 test: return (retval);Executed by:
| 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | orig_input_string = input_string; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | for (t = input_string; ifs_chars
| 0-1323206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | ; executed 566 times by 1 test: ;Executed by:
| 566 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | input_string = t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | for (; list->next
| 1019-1322640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | varname = list->word->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | if (legal_identifier (varname) == 0
| 0-1019 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | sh_invalidid (varname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | sh_xfree((orig_input_string), "./read.def", 861); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | if (*
| 21-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | t = get_word_from_string (&input_string, ifs_chars, &e); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | if (t
| 0-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | * executed 998 times by 1 test: e = '\0';*e = '\0';Executed by:
executed 998 times by 1 test: *e = '\0';Executed by:
| 998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | if (t
| 0-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | t1 = dequote_string (t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | var = bind_read_variable (varname, t1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | sh_xfree((t1), "./read.def", 879); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | var = bind_read_variable (varname, t ? t : ""); executed 988 times by 1 test: var = bind_read_variable (varname, t ? t : "");Executed by:
| 988 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | t = (char *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | var = bind_read_variable (varname, ""); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | } executed 21 times by 1 test: end of blockExecuted by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | do { if (t
executed 998 times by 1 test: } while (0);sh_xfree((t), "./read.def", 890);Executed by:
| 21-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | if (var == 0
| 0-1019 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | sh_xfree((orig_input_string), "./read.def", 893); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | stupidly_hack_special_variables (varname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | ((var)->attributes &= ~(0x0001000)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | } executed 1019 times by 1 test: end of blockExecuted by:
| 1019 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | if (legal_identifier (list->word->word) == 0
| 0-1322638 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | sh_invalidid (list->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | sh_xfree((orig_input_string), "./read.def", 909); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | tofree = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | if (*
| 660797-661843 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | t1 = input_string; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | t = get_word_from_string (&input_string, ifs_chars, &e); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 903 | if (*
| 389-661454 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | tofree = input_string = t; executed 661454 times by 1 test: tofree = input_string = t;Executed by:
| 661454 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 905 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | tofree = t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 909 | } executed 389 times by 1 test: end of blockExecuted by:
| 389 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 910 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 912 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | if (saw_escape
| 0-1322633 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | t = dequote_string (input_string); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | var = bind_read_variable (list->word->word, t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | sh_xfree((t), "./read.def", 940); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 920 | var = bind_read_variable (list->word->word, input_string ? input_string : ""); executed 1322636 times by 1 test: var = bind_read_variable (list->word->word, input_string ? input_string : "");Executed by:
| 1322636 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 921 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 922 | if (var
| 1-1322639 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 923 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 924 | stupidly_hack_special_variables (list->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 925 | ((var)->attributes &= ~(0x0001000)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 926 | } executed 1322639 times by 1 test: end of blockExecuted by:
| 1322639 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 927 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 928 | retval = 1; executed 1 time by 1 test: retval = 1;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 929 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 930 | do { if (tofree
executed 661843 times by 1 test: } while (0);sh_xfree((tofree), "./read.def", 953);Executed by:
| 660797-661843 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 931 | sh_xfree((orig_input_string), "./read.def", 954); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 933 | return executed 1322640 times by 1 test: (retval);return (retval);Executed by:
executed 1322640 times by 1 test: return (retval);Executed by:
| 1322640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 934 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 936 | static SHELL_VAR * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 937 | bind_read_variable (name, value) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 938 | char *name, *value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 939 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 940 | SHELL_VAR *v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 942 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 943 | if (valid_array_reference (name, assoc_expand_once) == 0
| 2-1323657 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 944 | v = bind_variable (name, value, 0); executed 1323657 times by 1 test: v = bind_variable (name, value, 0);Executed by:
| 1323657 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 945 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 946 | v = assign_array_element (name, value, assoc_expand_once ? 0x0080 : 0); executed 2 times by 1 test: v = assign_array_element (name, value, assoc_expand_once ? 0x0080 : 0);Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 947 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 948 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 949 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 950 | return executed 1323659 times by 1 test: (v == 0 ? vreturn (v == 0 ? v : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) ((void *)0) : v));Executed by:
executed 1323659 times by 1 test: return (v == 0 ? v : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) ((void *)0) : v));Executed by:
| 1323659 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 951 | : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) executed 1323659 times by 1 test: return (v == 0 ? v : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) ((void *)0) : v));Executed by:
| 1323659 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 952 | ((void *)0) executed 1323659 times by 1 test: return (v == 0 ? v : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) ((void *)0) : v));Executed by:
| 1323659 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 953 | : v)); executed 1323659 times by 1 test: return (v == 0 ? v : ((((((v)->attributes) & (0x0000002))) || ((((v)->attributes) & (0x0004000)))) ? (SHELL_VAR *) ((void *)0) : v));Executed by:
| 1323659 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 954 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 956 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 957 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 958 | read_mbchar (fd, string, ind, ch, unbuffered) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 959 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 960 | char *string; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 961 | int ind, ch, unbuffered; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 962 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 963 | char mbchar[ | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 964 | 16 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 965 | + 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 966 | int i, n, r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 967 | char c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 968 | size_t ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 969 | mbstate_t ps, ps_back; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 970 | wchar_t wc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 971 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 972 | memset (&ps, '\0', sizeof (mbstate_t)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 973 | memset (&ps_back, '\0', sizeof (mbstate_t)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 974 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 975 | mbchar[0] = ch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 976 | i = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 977 | for (n = 0; n <=
| 0-116 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 978 | 16
| 0-116 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 979 | ; n++) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 980 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 981 | ps_back = ps; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 982 | ret = mbrtowc (&wc, mbchar, i, &ps); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 983 | if (ret == (size_t)-2
| 26-90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 984 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 985 | ps = ps_back; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 986 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 987 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 988 | if (unbuffered == 2
| 0-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 989 | r = zreadn (fd, &c, 1); never executed: r = zreadn (fd, &c, 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 990 | else if (unbuffered
| 5-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 991 | r = zread (fd, &c, 1); executed 5 times by 1 test: r = zread (fd, &c, 1);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 992 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 993 | r = zreadc (fd, &c); executed 21 times by 1 test: r = zreadc (fd, &c);Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 994 | if (r <= 0
| 0-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 995 | goto never executed: mbchar_return;goto mbchar_return;never executed: goto mbchar_return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 996 | mbchar[i++] = c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 997 | continue; executed 26 times by 1 test: continue;Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 998 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 999 | else if (ret == (size_t)-1
| 0-90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1000 | break; executed 90 times by 1 test: break;Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1001 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1003 | mbchar_return: code before this statement executed 90 times by 1 test: mbchar_return:Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1004 | if (i > 1
| 26-64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1006 | for (r = 1; r < i
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1007 | string[ind+r-1] = mbchar[r]; executed 26 times by 1 test: string[ind+r-1] = mbchar[r];Executed by:
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1008 | return executed 90 times by 1 test: i - 1;return i - 1;Executed by:
executed 90 times by 1 test: return i - 1;Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1009 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1013 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1014 | ttyrestore (ttp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1015 | struct ttsave *ttp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1016 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1017 | ttsetattr (ttp->fd, &(ttp->attrs)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1018 | tty_modified = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1019 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1020 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1021 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1022 | read_tty_cleanup () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1023 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1024 | if (tty_modified
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1025 | ttyrestore (&termsave); never executed: ttyrestore (&termsave); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1026 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1028 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1029 | read_tty_modified () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1030 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1031 | return executed 550 times by 1 test: (tty_modified);return (tty_modified);Executed by:
executed 550 times by 1 test: return (tty_modified);Executed by:
| 550 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1032 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1034 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1035 | static rl_completion_func_t *old_attempted_completion_function = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1036 | static rl_hook_func_t *old_startup_hook; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1037 | static char *deftext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1038 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1039 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1040 | reset_attempted_completion_function (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1041 | char *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1042 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1043 | if (rl_attempted_completion_function == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1044 | rl_attempted_completion_function = old_attempted_completion_function; never executed: rl_attempted_completion_function = old_attempted_completion_function; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1045 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1046 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1047 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1048 | set_itext () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1049 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1050 | int r1, r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1051 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1052 | r1 = r2 = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1053 | if (old_startup_hook
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1054 | r1 = (*old_startup_hook) (); never executed: r1 = (*old_startup_hook) (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1055 | if (deftext
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1056 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1057 | r2 = rl_insert_text (deftext); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1058 | deftext = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1059 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1060 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1061 | rl_startup_hook = old_startup_hook; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1062 | old_startup_hook = (rl_hook_func_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1063 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1064 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1065 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1066 | return never executed: (r1 || r2);return (r1 || r2);never executed: return (r1 || r2); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1067 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1068 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1069 | static char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1070 | edit_line (p, itext) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1071 | char *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1072 | char *itext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1073 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1074 | char *ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1075 | int len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1076 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1077 | if (bash_readline_initialized == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1078 | initialize_readline (); never executed: initialize_readline (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1079 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1080 | old_attempted_completion_function = rl_attempted_completion_function; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1081 | rl_attempted_completion_function = (rl_completion_func_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1082 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1083 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1084 | bashline_set_event_hook (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1085 | if (itext
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1086 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1087 | old_startup_hook = rl_startup_hook; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1088 | rl_startup_hook = set_itext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1089 | deftext = itext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1090 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1091 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1092 | ret = readline (p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1093 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1094 | rl_attempted_completion_function = old_attempted_completion_function; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1095 | old_attempted_completion_function = (rl_completion_func_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1096 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1097 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1098 | bashline_reset_event_hook (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1099 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1100 | if (ret == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1101 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1102 | len = strlen (ret); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1103 | ret = (char *)sh_xrealloc((ret), (len + 2), "./read.def", 1112); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1104 | ret[len++] = delim; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1105 | ret[len] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1106 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1107 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1109 | static int old_delim_ctype; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1110 | static rl_command_func_t *old_delim_func; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1111 | static int old_newline_ctype; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1112 | static rl_command_func_t *old_newline_func; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1113 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1114 | static unsigned char delim_char; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1115 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1116 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1117 | set_eol_delim (c) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1118 | int c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1119 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1120 | Keymap cmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1122 | if (bash_readline_initialized == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1123 | initialize_readline (); never executed: initialize_readline (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1124 | cmap = rl_get_keymap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1125 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1126 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1127 | old_newline_ctype = cmap[(('M') & 0x1f)].type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1128 | old_newline_func = cmap[(('M') & 0x1f)].function; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1129 | cmap[(('M') & 0x1f)].type = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1130 | cmap[(('M') & 0x1f)].function = rl_insert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1133 | old_delim_ctype = cmap[c].type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1134 | old_delim_func = cmap[c].function; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1135 | cmap[c].type = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1136 | cmap[c].function = rl_newline; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1138 | delim_char = c; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1139 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1141 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1142 | reset_eol_delim (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1143 | char *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1144 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1145 | Keymap cmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1147 | cmap = rl_get_keymap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1149 | cmap[(('M') & 0x1f)].type = old_newline_ctype; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1150 | cmap[(('M') & 0x1f)].function = old_newline_func; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1152 | cmap[delim_char].type = old_delim_ctype; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1153 | cmap[delim_char].function = old_delim_func; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1154 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |