Skip to content

Commit

Permalink
Merge branch 'gnucobol-3.x' into gcos4gnucobol-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan committed Jan 3, 2025
2 parents 3f34a24 + ff8f895 commit c4fbcc3
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 14 deletions.
15 changes: 10 additions & 5 deletions libcob/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

2024-12-31 Simon Sobisch <simonsobisch@gnu.org>

* common.c [WITH_EXTENDED_SCREENIO]: adjusted curses includes/defines
used for info output to include panel header definitions and XCurses

2024-12-23 David Declerck <david.declerck@ocamlpro.com>

* termio.c (clean_double): skip more than a single leading
Expand Down Expand Up @@ -1487,7 +1492,7 @@ after suggestions by Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>
cob_add_exception
* screenio.c (handle_status): pass type of statement to raise
either COB_EC_IMP_ACCEPT or COB_EC_IMP_DISPLAY
* screenio.c (handle_status, cob_set_crt3_status) [!COB_GEN_SCREENIO]:
* screenio.c (handle_status, cob_set_crt3_status) [!WITH_EXTENDED_SCREENIO]:
unconditionally defined those functions and finally return error
status and nonfatal exception along with a warning on accept if the
runtime is not configured for extended screenio
Expand Down Expand Up @@ -2654,7 +2659,7 @@ after suggestions by Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>

2019-05-31 Simon Sobisch <simonsobisch@gnu.org>

* screenio.c (cob_settings_screenio): moved out of COB_GEN_SCREENIO
* screenio.c (cob_settings_screenio): moved out of WITH_EXTENDED_SCREENIO

2019-05-30 Simon Sobisch <simonsobisch@gnu.org>

Expand Down Expand Up @@ -3421,7 +3426,7 @@ after suggestions by Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>

2017-07-21 Simon Sobisch <simonsobisch@gnu.org>

* screenio.c: moved cob_sys_get_char and added parts for !COB_GEN_SCREENIO
* screenio.c: moved cob_sys_get_char and added parts for !WITH_EXTENDED_SCREENIO

2017-07-20 Simon Sobisch <simonsobisch@gnu.org>

Expand Down Expand Up @@ -3586,7 +3591,7 @@ after suggestions by Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>

2017-02-07 Simon Sobisch <simonsobisch@gnu.org>

* screenio.c: [!COB_GEN_SCREENIO] fixed zero_line_col_allowed
* screenio.c: [!WITH_EXTENDED_SCREENIO] fixed zero_line_col_allowed
missing / superfluous in function declarations

2017-02-06 Ron Norman <rjn@inglenet.com>
Expand Down Expand Up @@ -4532,7 +4537,7 @@ after suggestions by Chuck Haatvedt <chuck.haatvedt+cobol@gmail.com>

2010-10-18 Simon Sobisch <simonsobisch@gnu.org>

* screenio.c (!COB_GEN_SCREENIO): Make cob_sys_sound_bell usable via
* screenio.c (!WITH_EXTENDED_SCREENIO): Make cob_sys_sound_bell usable via
cob_speaker_beep
* common.c: Add possibility to disable the bell via
COB_BELL=NO/NONE/0/OFF (currently only the first char is checked)
Expand Down
56 changes: 47 additions & 9 deletions libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,67 @@
#include <db.h>
#endif

#if defined (HAVE_NCURSESW_NCURSES_H)
#if defined (HAVE_NCURSESW_PANEL_H)
#include <ncursesw/panel.h>
#define WITH_EXTENDED_SCREENIO
#define WITH_PANELS
#elif defined (HAVE_NCURSES_PANEL_H)
#include <ncurses/panel.h>
#define WITH_EXTENDED_SCREENIO
#define WITH_PANELS
#elif defined (HAVE_PDCURSES_PANEL_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <pdcurses/panel.h>
#define WITH_EXTENDED_SCREENIO
#define WITH_PANELS
#elif defined (HAVE_XCURSES_PANEL_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <xcurses/panel.h>
#define WITH_EXTENDED_SCREENIO
#define WITH_PANELS
#elif defined (HAVE_PANEL_H)
#define PDC_NCMOUSE /* see comment above */
#include <panel.h>
#ifndef PDC_MOUSE_MOVED
#undef PDC_NCMOUSE
#endif
#define WITH_EXTENDED_SCREENIO
#define WITH_PANELS
#elif defined (HAVE_NCURSESW_NCURSES_H)
#include <ncursesw/ncurses.h>
#define COB_GEN_SCREENIO
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_NCURSESW_CURSES_H)
#include <ncursesw/curses.h>
#define COB_GEN_SCREENIO
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_NCURSES_H)
#include <ncurses.h>
#define COB_GEN_SCREENIO
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_NCURSES_NCURSES_H)
#include <ncurses/ncurses.h>
#define COB_GEN_SCREENIO
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_PDCURSES_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <pdcurses.h>
#define COB_GEN_SCREENIO
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_PDCURSES_CURSES_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <pdcurses/curses.h>
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_XCURSES_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <xcurses.h>
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_XCURSES_CURSES_H)
#define PDC_NCMOUSE /* use ncurses compatible mouse API */
#include <xcurses/curses.h>
#define WITH_EXTENDED_SCREENIO
#elif defined (HAVE_CURSES_H)
#define PDC_NCMOUSE /* see comment above */
#include <curses.h>
#define COB_GEN_SCREENIO
#ifndef PDC_MOUSE_MOVED
#undef PDC_NCMOUSE
#endif
#define WITH_EXTENDED_SCREENIO
#endif

#if defined (__PDCURSES__)
Expand Down Expand Up @@ -9370,7 +9408,7 @@ conf_runtime_error (const int finish_error, const char *fmt, ...)
}
}

#if defined (COB_GEN_SCREENIO)
#if defined (WITH_EXTENDED_SCREENIO)
/* resolve curses library related version information
stores the information in the version_buffer parameter
returns the mouse info */
Expand Down Expand Up @@ -9778,7 +9816,7 @@ print_info_detailed (const int verbose)
/* resolving screenio related information before anything else as this
function will possibly run initscr + endwin and therefore
may interfer with other output */
#if defined (COB_GEN_SCREENIO)
#if defined (WITH_EXTENDED_SCREENIO)
mouse_support = get_screenio_and_mouse_info
((char*)&screenio_info, sizeof (screenio_info), verbose);
#else
Expand Down

0 comments on commit c4fbcc3

Please sign in to comment.