[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different behavior in Linux and Mac OS X
From: |
Thomas Dickey |
Subject: |
Re: Different behavior in Linux and Mac OS X |
Date: |
Sun, 9 May 2021 09:38:18 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sun, May 09, 2021 at 12:15:11PM +0100, Sebastiano Vigna wrote:
>
>
> > On 9 May 2021, at 11:41, Thomas Dickey <dickey@his.com> wrote:
> >
> >
> > I don't see that difference, testing on each platform, and assuming that
> > you are still referring to the hard-coded example.
> >
>
> OK, try this:
>
> #include <curses.h>
> #include <term.h>
>
> int main() {
> tgetent(NULL, "xterm");
> tputs(tgoto("\x1b[%i%d;%dH", 80, 25), 1, putchar);
sure: that's no longer terminfo (because the parameter markers are omitted),
but termcap.
I did this in 2000 (keeping in mind that ncurses 5.7 is a few years older).
20000923
+ split-out tgoto() again, this time into new file lib_tgoto.c, and
implement a conventional BSD-style tgoto() which is used if the
capability string does not contain terminfo-style padding or
parameters (requested by Andrey A Chernov).
If you stick to terminfo, it's portable.
> }
>
> Output on Linux: ESC + [81;26H
>
> Output on Mac Os X: ESC + [26;81H
>
>
> Ciao,
>
> seba
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature
- Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/02
- Re: Different behavior in Linux and Mac OS X, Thomas Dickey, 2021/05/02
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/05
- Re: Different behavior in Linux and Mac OS X, Thomas Dickey, 2021/05/05
- Re: Different behavior in Linux and Mac OS X, Thomas Dickey, 2021/05/08
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/08
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/08
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/09
- Re: Different behavior in Linux and Mac OS X, Thomas Dickey, 2021/05/09
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/09
- Re: Different behavior in Linux and Mac OS X,
Thomas Dickey <=
- Re: Different behavior in Linux and Mac OS X, Sebastiano Vigna, 2021/05/09
- Re: Different behavior in Linux and Mac OS X, Thomas Dickey, 2021/05/09