"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "histexpand.c" between
readline-7.0-rc1.tar.gz and readline-7.0-rc2.tar.gz

About: GNU Readline library - get a line from a user with editing. Release candidate.

histexpand.c  (readline-7.0-rc1):histexpand.c  (readline-7.0-rc2)
skipping to change at line 1223 skipping to change at line 1223
} }
else else
{ {
if (temp) if (temp)
{ {
modified++; modified++;
if (*temp) if (*temp)
ADD_STRING (temp); ADD_STRING (temp);
xfree (temp); xfree (temp);
} }
only_printing = r == 1; only_printing += r == 1;
i = eindex; i = eindex;
} }
break; break;
} }
} }
*output = result; *output = result;
if (string != hstring) if (string != hstring)
xfree (string); xfree (string);
skipping to change at line 1424 skipping to change at line 1424
xfree (list); xfree (list);
return (result); return (result);
} }
static int static int
history_tokenize_word (string, ind) history_tokenize_word (string, ind)
const char *string; const char *string;
int ind; int ind;
{ {
register int i; register int i, j;
int delimiter, nestdelim, delimopen; int delimiter, nestdelim, delimopen;
i = ind; i = ind;
delimiter = nestdelim = 0; delimiter = nestdelim = 0;
if (member (string[i], "()\n")) if (member (string[i], "()\n"))
{ {
i++; i++;
return i; return i;
} }
if (isdigit (string[i]))
{
j = i;
while (string[j] && isdigit (string[j]))
j++;
if (string[j] == 0)
return (j);
if (string[j] == '<' || string[j] == '>')
i = j; /* digit sequence is a file descriptor */
else
{
i = j;
goto get_word; /* digit sequence is part of a word */
}
}
if (member (string[i], "<>;&|$")) if (member (string[i], "<>;&|$"))
{ {
int peek = string[i + 1]; int peek = string[i + 1];
if (peek == string[i] && peek != '$') if (peek == string[i] && peek != '$')
{ {
if (peek == '<' && string[i + 2] == '-') if (peek == '<' && string[i + 2] == '-')
i++; i++;
else if (peek == '<' && string[i + 2] == '<') else if (peek == '<' && string[i + 2] == '<')
i++; i++;
i += 2; i += 2;
return i; return i;
} }
else if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || else if (peek == '&' && (string[i] == '>' || string[i] == '<'))
(peek == '>' && string[i] == '&')) {
j = i + 2;
while (string[j] && isdigit (string[j])) /* file descriptor */
j++;
if (string[j] =='-') /* <&[digits]-, >&[digits]- */
j++;
return j;
}
else if ((peek == '>' && string[i] == '&') || (peek == '|' && string[i] ==
'>'))
{ {
i += 2; i += 2;
return i; return i;
} }
/* XXX - separated out for later -- bash-4.2 */ /* XXX - separated out for later -- bash-4.2 */
else if ((peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) * / else if ((peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) * /
(peek == '(' && string[i] == '$')) /*)*/ (peek == '(' && string[i] == '$')) /*)*/
{ {
i += 2; i += 2;
delimopen = '('; delimopen = '(';
 End of changes. 4 change blocks. 
4 lines changed or deleted 29 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS