Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/input.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||
10 | extern void termsig_handler (int); | - | ||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||
14 | - | |||||||||||||||||||||||||
15 | static char localbuf[128]; | - | ||||||||||||||||||||||||
16 | static int local_index = 0, local_bufused = 0; | - | ||||||||||||||||||||||||
17 | - | |||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||
19 | - | |||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||
21 | int | - | ||||||||||||||||||||||||
22 | getc_with_restart (stream) | - | ||||||||||||||||||||||||
23 | FILE *stream; | - | ||||||||||||||||||||||||
24 | { | - | ||||||||||||||||||||||||
25 | unsigned char uc; | - | ||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||
27 | do { if (terminating_signal
never executed: } while (0);termsig_handler (terminating_signal); | 0 | ||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||
30 | if (local_index == local_bufused
| 0 | ||||||||||||||||||||||||
31 | { | - | ||||||||||||||||||||||||
32 | while (1) | - | ||||||||||||||||||||||||
33 | { | - | ||||||||||||||||||||||||
34 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0 | ||||||||||||||||||||||||
35 | run_pending_traps (); | - | ||||||||||||||||||||||||
36 | - | |||||||||||||||||||||||||
37 | local_bufused = read (fileno (stream), localbuf, sizeof(localbuf)); | - | ||||||||||||||||||||||||
38 | if (local_bufused > 0
| 0 | ||||||||||||||||||||||||
39 | break; never executed: break; | 0 | ||||||||||||||||||||||||
40 | else if (local_bufused == 0
| 0 | ||||||||||||||||||||||||
41 | { | - | ||||||||||||||||||||||||
42 | local_index = 0; | - | ||||||||||||||||||||||||
43 | return never executed: return (-1) ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
44 | (-1) never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
45 | ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
46 | } | - | ||||||||||||||||||||||||
47 | else if ( | - | ||||||||||||||||||||||||
48 | (*
| 0 | ||||||||||||||||||||||||
49 | ==
| 0 | ||||||||||||||||||||||||
50 | 11
| 0 | ||||||||||||||||||||||||
51 | || | - | ||||||||||||||||||||||||
52 | (*
| 0 | ||||||||||||||||||||||||
53 | ==
| 0 | ||||||||||||||||||||||||
54 | 11
| 0 | ||||||||||||||||||||||||
55 | ) | - | ||||||||||||||||||||||||
56 | { | - | ||||||||||||||||||||||||
57 | if (sh_unset_nodelay_mode (fileno (stream)) < 0
| 0 | ||||||||||||||||||||||||
58 | { | - | ||||||||||||||||||||||||
59 | sys_error ( | - | ||||||||||||||||||||||||
60 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||
61 | "cannot reset nodelay mode for fd %d" | - | ||||||||||||||||||||||||
62 | , 5) | - | ||||||||||||||||||||||||
63 | , fileno (stream)); | - | ||||||||||||||||||||||||
64 | local_index = local_bufused = 0; | - | ||||||||||||||||||||||||
65 | return never executed: return (-1) ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
66 | (-1) never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
67 | ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
68 | } | - | ||||||||||||||||||||||||
69 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||
70 | } | - | ||||||||||||||||||||||||
71 | else if ( | - | ||||||||||||||||||||||||
72 | (*
| 0 | ||||||||||||||||||||||||
73 | !=
| 0 | ||||||||||||||||||||||||
74 | 4
| 0 | ||||||||||||||||||||||||
75 | ) | - | ||||||||||||||||||||||||
76 | { | - | ||||||||||||||||||||||||
77 | local_index = local_bufused = 0; | - | ||||||||||||||||||||||||
78 | return never executed: return (-1) ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
79 | (-1) never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
80 | ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
81 | } | - | ||||||||||||||||||||||||
82 | else if (interrupt_state
| 0 | ||||||||||||||||||||||||
83 | local_index = local_bufused = 0; never executed: local_index = local_bufused = 0; | 0 | ||||||||||||||||||||||||
84 | } never executed: end of block | 0 | ||||||||||||||||||||||||
85 | local_index = 0; | - | ||||||||||||||||||||||||
86 | } never executed: end of block | 0 | ||||||||||||||||||||||||
87 | uc = localbuf[local_index++]; | - | ||||||||||||||||||||||||
88 | return never executed: uc;return uc; never executed: return uc; | 0 | ||||||||||||||||||||||||
89 | } | - | ||||||||||||||||||||||||
90 | - | |||||||||||||||||||||||||
91 | int | - | ||||||||||||||||||||||||
92 | ungetc_with_restart (c, stream) | - | ||||||||||||||||||||||||
93 | int c; | - | ||||||||||||||||||||||||
94 | FILE *stream; | - | ||||||||||||||||||||||||
95 | { | - | ||||||||||||||||||||||||
96 | if (local_index == 0
| 0 | ||||||||||||||||||||||||
97 | (-1)
| 0 | ||||||||||||||||||||||||
98 | ) | - | ||||||||||||||||||||||||
99 | return never executed: return (-1) ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
100 | (-1) never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
101 | ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
102 | localbuf[--local_index] = c; | - | ||||||||||||||||||||||||
103 | return never executed: c;return c; never executed: return c; | 0 | ||||||||||||||||||||||||
104 | } | - | ||||||||||||||||||||||||
105 | int bash_input_fd_changed; | - | ||||||||||||||||||||||||
106 | - | |||||||||||||||||||||||||
107 | - | |||||||||||||||||||||||||
108 | - | |||||||||||||||||||||||||
109 | - | |||||||||||||||||||||||||
110 | - | |||||||||||||||||||||||||
111 | - | |||||||||||||||||||||||||
112 | static BUFFERED_STREAM **buffers = (BUFFERED_STREAM **) | - | ||||||||||||||||||||||||
113 | ((void *)0) | - | ||||||||||||||||||||||||
114 | ; | - | ||||||||||||||||||||||||
115 | static int nbuffers; | - | ||||||||||||||||||||||||
116 | - | |||||||||||||||||||||||||
117 | - | |||||||||||||||||||||||||
118 | - | |||||||||||||||||||||||||
119 | - | |||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||
121 | static void | - | ||||||||||||||||||||||||
122 | allocate_buffers (n) | - | ||||||||||||||||||||||||
123 | int n; | - | ||||||||||||||||||||||||
124 | { | - | ||||||||||||||||||||||||
125 | register int i, orig_nbuffers; | - | ||||||||||||||||||||||||
126 | - | |||||||||||||||||||||||||
127 | orig_nbuffers = nbuffers; | - | ||||||||||||||||||||||||
128 | nbuffers = n + 20; | - | ||||||||||||||||||||||||
129 | buffers = (BUFFERED_STREAM **)sh_xrealloc((buffers), (nbuffers * sizeof (BUFFERED_STREAM *)), | - | ||||||||||||||||||||||||
130 | "input.c" | - | ||||||||||||||||||||||||
131 | , | - | ||||||||||||||||||||||||
132 | 176 | - | ||||||||||||||||||||||||
133 | ) | - | ||||||||||||||||||||||||
134 | ; | - | ||||||||||||||||||||||||
135 | - | |||||||||||||||||||||||||
136 | - | |||||||||||||||||||||||||
137 | for (i = orig_nbuffers; i < nbuffers
| 5251-1442749 | ||||||||||||||||||||||||
138 | buffers[i] = (BUFFERED_STREAM *) executed 1442749 times by 1 test: buffers[i] = (BUFFERED_STREAM *) ((void *)0) ; Executed by:
| 1442749 | ||||||||||||||||||||||||
139 | ((void *)0) executed 1442749 times by 1 test: buffers[i] = (BUFFERED_STREAM *) ((void *)0) ; Executed by:
| 1442749 | ||||||||||||||||||||||||
140 | ; executed 1442749 times by 1 test: buffers[i] = (BUFFERED_STREAM *) ((void *)0) ; Executed by:
| 1442749 | ||||||||||||||||||||||||
141 | } executed 5251 times by 1 test: end of block Executed by:
| 5251 | ||||||||||||||||||||||||
142 | - | |||||||||||||||||||||||||
143 | - | |||||||||||||||||||||||||
144 | - | |||||||||||||||||||||||||
145 | static BUFFERED_STREAM * | - | ||||||||||||||||||||||||
146 | make_buffered_stream (fd, buffer, bufsize) | - | ||||||||||||||||||||||||
147 | int fd; | - | ||||||||||||||||||||||||
148 | char *buffer; | - | ||||||||||||||||||||||||
149 | size_t bufsize; | - | ||||||||||||||||||||||||
150 | { | - | ||||||||||||||||||||||||
151 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||
153 | bp = (BUFFERED_STREAM *)sh_xmalloc((sizeof (BUFFERED_STREAM)), "input.c", 193); | - | ||||||||||||||||||||||||
154 | do { if ((
executed 5251 times by 1 test: } while (0);allocate_buffers (fd); Executed by:
| 17-5251 | ||||||||||||||||||||||||
155 | buffers[fd] = bp; | - | ||||||||||||||||||||||||
156 | bp->b_fd = fd; | - | ||||||||||||||||||||||||
157 | bp->b_buffer = buffer; | - | ||||||||||||||||||||||||
158 | bp->b_size = bufsize; | - | ||||||||||||||||||||||||
159 | bp->b_used = bp->b_inputp = bp->b_flag = 0; | - | ||||||||||||||||||||||||
160 | if (bufsize == 1
| 4-5264 | ||||||||||||||||||||||||
161 | bp->b_flag |= 0x04; executed 4 times by 1 test: bp->b_flag |= 0x04; Executed by:
| 4 | ||||||||||||||||||||||||
162 | if (0 && ( dead code: fcntl (fd, (fcntl (fd, 3 ) & 0) != 0 dead code: (fcntl (fd, 3 ) & 0) != 0 | - | ||||||||||||||||||||||||
163 | 3 dead code: (fcntl (fd, 3 ) & 0) != 0 | - | ||||||||||||||||||||||||
164 | ) & 0) != 0 dead code: )(fcntl (fd, 3 ) & 0) != 0 | - | ||||||||||||||||||||||||
165 | bp->b_flag |= 0x10; dead code: bp->b_flag |= 0x10; | - | ||||||||||||||||||||||||
166 | return executed 5268 times by 1 test: (bp);return (bp); Executed by:
executed 5268 times by 1 test: return (bp); Executed by:
| 5268 | ||||||||||||||||||||||||
167 | } | - | ||||||||||||||||||||||||
168 | - | |||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||
170 | static BUFFERED_STREAM * | - | ||||||||||||||||||||||||
171 | copy_buffered_stream (bp) | - | ||||||||||||||||||||||||
172 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
173 | { | - | ||||||||||||||||||||||||
174 | BUFFERED_STREAM *nbp; | - | ||||||||||||||||||||||||
175 | - | |||||||||||||||||||||||||
176 | if (!bp
| 0-28888 | ||||||||||||||||||||||||
177 | return executed 28888 times by 1 test: ((BUFFERED_STREAM *)return ((BUFFERED_STREAM *) ((void *)0) ); Executed by:
executed 28888 times by 1 test: return ((BUFFERED_STREAM *) ((void *)0) ); Executed by:
| 28888 | ||||||||||||||||||||||||
178 | ((void *)0) executed 28888 times by 1 test: return ((BUFFERED_STREAM *) ((void *)0) ); Executed by:
| 28888 | ||||||||||||||||||||||||
179 | ); executed 28888 times by 1 test: return ((BUFFERED_STREAM *) ((void *)0) ); Executed by:
| 28888 | ||||||||||||||||||||||||
180 | - | |||||||||||||||||||||||||
181 | nbp = (BUFFERED_STREAM *)sh_xmalloc((sizeof (BUFFERED_STREAM)), "input.c", 217); | - | ||||||||||||||||||||||||
182 | xbcopy ((char *)bp, (char *)nbp, sizeof (BUFFERED_STREAM)); | - | ||||||||||||||||||||||||
183 | return never executed: (nbp);return (nbp); never executed: return (nbp); | 0 | ||||||||||||||||||||||||
184 | } | - | ||||||||||||||||||||||||
185 | - | |||||||||||||||||||||||||
186 | int | - | ||||||||||||||||||||||||
187 | set_bash_input_fd (fd) | - | ||||||||||||||||||||||||
188 | int fd; | - | ||||||||||||||||||||||||
189 | { | - | ||||||||||||||||||||||||
190 | if (bash_input.type == st_bstream
| 0 | ||||||||||||||||||||||||
191 | bash_input.location.buffered_fd = fd; never executed: bash_input.location.buffered_fd = fd; | 0 | ||||||||||||||||||||||||
192 | else if (interactive_shell == 0
| 0 | ||||||||||||||||||||||||
193 | default_buffered_input = fd; never executed: default_buffered_input = fd; | 0 | ||||||||||||||||||||||||
194 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
195 | } | - | ||||||||||||||||||||||||
196 | - | |||||||||||||||||||||||||
197 | int | - | ||||||||||||||||||||||||
198 | fd_is_bash_input (fd) | - | ||||||||||||||||||||||||
199 | int fd; | - | ||||||||||||||||||||||||
200 | { | - | ||||||||||||||||||||||||
201 | if (bash_input.type == st_bstream
| 2-2715010 | ||||||||||||||||||||||||
202 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||||||||
203 | else if (interactive_shell == 0
| 0-2715357 | ||||||||||||||||||||||||
204 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||
205 | return executed 2715428 times by 1 test: 0;return 0; Executed by:
executed 2715428 times by 1 test: return 0; Executed by:
| 2715428 | ||||||||||||||||||||||||
206 | } | - | ||||||||||||||||||||||||
207 | - | |||||||||||||||||||||||||
208 | - | |||||||||||||||||||||||||
209 | - | |||||||||||||||||||||||||
210 | - | |||||||||||||||||||||||||
211 | - | |||||||||||||||||||||||||
212 | int | - | ||||||||||||||||||||||||
213 | save_bash_input (fd, new_fd) | - | ||||||||||||||||||||||||
214 | int fd, new_fd; | - | ||||||||||||||||||||||||
215 | { | - | ||||||||||||||||||||||||
216 | int nfd; | - | ||||||||||||||||||||||||
217 | - | |||||||||||||||||||||||||
218 | - | |||||||||||||||||||||||||
219 | - | |||||||||||||||||||||||||
220 | - | |||||||||||||||||||||||||
221 | if (buffers[fd]
| 0 | ||||||||||||||||||||||||
222 | sync_buffered_stream (fd); never executed: sync_buffered_stream (fd); | 0 | ||||||||||||||||||||||||
223 | - | |||||||||||||||||||||||||
224 | - | |||||||||||||||||||||||||
225 | - | |||||||||||||||||||||||||
226 | nfd = (
| 0 | ||||||||||||||||||||||||
227 | 0 | - | ||||||||||||||||||||||||
228 | , 10) : new_fd; | - | ||||||||||||||||||||||||
229 | if (nfd == -1
| 0 | ||||||||||||||||||||||||
230 | { | - | ||||||||||||||||||||||||
231 | if (fcntl (fd,
| 0 | ||||||||||||||||||||||||
232 | 1
| 0 | ||||||||||||||||||||||||
233 | , 0) == 0
| 0 | ||||||||||||||||||||||||
234 | sys_error ( never executed: sys_error ( dcgettext (((void *)0), "cannot allocate new file descriptor for bash input from fd %d" , 5) , fd); | 0 | ||||||||||||||||||||||||
235 | dcgettext (((void *)0), never executed: sys_error ( dcgettext (((void *)0), "cannot allocate new file descriptor for bash input from fd %d" , 5) , fd); | 0 | ||||||||||||||||||||||||
236 | "cannot allocate new file descriptor for bash input from fd %d" never executed: sys_error ( dcgettext (((void *)0), "cannot allocate new file descriptor for bash input from fd %d" , 5) , fd); | 0 | ||||||||||||||||||||||||
237 | , 5) never executed: sys_error ( dcgettext (((void *)0), "cannot allocate new file descriptor for bash input from fd %d" , 5) , fd); | 0 | ||||||||||||||||||||||||
238 | , fd); never executed: sys_error ( dcgettext (((void *)0), "cannot allocate new file descriptor for bash input from fd %d" , 5) , fd); | 0 | ||||||||||||||||||||||||
239 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
240 | } | - | ||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||
242 | if (nfd < nbuffers
| 0 | ||||||||||||||||||||||||
243 | { | - | ||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||
245 | - | |||||||||||||||||||||||||
246 | internal_error ( | - | ||||||||||||||||||||||||
247 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||
248 | "save_bash_input: buffer already exists for new fd %d" | - | ||||||||||||||||||||||||
249 | , 5) | - | ||||||||||||||||||||||||
250 | , nfd); | - | ||||||||||||||||||||||||
251 | if (buffers[nfd]->b_flag & 0x20
| 0 | ||||||||||||||||||||||||
252 | buffers[nfd]->b_buffer = (char *) never executed: buffers[nfd]->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
253 | ((void *)0) never executed: buffers[nfd]->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
254 | ; never executed: buffers[nfd]->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
255 | free_buffered_stream (buffers[nfd]); | - | ||||||||||||||||||||||||
256 | } never executed: end of block | 0 | ||||||||||||||||||||||||
257 | - | |||||||||||||||||||||||||
258 | - | |||||||||||||||||||||||||
259 | if (bash_input.type == st_bstream
| 0 | ||||||||||||||||||||||||
260 | { | - | ||||||||||||||||||||||||
261 | bash_input.location.buffered_fd = nfd; | - | ||||||||||||||||||||||||
262 | fd_to_buffered_stream (nfd); | - | ||||||||||||||||||||||||
263 | close_buffered_fd (fd); | - | ||||||||||||||||||||||||
264 | } never executed: end of block | 0 | ||||||||||||||||||||||||
265 | else | - | ||||||||||||||||||||||||
266 | - | |||||||||||||||||||||||||
267 | - | |||||||||||||||||||||||||
268 | - | |||||||||||||||||||||||||
269 | - | |||||||||||||||||||||||||
270 | - | |||||||||||||||||||||||||
271 | - | |||||||||||||||||||||||||
272 | bash_input_fd_changed++; never executed: bash_input_fd_changed++; | 0 | ||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||
274 | if (default_buffered_input == fd
| 0 | ||||||||||||||||||||||||
275 | default_buffered_input = nfd; never executed: default_buffered_input = nfd; | 0 | ||||||||||||||||||||||||
276 | - | |||||||||||||||||||||||||
277 | (fcntl ((nfd), | - | ||||||||||||||||||||||||
278 | 2 | - | ||||||||||||||||||||||||
279 | , | - | ||||||||||||||||||||||||
280 | 1 | - | ||||||||||||||||||||||||
281 | )); | - | ||||||||||||||||||||||||
282 | return never executed: nfd;return nfd; never executed: return nfd; | 0 | ||||||||||||||||||||||||
283 | } | - | ||||||||||||||||||||||||
284 | int | - | ||||||||||||||||||||||||
285 | check_bash_input (fd) | - | ||||||||||||||||||||||||
286 | int fd; | - | ||||||||||||||||||||||||
287 | { | - | ||||||||||||||||||||||||
288 | if (fd_is_bash_input (fd)
| 2-1364588 | ||||||||||||||||||||||||
289 | { | - | ||||||||||||||||||||||||
290 | if (fd > 0
| 0-2 | ||||||||||||||||||||||||
291 | return never executed: ((save_bash_input (fd, -1) == -1) ? -1 : 0);return ((save_bash_input (fd, -1) == -1) ? -1 : 0); never executed: return ((save_bash_input (fd, -1) == -1) ? -1 : 0); | 0 | ||||||||||||||||||||||||
292 | else if (fd == 0
| 0-2 | ||||||||||||||||||||||||
293 | return executed 2 times by 1 test: ((sync_buffered_stream (fd) == -1) ? -1 : 0);return ((sync_buffered_stream (fd) == -1) ? -1 : 0); Executed by:
executed 2 times by 1 test: return ((sync_buffered_stream (fd) == -1) ? -1 : 0); Executed by:
| 2 | ||||||||||||||||||||||||
294 | } never executed: end of block | 0 | ||||||||||||||||||||||||
295 | return executed 1364588 times by 1 test: 0;return 0; Executed by:
executed 1364588 times by 1 test: return 0; Executed by:
| 1364588 | ||||||||||||||||||||||||
296 | } | - | ||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||
298 | - | |||||||||||||||||||||||||
299 | - | |||||||||||||||||||||||||
300 | - | |||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||
302 | int | - | ||||||||||||||||||||||||
303 | duplicate_buffered_stream (fd1, fd2) | - | ||||||||||||||||||||||||
304 | int fd1, fd2; | - | ||||||||||||||||||||||||
305 | { | - | ||||||||||||||||||||||||
306 | int is_bash_input, m; | - | ||||||||||||||||||||||||
307 | - | |||||||||||||||||||||||||
308 | if (fd1 == fd2
| 28888-634537 | ||||||||||||||||||||||||
309 | return executed 634537 times by 1 test: 0;return 0; Executed by:
executed 634537 times by 1 test: return 0; Executed by:
| 634537 | ||||||||||||||||||||||||
310 | - | |||||||||||||||||||||||||
311 | m = (((
| 40-28848 | ||||||||||||||||||||||||
312 | do { if ((
never executed: } while (0);allocate_buffers (m); | 0-28888 | ||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||
318 | is_bash_input = (
| 7-28881 | ||||||||||||||||||||||||
319 | (
| 2-28879 | ||||||||||||||||||||||||
320 | - | |||||||||||||||||||||||||
321 | if (buffers[fd2]
| 2-28886 | ||||||||||||||||||||||||
322 | { | - | ||||||||||||||||||||||||
323 | - | |||||||||||||||||||||||||
324 | if (buffers[fd1]
| 0-2 | ||||||||||||||||||||||||
325 | buffers[fd2] = (BUFFERED_STREAM *) never executed: buffers[fd2] = (BUFFERED_STREAM *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
326 | ((void *)0) never executed: buffers[fd2] = (BUFFERED_STREAM *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
327 | ; never executed: buffers[fd2] = (BUFFERED_STREAM *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
328 | - | |||||||||||||||||||||||||
329 | else if (buffers[fd2]->b_flag & 0x20
| 0-2 | ||||||||||||||||||||||||
330 | { | - | ||||||||||||||||||||||||
331 | buffers[fd2]->b_buffer = (char *) | - | ||||||||||||||||||||||||
332 | ((void *)0) | - | ||||||||||||||||||||||||
333 | ; | - | ||||||||||||||||||||||||
334 | free_buffered_stream (buffers[fd2]); | - | ||||||||||||||||||||||||
335 | } never executed: end of block | 0 | ||||||||||||||||||||||||
336 | else | - | ||||||||||||||||||||||||
337 | free_buffered_stream (buffers[fd2]); executed 2 times by 1 test: free_buffered_stream (buffers[fd2]); Executed by:
| 2 | ||||||||||||||||||||||||
338 | } | - | ||||||||||||||||||||||||
339 | buffers[fd2] = copy_buffered_stream (buffers[fd1]); | - | ||||||||||||||||||||||||
340 | if (buffers[fd2]
| 0-28888 | ||||||||||||||||||||||||
341 | buffers[fd2]->b_fd = fd2; never executed: buffers[fd2]->b_fd = fd2; | 0 | ||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||
343 | if (is_bash_input
| 2-28886 | ||||||||||||||||||||||||
344 | { | - | ||||||||||||||||||||||||
345 | if (!buffers[fd2]
| 0-2 | ||||||||||||||||||||||||
346 | fd_to_buffered_stream (fd2); executed 2 times by 1 test: fd_to_buffered_stream (fd2); Executed by:
| 2 | ||||||||||||||||||||||||
347 | buffers[fd2]->b_flag |= 0x08; | - | ||||||||||||||||||||||||
348 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
349 | - | |||||||||||||||||||||||||
350 | if (fd_is_bash_input (fd1)
| 0-28888 | ||||||||||||||||||||||||
351 | buffers[fd2]->b_flag |= 0x20; never executed: buffers[fd2]->b_flag |= 0x20; | 0 | ||||||||||||||||||||||||
352 | - | |||||||||||||||||||||||||
353 | return executed 28888 times by 1 test: (fd2);return (fd2); Executed by:
executed 28888 times by 1 test: return (fd2); Executed by:
| 28888 | ||||||||||||||||||||||||
354 | } | - | ||||||||||||||||||||||||
355 | - | |||||||||||||||||||||||||
356 | - | |||||||||||||||||||||||||
357 | - | |||||||||||||||||||||||||
358 | - | |||||||||||||||||||||||||
359 | - | |||||||||||||||||||||||||
360 | - | |||||||||||||||||||||||||
361 | - | |||||||||||||||||||||||||
362 | BUFFERED_STREAM * | - | ||||||||||||||||||||||||
363 | fd_to_buffered_stream (fd) | - | ||||||||||||||||||||||||
364 | int fd; | - | ||||||||||||||||||||||||
365 | { | - | ||||||||||||||||||||||||
366 | char *buffer; | - | ||||||||||||||||||||||||
367 | size_t size; | - | ||||||||||||||||||||||||
368 | struct stat sb; | - | ||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||
370 | if (fstat (fd, &sb) < 0
| 0-5268 | ||||||||||||||||||||||||
371 | { | - | ||||||||||||||||||||||||
372 | close (fd); | - | ||||||||||||||||||||||||
373 | return never executed: ((BUFFERED_STREAM *)return ((BUFFERED_STREAM *) ((void *)0) ); never executed: return ((BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
374 | ((void *)0) never executed: return ((BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
375 | ); never executed: return ((BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
376 | } | - | ||||||||||||||||||||||||
377 | - | |||||||||||||||||||||||||
378 | size = ((
| 3-5265 | ||||||||||||||||||||||||
379 | 1
| 3-5265 | ||||||||||||||||||||||||
380 | ) >= 0))
| 3-5265 | ||||||||||||||||||||||||
381 | if (size == 0
| 1-5267 | ||||||||||||||||||||||||
382 | size = 1; executed 1 time by 1 test: size = 1; Executed by:
| 1 | ||||||||||||||||||||||||
383 | buffer = (char *)sh_xmalloc((size), "input.c", 405); | - | ||||||||||||||||||||||||
384 | - | |||||||||||||||||||||||||
385 | return executed 5268 times by 1 test: (make_buffered_stream (fd, buffer, size));return (make_buffered_stream (fd, buffer, size)); Executed by:
executed 5268 times by 1 test: return (make_buffered_stream (fd, buffer, size)); Executed by:
| 5268 | ||||||||||||||||||||||||
386 | } | - | ||||||||||||||||||||||||
387 | - | |||||||||||||||||||||||||
388 | - | |||||||||||||||||||||||||
389 | BUFFERED_STREAM * | - | ||||||||||||||||||||||||
390 | open_buffered_stream (file) | - | ||||||||||||||||||||||||
391 | char *file; | - | ||||||||||||||||||||||||
392 | { | - | ||||||||||||||||||||||||
393 | int fd; | - | ||||||||||||||||||||||||
394 | - | |||||||||||||||||||||||||
395 | fd = open (file, | - | ||||||||||||||||||||||||
396 | 00 | - | ||||||||||||||||||||||||
397 | ); | - | ||||||||||||||||||||||||
398 | return never executed: ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *)return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *) ((void *)0) ); never executed: return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
399 | ((void *)0) never executed: return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
400 | ); never executed: return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *) ((void *)0) ); | 0 | ||||||||||||||||||||||||
401 | } | - | ||||||||||||||||||||||||
402 | - | |||||||||||||||||||||||||
403 | - | |||||||||||||||||||||||||
404 | - | |||||||||||||||||||||||||
405 | void | - | ||||||||||||||||||||||||
406 | free_buffered_stream (bp) | - | ||||||||||||||||||||||||
407 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
408 | { | - | ||||||||||||||||||||||||
409 | int n; | - | ||||||||||||||||||||||||
410 | - | |||||||||||||||||||||||||
411 | if (!bp
| 0-4857 | ||||||||||||||||||||||||
412 | return; never executed: return; | 0 | ||||||||||||||||||||||||
413 | - | |||||||||||||||||||||||||
414 | n = bp->b_fd; | - | ||||||||||||||||||||||||
415 | if (bp->b_buffer
| 0-4857 | ||||||||||||||||||||||||
416 | sh_xfree((bp->b_buffer), "input.c", 434); executed 4857 times by 1 test: sh_xfree((bp->b_buffer), "input.c", 434); Executed by:
| 4857 | ||||||||||||||||||||||||
417 | sh_xfree((bp), "input.c", 435); | - | ||||||||||||||||||||||||
418 | buffers[n] = (BUFFERED_STREAM *) | - | ||||||||||||||||||||||||
419 | ((void *)0) | - | ||||||||||||||||||||||||
420 | ; | - | ||||||||||||||||||||||||
421 | } executed 4857 times by 1 test: end of block Executed by:
| 4857 | ||||||||||||||||||||||||
422 | - | |||||||||||||||||||||||||
423 | - | |||||||||||||||||||||||||
424 | - | |||||||||||||||||||||||||
425 | int | - | ||||||||||||||||||||||||
426 | close_buffered_stream (bp) | - | ||||||||||||||||||||||||
427 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
428 | { | - | ||||||||||||||||||||||||
429 | int fd; | - | ||||||||||||||||||||||||
430 | - | |||||||||||||||||||||||||
431 | if (!bp
| 0-4855 | ||||||||||||||||||||||||
432 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||
433 | fd = bp->b_fd; | - | ||||||||||||||||||||||||
434 | if (bp->b_flag & 0x20
| 0-4855 | ||||||||||||||||||||||||
435 | bp->b_buffer = (char *) never executed: bp->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
436 | ((void *)0) never executed: bp->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
437 | ; never executed: bp->b_buffer = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||
438 | free_buffered_stream (bp); | - | ||||||||||||||||||||||||
439 | return executed 4855 times by 1 test: (close (fd));return (close (fd)); Executed by:
executed 4855 times by 1 test: return (close (fd)); Executed by:
| 4855 | ||||||||||||||||||||||||
440 | } | - | ||||||||||||||||||||||||
441 | - | |||||||||||||||||||||||||
442 | - | |||||||||||||||||||||||||
443 | - | |||||||||||||||||||||||||
444 | int | - | ||||||||||||||||||||||||
445 | close_buffered_fd (fd) | - | ||||||||||||||||||||||||
446 | int fd; | - | ||||||||||||||||||||||||
447 | { | - | ||||||||||||||||||||||||
448 | if (fd < 0
| 0-698794 | ||||||||||||||||||||||||
449 | { | - | ||||||||||||||||||||||||
450 | - | |||||||||||||||||||||||||
451 | (*__errno_location ()) | - | ||||||||||||||||||||||||
452 | = | - | ||||||||||||||||||||||||
453 | 9 | - | ||||||||||||||||||||||||
454 | ; | - | ||||||||||||||||||||||||
455 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
456 | } | - | ||||||||||||||||||||||||
457 | if (fd >= nbuffers
| 0-698763 | ||||||||||||||||||||||||
458 | return executed 693939 times by 1 test: (close (fd));return (close (fd)); Executed by:
executed 693939 times by 1 test: return (close (fd)); Executed by:
| 693939 | ||||||||||||||||||||||||
459 | return executed 4855 times by 1 test: (close_buffered_stream (buffers[fd]));return (close_buffered_stream (buffers[fd])); Executed by:
executed 4855 times by 1 test: return (close_buffered_stream (buffers[fd])); Executed by:
| 4855 | ||||||||||||||||||||||||
460 | } | - | ||||||||||||||||||||||||
461 | - | |||||||||||||||||||||||||
462 | - | |||||||||||||||||||||||||
463 | - | |||||||||||||||||||||||||
464 | BUFFERED_STREAM * | - | ||||||||||||||||||||||||
465 | set_buffered_stream (fd, bp) | - | ||||||||||||||||||||||||
466 | int fd; | - | ||||||||||||||||||||||||
467 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
468 | { | - | ||||||||||||||||||||||||
469 | BUFFERED_STREAM *ret; | - | ||||||||||||||||||||||||
470 | - | |||||||||||||||||||||||||
471 | ret = buffers[fd]; | - | ||||||||||||||||||||||||
472 | buffers[fd] = bp; | - | ||||||||||||||||||||||||
473 | return executed 1432257 times by 1 test: ret;return ret; Executed by:
executed 1432257 times by 1 test: return ret; Executed by:
| 1432257 | ||||||||||||||||||||||||
474 | } | - | ||||||||||||||||||||||||
475 | - | |||||||||||||||||||||||||
476 | - | |||||||||||||||||||||||||
477 | static int | - | ||||||||||||||||||||||||
478 | b_fill_buffer (bp) | - | ||||||||||||||||||||||||
479 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
480 | { | - | ||||||||||||||||||||||||
481 | ssize_t nr; | - | ||||||||||||||||||||||||
482 | off_t o; | - | ||||||||||||||||||||||||
483 | - | |||||||||||||||||||||||||
484 | do { if (terminating_signal
never executed: } while (0);termsig_handler (terminating_signal); | 0-38630 | ||||||||||||||||||||||||
485 | - | |||||||||||||||||||||||||
486 | - | |||||||||||||||||||||||||
487 | - | |||||||||||||||||||||||||
488 | - | |||||||||||||||||||||||||
489 | if ((
| 0-38630 | ||||||||||||||||||||||||
490 | { | - | ||||||||||||||||||||||||
491 | o = lseek (bp->b_fd, 0, | - | ||||||||||||||||||||||||
492 | 1 | - | ||||||||||||||||||||||||
493 | ); | - | ||||||||||||||||||||||||
494 | nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); | - | ||||||||||||||||||||||||
495 | if (nr > 0
| 0 | ||||||||||||||||||||||||
496 | 1
| 0 | ||||||||||||||||||||||||
497 | ) - o
| 0 | ||||||||||||||||||||||||
498 | { | - | ||||||||||||||||||||||||
499 | lseek (bp->b_fd, o, | - | ||||||||||||||||||||||||
500 | 0 | - | ||||||||||||||||||||||||
501 | ); | - | ||||||||||||||||||||||||
502 | bp->b_flag |= 0x04; | - | ||||||||||||||||||||||||
503 | bp->b_size = 1; | - | ||||||||||||||||||||||||
504 | nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); | - | ||||||||||||||||||||||||
505 | } never executed: end of block | 0 | ||||||||||||||||||||||||
506 | } never executed: end of block | 0 | ||||||||||||||||||||||||
507 | else | - | ||||||||||||||||||||||||
508 | nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); executed 38630 times by 1 test: nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); Executed by:
| 38630 | ||||||||||||||||||||||||
509 | if (nr <= 0
| 338-38292 | ||||||||||||||||||||||||
510 | { | - | ||||||||||||||||||||||||
511 | bp->b_used = bp->b_inputp = 0; | - | ||||||||||||||||||||||||
512 | bp->b_buffer[0] = 0; | - | ||||||||||||||||||||||||
513 | if (nr == 0
| 0-338 | ||||||||||||||||||||||||
514 | bp->b_flag |= 0x01; executed 338 times by 1 test: bp->b_flag |= 0x01; Executed by:
| 338 | ||||||||||||||||||||||||
515 | else | - | ||||||||||||||||||||||||
516 | bp->b_flag |= 0x02; never executed: bp->b_flag |= 0x02; | 0 | ||||||||||||||||||||||||
517 | return executed 338 times by 1 test: (return ( (-1) ); Executed by:
executed 338 times by 1 test: return ( (-1) ); Executed by:
| 338 | ||||||||||||||||||||||||
518 | (-1) executed 338 times by 1 test: return ( (-1) ); Executed by:
| 338 | ||||||||||||||||||||||||
519 | ); executed 338 times by 1 test: return ( (-1) ); Executed by:
| 338 | ||||||||||||||||||||||||
520 | } | - | ||||||||||||||||||||||||
521 | - | |||||||||||||||||||||||||
522 | bp->b_used = nr; | - | ||||||||||||||||||||||||
523 | bp->b_inputp = 0; | - | ||||||||||||||||||||||||
524 | return executed 38292 times by 1 test: (bp->b_buffer[bp->b_inputp++] & 0xFF);return (bp->b_buffer[bp->b_inputp++] & 0xFF); Executed by:
executed 38292 times by 1 test: return (bp->b_buffer[bp->b_inputp++] & 0xFF); Executed by:
| 38292 | ||||||||||||||||||||||||
525 | } | - | ||||||||||||||||||||||||
526 | static int | - | ||||||||||||||||||||||||
527 | bufstream_ungetc(c, bp) | - | ||||||||||||||||||||||||
528 | int c; | - | ||||||||||||||||||||||||
529 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
530 | { | - | ||||||||||||||||||||||||
531 | if (c ==
| 0-1160 | ||||||||||||||||||||||||
532 | (-1)
| 0-1160 | ||||||||||||||||||||||||
533 | || bp == 0
| 0-1160 | ||||||||||||||||||||||||
534 | return never executed: (return ( (-1) ); never executed: return ( (-1) ); | 0 | ||||||||||||||||||||||||
535 | (-1) never executed: return ( (-1) ); | 0 | ||||||||||||||||||||||||
536 | ); never executed: return ( (-1) ); | 0 | ||||||||||||||||||||||||
537 | - | |||||||||||||||||||||||||
538 | bp->b_buffer[--bp->b_inputp] = c; | - | ||||||||||||||||||||||||
539 | return executed 1160 times by 1 test: (c);return (c); Executed by:
executed 1160 times by 1 test: return (c); Executed by:
| 1160 | ||||||||||||||||||||||||
540 | } | - | ||||||||||||||||||||||||
541 | - | |||||||||||||||||||||||||
542 | - | |||||||||||||||||||||||||
543 | - | |||||||||||||||||||||||||
544 | int | - | ||||||||||||||||||||||||
545 | sync_buffered_stream (bfd) | - | ||||||||||||||||||||||||
546 | int bfd; | - | ||||||||||||||||||||||||
547 | { | - | ||||||||||||||||||||||||
548 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
549 | off_t chars_left; | - | ||||||||||||||||||||||||
550 | - | |||||||||||||||||||||||||
551 | if (buffers == 0
| 0-3984410 | ||||||||||||||||||||||||
552 | return executed 6919 times by 1 test: (-1);return (-1); Executed by:
executed 6919 times by 1 test: return (-1); Executed by:
| 6919 | ||||||||||||||||||||||||
553 | - | |||||||||||||||||||||||||
554 | chars_left = bp->b_used - bp->b_inputp; | - | ||||||||||||||||||||||||
555 | if (chars_left
| 37747-3939744 | ||||||||||||||||||||||||
556 | lseek (bp->b_fd, -chars_left, executed 37747 times by 1 test: lseek (bp->b_fd, -chars_left, 1 ); Executed by:
| 37747 | ||||||||||||||||||||||||
557 | 1 executed 37747 times by 1 test: lseek (bp->b_fd, -chars_left, 1 ); Executed by:
| 37747 | ||||||||||||||||||||||||
558 | ); executed 37747 times by 1 test: lseek (bp->b_fd, -chars_left, 1 ); Executed by:
| 37747 | ||||||||||||||||||||||||
559 | bp->b_used = bp->b_inputp = 0; | - | ||||||||||||||||||||||||
560 | return executed 3977491 times by 1 test: (0);return (0); Executed by:
executed 3977491 times by 1 test: return (0); Executed by:
| 3977491 | ||||||||||||||||||||||||
561 | } | - | ||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||
563 | int | - | ||||||||||||||||||||||||
564 | buffered_getchar () | - | ||||||||||||||||||||||||
565 | { | - | ||||||||||||||||||||||||
566 | do { if (terminating_signal
never executed: } while (0);termsig_handler (terminating_signal); | 0-13228869 | ||||||||||||||||||||||||
567 | - | |||||||||||||||||||||||||
568 | if (bash_input.location.buffered_fd < 0
| 0-13228869 | ||||||||||||||||||||||||
569 | return never executed: return (-1) ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
570 | (-1) never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
571 | ; never executed: return (-1) ; | 0 | ||||||||||||||||||||||||
572 | - | |||||||||||||||||||||||||
573 | - | |||||||||||||||||||||||||
574 | return executed 13228869 times by 1 test: ((buffers[bash_input.location.buffered_fd]->b_inputp == buffers[bash_input.location.buffered_fd]->b_used || !buffers[bash_input.location.buffered_fd]->b_used) ? b_fill_buffer (buffers[bash_input.location.buffered_fd]) : buffers[bash_input.location.buffered_fd]->b_buffer[buffers[bash_input.location.buffered_fd]->b_inputp++] & 0xFF);return ((buffers[bash_input.location.buffered_fd]->b_inputp == buffers[bash_input.location.buffered_fd]->b_used || !buffers[bash_input.location.buffered_fd]->b_used) ? b_fill_buffer (buffers[bash_input.location.buffered_fd]) : buffers[bash_input.location.buffered_fd]->b_buffer[buffers[bash_input.location.buffered_fd]->b_inputp++] & 0xFF); Executed by:
executed 13228869 times by 1 test: return ((buffers[bash_input.location.buffered_fd]->b_inputp == buffers[bash_input.location.buffered_fd]->b_used || !buffers[bash_input.location.buffered_fd]->b_used) ? b_fill_buffer (buffers[bash_input.location.buffered_fd]) : buffers[bash_input.location.buffered_fd]->b_buffer[buffers[bash_input.location.buffered_fd]->b_inputp++] & 0xFF); Executed by:
| 13228869 | ||||||||||||||||||||||||
575 | - | |||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||
577 | - | |||||||||||||||||||||||||
578 | - | |||||||||||||||||||||||||
579 | - | |||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||
581 | - | |||||||||||||||||||||||||
582 | } | - | ||||||||||||||||||||||||
583 | - | |||||||||||||||||||||||||
584 | int | - | ||||||||||||||||||||||||
585 | buffered_ungetchar (c) | - | ||||||||||||||||||||||||
586 | int c; | - | ||||||||||||||||||||||||
587 | { | - | ||||||||||||||||||||||||
588 | return executed 1160 times by 1 test: (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd]));return (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd])); Executed by:
executed 1160 times by 1 test: return (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd])); Executed by:
| 1160 | ||||||||||||||||||||||||
589 | } | - | ||||||||||||||||||||||||
590 | - | |||||||||||||||||||||||||
591 | - | |||||||||||||||||||||||||
592 | void | - | ||||||||||||||||||||||||
593 | with_input_from_buffered_stream (bfd, name) | - | ||||||||||||||||||||||||
594 | int bfd; | - | ||||||||||||||||||||||||
595 | char *name; | - | ||||||||||||||||||||||||
596 | { | - | ||||||||||||||||||||||||
597 | INPUT_STREAM location; | - | ||||||||||||||||||||||||
598 | BUFFERED_STREAM *bp; | - | ||||||||||||||||||||||||
599 | - | |||||||||||||||||||||||||
600 | location.buffered_fd = bfd; | - | ||||||||||||||||||||||||
601 | - | |||||||||||||||||||||||||
602 | bp = fd_to_buffered_stream (bfd); | - | ||||||||||||||||||||||||
603 | init_yy_io (bp == 0 ? return_EOF : buffered_getchar, | - | ||||||||||||||||||||||||
604 | buffered_ungetchar, st_bstream, name, location); | - | ||||||||||||||||||||||||
605 | } executed 5266 times by 1 test: end of block Executed by:
| 5266 | ||||||||||||||||||||||||
Switch to Source code | Preprocessed file |