]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/bash/bash32-022
Merge remote-tracking branch 'origin/next' into thirteen
[people/pmueller/ipfire-2.x.git] / src / patches / bash / bash32-022
CommitLineData
24acfa14
MT
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 3.2
5Patch-ID: bash32-022
6
7Bug-Reported-by: Chet Ramey <chet.ramey@cwru.edu>
8Bug-Reference-ID:
9Bug-Reference-URL:
10
11Bug-Description:
12
13POSIX specifies that the `read' builtin invoked from an interative shell
14must prompt with $PS2 when a line is continued using a backslash while
15reading from a terminal.
16
17Patch:
18
19*** ../bash-3.2-patched/builtins/read.def Tue Sep 19 08:45:48 2006
20--- builtins/read.def Thu May 24 16:03:30 2007
21***************
22*** 128,133 ****
23 {
24 register char *varname;
25! int size, i, nr, pass_next, saw_escape, eof, opt, retval, code;
26! int input_is_tty, input_is_pipe, unbuffered_read;
27 int raw, edit, nchars, silent, have_timeout, fd;
28 unsigned int tmout;
29--- 131,136 ----
30 {
31 register char *varname;
32! int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
33! int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
34 int raw, edit, nchars, silent, have_timeout, fd;
35 unsigned int tmout;
36***************
37*** 135,139 ****
38 char c;
39 char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
40! char *e, *t, *t1;
41 struct stat tsb;
42 SHELL_VAR *var;
43--- 138,142 ----
44 char c;
45 char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
46! char *e, *t, *t1, *ps2;
47 struct stat tsb;
48 SHELL_VAR *var;
49***************
50*** 149,152 ****
51--- 152,156 ----
52 USE_VAR(i);
53 USE_VAR(pass_next);
54+ USE_VAR(print_ps2);
55 USE_VAR(saw_escape);
56 USE_VAR(input_is_pipe);
57***************
58*** 164,167 ****
59--- 168,172 ----
60 #endif
61 USE_VAR(list);
62+ USE_VAR(ps2);
63
64 i = 0; /* Index into the string that we are reading. */
65***************
66*** 387,391 ****
67 #endif
68
69! for (eof = retval = 0;;)
70 {
71 #if defined (READLINE)
72--- 394,399 ----
73 #endif
74
75! ps2 = 0;
76! for (print_ps2 = eof = retval = 0;;)
77 {
78 #if defined (READLINE)
79***************
80*** 413,416 ****
81--- 421,433 ----
82 #endif
83
84+ if (print_ps2)
85+ {
86+ if (ps2 == 0)
87+ ps2 = get_string_value ("PS2");
88+ fprintf (stderr, "%s", ps2 ? ps2 : "");
89+ fflush (stderr);
90+ print_ps2 = 0;
91+ }
92+
93 if (unbuffered_read)
94 retval = zread (fd, &c, 1);
95***************
96*** 441,445 ****
97 pass_next = 0;
98 if (c == '\n')
99! i--; /* back up over the CTLESC */
100 else
101 goto add_char;
102--- 458,466 ----
103 pass_next = 0;
104 if (c == '\n')
105! {
106! i--; /* back up over the CTLESC */
107! if (interactive && input_is_tty && raw == 0)
108! print_ps2 = 1;
109! }
110 else
111 goto add_char;
112*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
113--- patchlevel.h Mon Oct 16 14:22:54 2006
114***************
115*** 26,30 ****
116 looks for to find the patch level (for the sccs version string). */
117
118! #define PATCHLEVEL 21
119
120 #endif /* _PATCHLEVEL_H_ */
121--- 26,30 ----
122 looks for to find the patch level (for the sccs version string). */
123
124! #define PATCHLEVEL 22
125
126 #endif /* _PATCHLEVEL_H_ */