Skip to content

Commit

Permalink
We can avoid library mislinkages (compiling with, say, 32-bit chtypes…
Browse files Browse the repository at this point in the history
… and 8-bit characters and linking to a library built with 64-bit chtypes and wide-chars). See issue #133.  Implements my 'this _might_ be easier than I thought' approach.
  • Loading branch information
Bill-Gray committed May 28, 2020
1 parent 19aa4d6 commit 56a0864
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions curses.h
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,29 @@ PDCEX int init_color(short, short, short, short);
PDCEX int init_extended_color(int, int, int, int);
PDCEX int init_extended_pair(int, int, int);
PDCEX int init_pair(short, short, short);

#ifdef PDC_WIDE
#ifdef PDC_FORCE_UTF8

This comment has been minimized.

Copy link
@GitMensch

GitMensch Jun 8, 2020

Collaborator

If we add this then we also need a note in the comments of this file's header about PDC_FORCE_UTF8.

#ifdef CHTYPE_32
#define initscr initscr_u32
#else
#define initscr initscr_u64
#endif
#else
#ifdef CHTYPE_32
#define initscr initscr_w32
#else
#define initscr initscr_w64
#endif
#endif
#else /* 8-bit chtypes */
#ifdef CHTYPE_32
#define initscr initscr_x32
#else
#define initscr initscr_x64
#endif
#endif

PDCEX WINDOW *initscr(void);
PDCEX int innstr(char *, int);
PDCEX int insch(chtype);
Expand Down

0 comments on commit 56a0864

Please sign in to comment.