delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/02/14/02:37:36

Delivered-To: listarch-cygwin AT sourceware DOT cygnus DOT com
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: "Rick Rankin" <rrankin AT primenet DOT com>
To: "Cygwin" <cygwin AT sourceware DOT cygnus DOT com>
Subject: rxvt patches for initial terminal size
Date: Sat, 13 Feb 1999 19:37:33 -0700
Message-ID: <NCBBLBLBNJPLCPKCBIIIAEKDCBAA.rrankin@primenet.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2212 (4.71.2419.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01BE5788.4D49BF00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here's a small patch against the rxvt-2.4.5 distribution that eliminates the
need to resize the  window to get it to recognize an initial size other than
25 lines. The patch also modifies the makefile to create rxvt as a windows
application, rather than a console application. This prevents it from
creating an extra console window when started from various launch bars.
Finally, it modifies Makefile.in to recognize the .exe extension (rxvt.exe,
rclock.exe) [there's got to be a better way to handle this!]. To use the
patch, copy the patch file to the top level directory of the rxvt
distribution, and run "patch -p1 <rxvt-2.4.5.patch". You should be able to
run "configure", "make", and "make install" with no problems.

Let me know how the patch works overall. If no one has any serious problems
with it, I'll submit it to the rxvt maintainers.

Rick
--
Rick Rankin
rrankin AT primenet DOT com

------=_NextPart_000_0000_01BE5788.4D49BF00
Content-Type: application/octet-stream;
	name="rxvt-2.4.5.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="rxvt-2.4.5.patch"

diff -Naur rxvt-2.4.5/autoconf/Make.common.in =
rxvt-2.4.5.working/autoconf/Make.common.in=0A=
--- rxvt-2.4.5/autoconf/Make.common.in	Thu Jan 01 12:29:08 1998=0A=
+++ rxvt-2.4.5.working/autoconf/Make.common.in	Fri May 01 16:13:03 1998=0A=
@@ -42,7 +42,7 @@=0A=
 =0A=
 CFLAGS =3D @CFLAGS@=0A=
 CPPFLAGS =3D @CPPFLAGS@ @XPM_CPPFLAGS@=0A=
-LDFLAGS =3D @LDFLAGS@=0A=
+LDFLAGS =3D @LDFLAGS@ -Wl,--subsystem,windows=0A=
 DEFS =3D @DEFS@=0A=
 LIBS =3D @LIBS@=0A=
 DINCLUDE =3D @DINCLUDE@=0A=
diff -Naur rxvt-2.4.5/rclock/Makefile.in =
rxvt-2.4.5.working/rclock/Makefile.in=0A=
--- rxvt-2.4.5/rclock/Makefile.in	Thu Jan 01 12:29:09 1998=0A=
+++ rxvt-2.4.5.working/rclock/Makefile.in	Fri May 01 16:04:13 1998=0A=
@@ -63,11 +63,11 @@=0A=
 	(cd $(srcdir); $(RMF) Makefile)=0A=
 =0A=
 install: allbin alldoc=0A=
-	$(INSTALL_PROGRAM) rclock $(DESTDIR)$(bindir)/$(binprefix)rclock=0A=
+	$(INSTALL_PROGRAM) rclock.exe =
$(DESTDIR)$(bindir)/$(binprefix)rclock.exe=0A=
 	$(INSTALL_DATA) rclock.1 =
$(DESTDIR)$(mandir)/$(manprefix)rclock.$(manext)=0A=
 =0A=
 uninstall:=0A=
-	cd $(bindir); $(RMF) $(binprefix)rclock=0A=
+	cd $(bindir); $(RMF) $(binprefix)rclock.exe=0A=
 	cd $(mandir); $(RMF) $(manprefix)rclock.$(manext)=0A=
 =0A=
 distdirs:=0A=
diff -Naur rxvt-2.4.5/src/Makefile.in rxvt-2.4.5.working/src/Makefile.in=0A=
--- rxvt-2.4.5/src/Makefile.in	Thu Jan 01 12:29:08 1998=0A=
+++ rxvt-2.4.5.working/src/Makefile.in	Fri May 01 16:02:56 1998=0A=
@@ -58,7 +58,7 @@=0A=
 alldoc:=0A=
 =0A=
 clean:=0A=
-	$(RMF) rxvt core a.out $(OBJS) *.bak *~=0A=
+	$(RMF) rxvt.exe core a.out $(OBJS) *.bak *~=0A=
 =0A=
 realclean: clean=0A=
 	$(RMF) tags *.pro=0A=
@@ -68,10 +68,10 @@=0A=
 	(cd $(srcdir); $(RMF) Makefile)=0A=
 =0A=
 install: allbin alldoc=0A=
-	$(INSTALL_PROGRAM) rxvt $(DESTDIR)$(bindir)/$(binprefix)rxvt=0A=
+	$(INSTALL_PROGRAM) rxvt.exe $(DESTDIR)$(bindir)/$(binprefix)rxvt.exe=0A=
 =0A=
 uninstall:=0A=
-	(cd $(bindir); $(RMF) $(binprefix)rxvt)=0A=
+	(cd $(bindir); $(RMF) $(binprefix)rxvt.exe)=0A=
 =0A=
 distdirs:=0A=
 	mkdir $(basedir)/../$(VERNAME)/$(thisdir)=0A=
diff -Naur rxvt-2.4.5/src/command.c rxvt-2.4.5.working/src/command.c=0A=
--- rxvt-2.4.5/src/command.c	Thu Jan 01 12:29:08 1998=0A=
+++ rxvt-2.4.5.working/src/command.c	Wed Apr 01 15:25:24 1998=0A=
@@ -332,8 +332,10 @@=0A=
      * change effective uid/gid - not real uid/gid - so we can switch=0A=
      * back to root later, as required=0A=
      */=0A=
+/* #ifndef __CYGWIN__ */=0A=
 	seteuid(getuid());=0A=
 	setegid(getgid());=0A=
+/* #endif */=0A=
 	break;=0A=
 =0A=
     case SAVE:=0A=
@@ -342,8 +344,10 @@=0A=
 	break;=0A=
 =0A=
     case RESTORE:=0A=
+/* #ifndef __CYGWIN__ */=0A=
 	seteuid(euid);=0A=
 	setegid(egid);=0A=
+/* #endif */=0A=
 	break;=0A=
     }=0A=
 #else=0A=
@@ -448,7 +452,7 @@=0A=
     ptydev =3D ttydev =3D _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0);=0A=
     if (ptydev =3D=3D NULL)=0A=
 	goto Failed;=0A=
-#elif defined (__svr4__)=0A=
+#elif defined (__svr4__) || defined (__CYGWIN__)=0A=
     {=0A=
 	extern char    *ptsname();=0A=
 =0A=
@@ -592,8 +596,10 @@=0A=
 #endif				/* TTY_GID_SUPPORT */=0A=
 =0A=
 	privileges(RESTORE);=0A=
-	fchown(fd, getuid(), gid);	/* fail silently */=0A=
-	fchmod(fd, mode);=0A=
+#ifndef __CYGWIN__=0A=
+ 	fchown(fd, getuid(), gid);	/* fail silently */=0A=
+#endif=0A=
+ 	fchmod(fd, mode);=0A=
 	privileges(IGNORE);=0A=
     }=0A=
 #endif				/* __svr4__ */=0A=
diff -Naur rxvt-2.4.5/src/main.c rxvt-2.4.5.working/src/main.c=0A=
--- rxvt-2.4.5/src/main.c	Thu Jan 01 12:29:08 1998=0A=
+++ rxvt-2.4.5.working/src/main.c	Wed Apr 01 16:36:00 1998=0A=
@@ -1823,6 +1823,9 @@=0A=
 =0A=
     init_command(cmd_argv);=0A=
 =0A=
+    /* Make sure the terminal subsystem knows about the initial size. */=0A=
+    tt_resize();=0A=
+=0A=
     main_loop();		/* main processing loop */=0A=
     return EXIT_SUCCESS;=0A=
 }=0A=

------=_NextPart_000_0000_01BE5788.4D49BF00--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019