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
>>>>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
>>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
both state that it is const). I'll have to lookup one of the cases
giving me trouble (no time right now - sorry).