Commit 2269e5d51eeaf8acedaa6e86f355891cfa988555
1 parent
d5cfc922
Exists in
master
and in
3 other branches
Movendo includes que faltavam para o diretorio da lib, ajustes para a versao 5
Showing
26 changed files
with
141 additions
and
145 deletions
Show diff stats
XtGlue.c
| @@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
| 33 | /* glue for missing Xt code */ | 33 | /* glue for missing Xt code */ |
| 34 | 34 | ||
| 35 | #include "globals.h" | 35 | #include "globals.h" |
| 36 | +#include "api.h" | ||
| 36 | #if defined(_WIN32) /*[*/ | 37 | #if defined(_WIN32) /*[*/ |
| 37 | #include "appres.h" | 38 | #include "appres.h" |
| 38 | #include "trace_dsc.h" | 39 | #include "trace_dsc.h" |
| @@ -43,7 +44,7 @@ | @@ -43,7 +44,7 @@ | ||
| 43 | #include <stdlib.h> | 44 | #include <stdlib.h> |
| 44 | #include <string.h> | 45 | #include <string.h> |
| 45 | #include <errno.h> | 46 | #include <errno.h> |
| 46 | -#include <X11/keysym.h> | 47 | +// #include <X11/keysym.h> |
| 47 | 48 | ||
| 48 | #include <sys/time.h> | 49 | #include <sys/time.h> |
| 49 | #include <sys/types.h> | 50 | #include <sys/types.h> |
| @@ -587,12 +588,6 @@ Free(void *p) | @@ -587,12 +588,6 @@ Free(void *p) | ||
| 587 | } | 588 | } |
| 588 | 589 | ||
| 589 | /* | 590 | /* |
| 590 | -char * | ||
| 591 | -NewString(const char *s) | ||
| 592 | -{ | ||
| 593 | - return strcpy(Malloc(strlen(s) + 1), s); | ||
| 594 | -} | ||
| 595 | -*/ | ||
| 596 | 591 | ||
| 597 | static struct { | 592 | static struct { |
| 598 | const char *name; | 593 | const char *name; |
| @@ -794,18 +789,16 @@ static struct { | @@ -794,18 +789,16 @@ static struct { | ||
| 794 | { "thorn", XK_thorn }, | 789 | { "thorn", XK_thorn }, |
| 795 | { "ydiaeresis", XK_ydiaeresis }, | 790 | { "ydiaeresis", XK_ydiaeresis }, |
| 796 | 791 | ||
| 797 | - /* | ||
| 798 | - * The following are, umm, hacks to allow symbolic names for | ||
| 799 | - * control codes. | ||
| 800 | - */ | ||
| 801 | -#if !defined(_WIN32) /*[*/ | 792 | + // The following are, umm, hacks to allow symbolic names for |
| 793 | + // control codes. | ||
| 794 | +#if !defined(_WIN32) | ||
| 802 | { "BackSpace", 0x08 }, | 795 | { "BackSpace", 0x08 }, |
| 803 | { "Tab", 0x09 }, | 796 | { "Tab", 0x09 }, |
| 804 | { "Linefeed", 0x0a }, | 797 | { "Linefeed", 0x0a }, |
| 805 | { "Return", 0x0d }, | 798 | { "Return", 0x0d }, |
| 806 | { "Escape", 0x1b }, | 799 | { "Escape", 0x1b }, |
| 807 | { "Delete", 0x7f }, | 800 | { "Delete", 0x7f }, |
| 808 | -#endif /*]*/ | 801 | +#endif |
| 809 | 802 | ||
| 810 | { (char *)NULL, NoSymbol } | 803 | { (char *)NULL, NoSymbol } |
| 811 | }; | 804 | }; |
| @@ -824,7 +817,6 @@ StringToKeysym(char *s) | @@ -824,7 +817,6 @@ StringToKeysym(char *s) | ||
| 824 | return NoSymbol; | 817 | return NoSymbol; |
| 825 | } | 818 | } |
| 826 | 819 | ||
| 827 | -/* | ||
| 828 | char * | 820 | char * |
| 829 | KeysymToString(KeySym k) | 821 | KeysymToString(KeySym k) |
| 830 | { | 822 | { |
| @@ -117,23 +117,6 @@ | @@ -117,23 +117,6 @@ | ||
| 117 | #define LUNAME_SIZE 16 | 117 | #define LUNAME_SIZE 16 |
| 118 | #define FULL_MODEL_NAME_SIZE 13 | 118 | #define FULL_MODEL_NAME_SIZE 13 |
| 119 | 119 | ||
| 120 | - | ||
| 121 | - /* State change IDs. */ | ||
| 122 | - typedef enum _lib3270_state | ||
| 123 | - { | ||
| 124 | - LIB3270_STATE_RESOLVING, | ||
| 125 | - LIB3270_STATE_HALF_CONNECT, | ||
| 126 | - LIB3270_STATE_CONNECT, | ||
| 127 | - LIB3270_STATE_3270_MODE, | ||
| 128 | - LIB3270_STATE_LINE_MODE, | ||
| 129 | - LIB3270_STATE_REMODEL, | ||
| 130 | - LIB3270_STATE_PRINTER, | ||
| 131 | - LIB3270_STATE_EXITING, | ||
| 132 | - LIB3270_STATE_CHARSET, | ||
| 133 | - | ||
| 134 | - LIB3270_STATE_USER // Always the last one | ||
| 135 | - } LIB3270_STATE; | ||
| 136 | - | ||
| 137 | #define ST_RESOLVING LIB3270_STATE_RESOLVING | 120 | #define ST_RESOLVING LIB3270_STATE_RESOLVING |
| 138 | #define ST_HALF_CONNECT LIB3270_STATE_HALF_CONNECT | 121 | #define ST_HALF_CONNECT LIB3270_STATE_HALF_CONNECT |
| 139 | #define ST_CONNECT LIB3270_STATE_CONNECT | 122 | #define ST_CONNECT LIB3270_STATE_CONNECT |
| @@ -299,13 +282,6 @@ | @@ -299,13 +282,6 @@ | ||
| 299 | PW3270_DIALOG_USER | 282 | PW3270_DIALOG_USER |
| 300 | } PW3270_DIALOG; | 283 | } PW3270_DIALOG; |
| 301 | 284 | ||
| 302 | - /** input key type */ | ||
| 303 | - enum keytype | ||
| 304 | - { | ||
| 305 | - KT_STD, | ||
| 306 | - KT_GE | ||
| 307 | - }; | ||
| 308 | - | ||
| 309 | /** extended attributes */ | 285 | /** extended attributes */ |
| 310 | struct ea | 286 | struct ea |
| 311 | { | 287 | { |
| @@ -391,8 +367,6 @@ | @@ -391,8 +367,6 @@ | ||
| 391 | 367 | ||
| 392 | LIB3270_EXPORT int RegisterFTCallbacks(const struct filetransfer_callbacks *cbk); | 368 | LIB3270_EXPORT int RegisterFTCallbacks(const struct filetransfer_callbacks *cbk); |
| 393 | 369 | ||
| 394 | -// #define QueryCstate() lib3270_get_connection_state(NULL) | ||
| 395 | - | ||
| 396 | #define PCONNECTED lib3270_pconnected(NULL) | 370 | #define PCONNECTED lib3270_pconnected(NULL) |
| 397 | #define HALF_CONNECTED lib3270_half_connected(NULL) | 371 | #define HALF_CONNECTED lib3270_half_connected(NULL) |
| 398 | #define CONNECTED lib3270_connected(NULL) | 372 | #define CONNECTED lib3270_connected(NULL) |
| @@ -406,45 +380,10 @@ | @@ -406,45 +380,10 @@ | ||
| 406 | 380 | ||
| 407 | #ifndef LIB3270 | 381 | #ifndef LIB3270 |
| 408 | 382 | ||
| 409 | - | ||
| 410 | LIB3270_EXPORT enum ft_state QueryFTstate(void); | 383 | LIB3270_EXPORT enum ft_state QueryFTstate(void); |
| 411 | 384 | ||
| 412 | -// #define PCONNECTED ((int) QueryCstate() >= (int)RESOLVING) | ||
| 413 | -// #define HALF_CONNECTED (QueryCstate() == RESOLVING || QueryCstate() == PENDING) | ||
| 414 | -// #define CONNECTED ((int) QueryCstate() >= (int)CONNECTED_INITIAL) | ||
| 415 | -// #define IN_NEITHER (QueryCstate() == CONNECTED_INITIAL) | ||
| 416 | -// #define IN_ANSI (QueryCstate() == CONNECTED_ANSI || QueryCstate() == CONNECTED_NVT) | ||
| 417 | -// #define IN_3270 (QueryCstate() == CONNECTED_3270 || QueryCstate() == CONNECTED_TN3270E || QueryCstate() == CONNECTED_SSCP) | ||
| 418 | -// #define IN_SSCP (QueryCstate() == CONNECTED_SSCP) | ||
| 419 | -// #define IN_TN3270E (QueryCstate() == CONNECTED_TN3270E) | ||
| 420 | -// #define IN_E (QueryCstate() >= CONNECTED_INITIAL_E) | ||
| 421 | - | ||
| 422 | #endif | 385 | #endif |
| 423 | 386 | ||
| 424 | - /* I/O processing */ | ||
| 425 | - struct lib3270_io_callbacks | ||
| 426 | - { | ||
| 427 | - unsigned short sz; | ||
| 428 | - | ||
| 429 | - unsigned long (*AddTimeOut)(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session)); | ||
| 430 | - void (*RemoveTimeOut)(unsigned long timer); | ||
| 431 | - | ||
| 432 | - unsigned long (*AddInput)(int source, H3270 *session, void (*fn)(H3270 *session)); | ||
| 433 | - void (*RemoveInput)(unsigned long id); | ||
| 434 | - | ||
| 435 | - unsigned long (*AddExcept)(int source, H3270 *session, void (*fn)(H3270 *session)); | ||
| 436 | - | ||
| 437 | - #if !defined(_WIN32) /*[*/ | ||
| 438 | - unsigned long (*AddOutput)(int source, H3270 *session, void (*fn)(H3270 *session)); | ||
| 439 | - #endif /*]*/ | ||
| 440 | - | ||
| 441 | - int (*callthread)(int(*callback)(H3270 *, void *), H3270 *session, void *parm); | ||
| 442 | - | ||
| 443 | - int (*Wait)(int seconds); | ||
| 444 | - int (*RunPendingEvents)(int wait); | ||
| 445 | - | ||
| 446 | - }; | ||
| 447 | - | ||
| 448 | #define Register3270IOCallbacks(x) lib3270_register_io_handlers(x) | 387 | #define Register3270IOCallbacks(x) lib3270_register_io_handlers(x) |
| 449 | 388 | ||
| 450 | 389 | ||
| @@ -608,12 +547,6 @@ | @@ -608,12 +547,6 @@ | ||
| 608 | LIB3270_EXPORT void screen_suspend(H3270 *session); | 547 | LIB3270_EXPORT void screen_suspend(H3270 *session); |
| 609 | LIB3270_EXPORT void screen_disp(H3270 *session); | 548 | LIB3270_EXPORT void screen_disp(H3270 *session); |
| 610 | 549 | ||
| 611 | - /* Console calls */ | ||
| 612 | - LIB3270_EXPORT HCONSOLE console_window_new(const char *title, const char *label); | ||
| 613 | - LIB3270_EXPORT void console_window_delete(HCONSOLE hwnd); | ||
| 614 | - LIB3270_EXPORT int console_window_append(HCONSOLE hwnd, const char *fmt, ...); | ||
| 615 | - LIB3270_EXPORT char * console_window_wait_for_user_entry(HCONSOLE hwnd); | ||
| 616 | - | ||
| 617 | /* Cursor calls */ | 550 | /* Cursor calls */ |
| 618 | #define cursor_get_addr(void) lib3270_get_cursor_address(NULL) | 551 | #define cursor_get_addr(void) lib3270_get_cursor_address(NULL) |
| 619 | #define cursor_set_addr(x) lib3270_set_cursor_address(NULL,x) | 552 | #define cursor_set_addr(x) lib3270_set_cursor_address(NULL,x) |
| @@ -625,7 +558,6 @@ | @@ -625,7 +558,6 @@ | ||
| 625 | #define host_reconnect(w) lib3270_reconnect(NULL,w) | 558 | #define host_reconnect(w) lib3270_reconnect(NULL,w) |
| 626 | 559 | ||
| 627 | #define register_schange(tx,func) lib3270_register_schange(NULL,tx,func,NULL) | 560 | #define register_schange(tx,func) lib3270_register_schange(NULL,tx,func,NULL) |
| 628 | - LIB3270_EXPORT void lib3270_register_schange(H3270 *h,LIB3270_STATE tx, void (*func)(H3270 *, int, void *),void *user_data); | ||
| 629 | 561 | ||
| 630 | /* Console/Trace window */ | 562 | /* Console/Trace window */ |
| 631 | LIB3270_EXPORT HCONSOLE console_window_new(const char *title, const char *label); | 563 | LIB3270_EXPORT HCONSOLE console_window_new(const char *title, const char *label); |
appres.h
charset.c
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | #include <langinfo.h> | 58 | #include <langinfo.h> |
| 59 | #endif /*]*/ | 59 | #endif /*]*/ |
| 60 | 60 | ||
| 61 | -#include <lib3270/api.h> | 61 | +// #include <lib3270/api.h> |
| 62 | 62 | ||
| 63 | #define EURO_SUFFIX "-euro" | 63 | #define EURO_SUFFIX "-euro" |
| 64 | #define ES_SIZE (sizeof(EURO_SUFFIX) - 1) | 64 | #define ES_SIZE (sizeof(EURO_SUFFIX) - 1) |
ft_cut.c
globals.h
| @@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
| 33 | /* Autoconf settings. */ | 33 | /* Autoconf settings. */ |
| 34 | #include <lib3270/config.h> /* autoconf settings */ | 34 | #include <lib3270/config.h> /* autoconf settings */ |
| 35 | #include <lib3270.h> /* lib3270 API calls and defs */ | 35 | #include <lib3270.h> /* lib3270 API calls and defs */ |
| 36 | +#include "api.h" | ||
| 36 | 37 | ||
| 37 | /* From glibconfig.h */ | 38 | /* From glibconfig.h */ |
| 38 | #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) | 39 | #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
glue.c
| @@ -83,7 +83,7 @@ | @@ -83,7 +83,7 @@ | ||
| 83 | #include "winversc.h" | 83 | #include "winversc.h" |
| 84 | #endif /*]*/ | 84 | #endif /*]*/ |
| 85 | 85 | ||
| 86 | -#include "session.h" | 86 | +// #include "session.h" |
| 87 | 87 | ||
| 88 | #if defined WIN32 | 88 | #if defined WIN32 |
| 89 | BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd); | 89 | BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd); |
hostc.h
kybd.c
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | #if defined(X3270_APL) /*[*/ | 44 | #if defined(X3270_APL) /*[*/ |
| 45 | #define XK_APL | 45 | #define XK_APL |
| 46 | #endif /*]*/ | 46 | #endif /*]*/ |
| 47 | -#include <X11/keysym.h> | 47 | +// #include <X11/keysym.h> |
| 48 | 48 | ||
| 49 | #include <fcntl.h> | 49 | #include <fcntl.h> |
| 50 | #include "3270ds.h" | 50 | #include "3270ds.h" |
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | #if defined(X3270_DBCS) /*[*/ | 76 | #if defined(X3270_DBCS) /*[*/ |
| 77 | #include "widec.h" | 77 | #include "widec.h" |
| 78 | #endif /*]*/ | 78 | #endif /*]*/ |
| 79 | -#include <lib3270/api.h> | 79 | +#include "api.h" |
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | /*#define KYBDLOCK_TRACE 1*/ | 82 | /*#define KYBDLOCK_TRACE 1*/ |
| @@ -3439,22 +3439,10 @@ LIB3270_EXPORT int lib3270_emulate_input(H3270 *session, char *s, int len, int p | @@ -3439,22 +3439,10 @@ LIB3270_EXPORT int lib3270_emulate_input(H3270 *session, char *s, int len, int p | ||
| 3439 | state = XGE; | 3439 | state = XGE; |
| 3440 | break; | 3440 | break; |
| 3441 | case '[': /* APL left bracket */ | 3441 | case '[': /* APL left bracket */ |
| 3442 | - if (pasting && appres.apl_mode) | ||
| 3443 | - key_ACharacter( | ||
| 3444 | - (unsigned char) XK_Yacute, | ||
| 3445 | - KT_GE, ia, &skipped); | ||
| 3446 | - else | ||
| 3447 | - key_ACharacter((unsigned char) c, | ||
| 3448 | - KT_STD, ia, &skipped); | 3442 | + key_ACharacter((unsigned char) c, KT_STD, ia, &skipped); |
| 3449 | break; | 3443 | break; |
| 3450 | case ']': /* APL right bracket */ | 3444 | case ']': /* APL right bracket */ |
| 3451 | - if (pasting && appres.apl_mode) | ||
| 3452 | - key_ACharacter( | ||
| 3453 | - (unsigned char) XK_diaeresis, | ||
| 3454 | - KT_GE, ia, &skipped); | ||
| 3455 | - else | ||
| 3456 | - key_ACharacter((unsigned char) c, | ||
| 3457 | - KT_STD, ia, &skipped); | 3445 | + key_ACharacter((unsigned char) c, KT_STD, ia, &skipped); |
| 3458 | break; | 3446 | break; |
| 3459 | default: | 3447 | default: |
| 3460 | #if defined(X3270_DBCS) /*[*/ | 3448 | #if defined(X3270_DBCS) /*[*/ |
macros.c
| @@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
| 30 | * | 30 | * |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | + #include <errno.h> | ||
| 33 | #include <string.h> | 34 | #include <string.h> |
| 34 | #include <stdio.h> | 35 | #include <stdio.h> |
| 35 | #include <lib3270.h> | 36 | #include <lib3270.h> |
| @@ -59,15 +60,6 @@ | @@ -59,15 +60,6 @@ | ||
| 59 | return macro_list; | 60 | return macro_list; |
| 60 | } | 61 | } |
| 61 | 62 | ||
| 62 | -/* | ||
| 63 | - static char * value_as_string(int val) | ||
| 64 | - { | ||
| 65 | - char buffer[10]; | ||
| 66 | - snprintf(buffer,9,"%d",val); | ||
| 67 | - return strdup(buffer); | ||
| 68 | - } | ||
| 69 | -*/ | ||
| 70 | - | ||
| 71 | static const char * get_state(H3270 *h) | 63 | static const char * get_state(H3270 *h) |
| 72 | { | 64 | { |
| 73 | #define DECLARE_XLAT_STATE(x) { x, #x } | 65 | #define DECLARE_XLAT_STATE(x) { x, #x } |
| @@ -77,16 +69,16 @@ | @@ -77,16 +69,16 @@ | ||
| 77 | const char * ret; | 69 | const char * ret; |
| 78 | } xlat_state[] = | 70 | } xlat_state[] = |
| 79 | { | 71 | { |
| 80 | - DECLARE_XLAT_STATE( NOT_CONNECTED ), | ||
| 81 | - DECLARE_XLAT_STATE( RESOLVING ), | ||
| 82 | - DECLARE_XLAT_STATE( PENDING ), | ||
| 83 | - DECLARE_XLAT_STATE( CONNECTED_INITIAL ), | ||
| 84 | - DECLARE_XLAT_STATE( CONNECTED_ANSI ), | ||
| 85 | - DECLARE_XLAT_STATE( CONNECTED_3270 ), | ||
| 86 | - DECLARE_XLAT_STATE( CONNECTED_INITIAL_E ), | ||
| 87 | - DECLARE_XLAT_STATE( CONNECTED_NVT ), | ||
| 88 | - DECLARE_XLAT_STATE( CONNECTED_SSCP ), | ||
| 89 | - DECLARE_XLAT_STATE( CONNECTED_TN3270E ) | 72 | + DECLARE_XLAT_STATE( LIB3270_NOT_CONNECTED ), |
| 73 | + DECLARE_XLAT_STATE( LIB3270_RESOLVING ), | ||
| 74 | + DECLARE_XLAT_STATE( LIB3270_PENDING ), | ||
| 75 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_INITIAL ), | ||
| 76 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_ANSI ), | ||
| 77 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_3270 ), | ||
| 78 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_INITIAL_E ), | ||
| 79 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_NVT ), | ||
| 80 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_SSCP ), | ||
| 81 | + DECLARE_XLAT_STATE( LIB3270_CONNECTED_TN3270E ) | ||
| 90 | }; | 82 | }; |
| 91 | 83 | ||
| 92 | int f; | 84 | int f; |
| @@ -182,7 +174,7 @@ | @@ -182,7 +174,7 @@ | ||
| 182 | { | 174 | { |
| 183 | const char *str = NULL; | 175 | const char *str = NULL; |
| 184 | 176 | ||
| 185 | - if(query_3270_terminal_status() != LIB3270_STATUS_BLANK) | 177 | + if(query_3270_terminal_status() != LIB3270_MESSAGE_NONE) |
| 186 | { | 178 | { |
| 187 | errno = EBUSY; | 179 | errno = EBUSY; |
| 188 | return NULL; | 180 | return NULL; |
paste.c
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | #if defined(X3270_APL) /*[*/ | 39 | #if defined(X3270_APL) /*[*/ |
| 40 | #define XK_APL | 40 | #define XK_APL |
| 41 | #endif /*]*/ | 41 | #endif /*]*/ |
| 42 | -#include <X11/keysym.h> | 42 | +//#include <X11/keysym.h> |
| 43 | 43 | ||
| 44 | #include <fcntl.h> | 44 | #include <fcntl.h> |
| 45 | #include "3270ds.h" | 45 | #include "3270ds.h" |
| @@ -74,7 +74,7 @@ | @@ -74,7 +74,7 @@ | ||
| 74 | #if defined(X3270_DBCS) /*[*/ | 74 | #if defined(X3270_DBCS) /*[*/ |
| 75 | #include "widec.h" | 75 | #include "widec.h" |
| 76 | #endif /*]*/ | 76 | #endif /*]*/ |
| 77 | -#include <lib3270/api.h> | 77 | +#include "api.h" |
| 78 | 78 | ||
| 79 | /*---[ Struct ]-------------------------------------------------------------------------------------------------*/ | 79 | /*---[ Struct ]-------------------------------------------------------------------------------------------------*/ |
| 80 | 80 |
print.c
printer.c
| @@ -415,14 +415,14 @@ printer_start(const char *lu) | @@ -415,14 +415,14 @@ printer_start(const char *lu) | ||
| 415 | !strcasecmp(subcommand, "wpr3287")) { | 415 | !strcasecmp(subcommand, "wpr3287")) { |
| 416 | char *pc; | 416 | char *pc; |
| 417 | 417 | ||
| 418 | - pc = xs_buffer("%s%s", PROGRAM_BIN, subcommand); | 418 | + pc = xs_buffer("%s%s", ".", subcommand); |
| 419 | Free(subcommand); | 419 | Free(subcommand); |
| 420 | subcommand = pc; | 420 | subcommand = pc; |
| 421 | 421 | ||
| 422 | if (space) | 422 | if (space) |
| 423 | pc = xs_buffer("\"%s\" %s", subcommand, space + 1); | 423 | pc = xs_buffer("\"%s\" %s", subcommand, space + 1); |
| 424 | else | 424 | else |
| 425 | - pc = xs_buffer("\"%s%s\"", PROGRAM_BIN, cmd_text); | 425 | + pc = xs_buffer("\"%s%s\"", ".", cmd_text); |
| 426 | Free(cmd_text); | 426 | Free(cmd_text); |
| 427 | cmd_text = pc; | 427 | cmd_text = pc; |
| 428 | } | 428 | } |
proxy.c
resolver.c
screen.c
| @@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
| 60 | #include "errno.h" | 60 | #include "errno.h" |
| 61 | #include "statusc.h" | 61 | #include "statusc.h" |
| 62 | #include "togglesc.h" | 62 | #include "togglesc.h" |
| 63 | -#include <lib3270/api.h> | 63 | +#include "api.h" |
| 64 | 64 | ||
| 65 | #if defined(_WIN32) | 65 | #if defined(_WIN32) |
| 66 | #include <windows.h> | 66 | #include <windows.h> |
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | #include "trace_dsc.h" | 62 | #include "trace_dsc.h" |
| 63 | #include "utilc.h" | 63 | #include "utilc.h" |
| 64 | 64 | ||
| 65 | -#include <lib3270/api.h> | 65 | +#include "api.h" |
| 66 | 66 | ||
| 67 | /* Externals: ctlr.c */ | 67 | /* Externals: ctlr.c */ |
| 68 | // extern Boolean screen_alt; | 68 | // extern Boolean screen_alt; |
statusc.h
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | 13 | ||
| 14 | /* c3270 verson of statusc.h */ | 14 | /* c3270 verson of statusc.h */ |
| 15 | 15 | ||
| 16 | -#include <lib3270/api.h> | 16 | +#include "api.h" |
| 17 | 17 | ||
| 18 | LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype); | 18 | LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype); |
| 19 | LIB3270_INTERNAL void status_ctlr_done(H3270 *session); | 19 | LIB3270_INTERNAL void status_ctlr_done(H3270 *session); |
telnet.c
| @@ -3392,11 +3392,11 @@ continue_tls(unsigned char *sbbuf, int len) | @@ -3392,11 +3392,11 @@ continue_tls(unsigned char *sbbuf, int len) | ||
| 3392 | #endif /*]*/ | 3392 | #endif /*]*/ |
| 3393 | 3393 | ||
| 3394 | /* Return the local address for the socket. */ | 3394 | /* Return the local address for the socket. */ |
| 3395 | -int net_getsockname(const H3270 *h3270, void *buf, int *len) | 3395 | +int net_getsockname(const H3270 *session, void *buf, int *len) |
| 3396 | { | 3396 | { |
| 3397 | - if (h3270->sock < 0) | 3397 | + if (session->sock < 0) |
| 3398 | return -1; | 3398 | return -1; |
| 3399 | - return getsockname(h3270->sock, buf, (socklen_t *)(void *)len); | 3399 | + return getsockname(session->sock, buf, (socklen_t *)(void *)len); |
| 3400 | } | 3400 | } |
| 3401 | 3401 | ||
| 3402 | /* Return a text version of the current proxy type, or NULL. */ | 3402 | /* Return a text version of the current proxy type, or NULL. */ |
| @@ -0,0 +1,94 @@ | @@ -0,0 +1,94 @@ | ||
| 1 | +/* | ||
| 2 | + * "Software G3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
| 3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
| 4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
| 5 | + * | ||
| 6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
| 7 | + * | ||
| 8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
| 9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
| 10 | + * Free Software Foundation. | ||
| 11 | + * | ||
| 12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
| 13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
| 14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
| 15 | + * obter mais detalhes. | ||
| 16 | + * | ||
| 17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
| 18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | ||
| 19 | + * Place, Suite 330, Boston, MA, 02111-1307, USA | ||
| 20 | + * | ||
| 21 | + * Este programa está nomeado como toggle.h e possui 77 linhas de código. | ||
| 22 | + * | ||
| 23 | + * Contatos: | ||
| 24 | + * | ||
| 25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
| 26 | + * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | ||
| 27 | + * licinio@bb.com.br (Licínio Luis Branco) | ||
| 28 | + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
| 29 | + * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) | ||
| 30 | + * | ||
| 31 | + */ | ||
| 32 | + | ||
| 33 | +#ifndef TOGGLE3270_H_INCLUDED | ||
| 34 | + | ||
| 35 | + #define TOGGLE3270_H_INCLUDED 1 | ||
| 36 | + | ||
| 37 | + #include <lib3270.h> | ||
| 38 | + | ||
| 39 | + #define TT_INITIAL LIB3270_TOGGLE_TYPE_INITIAL | ||
| 40 | + #define TT_INTERACTIVE LIB3270_TOGGLE_TYPE_INTERACTIVE | ||
| 41 | + #define TT_ACTION LIB3270_TOGGLE_TYPE_ACTION | ||
| 42 | + #define TT_FINAL LIB3270_TOGGLE_TYPE_FINAL | ||
| 43 | + #define TT_UPDATE LIB3270_TOGGLE_TYPE_UPDATE | ||
| 44 | + | ||
| 45 | + #define MONOCASE LIB3270_TOGGLE_MONOCASE | ||
| 46 | + #define ALT_CURSOR LIB3270_TOGGLE_ALT_CURSOR | ||
| 47 | + #define CURSOR_BLINK LIB3270_TOGGLE_CURSOR_BLINK | ||
| 48 | + #define SHOW_TIMING LIB3270_TOGGLE_SHOW_TIMING | ||
| 49 | + #define CURSOR_POS LIB3270_TOGGLE_CURSOR_POS | ||
| 50 | + #define DS_TRACE LIB3270_TOGGLE_DS_TRACE | ||
| 51 | + #define SCROLL_BAR LIB3270_TOGGLE_SCROLL_BAR | ||
| 52 | + #define LINE_WRAP LIB3270_TOGGLE_LINE_WRAP | ||
| 53 | + #define BLANK_FILL LIB3270_TOGGLE_BLANK_FILL | ||
| 54 | + #define SCREEN_TRACE LIB3270_TOGGLE_SCREEN_TRACE | ||
| 55 | + #define EVENT_TRACE LIB3270_TOGGLE_EVENT_TRACE | ||
| 56 | + #define MARGINED_PASTE LIB3270_TOGGLE_MARGINED_PASTE | ||
| 57 | + #define RECTANGLE_SELECT LIB3270_TOGGLE_RECTANGLE_SELECT | ||
| 58 | + #define CROSSHAIR LIB3270_TOGGLE_CROSSHAIR | ||
| 59 | + #define VISIBLE_CONTROL LIB3270_TOGGLE_VISIBLE_CONTROL | ||
| 60 | + #define AID_WAIT LIB3270_TOGGLE_AID_WAIT | ||
| 61 | + #define FULL_SCREEN LIB3270_TOGGLE_FULL_SCREEN | ||
| 62 | + #define RECONNECT LIB3270_TOGGLE_RECONNECT | ||
| 63 | + #define INSERT LIB3270_TOGGLE_INSERT | ||
| 64 | + #define KEYPAD LIB3270_TOGGLE_KEYPAD | ||
| 65 | + #define SMART_PASTE LIB3270_TOGGLE_SMART_PASTE | ||
| 66 | + #define N_TOGGLES LIB3270_TOGGLE_COUNT | ||
| 67 | + | ||
| 68 | + #define LIB3270_TOGGLE_ID LIB3270_TOGGLE | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + #define register_3270_toggle_monitor(ix,callback) lib3270_register_tchange(NULL,ix,callback) | ||
| 72 | + | ||
| 73 | + // LIB3270_EXPORT void register_3270_toggle_monitor(LIB3270_TOGGLE_ID ix, void (*callback)(int value, LIB3270_TOGGLE_TYPE reason)); | ||
| 74 | +// LIB3270_EXPORT int lib3270_toggle(H3270 *session, LIB3270_TOGGLE_ID ix); | ||
| 75 | + | ||
| 76 | + LIB3270_EXPORT int set_3270_toggle(LIB3270_TOGGLE_ID ix, int value); | ||
| 77 | + | ||
| 78 | +// LIB3270_EXPORT const char * get_3270_toggle_name(LIB3270_TOGGLE_ID ix); | ||
| 79 | +// LIB3270_EXPORT LIB3270_TOGGLE_ID get_3270_toggle_by_name(const char *name); | ||
| 80 | + #define get_3270_toggle_by_name(x) lib3270_get_toggle_id(x) | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + LIB3270_EXPORT void update_toggle_actions(void); | ||
| 84 | + | ||
| 85 | + // Compatibility macros | ||
| 86 | + #define register_tchange(ix,callback) register_3270_toggle_monitor(ix,callback) | ||
| 87 | + #define do_toggle(ix) lib3270_toggle(NULL,ix) | ||
| 88 | + | ||
| 89 | + #define get_3270_toggle_name(ix) lib3270_get_toggle_name(ix) | ||
| 90 | + #define get_toggle_name(ix) lib3270_get_toggle_name(ix) | ||
| 91 | + #define set_toggle(ix,value) lib3270_set_toggle(NULL,ix,value) | ||
| 92 | + #define get_toggle_by_name(name) lib3270_get_toggle_id(name) | ||
| 93 | + | ||
| 94 | +#endif /* TOGGLE3270_H_INCLUDED */ |
toggles.c
utf8.c
util.c
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | #include "resources.h" | 57 | #include "resources.h" |
| 58 | 58 | ||
| 59 | #include "utilc.h" | 59 | #include "utilc.h" |
| 60 | -#include <lib3270/api.h> | 60 | +#include "api.h" |
| 61 | 61 | ||
| 62 | #define my_isspace(c) isspace((unsigned char)c) | 62 | #define my_isspace(c) isspace((unsigned char)c) |
| 63 | 63 |
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | #include "actionsc.h" | 40 | #include "actionsc.h" |
| 41 | #include "hostc.h" | 41 | #include "hostc.h" |
| 42 | #include "telnetc.h" | 42 | #include "telnetc.h" |
| 43 | -#include <toggle.h> | 43 | +#include "toggle.h" |
| 44 | #include "utilc.h" | 44 | #include "utilc.h" |
| 45 | #include "xioc.h" | 45 | #include "xioc.h" |
| 46 | 46 |