source: patches/readline-5.1-fixes-3.patch @ f99d122

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since f99d122 was 69cde8d, checked in by Jim Gifford <clfs@…>, 18 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 3.7 KB
  • readline-5.1

    Submitted By: Matthew Burgess (matthew at linuxfromscratch dot org)
    Date: 2006-03-17
    Initial Package Version: 5.1
    Origin: http://ftp.gnu.org/gnu/readline/readline-5.1-patches/
    Upstream Status: From Upstream 
    Description: Contains Patch 001-004 from Upstream
    
    diff -Naur readline-5.1.orig/display.c readline-5.1/display.c
    old new  
    19831983     int pchar;
    19841984{
    19851985  int len;
    1986   char *pmt;
     1986  char *pmt, *p;
    19871987
    19881988  rl_save_prompt ();
    19891989
    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)
    19911995    {
    19921996      len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
    19931997      pmt = (char *)xmalloc (len + 2);
     
    19982002    }
    19992003  else
    20002004    {
    2001       len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
     2005      p++;
     2006      len = strlen (p);
    20022007      pmt = (char *)xmalloc (len + 2);
    20032008      if (len)
    2004         strcpy (pmt, saved_local_prompt);
     2009        strcpy (pmt, p);
    20052010      pmt[len] = pchar;
    20062011      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    } 
    20112013
     2014  /* will be overwritten by expand_prompt, called from rl_message */
    20122015  prompt_physical_chars = saved_physical_chars + 1;
    2013 
    20142016  return pmt;
    20152017}
    20162018
  • readline-5.1

    diff -Naur readline-5.1.orig/readline.c readline-5.1/readline.c
    old new  
    282282{
    283283  FREE (rl_prompt);
    284284  rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
     285  rl_display_prompt = rl_prompt ? rl_prompt : "";
    285286
    286287  rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
    287288  return 0;
     
    714715
    715716          rl_dispatching = 1;
    716717          RL_SETSTATE(RL_STATE_DISPATCHING);
    717           r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
     718          (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
    718719          RL_UNSETSTATE(RL_STATE_DISPATCHING);
    719720          rl_dispatching = 0;
    720721
  • readline-5.1

    diff -Naur readline-5.1.orig/terminal.c readline-5.1/terminal.c
    old new  
    122122static char *_rl_visible_bell;
    123123
    124124/* Non-zero means the terminal can auto-wrap lines. */
    125 int _rl_term_autowrap;
     125int _rl_term_autowrap = -1;
    126126
    127127/* Non-zero means that this terminal has a meta key. */
    128128static int term_has_meta;
     
    274274_rl_set_screen_size (rows, cols)
    275275     int rows, cols;
    276276{
     277  if (_rl_term_autowrap == -1)
     278    _rl_init_terminal_io (rl_terminal_name);
     279
    277280  if (rows > 0)
    278281    _rl_screenheight = rows;
    279282  if (cols > 0)
  • readline-5.1

    diff -Naur readline-5.1.orig/text.c readline-5.1/text.c
    old new  
    10711071rl_delete (count, key)
    10721072     int count, key;
    10731073{
    1074   int r;
    1075 
    10761074  if (count < 0)
    10771075    return (_rl_rubout_char (-count, key));
    10781076
     
    10901088      else
    10911089        rl_forward_byte (count, key);
    10921090
    1093       r = rl_kill_text (orig_point, rl_point);
     1091      rl_kill_text (orig_point, rl_point);
    10941092      rl_point = orig_point;
    1095       return r;
    10961093    }
    10971094  else
    10981095    {
    10991096      int new_point;
    11001097
    11011098      new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
    1102       return (rl_delete_text (rl_point, new_point));
     1099      rl_delete_text (rl_point, new_point);
    11031100    }
     1101  return 0;
    11041102}
    11051103
    11061104/* Delete the character under the cursor, unless the insertion
Note: See TracBrowser for help on using the repository browser.