* DEC OSF/1 curses problem
@ 1994-03-16 18:08 Piotr A.Zolnierczuk
0 siblings, 0 replies; only message in thread
From: Piotr A.Zolnierczuk @ 1994-03-16 18:08 UTC (permalink / raw)
Hi,
I have tried to compile a sample program from curses_intro(3) man
page from DEC. I added only one line into main routine, namely
ch = getch()
and some #ifdef for DEC C++ (1.3) in the beginning
What I observed that it compiles without troubles with cc and
cxx (when having extension .c, C mode ) but fails to compile when having
extension .cc or .cxx ( C++ mode).
There is a bug in curses.h file, getch() is wrongly delclared (as for C++).
On the other hand, when removing #ifdef __cplusplus surrounding
#include <curses.h>, getch() is OK, but now initscr has a bad linkage type.
Any comments, hints how to solve it (especially from DEC)?
Piotr A.Zolnierczuk
--------------------- THAT STRANGE FILE curs.c or curs.cc or curs.cxx ------------
#ifdef __cplusplus
extern "C" {
#endif
#include <curses.h>
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" int wmove (WINDOW *win, int y, int x) ;
extern "C" int waddstr (WINDOW *win,char *str);
extern "C" int wrefresh (WINDOW *win);
extern "C" int endwin();
#endif
int main()
{
int ch;
initscr();
move(LINES/2-1,COLS/2-4);
addstr("MID");
refresh();
addstr("SCREEN");
refresh();
ch = getch();
endwin();
return(ch);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-03-16 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-16 18:08 DEC OSF/1 curses problem Piotr A.Zolnierczuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox