Last update: 26 April,2000
2000 #002
_____________________________________________________________________________
Topic: *printw functions
Relevant Sections: curses.h
Spec: X/Open Curses Issue 4 Version 2
Resolution Request:
-------------------
There is an inconsistency between definitions of the *printw() functions
in the curses.h file in that the format specification is not declared as a
"const char *" as it is in the XSH5 *printf() functions.
Is this intentional?
Resolution Response
-------------------
A future revision will change the prototypes for
int mvprintw(int y, int x, char *fmt, ...);
int mvwprintw(WINDOW *win, int y, int x, char *fmt, ...);
int printw(char *fmt, ...);
int wprintw(WINDOW *win, char *fmt, ...);
to
int mvprintw(int y, int x, const char *fmt, ...);
int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
int printw(const char *fmt, ...);
int wprintw(WINDOW *win, const char *fmt, ...);
For this issue of the specification either prototypes are acceptable.
Rationale
-------------
There is no reason for these functions to alter the format specification
string, and thus it should be a "const char *". I suspect that this is a
simple historical error, since curses was specified before ISO-C and the
"const" specifier were around!
Circulated for review: 30 March 2000
Approved: April 2000