Commit 9e393acbbdf43ba6d77d01b2e2a193fe8035d726
1 parent
47203aff
Exists in
master
and in
3 other branches
Melhorando sistema de callbacks.
Showing
3 changed files
with
15 additions
and
23 deletions
Show diff stats
ctlr.c
@@ -2696,27 +2696,6 @@ void ctlr_scroll(H3270 *hSession) | @@ -2696,27 +2696,6 @@ void ctlr_scroll(H3270 *hSession) | ||
2696 | #endif /*]*/ | 2696 | #endif /*]*/ |
2697 | 2697 | ||
2698 | /* | 2698 | /* |
2699 | - * Note that a particular region of the screen has changed. | ||
2700 | - */ | ||
2701 | - | ||
2702 | -// void changed(H3270 *session, int bstart, int bend) | ||
2703 | -// { | ||
2704 | - /* | ||
2705 | - if(session->first_changed < 0) | ||
2706 | - { | ||
2707 | - session->first_changed = bstart; | ||
2708 | - session->last_changed = bend; | ||
2709 | - return; | ||
2710 | - } | ||
2711 | - if(bstart < session->first_changed) | ||
2712 | - session->first_changed = bstart; | ||
2713 | - | ||
2714 | - if(bend > session->last_changed) | ||
2715 | - session->last_changed = bend; | ||
2716 | - */ | ||
2717 | -// } | ||
2718 | - | ||
2719 | -/* | ||
2720 | * Swap the regular and alternate screen buffers | 2699 | * Swap the regular and alternate screen buffers |
2721 | */ | 2700 | */ |
2722 | void ctlr_altbuffer(H3270 *session, int alt) | 2701 | void ctlr_altbuffer(H3270 *session, int alt) |
session.c
@@ -331,3 +331,15 @@ LIB3270_EXPORT void * lib3270_get_user_data(H3270 *h) | @@ -331,3 +331,15 @@ LIB3270_EXPORT void * lib3270_get_user_data(H3270 *h) | ||
331 | CHECK_SESSION_HANDLE(h); | 331 | CHECK_SESSION_HANDLE(h); |
332 | return h->user_data; | 332 | return h->user_data; |
333 | } | 333 | } |
334 | + | ||
335 | +struct lib3270_session_callbacks * lib3270_get_session_callbacks(H3270 *session, unsigned short sz) | ||
336 | +{ | ||
337 | + CHECK_SESSION_HANDLE(session); | ||
338 | + | ||
339 | + if(sz != sizeof(struct lib3270_session_callbacks)) | ||
340 | + return NULL; | ||
341 | + | ||
342 | + return &session->cbk; | ||
343 | +} | ||
344 | + | ||
345 | + |
telnet.c
@@ -1866,10 +1866,11 @@ static void process_bind(H3270 *hSession, unsigned char *buf, int buflen) | @@ -1866,10 +1866,11 @@ static void process_bind(H3270 *hSession, unsigned char *buf, int buflen) | ||
1866 | } | 1866 | } |
1867 | #endif /*]*/ | 1867 | #endif /*]*/ |
1868 | 1868 | ||
1869 | -static int | ||
1870 | -process_eor(H3270 *hSession) | 1869 | +static int process_eor(H3270 *hSession) |
1871 | { | 1870 | { |
1871 | + | ||
1872 | trace("%s: syncing=%s",__FUNCTION__,hSession->syncing ? "Yes" : "No"); | 1872 | trace("%s: syncing=%s",__FUNCTION__,hSession->syncing ? "Yes" : "No"); |
1873 | + | ||
1873 | if (hSession->syncing || !(hSession->ibptr - hSession->ibuf)) | 1874 | if (hSession->syncing || !(hSession->ibptr - hSession->ibuf)) |
1874 | return(0); | 1875 | return(0); |
1875 | 1876 |