Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Compilation error in Src/Modules/curses.c on HP-UX



I've apparently been using ncurses with this until now, but I just
happened to try out HP's curses library instead, and encounter this error. 

cc: "curses.c", line 1332: error 1000: Unexpected symbol: "{".
cc: "curses.c", line 1332: error 1000: Unexpected symbol: "==".
cc: "curses.c", line 1333: error 1000: Unexpected symbol: "{".
cc: "curses.c", line 1333: error 1588: "__wi" undefined.

It only happens with the HP compiler, gcc seems to cope with the code
even though the curses.h it uses is very similar.  Given that the macro
looks like

#define getyx(__win,__y,__x)    { WINDOW *__wi; \
                 __wi = __win; ((__y) = __getcury(__wi), \
                 (__x) = __getcurx(__wi)); }

I'm not quite sure what is meant or what gcc is giving us out of
the macro call:

1331     /* Look no pointers:  these are macros. */
1332     if (getyx(w->win, intarr[0], intarr[1]) == ERR ||
1333   getbegyx(w->win, intarr[2], intarr[3]) == ERR ||
1334   getmaxyx(w->win, intarr[4], intarr[5]) == ERR)
1335   return 1;



Messages sorted by: Reverse Date, Date, Thread, Author