Skip to content

Commit

Permalink
PDCurses version string gave the date 'initscr.c' was compiled, not t…
Browse files Browse the repository at this point in the history
…he actual version date you might expect from the header constants PDC_VER_YEAR, PDC_VER_MONTH, PDC_VER_DAY.
  • Loading branch information
Bill-Gray committed Oct 4, 2020
1 parent 1451686 commit 1024ee4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
4 changes: 4 additions & 0 deletions curses.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Defined by this header:
PDC_stringize( PDC_VER_MINOR) "." \
PDC_stringize( PDC_VER_CHANGE)

#define PDC_VER_YMD PDC_stringize( PDC_VER_YEAR) "-" \
PDC_stringize( PDC_VER_MONTH) "-" \
PDC_stringize( PDC_VER_DAY)

#define CHTYPE_LONG 1 /* chtype >= 32 bits */

#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
Expand Down
33 changes: 32 additions & 1 deletion pdcurses/initscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,38 @@ initscr

char ttytype[128];

const char *_curses_notice = "PDCurses " PDC_VERDOT " - " __DATE__;
#if PDC_VER_MONTH == 1
#define PDC_VER_MONTH_STR "Jan"
#elif PDC_VER_MONTH == 2
#define PDC_VER_MONTH_STR "Feb"
#elif PDC_VER_MONTH == 3
#define PDC_VER_MONTH_STR "Mar"
#elif PDC_VER_MONTH == 4
#define PDC_VER_MONTH_STR "Apr"
#elif PDC_VER_MONTH == 5
#define PDC_VER_MONTH_STR "May"
#elif PDC_VER_MONTH == 6
#define PDC_VER_MONTH_STR "Jun"
#elif PDC_VER_MONTH == 7
#define PDC_VER_MONTH_STR "Jul"
#elif PDC_VER_MONTH == 8
#define PDC_VER_MONTH_STR "Aug"
#elif PDC_VER_MONTH == 9
#define PDC_VER_MONTH_STR "Sep"
#elif PDC_VER_MONTH == 10
#define PDC_VER_MONTH_STR "Oct"
#elif PDC_VER_MONTH == 11
#define PDC_VER_MONTH_STR "Nov"
#elif PDC_VER_MONTH == 12
#define PDC_VER_MONTH_STR "Dec"
#else
#define PDC_VER_MONTH_STR "!!!"
#endif

const char *_curses_notice = "PDCurses " PDC_VERDOT " - "\
PDC_stringize( PDC_VER_YEAR) "-" \
PDC_VER_MONTH_STR "-" \
PDC_stringize( PDC_VER_DAY);

SCREEN *SP = (SCREEN*)NULL; /* curses variables */
WINDOW *curscr = (WINDOW *)NULL; /* the current screen image */
Expand Down

0 comments on commit 1024ee4

Please sign in to comment.