bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor corrections - lib_screen.c


From: Thomas E. Dickey
Subject: Re: Minor corrections - lib_screen.c
Date: Tue, 20 Aug 2002 07:14:33 -0400 (EDT)

On Tue, 20 Aug 2002, Philippe Blain wrote:

> >From Philippe Blain, Bordeaux, FRANCE.
> My old computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0
>
> To maintainers of 'ncurses'.(and to Mr Dickey)
> Subject: Corrections for ncurses-5.2-20020817+
>
> Here are some problems I found:
>
> ----------------------------------------------------------------------------
> ----
> File : ncurses/base/lib_screen.c
>
> Function : getwin() - Clearing errors indicator before testing
>     .................
>     T((T_CALLED("getwin(%p)"), filep));
>
> ==> clearerr(filep);
>     (void) fread(&tmp, sizeof(WINDOW), 1, filep);
>     if (ferror(filep))
>     returnWin(0);

I guess so - perhaps it would be preferable to do this:

        if (fread(&tmp, sizeof(WINDOW), 1, filep) == 0
         && ferror(filep))
            returnWin(0);

though I seem to recall a libc5 bug that handled ferror incorrectly...

> Function : scr_set() - Forgot something in correcting bugzilla #68199
>
> NCURSES_EXPORT(int) scr_set(const char *file)
> {
>     T((T_CALLED("scr_set(%s)"), _nc_visbuf(file)));
>
>     if (scr_init(file) == ERR) {
>         returnCode(ERR);
>     } else {
>         delwin(newscr);
> ==>     SP->_newscr = newscr = dupwin(curscr);
>         returnCode(OK);
>     }
> }

ok (I did look, but overlooked)

-- 
T.E.Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]