From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25095 invoked from network); 15 Oct 2007 13:25:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Oct 2007 13:25:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 70723 invoked from network); 15 Oct 2007 13:25:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Oct 2007 13:25:53 -0000 Received: (qmail 328 invoked by alias); 15 Oct 2007 13:25:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23957 Received: (qmail 311 invoked from network); 15 Oct 2007 13:25:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Oct 2007 13:25:50 -0000 Received: (qmail 70463 invoked from network); 15 Oct 2007 13:25:50 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 15 Oct 2007 13:25:44 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 77CD95C58C; Mon, 15 Oct 2007 09:25:42 -0400 (EDT) Date: Mon, 15 Oct 2007 09:25:42 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.dk Subject: Re: PATCH: make curses module not need wideness Message-ID: <20071015132542.GA2882@scowler.net> Mail-Followup-To: Bart Schaefer , zsh-workers@sunsite.dk References: <20071014042142.GA27713@scowler.net> <071014092646.ZM21802@torch.brasslantern.com> <20071014170856.GA14631@scowler.net> <071014151608.ZM26588@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <071014151608.ZM26588@torch.brasslantern.com> User-Agent: Mutt/1.5.16 (2007-06-11) On Sun, Oct 14, 2007 at 03:16:08PM -0700, Bart Schaefer wrote: > I'm not having much luck with this. The doc should mention that window > zero is automatically created as the whole terminal. Also there's no > check that the targetwin argument is really an integer; I typo'd a "q" > for a "1", got some errors about the window already existing (apparently > because non-integers are read as "0"), and ended up with a core dump: I'll just disallow specification of window 0 for now. > The doc for "zcurses -m" says "moves targetwin to new coordinates" but > really it positions the cursor within the target window, doesn't it? > Maybe better phrasing is all that's needed. Agreed. > Also I none of the strings I send with "zcurses -s" show up in the > window. A border added with "zcurses -b" will display, but that's all. > "zcurses -c" has a similar problem. As I perhaps failed to express before, -c and -s work fine for me with non-wide ncurses, and only -c functions properly with wide ncurses. Index: Doc/Zsh/mod_curses.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_curses.yo,v retrieving revision 1.1 diff -u -r1.1 mod_curses.yo --- Doc/Zsh/mod_curses.yo 14 Oct 2007 17:14:22 -0000 1.1 +++ Doc/Zsh/mod_curses.yo 15 Oct 2007 13:20:15 -0000 @@ -26,7 +26,8 @@ make any pending changes (such as characters you have prepared for output with tt(-c)) visible on the screen. -tt(-m) moves var(targetwin) to new coordinates var(new_y) and var(new_x). +tt(-m) moves the cursor position in var(targetwin) to new coordinates +var(new_y) and var(new_x). Outputting characters and strings are achieved by tt(-c) and tt(-s) respectively. Index: Src/Modules/curses.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v retrieving revision 1.4 diff -u -r1.4 curses.c --- Src/Modules/curses.c 14 Oct 2007 04:24:47 -0000 1.4 +++ Src/Modules/curses.c 15 Oct 2007 13:20:15 -0000 @@ -78,7 +78,7 @@ target = (unsigned)atoi(win); - if (target > ZCURSES_MAX_WINDOWS) { + if (target > ZCURSES_MAX_WINDOWS || target < 1) { zc_errno = ZCURSES_ERANGE; return -1; }