ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.45 by pcg, Tue Feb 24 21:46:15 2004 UTC vs.
Revision 1.48 by pcg, Wed Mar 3 04:07:52 2004 UTC

385 385
386 p = malloc (size); 386 p = malloc (size);
387 if (p) 387 if (p)
388 return p; 388 return p;
389 389
390 fprintf (stderr, APL_NAME ": memory allocation failure. Aborting"); 390 fprintf (stderr, RESNAME ": memory allocation failure. Aborting");
391 rxvt_clean_exit (); 391 rxvt_clean_exit ();
392 exit (EXIT_FAILURE); 392 exit (EXIT_FAILURE);
393 /* NOTREACHED */ 393 /* NOTREACHED */
394} 394}
395 395
401 401
402 p = calloc (number, size); 402 p = calloc (number, size);
403 if (p) 403 if (p)
404 return p; 404 return p;
405 405
406 fprintf (stderr, APL_NAME ": memory allocation failure. Aborting"); 406 fprintf (stderr, RESNAME ": memory allocation failure. Aborting");
407 rxvt_clean_exit (); 407 rxvt_clean_exit ();
408 exit (EXIT_FAILURE); 408 exit (EXIT_FAILURE);
409 /* NOTREACHED */ 409 /* NOTREACHED */
410} 410}
411 411
420 else 420 else
421 p = malloc (size); 421 p = malloc (size);
422 if (p) 422 if (p)
423 return p; 423 return p;
424 424
425 fprintf (stderr, APL_NAME ": memory allocation failure. Aborting"); 425 fprintf (stderr, RESNAME ": memory allocation failure. Aborting");
426 rxvt_clean_exit (); 426 rxvt_clean_exit ();
427 exit (EXIT_FAILURE); 427 exit (EXIT_FAILURE);
428 /* NOTREACHED */ 428 /* NOTREACHED */
429} 429}
430 430
739 } 739 }
740 else 740 else
741 { 741 {
742 rxvt_fontset *fs = new rxvt_fontset (this); 742 rxvt_fontset *fs = new rxvt_fontset (this);
743 743
744 if (fs && fs->populate (fontname)) 744 if (fs && fs->populate (fontname ? fontname : "fixed"))
745 { 745 {
746 delete TermWin.fontset; 746 delete TermWin.fontset;
747 TermWin.fontset = fs; 747 TermWin.fontset = fs;
748 TermWin.fwidth = fs->base_font ()->width; 748 TermWin.fwidth = fs->base_font ()->width;
749 TermWin.fheight = fs->base_font ()->height; 749 TermWin.fheight = fs->base_font ()->height;
750 TermWin.fbase = fs->base_font ()->ascent; 750 TermWin.fbase = fs->base_font ()->ascent;
751 751
752 // TODO: screen needs to be told about new fonts
753
754 if (TermWin.parent[0]) 752 if (TermWin.parent[0])
755 { 753 {
756 resize_all_windows (0, 0, 0); 754 resize_all_windows (0, 0, 0);
757 scr_remap_chars (); 755 scr_remap_chars ();
758 scr_touch (true); 756 scr_touch (true);
778rxvt_term::set_title (const char *str) 776rxvt_term::set_title (const char *str)
779{ 777{
780#ifndef SMART_WINDOW_TITLE 778#ifndef SMART_WINDOW_TITLE
781 XStoreName (display->display, TermWin.parent[0], str); 779 XStoreName (display->display, TermWin.parent[0], str);
782#else 780#else
783 char *name; 781 char *name;
784 782
785 if (XFetchName (display->display, TermWin.parent[0], &name) == 0) 783 if (XFetchName (display->display, TermWin.parent[0], &name) == 0)
786 name = NULL; 784 name = NULL;
787 if (name == NULL || STRCMP (name, str)) 785 if (name == NULL || STRCMP (name, str))
788 XStoreName (display->display, TermWin.parent[0], str); 786 XStoreName (display->display, TermWin.parent[0], str);
795rxvt_term::set_iconName (const char *str) 793rxvt_term::set_iconName (const char *str)
796{ 794{
797#ifndef SMART_WINDOW_TITLE 795#ifndef SMART_WINDOW_TITLE
798 XSetIconName (display->display, TermWin.parent[0], str); 796 XSetIconName (display->display, TermWin.parent[0], str);
799#else 797#else
800 char *name; 798 char *name;
801 799
802 if (XGetIconName (display->display, TermWin.parent[0], &name)) 800 if (XGetIconName (display->display, TermWin.parent[0], &name))
803 name = NULL; 801 name = NULL;
804 if (name == NULL || STRCMP (name, str)) 802 if (name == NULL || STRCMP (name, str))
805 XSetIconName (display->display, TermWin.parent[0], str); 803 XSetIconName (display->display, TermWin.parent[0], str);
810 808
811#ifdef XTERM_COLOR_CHANGE 809#ifdef XTERM_COLOR_CHANGE
812void 810void
813rxvt_term::set_window_color (int idx, const char *color) 811rxvt_term::set_window_color (int idx, const char *color)
814{ 812{
815 rxvt_color xcol; 813 rxvt_color xcol;
816 int i; 814 int i;
817 815
818 if (color == NULL || *color == '\0') 816 if (color == NULL || *color == '\0')
819 return; 817 return;
820 818
821 /* handle color aliases */ 819 /* handle color aliases */
1038 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); 1036 0, TermWin_TotalWidth (), menuBar_TotalHeight ());
1039 1037
1040 XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, 1038 XMoveResizeWindow (display->display, TermWin.vt, window_vt_x,
1041 window_vt_y, TermWin_TotalWidth (), 1039 window_vt_y, TermWin_TotalWidth (),
1042 TermWin_TotalHeight ()); 1040 TermWin_TotalHeight ());
1043 scr_clear (); 1041 scr_clear (height != old_height);
1044#ifdef XPM_BACKGROUND 1042#ifdef XPM_BACKGROUND
1045 resize_pixmap (); 1043 resize_pixmap ();
1046#endif 1044#endif
1047 1045
1048 } 1046 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines