Commit 30b1c5d8ec3e534a3819f25a02f3427d9942c097
1 parent
bd224002
Exists in
master
and in
3 other branches
Incluindo ring daemon
Showing
7 changed files
with
36 additions
and
29 deletions
Show diff stats
XtGlue.c
| ... | ... | @@ -94,9 +94,14 @@ static void DefaultRemoveInput(unsigned long id); |
| 94 | 94 | |
| 95 | 95 | static int DefaultProcessEvents(int block); |
| 96 | 96 | |
| 97 | -static const struct lib3270_io_callbacks default_io_callbacks = | |
| 97 | +static void dunno(void) | |
| 98 | 98 | { |
| 99 | - sizeof(struct lib3270_io_callbacks), | |
| 99 | + | |
| 100 | +} | |
| 101 | + | |
| 102 | +static const struct lib3270_callbacks default_callbacks = | |
| 103 | +{ | |
| 104 | + sizeof(struct lib3270_callbacks), | |
| 100 | 105 | |
| 101 | 106 | DefaultAddTimeOut, // unsigned long (*AddTimeOut)(unsigned long interval_ms, void (*proc)(void)); |
| 102 | 107 | DefaultRemoveTimeOut, // void (*RemoveTimeOut)(unsigned long timer); |
| ... | ... | @@ -114,10 +119,12 @@ static const struct lib3270_io_callbacks default_io_callbacks = |
| 114 | 119 | |
| 115 | 120 | NULL, // int (*Wait)(int seconds); |
| 116 | 121 | DefaultProcessEvents, // int (*RunPendingEvents)(int wait); |
| 122 | + dunno | |
| 123 | + | |
| 117 | 124 | |
| 118 | 125 | }; |
| 119 | 126 | |
| 120 | -static const struct lib3270_io_callbacks *callbacks = &default_io_callbacks; | |
| 127 | +static const struct lib3270_callbacks *callbacks = &default_callbacks; | |
| 121 | 128 | |
| 122 | 129 | /*---[ Implement default calls ]----------------------------------------------------------------------------*/ |
| 123 | 130 | |
| ... | ... | @@ -870,14 +877,12 @@ void RemoveInput(unsigned long id) |
| 870 | 877 | callbacks->RemoveInput(id); |
| 871 | 878 | } |
| 872 | 879 | |
| 873 | -#define Register3270IOCallbacks(x) lib3270_register_io_handlers(x) | |
| 874 | - | |
| 875 | -int LIB3270_EXPORT lib3270_register_io_handlers(const struct lib3270_io_callbacks *cbk) | |
| 880 | +int LIB3270_EXPORT lib3270_register_handlers(const struct lib3270_callbacks *cbk) | |
| 876 | 881 | { |
| 877 | 882 | if(!cbk) |
| 878 | 883 | return EINVAL; |
| 879 | 884 | |
| 880 | - if(cbk->sz != sizeof(struct lib3270_io_callbacks)) | |
| 885 | + if(cbk->sz != sizeof(struct lib3270_callbacks)) | |
| 881 | 886 | return EINVAL; |
| 882 | 887 | |
| 883 | 888 | callbacks = cbk; |
| ... | ... | @@ -993,3 +998,10 @@ LIB3270_EXPORT int lib3270_wait(seconds) |
| 993 | 998 | |
| 994 | 999 | return 0; |
| 995 | 1000 | } |
| 1001 | + | |
| 1002 | +LIB3270_EXPORT void lib3270_ring_bell(void) | |
| 1003 | +{ | |
| 1004 | + callbacks->ring_bell(); | |
| 1005 | +} | |
| 1006 | + | |
| 1007 | + | ... | ... |
ansi.c
| ... | ... | @@ -285,8 +285,6 @@ |
| 285 | 285 | |
| 286 | 286 | #endif |
| 287 | 287 | |
| 288 | - #define Register3270IOCallbacks(x) lib3270_register_io_handlers(x) | |
| 289 | - | |
| 290 | 288 | |
| 291 | 289 | /* Screen processing */ |
| 292 | 290 | |
| ... | ... | @@ -327,6 +325,7 @@ |
| 327 | 325 | |
| 328 | 326 | #define CHAR_ATTR_UNCONVERTED CHAR_ATTR_CG |
| 329 | 327 | |
| 328 | +/* | |
| 330 | 329 | struct lib3270_screen_callbacks |
| 331 | 330 | { |
| 332 | 331 | unsigned short sz; |
| ... | ... | @@ -363,6 +362,7 @@ |
| 363 | 362 | char * (*console_entry)(HCONSOLE hwnd); |
| 364 | 363 | |
| 365 | 364 | }; |
| 365 | +*/ | |
| 366 | 366 | |
| 367 | 367 | struct lib3270_option |
| 368 | 368 | { |
| ... | ... | @@ -383,8 +383,7 @@ |
| 383 | 383 | const char *description; |
| 384 | 384 | }; |
| 385 | 385 | |
| 386 | - // LOCAL_EXTERN int Register3270ScreenCallbacks(const struct lib3270_screen_callbacks *cbk); | |
| 387 | - LOCAL_EXTERN void ring_bell(void); | |
| 386 | + LIB3270_EXPORT void lib3270_ring_bell(void); | |
| 388 | 387 | |
| 389 | 388 | #define new_3270_session(m) lib3270_session_new(m) |
| 390 | 389 | ... | ... |
ctlr.c
| ... | ... | @@ -1871,7 +1871,7 @@ ctlr_write(unsigned char buf[], int buflen, Boolean erase) |
| 1871 | 1871 | status_syswait(); |
| 1872 | 1872 | } |
| 1873 | 1873 | if (wcc_sound_alarm) |
| 1874 | - ring_bell(); | |
| 1874 | + lib3270_ring_bell(); | |
| 1875 | 1875 | |
| 1876 | 1876 | /* Set up the DBCS state. */ |
| 1877 | 1877 | if (ctlr_dbcs_postprocess() < 0 && rv == PDS_OKAY_NO_OUTPUT) | ... | ... |
kybd.c
| ... | ... | @@ -182,7 +182,7 @@ static int enq_chk(void) |
| 182 | 182 | /* If operator error, complain and drop it. */ |
| 183 | 183 | if (kybdlock & KL_OERR_MASK) |
| 184 | 184 | { |
| 185 | - ring_bell(); | |
| 185 | + lib3270_ring_bell(); | |
| 186 | 186 | trace_event(" dropped (operator error)\n"); |
| 187 | 187 | return -1; |
| 188 | 188 | } |
| ... | ... | @@ -190,7 +190,7 @@ static int enq_chk(void) |
| 190 | 190 | /* If scroll lock, complain and drop it. */ |
| 191 | 191 | if (kybdlock & KL_SCROLLED) |
| 192 | 192 | { |
| 193 | - ring_bell(); | |
| 193 | + lib3270_ring_bell(); | |
| 194 | 194 | trace_event(" dropped (scrolled)\n"); |
| 195 | 195 | return -1; |
| 196 | 196 | } |
| ... | ... | @@ -471,7 +471,7 @@ operator_error(int error_type) |
| 471 | 471 | kybdlock_set((unsigned int)error_type, "operator_error"); |
| 472 | 472 | (void) flush_ta(); |
| 473 | 473 | } else { |
| 474 | - ring_bell(); | |
| 474 | + lib3270_ring_bell(); | |
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | 477 | |
| ... | ... | @@ -1317,7 +1317,7 @@ void key_ACharacter(unsigned char c, enum keytype keytype, enum iaction cause,Bo |
| 1317 | 1317 | composing = FIRST; |
| 1318 | 1318 | status_compose(True, c, keytype); |
| 1319 | 1319 | } else { |
| 1320 | - ring_bell(); | |
| 1320 | + lib3270_ring_bell(); | |
| 1321 | 1321 | composing = NONE; |
| 1322 | 1322 | status_compose(False, 0, KT_STD); |
| 1323 | 1323 | } |
| ... | ... | @@ -1335,7 +1335,7 @@ void key_ACharacter(unsigned char c, enum keytype keytype, enum iaction cause,Bo |
| 1335 | 1335 | c = composites[i].translation.keysym; |
| 1336 | 1336 | keytype = composites[i].translation.keytype; |
| 1337 | 1337 | } else { |
| 1338 | - ring_bell(); | |
| 1338 | + lib3270_ring_bell(); | |
| 1339 | 1339 | return; |
| 1340 | 1340 | } |
| 1341 | 1341 | break; |
| ... | ... | @@ -2449,7 +2449,7 @@ lightpen_select(int baddr) |
| 2449 | 2449 | faddr = find_field_attribute(baddr); |
| 2450 | 2450 | fa = ea_buf[faddr].fa; |
| 2451 | 2451 | if (!FA_IS_SELECTABLE(fa)) { |
| 2452 | - ring_bell(); | |
| 2452 | + lib3270_ring_bell(); | |
| 2453 | 2453 | return; |
| 2454 | 2454 | } |
| 2455 | 2455 | designator = faddr; |
| ... | ... | @@ -2464,7 +2464,7 @@ lightpen_select(int baddr) |
| 2464 | 2464 | ea_buf[designator].db != DBCS_LEFT_WRAP) && |
| 2465 | 2465 | (ea_buf[designator2].db != DBCS_RIGHT && |
| 2466 | 2466 | ea_buf[designator2].db != DBCS_RIGHT_WRAP)) { |
| 2467 | - ring_bell(); | |
| 2467 | + lib3270_ring_bell(); | |
| 2468 | 2468 | return; |
| 2469 | 2469 | } |
| 2470 | 2470 | if (ea_buf[designator].cc == 0x42 && |
| ... | ... | @@ -2487,7 +2487,7 @@ lightpen_select(int baddr) |
| 2487 | 2487 | mdt_set(faddr); |
| 2488 | 2488 | key_AID(AID_ENTER); |
| 2489 | 2489 | } else { |
| 2490 | - ring_bell(); | |
| 2490 | + lib3270_ring_bell(); | |
| 2491 | 2491 | } |
| 2492 | 2492 | return; |
| 2493 | 2493 | } |
| ... | ... | @@ -2513,7 +2513,7 @@ lightpen_select(int baddr) |
| 2513 | 2513 | key_AID(AID_ENTER); |
| 2514 | 2514 | break; |
| 2515 | 2515 | default: |
| 2516 | - ring_bell(); | |
| 2516 | + lib3270_ring_bell(); | |
| 2517 | 2517 | break; |
| 2518 | 2518 | } |
| 2519 | 2519 | } | ... | ... |
screen.c
selection.c
| ... | ... | @@ -205,7 +205,7 @@ LIB3270_EXPORT void lib3270_select_word(H3270 *session, int baddr) |
| 205 | 205 | |
| 206 | 206 | if(!lib3270_connected(session) || isspace(ea_buf[baddr].chr)) |
| 207 | 207 | { |
| 208 | - ring_bell(); | |
| 208 | + lib3270_ring_bell(); | |
| 209 | 209 | return; |
| 210 | 210 | } |
| 211 | 211 | |
| ... | ... | @@ -227,7 +227,7 @@ LIB3270_EXPORT int lib3270_select_field(H3270 *session, int baddr) |
| 227 | 227 | |
| 228 | 228 | if(!lib3270_connected(session)) |
| 229 | 229 | { |
| 230 | - ring_bell(); | |
| 230 | + lib3270_ring_bell(); | |
| 231 | 231 | return; |
| 232 | 232 | } |
| 233 | 233 | |
| ... | ... | @@ -235,7 +235,7 @@ LIB3270_EXPORT int lib3270_select_field(H3270 *session, int baddr) |
| 235 | 235 | |
| 236 | 236 | if(start < 0) |
| 237 | 237 | { |
| 238 | - ring_bell(); | |
| 238 | + lib3270_ring_bell(); | |
| 239 | 239 | return -1; |
| 240 | 240 | } |
| 241 | 241 | ... | ... |