Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/builtins/echo.def |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||
7 | int xpg_echo = 0; | - | ||||||||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||||||||
13 | int | - | ||||||||||||||||||||||||||||||
14 | echo_builtin (list) | - | ||||||||||||||||||||||||||||||
15 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||
16 | { | - | ||||||||||||||||||||||||||||||
17 | int display_return, do_v9, i, len; | - | ||||||||||||||||||||||||||||||
18 | char *temp, *s; | - | ||||||||||||||||||||||||||||||
19 | - | |||||||||||||||||||||||||||||||
20 | do_v9 = xpg_echo; | - | ||||||||||||||||||||||||||||||
21 | display_return = 1; | - | ||||||||||||||||||||||||||||||
22 | - | |||||||||||||||||||||||||||||||
23 | if (posixly_correct
| 0-687457 | ||||||||||||||||||||||||||||||
24 | goto never executed: just_echo;goto just_echo; never executed: goto just_echo; | 0 | ||||||||||||||||||||||||||||||
25 | - | |||||||||||||||||||||||||||||||
26 | for (; list
| 0-1348375 | ||||||||||||||||||||||||||||||
27 | { | - | ||||||||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||||||||
31 | temp++; | - | ||||||||||||||||||||||||||||||
32 | - | |||||||||||||||||||||||||||||||
33 | for (i = 0; temp[i]
| 661218-661325 | ||||||||||||||||||||||||||||||
34 | { | - | ||||||||||||||||||||||||||||||
35 | if ( | - | ||||||||||||||||||||||||||||||
36 | (
| 0-661325 | ||||||||||||||||||||||||||||||
37 | temp[i]
| 0-661325 | ||||||||||||||||||||||||||||||
38 | )
| 0-661325 | ||||||||||||||||||||||||||||||
39 | "neE"
| 0-661220 | ||||||||||||||||||||||||||||||
40 | )
| 0-661220 | ||||||||||||||||||||||||||||||
41 | temp[i]
| 0-661220 | ||||||||||||||||||||||||||||||
42 | ) == '\0'
| 0-661220 | ||||||||||||||||||||||||||||||
43 | "neE"
| 105-661220 | ||||||||||||||||||||||||||||||
44 | ,
| 105-661220 | ||||||||||||||||||||||||||||||
45 | temp[i]
| 105-661220 | ||||||||||||||||||||||||||||||
46 | ) : __builtin_strchr (
| 105-661220 | ||||||||||||||||||||||||||||||
47 | "neE"
| 105-661220 | ||||||||||||||||||||||||||||||
48 | ,
| 105-661220 | ||||||||||||||||||||||||||||||
49 | temp[i]
| 105-661220 | ||||||||||||||||||||||||||||||
50 | )))
| 105-661220 | ||||||||||||||||||||||||||||||
51 | == 0
| 105-661220 | ||||||||||||||||||||||||||||||
52 | break; executed 105 times by 1 test: break; Executed by:
| 105 | ||||||||||||||||||||||||||||||
53 | } executed 661220 times by 1 test: end of block Executed by:
| 661220 | ||||||||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||
56 | if (*
| 2-661321 | ||||||||||||||||||||||||||||||
57 | break; executed 107 times by 1 test: break; Executed by:
| 107 | ||||||||||||||||||||||||||||||
58 | - | |||||||||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||||||||
60 | - | |||||||||||||||||||||||||||||||
61 | while (i = *temp++
| 661216-661220 | ||||||||||||||||||||||||||||||
62 | { | - | ||||||||||||||||||||||||||||||
63 | switch (i) | - | ||||||||||||||||||||||||||||||
64 | { | - | ||||||||||||||||||||||||||||||
65 | case executed 661155 times by 1 test: 'n':case 'n': Executed by:
executed 661155 times by 1 test: case 'n': Executed by:
| 661155 | ||||||||||||||||||||||||||||||
66 | display_return = 0; | - | ||||||||||||||||||||||||||||||
67 | break; executed 661155 times by 1 test: break; Executed by:
| 661155 | ||||||||||||||||||||||||||||||
68 | - | |||||||||||||||||||||||||||||||
69 | case executed 60 times by 1 test: 'e':case 'e': Executed by:
executed 60 times by 1 test: case 'e': Executed by:
| 60 | ||||||||||||||||||||||||||||||
70 | do_v9 = 1; | - | ||||||||||||||||||||||||||||||
71 | break; executed 60 times by 1 test: break; Executed by:
| 60 | ||||||||||||||||||||||||||||||
72 | case executed 5 times by 1 test: 'E':case 'E': Executed by:
executed 5 times by 1 test: case 'E': Executed by:
| 5 | ||||||||||||||||||||||||||||||
73 | do_v9 = 0; | - | ||||||||||||||||||||||||||||||
74 | break; executed 5 times by 1 test: break; Executed by:
| 5 | ||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||
76 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||
77 | goto never executed: just_echo;goto just_echo; never executed: goto just_echo; | 0 | ||||||||||||||||||||||||||||||
78 | } | - | ||||||||||||||||||||||||||||||
79 | } | - | ||||||||||||||||||||||||||||||
80 | } executed 661216 times by 1 test: end of block Executed by:
| 661216 | ||||||||||||||||||||||||||||||
81 | - | |||||||||||||||||||||||||||||||
82 | just_echo: code before this statement executed 687636 times by 1 test: just_echo: Executed by:
| 687636 | ||||||||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||||||||
84 | clearerr ( | - | ||||||||||||||||||||||||||||||
85 | stdout | - | ||||||||||||||||||||||||||||||
86 | ); | - | ||||||||||||||||||||||||||||||
87 | - | |||||||||||||||||||||||||||||||
88 | while (list
| 687616-697417 | ||||||||||||||||||||||||||||||
89 | { | - | ||||||||||||||||||||||||||||||
90 | i = len = 0; | - | ||||||||||||||||||||||||||||||
91 | temp = do_v9
| 79-697338 | ||||||||||||||||||||||||||||||
92 | : list->word->word; | - | ||||||||||||||||||||||||||||||
93 | if (temp
| 0-697417 | ||||||||||||||||||||||||||||||
94 | { | - | ||||||||||||||||||||||||||||||
95 | if (do_v9
| 79-697338 | ||||||||||||||||||||||||||||||
96 | { | - | ||||||||||||||||||||||||||||||
97 | for (s = temp; len > 0
| 79-276 | ||||||||||||||||||||||||||||||
98 | putchar (*s++); executed 276 times by 1 test: putchar (*s++); Executed by:
| 276 | ||||||||||||||||||||||||||||||
99 | } executed 79 times by 1 test: end of block Executed by:
| 79 | ||||||||||||||||||||||||||||||
100 | else | - | ||||||||||||||||||||||||||||||
101 | printf ("%s", temp); executed 697338 times by 1 test: printf ("%s", temp); Executed by:
| 697338 | ||||||||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||||||||
103 | - | |||||||||||||||||||||||||||||||
104 | - | |||||||||||||||||||||||||||||||
105 | } | - | ||||||||||||||||||||||||||||||
106 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-697417 | ||||||||||||||||||||||||||||||
107 | if (do_v9
| 0-697338 | ||||||||||||||||||||||||||||||
108 | sh_xfree((temp), "./echo.def", 182); executed 79 times by 1 test: sh_xfree((temp), "./echo.def", 182); Executed by:
| 79 | ||||||||||||||||||||||||||||||
109 | list = list->next; | - | ||||||||||||||||||||||||||||||
110 | if (i
| 20-697397 | ||||||||||||||||||||||||||||||
111 | { | - | ||||||||||||||||||||||||||||||
112 | display_return = 0; | - | ||||||||||||||||||||||||||||||
113 | break; executed 20 times by 1 test: break; Executed by:
| 20 | ||||||||||||||||||||||||||||||
114 | } | - | ||||||||||||||||||||||||||||||
115 | if (list
| 10258-687139 | ||||||||||||||||||||||||||||||
116 | putchar(' '); executed 10258 times by 1 test: putchar(' '); Executed by:
| 10258 | ||||||||||||||||||||||||||||||
117 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-697397 | ||||||||||||||||||||||||||||||
118 | } executed 697397 times by 1 test: end of block Executed by:
| 697397 | ||||||||||||||||||||||||||||||
119 | - | |||||||||||||||||||||||||||||||
120 | if (display_return
| 26461-661175 | ||||||||||||||||||||||||||||||
121 | putchar ('\n'); executed 26461 times by 1 test: putchar ('\n'); Executed by:
| 26461 | ||||||||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||||||||
123 | return executed 687636 times by 1 test: (sh_chkwrite (0));return (sh_chkwrite (0)); Executed by:
executed 687636 times by 1 test: return (sh_chkwrite (0)); Executed by:
| 687636 | ||||||||||||||||||||||||||||||
124 | } | - | ||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |