source:
patches/bash-3.1-fixes-8.patch@
84cd165
Last change on this file since 84cd165 was 3614cf6, checked in by , 19 years ago | |
---|---|
|
|
File size: 23.0 KB |
-
arrayfunc.c
Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org) Date: 2006-04-11 Initial Package Version: 3.1 Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/ Upstream Status: From Upstream Description: Contains patches 001-017 from upstream diff -Naur bash-3.1.orig/arrayfunc.c bash-3.1/arrayfunc.c
old new 592 592 exp = (char *)xmalloc (len); 593 593 strncpy (exp, s, len - 1); 594 594 exp[len - 1] = '\0'; 595 #if 0 596 t = expand_string_to_string (exp, 0); 597 #else 598 t = expand_string_to_string (exp, Q_DOUBLE_QUOTES); 599 #endif 595 t = expand_arith_string (exp, 0); 600 596 this_command_name = (char *)NULL; 601 597 val = evalexp (t, &expok); 602 598 free (t); -
doc/bash.1
diff -Naur bash-3.1.orig/doc/bash.1 bash-3.1/doc/bash.1
old new 6 6 .\" Case Western Reserve University 7 7 .\" chet@po.cwru.edu 8 8 .\" 9 .\" Last Change: Sat Aug 27 13:28:44 EDT 20059 .\" Last Change: Wed Dec 28 19:58:45 EST 2005 10 10 .\" 11 11 .\" bash_builtins, strip all but Built-Ins section 12 12 .if \n(zZ=1 .ig zZ 13 13 .if \n(zY=1 .ig zY 14 .TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"14 .TH BASH 1 "2005 Dec 28" "GNU Bash-3.1" 15 15 .\" 16 16 .\" There's some problem with having a `@' 17 17 .\" in a tagged paragraph with the BSD man macros. … … 677 677 .B nocasematch 678 678 is enabled, the match is performed without regard to the case 679 679 of alphabetic characters. 680 The return value is 0 if the string matches or does not match681 the pattern, respectively, and 1 otherwise.680 The return value is 0 if the string matches (\fB==\fP) or does not match 681 (\fB!=\fP) the pattern, and 1 otherwise. 682 682 Any part of the pattern may be quoted to force it to be matched as a 683 683 string. 684 684 .if t .sp 0.5 … … 807 807 as for pathname expansion (see 808 808 .B Pathname Expansion 809 809 below). 810 The \fIword\fP is expanded using tilde 811 expansion, parameter and variable expansion, arithmetic substituion, 812 command substitution, process substitution and quote removal. 813 Each \fIpattern\fP examined is expanded using tilde 814 expansion, parameter and variable expansion, arithmetic substituion, 815 command substitution, and process substitution. 810 816 If the shell option 811 817 .B nocasematch 812 818 is enabled, the match is performed without regard to the case … … 8484 8490 returns true if any of the arguments are found, false if 8485 8491 none are found. 8486 8492 .TP 8487 \fBulimit\fP [\fB\-SHacdf lmnpstuv\fP [\fIlimit\fP]]8493 \fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]] 8488 8494 Provides control over the resources available to the shell and to 8489 8495 processes started by it, on systems that allow such control. 8490 8496 The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is … … 8523 8529 .B \-f 8524 8530 The maximum size of files created by the shell 8525 8531 .TP 8532 .B \-i 8533 The maximum number of pending signals 8534 .TP 8526 8535 .B \-l 8527 8536 The maximum size that may be locked into memory 8528 8537 .TP … … 8536 8545 .B \-p 8537 8546 The pipe size in 512-byte blocks (this may not be set) 8538 8547 .TP 8548 .B \-q 8549 The maximum number of bytes in POSIX message queues 8550 .TP 8539 8551 .B \-s 8540 8552 The maximum stack size 8541 8553 .TP … … 8547 8559 .TP 8548 8560 .B \-v 8549 8561 The maximum amount of virtual memory available to the shell 8562 .TP 8563 .B \-x 8564 The maximum number of file locks 8550 8565 .PD 8551 8566 .PP 8552 8567 If -
doc/bashref.texi
diff -Naur bash-3.1.orig/doc/bashref.texi bash-3.1/doc/bashref.texi
old new 961 961 (see the description of @code{shopt} in @ref{Bash Builtins}) 962 962 is enabled, the match is performed without regard to the case 963 963 of alphabetic characters. 964 The return value is 0 if the string matches or does not match965 the pattern, respectively, and 1 otherwise.964 The return value is 0 if the string matches (@samp{==}) or does not 965 match (@samp{!=})the pattern, and 1 otherwise. 966 966 Any part of the pattern may be quoted to force it to be matched as a 967 967 string. 968 968 … … 2598 2598 Builtin commands are necessary to implement functionality impossible 2599 2599 or inconvenient to obtain with separate utilities. 2600 2600 2601 This section briefly the builtins which Bash inherits from2601 This section briefly describes the builtins which Bash inherits from 2602 2602 the Bourne Shell, as well as the builtin commands which are unique 2603 2603 to or have been extended in Bash. 2604 2604 … … 3833 3833 @item ulimit 3834 3834 @btindex ulimit 3835 3835 @example 3836 ulimit [-acdf lmnpstuvSH] [@var{limit}]3836 ulimit [-acdfilmnpqstuvxSH] [@var{limit}] 3837 3837 @end example 3838 3838 @code{ulimit} provides control over the resources available to processes 3839 3839 started by the shell, on systems that allow such control. If an … … 3857 3857 @item -f 3858 3858 The maximum size of files created by the shell. 3859 3859 3860 @item -i 3861 The maximum number of pending signals. 3862 3860 3863 @item -l 3861 3864 The maximum size that may be locked into memory. 3862 3865 … … 3869 3872 @item -p 3870 3873 The pipe buffer size. 3871 3874 3875 @item -q 3876 The maximum number of bytes in POSIX message queues. 3877 3872 3878 @item -s 3873 3879 The maximum stack size. 3874 3880 … … 3881 3887 @item -v 3882 3888 The maximum amount of virtual memory available to the process. 3883 3889 3890 @item -x 3891 The maximum number of file locks. 3892 3884 3893 @end table 3885 3894 3886 3895 If @var{limit} is given, it is the new value of the specified resource; … … 4089 4098 Print shell input lines as they are read. 4090 4099 4091 4100 @item -x 4092 Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP4093 commands, \fBselect\fP commands, and arithmetic \fBfor\fPcommands4101 Print a trace of simple commands, @code{for} commands, @code{case} 4102 commands, @code{select} commands, and arithmetic @code{for} commands 4094 4103 and their arguments or associated word lists after they are 4095 4104 expanded and before they are executed. The value of the @env{PS4} 4096 4105 variable is expanded and the resultant value is printed before -
doc/version.texi
diff -Naur bash-3.1.orig/doc/version.texi bash-3.1/doc/version.texi
old new 2 2 Copyright (C) 1988-2005 Free Software Foundation, Inc. 3 3 @end ignore 4 4 5 @set LASTCHANGE Mon Sep 5 11:47:04 EDT 20055 @set LASTCHANGE Fri Dec 30 10:50:51 EST 2005 6 6 7 @set EDITION 3.1 -beta18 @set VERSION 3.1 -beta19 @set UPDATED 5 September 200510 @set UPDATED-MONTH September 20057 @set EDITION 3.1 8 @set VERSION 3.1 9 @set UPDATED 30 December 2005 10 @set UPDATED-MONTH December 2005 -
bash-3.1
diff -Naur bash-3.1.orig/jobs.c bash-3.1/jobs.c
old new 619 619 * once in the parent and once in each child. This is where 620 620 * the parent gives it away. 621 621 * 622 * Don't give the terminal away if this shell is an asynchronous 623 * subshell. 624 * 622 625 */ 623 if (job_control && newjob->pgrp )626 if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) 624 627 give_terminal_to (newjob->pgrp, 0); 625 628 } 626 629 } … … 844 847 realloc_jobs_list () 845 848 { 846 849 sigset_t set, oset; 847 int nsize, i, j ;850 int nsize, i, j, ncur, nprev; 848 851 JOB **nlist; 849 852 853 ncur = nprev = NO_JOB; 850 854 nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS); 851 855 nsize *= JOB_SLOTS; 852 856 i = js.j_njobs % JOB_SLOTS; … … 854 858 nsize += JOB_SLOTS; 855 859 856 860 BLOCK_CHILD (set, oset); 857 nlist = (JOB **) xmalloc (nsize * sizeof (JOB *)); 861 nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *)); 862 858 863 for (i = j = 0; i < js.j_jobslots; i++) 859 864 if (jobs[i]) 860 nlist[j++] = jobs[i]; 865 { 866 if (i == js.j_current) 867 ncur = j; 868 if (i == js.j_previous) 869 nprev = j; 870 nlist[j++] = jobs[i]; 871 } 872 873 #if defined (DEBUG) 874 itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize); 875 itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0); 876 itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0); 877 #endif 861 878 862 879 js.j_firstj = 0; 863 js.j_lastj = (j > 0) ? j - 1: 0; 880 js.j_lastj = (j > 0) ? j - 1 : 0; 881 js.j_njobs = j; 864 882 js.j_jobslots = nsize; 865 883 866 free (jobs); 867 jobs = nlist; 884 /* Zero out remaining slots in new jobs list */ 885 for ( ; j < nsize; j++) 886 nlist[j] = (JOB *)NULL; 887 888 if (jobs != nlist) 889 { 890 free (jobs); 891 jobs = nlist; 892 } 893 894 if (ncur != NO_JOB) 895 js.j_current = ncur; 896 if (nprev != NO_JOB) 897 js.j_previous = nprev; 898 899 /* Need to reset these */ 900 if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj) 901 reset_current (); 902 903 #ifdef DEBUG 904 itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous); 905 #endif 868 906 869 907 UNBLOCK_CHILD (oset); 870 908 } … … 1655 1693 In this case, we don't want to give the terminal to the 1656 1694 shell's process group (we could be in the middle of a 1657 1695 pipeline, for example). */ 1658 if (async_p == 0 && pipeline_pgrp != shell_pgrp )1696 if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0)) 1659 1697 give_terminal_to (pipeline_pgrp, 0); 1660 1698 1661 1699 #if defined (PGRP_PIPE) … … 2198 2236 /* This is possibly a race condition -- should it go in stop_pipeline? */ 2199 2237 wait_sigint_received = 0; 2200 2238 if (job_control == 0) 2201 old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); 2239 { 2240 old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); 2241 if (old_sigint_handler == SIG_IGN) 2242 set_signal_handler (SIGINT, old_sigint_handler); 2243 } 2202 2244 2203 2245 termination_state = last_command_exit_value; 2204 2246 -
lib/glob/glob.c
diff -Naur bash-3.1.orig/lib/glob/glob.c bash-3.1/lib/glob/glob.c
old new 360 360 count = lose = skip = 0; 361 361 362 362 firstmalloc = 0; 363 nalloca = 0; 363 364 364 365 /* If PAT is empty, skip the loop, but return one (empty) filename. */ 365 366 if (pat == 0 || *pat == '\0') … … 546 547 firstmalloc = 0; 547 548 tmplink = lastlink; 548 549 } 550 else 551 tmplink = 0; 549 552 free (lastlink->name); 550 553 lastlink = lastlink->next; 551 554 FREE (tmplink); -
lib/glob/sm_loop.c
diff -Naur bash-3.1.orig/lib/glob/sm_loop.c bash-3.1/lib/glob/sm_loop.c
old new 638 638 CHAR *psub; /* pointer to sub-pattern */ 639 639 CHAR *pnext; /* pointer to next sub-pattern */ 640 640 CHAR *srest; /* pointer to rest of string */ 641 int m1, m2 ;641 int m1, m2, xflags; /* xflags = flags passed to recursive matches */ 642 642 643 643 #if DEBUG_MATCHING 644 644 fprintf(stderr, "extmatch: xc = %c\n", xc); 645 645 fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se); 646 646 fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); 647 fprintf(stderr, "extmatch: flags = %d\n", flags); 647 648 #endif 648 649 649 650 prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */ … … 677 678 string matches the rest of the pattern. Also handle 678 679 multiple matches of the pattern. */ 679 680 if (m1) 680 m2 = (GMATCH (srest, se, prest, pe, flags) == 0) || 681 (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0); 681 { 682 /* if srest > s, we are not at start of string */ 683 xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; 684 m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) || 685 (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0); 686 } 682 687 if (m1 && m2) 683 688 return (0); 684 689 } … … 704 709 srest = (prest == pe) ? se : s; 705 710 for ( ; srest <= se; srest++) 706 711 { 712 /* if srest > s, we are not at start of string */ 713 xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; 707 714 if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && 708 GMATCH (srest, se, prest, pe, flags) == 0)715 GMATCH (srest, se, prest, pe, xflags) == 0) 709 716 return (0); 710 717 } 711 718 if (pnext == prest) … … 726 733 if (pnext == prest) 727 734 break; 728 735 } 729 if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0) 736 /* if srest > s, we are not at start of string */ 737 xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; 738 if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0) 730 739 return (0); 731 740 } 732 741 return (FNM_NOMATCH); -
lib/readline/display.c
diff -Naur bash-3.1.orig/lib/readline/display.c bash-3.1/lib/readline/display.c
old new 1983 1983 int pchar; 1984 1984 { 1985 1985 int len; 1986 char *pmt ;1986 char *pmt, *p; 1987 1987 1988 1988 rl_save_prompt (); 1989 1989 1990 if (saved_local_prompt == 0) 1990 /* We've saved the prompt, and can do anything with the various prompt 1991 strings we need before they're restored. We want the unexpanded 1992 portion of the prompt string after any final newline. */ 1993 p = rl_prompt ? strrchr (rl_prompt, '\n') : 0; 1994 if (p == 0) 1991 1995 { 1992 1996 len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; 1993 1997 pmt = (char *)xmalloc (len + 2); … … 1998 2002 } 1999 2003 else 2000 2004 { 2001 len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; 2005 p++; 2006 len = strlen (p); 2002 2007 pmt = (char *)xmalloc (len + 2); 2003 2008 if (len) 2004 strcpy (pmt, saved_local_prompt);2009 strcpy (pmt, p); 2005 2010 pmt[len] = pchar; 2006 2011 pmt[len+1] = '\0'; 2007 local_prompt = savestring (pmt); 2008 prompt_last_invisible = saved_last_invisible; 2009 prompt_visible_length = saved_visible_length + 1; 2010 } 2012 } 2011 2013 2014 /* will be overwritten by expand_prompt, called from rl_message */ 2012 2015 prompt_physical_chars = saved_physical_chars + 1; 2013 2014 2016 return pmt; 2015 2017 } 2016 2018 -
lib/readline/readline.c
diff -Naur bash-3.1.orig/lib/readline/readline.c bash-3.1/lib/readline/readline.c
old new 282 282 { 283 283 FREE (rl_prompt); 284 284 rl_prompt = prompt ? savestring (prompt) : (char *)NULL; 285 rl_display_prompt = rl_prompt ? rl_prompt : ""; 285 286 286 287 rl_visible_prompt_length = rl_expand_prompt (rl_prompt); 287 288 return 0; -
lib/readline/terminal.c
diff -Naur bash-3.1.orig/lib/readline/terminal.c bash-3.1/lib/readline/terminal.c
old new 122 122 static char *_rl_visible_bell; 123 123 124 124 /* Non-zero means the terminal can auto-wrap lines. */ 125 int _rl_term_autowrap ;125 int _rl_term_autowrap = -1; 126 126 127 127 /* Non-zero means that this terminal has a meta key. */ 128 128 static int term_has_meta; … … 274 274 _rl_set_screen_size (rows, cols) 275 275 int rows, cols; 276 276 { 277 if (_rl_term_autowrap == -1) 278 _rl_init_terminal_io (rl_terminal_name); 279 277 280 if (rows > 0) 278 281 _rl_screenheight = rows; 279 282 if (cols > 0) -
parse.y
diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
old new 2716 2716 #define P_ALLOWESC 0x02 2717 2717 #define P_DQUOTE 0x04 2718 2718 #define P_COMMAND 0x08 /* parsing a command, so look for comments */ 2719 #define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */ 2719 2720 2720 2721 static char matched_pair_error; 2721 2722 static char * … … 2725 2726 int *lenp, flags; 2726 2727 { 2727 2728 int count, ch, was_dollar, in_comment, check_comment; 2728 int pass_next_character, nestlen, ttranslen, start_lineno;2729 int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno; 2729 2730 char *ret, *nestret, *ttrans; 2730 2731 int retind, retsize, rflags; 2731 2732 2732 2733 count = 1; 2733 pass_next_character = was_dollar = in_comment = 0;2734 pass_next_character = backq_backslash = was_dollar = in_comment = 0; 2734 2735 check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; 2735 2736 2736 2737 /* RFLAGS is the set of flags we want to pass to recursive calls. */ … … 2742 2743 start_lineno = line_number; 2743 2744 while (count) 2744 2745 { 2745 #if 0 2746 ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0); 2747 #else 2748 ch = shell_getc (qc != '\'' && pass_next_character == 0); 2749 #endif 2746 ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0); 2747 2750 2748 if (ch == EOF) 2751 2749 { 2752 2750 free (ret); … … 2771 2769 continue; 2772 2770 } 2773 2771 /* Not exactly right yet */ 2774 else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))2772 else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1]))) 2775 2773 in_comment = 1; 2776 2774 2775 /* last char was backslash inside backquoted command substitution */ 2776 if (backq_backslash) 2777 { 2778 backq_backslash = 0; 2779 /* Placeholder for adding special characters */ 2780 } 2781 2777 2782 if (pass_next_character) /* last char was backslash */ 2778 2783 { 2779 2784 pass_next_character = 0; … … 2814 2819 { 2815 2820 if MBTEST((flags & P_ALLOWESC) && ch == '\\') 2816 2821 pass_next_character++; 2822 else if MBTEST((flags & P_BACKQUOTE) && ch == '\\') 2823 backq_backslash++; 2817 2824 continue; 2818 2825 } 2819 2826 … … 2898 2905 } 2899 2906 else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0) 2900 2907 { 2901 nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags); 2908 /* Add P_BACKQUOTE so backslash quotes the next character and 2909 shell_getc does the right thing with \<newline>. We do this for 2910 a measure of backwards compatibility -- it's not strictly the 2911 right POSIX thing. */ 2912 nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE); 2902 2913 goto add_nestret; 2903 2914 } 2904 2915 else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ … … 2907 2918 if (open == ch) /* undo previous increment */ 2908 2919 count--; 2909 2920 if (ch == '(') /* ) */ 2910 nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags );2921 nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE); 2911 2922 else if (ch == '{') /* } */ 2912 2923 nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); 2913 2924 else if (ch == '[') /* ] */ … … 3578 3589 FREE (ttok); 3579 3590 all_digit_token = 0; 3580 3591 compound_assignment = 1; 3581 #if 03592 #if 1 3582 3593 goto next_character; 3583 3594 #else 3584 3595 goto got_token; /* ksh93 seems to do this */ … … 3695 3706 struct builtin *b; 3696 3707 b = builtin_address_internal (token, 0); 3697 3708 if (b && (b->flags & ASSIGNMENT_BUILTIN)) 3698 parser_state |= PST_ASSIGNOK; 3709 parser_state |= PST_ASSIGNOK; 3710 else if (STREQ (token, "eval") || STREQ (token, "let")) 3711 parser_state |= PST_ASSIGNOK; 3699 3712 } 3700 3713 3701 3714 yylval.word = the_word; … … 4686 4699 int *retlenp; 4687 4700 { 4688 4701 WORD_LIST *wl, *rl; 4689 int tok, orig_line_number, orig_token_size ;4702 int tok, orig_line_number, orig_token_size, orig_last_token, assignok; 4690 4703 char *saved_token, *ret; 4691 4704 4692 4705 saved_token = token; 4693 4706 orig_token_size = token_buffer_size; 4694 4707 orig_line_number = line_number; 4708 orig_last_token = last_read_token; 4695 4709 4696 4710 last_read_token = WORD; /* WORD to allow reserved words here */ 4697 4711 4698 4712 token = (char *)NULL; 4699 4713 token_buffer_size = 0; 4700 4714 4715 assignok = parser_state&PST_ASSIGNOK; /* XXX */ 4716 4701 4717 wl = (WORD_LIST *)NULL; /* ( */ 4702 4718 parser_state |= PST_COMPASSIGN; 4703 4719 … … 4740 4756 jump_to_top_level (DISCARD); 4741 4757 } 4742 4758 4743 last_read_token = WORD;4759 last_read_token = orig_last_token; /* XXX - was WORD? */ 4744 4760 if (wl) 4745 4761 { 4746 4762 rl = REVERSE_LIST (wl, WORD_LIST *); … … 4752 4768 4753 4769 if (retlenp) 4754 4770 *retlenp = (ret && *ret) ? strlen (ret) : 0; 4771 4772 if (assignok) 4773 parser_state |= PST_ASSIGNOK; 4774 4755 4775 return ret; 4756 4776 } 4757 4777 -
patchlevel.h
diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
old new 25 25 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 26 26 looks for to find the patch level (for the sccs version string). */ 27 27 28 #define PATCHLEVEL 028 #define PATCHLEVEL 17 29 29 30 30 #endif /* _PATCHLEVEL_H_ */ -
subst.c
diff -Naur bash-3.1.orig/subst.c bash-3.1/subst.c
old new 2187 2187 if (mklocal && variable_context) 2188 2188 { 2189 2189 v = find_variable (name); 2190 if (v == 0 || array_p (v) == 0 )2190 if (v == 0 || array_p (v) == 0 || v->context != variable_context) 2191 2191 v = make_local_array_variable (name); 2192 2192 v = assign_array_var_from_string (v, value, flags); 2193 2193 } … … 2575 2575 return (expand_string_to_string_internal (string, quoted, expand_string_assignment)); 2576 2576 } 2577 2577 2578 char * 2579 expand_arith_string (string, quoted) 2580 char *string; 2581 { 2582 return (expand_string_if_necessary (string, quoted, expand_string)); 2583 } 2584 2578 2585 #if defined (COND_COMMAND) 2579 2586 /* Just remove backslashes in STRING. Returns a new string. */ 2580 2587 char * … … 5248 5255 else 5249 5256 t = (char *)0; 5250 5257 5251 temp1 = expand_ string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string);5258 temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES); 5252 5259 *e1p = evalexp (temp1, &expok); 5253 5260 free (temp1); 5254 5261 if (expok == 0) … … 5293 5300 { 5294 5301 t++; 5295 5302 temp2 = savestring (t); 5296 temp1 = expand_ string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);5303 temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); 5297 5304 free (temp2); 5298 5305 t[-1] = ':'; 5299 5306 *e2p = evalexp (temp1, &expok); … … 6435 6442 temp2[t_index] = '\0'; 6436 6443 6437 6444 /* Expand variables found inside the expression. */ 6438 temp1 = expand_ string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);6445 temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); 6439 6446 free (temp2); 6440 6447 6441 6448 arithsub: … … 6477 6484 zindex = t_index; 6478 6485 6479 6486 /* Do initial variable expansion. */ 6480 temp1 = expand_ string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string);6487 temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES); 6481 6488 6482 6489 goto arithsub; 6483 6490 … … 6795 6802 if (temp && *temp && t_index > 0) 6796 6803 { 6797 6804 temp1 = bash_tilde_expand (temp, tflag); 6805 if (temp1 && *temp1 == '~' && STREQ (temp, temp1)) 6806 { 6807 FREE (temp); 6808 FREE (temp1); 6809 goto add_character; /* tilde expansion failed */ 6810 } 6798 6811 free (temp); 6799 6812 temp = temp1; 6800 6813 sindex += t_index; -
subst.h
diff -Naur bash-3.1.orig/subst.h bash-3.1/subst.h
old new 151 151 extern char *expand_string_unsplit_to_string __P((char *, int)); 152 152 extern char *expand_assignment_string_to_string __P((char *, int)); 153 153 154 /* Expand an arithmetic expression string */ 155 extern char *expand_arith_string __P((char *, int)); 156 154 157 /* De-quoted quoted characters in STRING. */ 155 158 extern char *dequote_string __P((char *)); 156 159 -
variables.c
diff -Naur bash-3.1.orig/variables.c bash-3.1/variables.c
old new 860 860 { 861 861 char val[INT_STRLEN_BOUND(int) + 1], *v; 862 862 863 #if defined (READLINE) 863 864 /* If we are currently assigning to LINES or COLUMNS, don't do anything. */ 864 865 if (winsize_assignment) 865 866 return; 867 #endif 866 868 867 869 v = inttostr (lines, val, sizeof (val)); 868 870 bind_variable ("LINES", v, 0);
Note:
See TracBrowser
for help on using the repository browser.