diff --git a/XtGlue.c b/XtGlue.c index 4bf9bd5..e6c1d6c 100644 --- a/XtGlue.c +++ b/XtGlue.c @@ -94,7 +94,7 @@ static void DefaultRemoveInput(unsigned long id); static int DefaultProcessEvents(int block); -static void dunno(void) +static void dunno(H3270 *session) { } @@ -999,9 +999,10 @@ LIB3270_EXPORT int lib3270_wait(seconds) return 0; } -LIB3270_EXPORT void lib3270_ring_bell(void) +LIB3270_EXPORT void lib3270_ring_bell(H3270 *session) { - callbacks->ring_bell(); + CHECK_SESSION_HANDLE(session); + callbacks->ring_bell(session); } diff --git a/ansi.c b/ansi.c index 1d500ac..afb7a5d 100644 --- a/ansi.c +++ b/ansi.c @@ -917,7 +917,7 @@ ansi_sgr(int ig1 unused, int ig2 unused) static enum state ansi_bell(int ig1 unused, int ig2 unused) { - lib3270_ring_bell(); + lib3270_ring_bell(NULL); return DATA; } diff --git a/api.h b/api.h index 851ace4..f4ebd91 100644 --- a/api.h +++ b/api.h @@ -383,8 +383,6 @@ const char *description; }; - LIB3270_EXPORT void lib3270_ring_bell(void); - #define new_3270_session(m) lib3270_session_new(m) LOCAL_EXTERN const struct lib3270_option * get_3270_option_table(int sz); diff --git a/ctlr.c b/ctlr.c index 9552ecc..059584c 100644 --- a/ctlr.c +++ b/ctlr.c @@ -1871,7 +1871,7 @@ ctlr_write(unsigned char buf[], int buflen, Boolean erase) status_syswait(); } if (wcc_sound_alarm) - lib3270_ring_bell(); + lib3270_ring_bell(NULL); /* Set up the DBCS state. */ if (ctlr_dbcs_postprocess() < 0 && rv == PDS_OKAY_NO_OUTPUT) diff --git a/kybd.c b/kybd.c index f151538..c26f1e8 100644 --- a/kybd.c +++ b/kybd.c @@ -182,7 +182,7 @@ static int enq_chk(void) /* If operator error, complain and drop it. */ if (kybdlock & KL_OERR_MASK) { - lib3270_ring_bell(); + lib3270_ring_bell(NULL); trace_event(" dropped (operator error)\n"); return -1; } @@ -190,7 +190,7 @@ static int enq_chk(void) /* If scroll lock, complain and drop it. */ if (kybdlock & KL_SCROLLED) { - lib3270_ring_bell(); + lib3270_ring_bell(NULL); trace_event(" dropped (scrolled)\n"); return -1; } @@ -471,7 +471,7 @@ operator_error(int error_type) kybdlock_set((unsigned int)error_type, "operator_error"); (void) flush_ta(); } else { - lib3270_ring_bell(); + lib3270_ring_bell(NULL); } } diff --git a/lib3270.cbp b/lib3270.cbp index 3875529..492c3f5 100644 --- a/lib3270.cbp +++ b/lib3270.cbp @@ -57,8 +57,14 @@ + + + + + + diff --git a/selection.c b/selection.c index 5b44c72..abf30d0 100644 --- a/selection.c +++ b/selection.c @@ -205,7 +205,7 @@ LIB3270_EXPORT void lib3270_select_word(H3270 *session, int baddr) if(!lib3270_connected(session) || isspace(ea_buf[baddr].chr)) { - lib3270_ring_bell(); + lib3270_ring_bell(session); return; } @@ -227,15 +227,15 @@ LIB3270_EXPORT int lib3270_select_field(H3270 *session, int baddr) if(!lib3270_connected(session)) { - lib3270_ring_bell(); - return; + lib3270_ring_bell(session); + return -1; } start = lib3270_field_addr(session,baddr); if(start < 0) { - lib3270_ring_bell(); + lib3270_ring_bell(session); return -1; } -- libgit2 0.21.2