bug-ncurses
[Top][All Lists]
Advanced

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

Re: printw: const char*


From: Thomas Dickey
Subject: Re: printw: const char*
Date: Fri, 15 Nov 2002 18:49:44 -0500
User-agent: Mutt/1.3.27i

On Fri, Nov 15, 2002 at 03:01:01PM +0000, Pedro Palhoto Matos wrote:
> Hello,
> 
> I'm developing a program with ncurses and I am in the middle of checking 
> everything I can via the compiler, through its warnings and I have 
> stummbled on a feature or a bug of ncurses that I'm not sure why it is so.
> 
> The printw is declared as printw(char *fmt...); and in the curs_printw 
> man page, it refers to printw as being analogous to printf.
> 
> As I compiled with the -Wwrite-strings option in gcc, I have got the 
> warning "passing arg 1 of `printw' discards qualifiers from pointer 
> target type". This doesn't happen to the printf function, because the 
> first argument is const char *.
> 
> Is there any particular reason for this? Does printw alter the string?

It's declared w/o const because that's the interface published by X/Open.
See the discussion of NCURSES_CONST in the ncurses INSTALL file.

-- 
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]