delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/28/20:03:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sun, 28 Nov 2004 20:03:18 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: SEDT (VMS EDT-like editor) under Cygwin ?
Message-ID: <20041129010318.GA23153@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <001101c4d59a$1d84f870$0700a8c0 AT services DOT sp DOT trw DOT com> <41AA60D9 DOT 8070007 AT familiehaase DOT de> <20041128234041 DOT GA22684 AT trixie DOT casa DOT cgf DOT cx> <41AA689E DOT 2050703 AT familiehaase DOT de>
Mime-Version: 1.0
In-Reply-To: <41AA689E.2050703@familiehaase.de>
User-Agent: Mutt/1.4.1i

On Mon, Nov 29, 2004 at 01:09:02AM +0100, Gerrit P. Haase wrote:
>Christopher Faylor wrote:
>
>>On Mon, Nov 29, 2004 at 12:35:53AM +0100, Gerrit P. Haase wrote:
>>
>>>Jim McCarthy wrote:
>>>
>>>>Sorry, no patchfile, but ...
>>>>
>>>>1) Edit sedt.c and change all 'stricmp' to 'sedt_stricmp' to avoid
>>>> conflict with 'stricmp' declaration in /usr/include/string.h
>>>>
>>>>2) In comd.c, add #include <errno.h> before line #include "proto.h"
>>>>
>>>>With these changes, build should result in a functional sedt.exe
>>>>file.
>>>
>>>Well, not really, I found two more issues:
>>>
>>>diff -urd sedt/term.c sedt-0.0/term.c
>>>--- sedt/term.c	1994-08-28 20:51:34.000000000 +0200
>>>+++ sedt-0.0/term.c	2004-11-28 23:17:21.615971200 +0100
>>>@@ -747,7 +747,7 @@
>>> }
>>> _exit(1);
>>>}
>>>-#if !defined(SCO) & !defined(HPUX)
>>>+#if !defined(SCO) & !defined(HPUX) & !defined(__CYGWIN__)
>>>if (ioctl(0,TIOCGWINSZ,&ws)!=-1&&ws.ws_row!=0&&ws.ws_col!=0)
>>
>>
>>Why is this?  TIOCGWINSZ is defined for cygwin.
>
>I got an error at this line:
>ccache gcc -O -DANSIC -DUNIX -DTERMCAP -DLINUX   -c -o term.o term.c
>term.c: In function `Set_Terminal':
>term.c:751: error: `TIOCGWINSZ' undeclared (first use in this function)
>term.c:751: error: (Each undeclared identifier is reported only once
>term.c:751: error: for each function it appears in.)
>term.c:751: error: invalid use of undefined type `struct winsize'
>term.c:751: error: invalid use of undefined type `struct winsize'
>term.c:752: error: invalid use of undefined type `struct winsize'
>term.c:753: error: invalid use of undefined type `struct winsize'
>make: *** [term.o] Error 1
>
>When I include sys/termios.h I get this:
>$ make
>ccache gcc -O -DANSIC -DUNIX -DTERMCAP -DLINUX   -c -o term.o term.c
>term.c: In function `Set_Terminal':
>term.c:754: error: invalid use of undefined type `struct winsize'
>term.c:754: error: invalid use of undefined type `struct winsize'
>term.c:755: error: invalid use of undefined type `struct winsize'
>term.c:756: error: invalid use of undefined type `struct winsize'
>make: *** [term.o] Error 1
>
>
>Even if I patch vars.c to include sys/termios.h so that the part
>with 'struct winsize ws' compiles, I get the second error.

Which means that term.c is using winsize incorrectly, apparently.

Since other applications (like vim) are using TIOCGWINSZ, it can't be
entirely broken.

If this actually ever becomes a package it shouldn't be released broken
in this regard.  It should be able to determine the size of the screen.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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