From owner-freebsd-hackers@FreeBSD.ORG Sat May 21 08:07:40 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4686E16A4CF for ; Sat, 21 May 2005 08:07:40 +0000 (GMT) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74CA43DA5 for ; Sat, 21 May 2005 08:07:27 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j4L87Ofl005736 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 21 May 2005 18:07:25 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j4L87NRx009624; Sat, 21 May 2005 18:07:24 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j4L87NkW009623; Sat, 21 May 2005 18:07:23 +1000 (EST) (envelope-from pjeremy) Date: Sat, 21 May 2005 18:07:23 +1000 From: Peter Jeremy To: alexander Message-ID: <20050521080723.GN2129@cirb503493.alcatel.com.au> References: <20050520224726.GA7951@skatecity> <20050520230845.GC51092@dan.emsphone.com> <20050521015105.GA9063@skatecity> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050521015105.GA9063@skatecity> User-Agent: Mutt/1.4.2i cc: freebsd-hackers@freebsd.org Subject: Re: Looking for ANSI/VT100 code replacement. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2005 08:07:40 -0000 On Sat, 2005-May-21 03:51:05 +0200, alexander wrote: >Ohh...sorry for not telling you this. Yes. The app works alright when >executed from the console. But my problem is with xterm or Eterm. They don't >handle VT100 very well. By default, xterm is a VT102 superset, and the VT102 is a VT100 superset. Unless you are issuing unusual escape sequences, you shouldn't be able to tell the difference. > In fact Eterm or xterm might not update the value >for as long as 5-8 seconds. Out of interest, is the xterm or Eterm client running on the Xserver or a different host? It is possible that updates are being queued between xterm and the Xserver, though I think 5-8 seconds is excessive. >The app is used to upload data to another device. Under the console the upload >time is ~ 11.5 seconds. Under Eterm it is ~ 25 seconds. That's why I really >want to get rid of the VT100 stuff. xterm/Eterm have much more overhead than the console. If you're running on really slow hardware, this might make a difference. >The nanosleep delay I'm using is 0,00050000. Note that the minimum delay is 1 tick (1/HZ). Shorter delays are rounded up (and there might still be a one-tick additional delay). > Plus the cursor jumps forth and back. I would expect that. The cursor is moving back and forth as you write to the xterm. Since the screen refresh rate is much slower than your update rate, you are seeing the cursor in random locations. The easy solution for xterm is to make the cursor invisible ("\e[?25l" and "\e[?25h" to make it visible again). I think you need to give us more details and preferably some sample code to simulate the problem. What is the hardware you are running on? What version of FreeBSD, X11 and xterm/Eterm. -- Peter Jeremy