bug-ncurses
[Top][All Lists]
Advanced

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

Re: color in subwindows


From: Thomas Dickey
Subject: Re: color in subwindows
Date: Tue, 17 Jun 2003 06:54:38 -0400
User-agent: Mutt/1.3.28i

On Tue, Jun 17, 2003 at 06:27:26AM -0400, Thomas Dickey wrote:
> On Mon, Jun 16, 2003 at 08:46:46PM -0600, D. Stimits wrote:
> > >
> > > >PS: What are the chances that the wprintw family can be fixed to keep
> > > >the fmt const char* instead of just char*? I know curses.h says they are
> > > >const, but the actual functions are throwing the const away (according

they're const in my current code as well (I was responding to the general
topic, which has come up more than once, but did not notice that this was
one that was no longer an issue).  This particular case is the one that
someone from NetBSD got someone from X/Open to bless a few years ago.

> > Basically, if a parameter to a function is not going to be modified, it 
> > should be const in the function declaration. From the man page, and from 
> > the curses.h  file, it claims it is const already for the fmt parameter:
> 
> I missed some of those (people report a few each year).
>  
> >    int printw(const char *fmt, ...);
> >    int wprintw(WINDOW *win, const char *fmt, ...);
> >    int mvprintw(int y, int x, const char *fmt, ...);
> >    int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
> >    int vwprintw(WINDOW *win, const char *fmt, va_list varglist);
> >    int vw_printw(WINDOW *win, const char *fmt, va_list varglist);
> 
> here's the reference:

however, this is not a good case to argue about (since the manpage and curses.h
both state that it is const).  I'll have to lookup one of the cases that was
giving me trouble (no time right now - sorry).

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




reply via email to

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