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.135 by root, Sun Feb 13 11:07:57 2005 UTC vs.
Revision 1.141 by root, Sat Feb 19 01:07:58 2005 UTC

30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 *---------------------------------------------------------------------*/ 31 *---------------------------------------------------------------------*/
32 32
33#include "../config.h" /* NECESSARY */ 33#include "../config.h" /* NECESSARY */
34#include "rxvt.h" /* NECESSARY */ 34#include "rxvt.h" /* NECESSARY */
35#include "main.intpro" /* PROTOS for internal routines */
36 35
37#include <csignal> 36#include <csignal>
38#include <cstring> 37#include <cstring>
39 38
40#ifdef TTY_GID_SUPPORT 39#ifdef TTY_GID_SUPPORT
253 //if (menuBar.win) 252 //if (menuBar.win)
254 // XDestroyWindow (disp, menuBar.win); 253 // XDestroyWindow (disp, menuBar.win);
255#endif 254#endif
256 delete TermWin.drawable; 255 delete TermWin.drawable;
257 // destroy all windows 256 // destroy all windows
258 if (TermWin.parent[0]) 257 if (TermWin.parent[0]
258#if ENABLE_XEMBED
259 && !rs[Rs_embed]
260#endif
261 )
259 XDestroyWindow (disp, TermWin.parent[0]); 262 XDestroyWindow (disp, TermWin.parent[0]);
260 } 263 }
261 264
262 // TODO: free pixcolours, colours should become part of rxvt_display 265 // TODO: free pixcolours, colours should become part of rxvt_display
263 266
586 rxvt_fatal ("memory allocation failure. aborting.\n"); 589 rxvt_fatal ("memory allocation failure. aborting.\n");
587 590
588 return p; 591 return p;
589} 592}
590 593
591/* INTPROTO */
592void * 594void *
593rxvt_calloc (size_t number, size_t size) 595rxvt_calloc (size_t number, size_t size)
594{ 596{
595 void *p = calloc (number, size); 597 void *p = calloc (number, size);
596 598
598 rxvt_fatal ("memory allocation failure. aborting.\n"); 600 rxvt_fatal ("memory allocation failure. aborting.\n");
599 601
600 return p; 602 return p;
601} 603}
602 604
603/* INTPROTO */
604void * 605void *
605rxvt_realloc (void *ptr, size_t size) 606rxvt_realloc (void *ptr, size_t size)
606{ 607{
607 void *p = realloc (ptr, size); 608 void *p = realloc (ptr, size);
608 609
712 if (!parsed_geometry) 713 if (!parsed_geometry)
713 { 714 {
714 parsed_geometry = 1; 715 parsed_geometry = 1;
715 if (rs[Rs_geometry]) 716 if (rs[Rs_geometry])
716 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h); 717 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h);
718
717 if (flags & WidthValue) 719 if (flags & WidthValue)
718 { 720 {
719 TermWin.ncol = BOUND_POSITIVE_INT16 (w); 721 TermWin.ncol = BOUND_POSITIVE_INT16 (w);
720 szHint.flags |= USSize; 722 szHint.flags |= USSize;
721 } 723 }
724
722 if (flags & HeightValue) 725 if (flags & HeightValue)
723 { 726 {
724 TermWin.nrow = BOUND_POSITIVE_INT16 (h); 727 TermWin.nrow = BOUND_POSITIVE_INT16 (h);
725 szHint.flags |= USSize; 728 szHint.flags |= USSize;
726 } 729 }
730
727 if (flags & XValue) 731 if (flags & XValue)
728 { 732 {
729 szHint.x = x; 733 szHint.x = x;
730 szHint.flags |= USPosition; 734 szHint.flags |= USPosition;
731 if (flags & XNegative) 735 if (flags & XNegative)
732 { 736 {
733 recalc_x = 1; 737 recalc_x = 1;
734 szHint.win_gravity = NorthEastGravity; 738 szHint.win_gravity = NorthEastGravity;
735 } 739 }
736 } 740 }
741
737 if (flags & YValue) 742 if (flags & YValue)
738 { 743 {
739 szHint.y = y; 744 szHint.y = y;
740 szHint.flags |= USPosition; 745 szHint.flags |= USPosition;
741 if (flags & YNegative) 746 if (flags & YNegative)
840 (void)ioctl (pty.pty, TIOCSWINSZ, &ws); 845 (void)ioctl (pty.pty, TIOCSWINSZ, &ws);
841 846
842#if 0 847#if 0
843 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly 848 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly
844 if (cmd_pid) /* force through to the command */ 849 if (cmd_pid) /* force through to the command */
845 kill (cmd_pid, SIGWINCH); 850 kill (-cmd_pid, SIGWINCH);
846#endif 851#endif
847} 852}
848 853
849/*----------------------------------------------------------------------*/ 854/*----------------------------------------------------------------------*/
850/* set_fonts () - load and set the various fonts 855/* set_fonts () - load and set the various fonts

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines