From: zolnie@ikpgem02.ikp (Piotr A.Zolnierczuk)
Subject: DEC OSF/1 curses problem
Date: 16 Mar 94 18:08:25 GMT [thread overview]
Message-ID: <978@zam103.zam.kfa-juelich.de> (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);
}
reply other threads:[~1994-03-16 18:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox