|
cursesterm.c:42: error: syntax error before "attr_t" cursesterm.c:42: warning: no semicolon at end of struct or union cursesterm.c:46: error: elements of array `colorlist' have incomplete type
Here's what I see in the source code at that point: #ifndef NCURSES_COLOR_T #define NCURSES_COLOR_T short #endif /* Mapping of 5250 colors to curses colors */ struct _curses_color_map { char *name; NCURSES_COLOR_T ref; attr_t bld; }; typedef struct _curses_color_map curses_color_map; static curses_color_map colorlist[] = { { "black", COLOR_BLACK }, { "red", COLOR_RED, A_BOLD }, .. more interesting colors listed here ..line 32 is the line that says "attr_t bld". I don't see a missing semicolon anywhere, and it compiles without trouble on all of my systems. (Again, this isn't new code, it's been around for quite awhile, though this time I get to take the blame for writing it!)
So I'm guessing your system doesn't have a definition for "attr_t". On my system, it's defined in ncurses.h, and used in prototypes for several ncurses APIs, such as attr_off() and attr_on(), You might look to see what you have listed in the prototypes for those APIs.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.