/[emacs]/emacs/src/term.c
ViewVC logotype

Diff of /emacs/src/term.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.146 by kfstorm, Sat May 24 22:04:48 2003 UTC revision 1.147 by rms, Tue Aug 19 23:47:22 2003 UTC
# Line 2159  term_init (terminal_type) Line 2159  term_init (terminal_type)
2159  {  {
2160    char *area;    char *area;
2161    char **address = &area;    char **address = &area;
2162    char buffer[2044];    char *buffer = NULL;
2163      const int buffer_size = 4096;
2164    register char *p;    register char *p;
2165    int status;    int status;
2166    struct frame *sf = XFRAME (selected_frame);    struct frame *sf = XFRAME (selected_frame);
# Line 2171  term_init (terminal_type) Line 2172  term_init (terminal_type)
2172    
2173    area = (char *) xmalloc (2044);    area = (char *) xmalloc (2044);
2174    
   if (area == 0)  
     abort ();  
   
2175    FrameRows = FRAME_LINES (sf);    FrameRows = FRAME_LINES (sf);
2176    FrameCols = FRAME_COLS (sf);    FrameCols = FRAME_COLS (sf);
2177    specified_window = FRAME_LINES (sf);    specified_window = FRAME_LINES (sf);
# Line 2202  term_init (terminal_type) Line 2200  term_init (terminal_type)
2200    
2201    Wcm_clear ();    Wcm_clear ();
2202    
2203      buffer = (char *) xmalloc (buffer_size);
2204    status = tgetent (buffer, terminal_type);    status = tgetent (buffer, terminal_type);
2205    if (status < 0)    if (status < 0)
2206      {      {
# Line 2229  to do `unset TERMCAP' (C-shell: `unseten Line 2228  to do `unset TERMCAP' (C-shell: `unseten
2228               terminal_type);               terminal_type);
2229  #endif  #endif
2230      }      }
2231  #ifdef TERMINFO  
2232    area = (char *) xmalloc (2044);    if (strlen (buffer) >= buffer_size)
 #else  
   area = (char *) xmalloc (strlen (buffer));  
 #endif /* not TERMINFO */  
   if (area == 0)  
2233      abort ();      abort ();
2234      
2235      area = (char *) xmalloc (strlen (buffer));
2236    
2237    TS_ins_line = tgetstr ("al", address);    TS_ins_line = tgetstr ("al", address);
2238    TS_ins_multi_lines = tgetstr ("AL", address);    TS_ins_multi_lines = tgetstr ("AL", address);
# Line 2560  to do `unset TERMCAP' (C-shell: `unseten Line 2557  to do `unset TERMCAP' (C-shell: `unseten
2557    FRAME_CAN_HAVE_SCROLL_BARS (sf) = 0;    FRAME_CAN_HAVE_SCROLL_BARS (sf) = 0;
2558    FRAME_VERTICAL_SCROLL_BAR_TYPE (sf) = vertical_scroll_bar_none;    FRAME_VERTICAL_SCROLL_BAR_TYPE (sf) = vertical_scroll_bar_none;
2559  #endif /* WINDOWSNT */  #endif /* WINDOWSNT */
2560    
2561      xfree (buffer);
2562  }  }
2563    
2564  /* VARARGS 1 */  /* VARARGS 1 */

Legend:
Removed from v.1.146  
changed lines
  Added in v.1.147

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26