Poštni seznam arhiviranih sporo?il

Od: "Dave Yeo" <gnuports@2rosenthals.com> Glava
Izvorno E-sporo?ilo
Zadeva: Terminal width?
Datum: Sat, 14 May 2022 10:29:55 -0700
Za: GNU Ports for eCS Mailing List <gnuports@2rosenthals.com>

Need something like this, but we are missing TIOCGWINSZ()
int term_width(int fd)
{
        struct winsize geometry;
        geometry.ws_col = 0;
        if(ioctl(fd, TIOCGWINSZ, &geometry) >= 0)
                return (int)geometry.ws_col;
        return -1;
}

Ideas? Even OS/2 API?
Dave

Naro?iti: Poro?ilo (Feed), Izvle?ek (Digest), Indeks.
Odjava
E-pošta za mojstra za sezname