Commit 9e9239aad1bcd7093b4bf48d5f4439b8a92fb588

Authored by Perry Werneck
1 parent 3fd8058c

Cleaning unused code.

src/core/ctlr.c
@@ -73,7 +73,7 @@ static void set_formatted(H3270 *hSession, int state); @@ -73,7 +73,7 @@ static void set_formatted(H3270 *hSession, int state);
73 static void ctlr_blanks(H3270 *session); 73 static void ctlr_blanks(H3270 *session);
74 static void ctlr_half_connect(H3270 *session, int ignored, void *dunno); 74 static void ctlr_half_connect(H3270 *session, int ignored, void *dunno);
75 static void ctlr_connect(H3270 *session, int ignored, void *dunno); 75 static void ctlr_connect(H3270 *session, int ignored, void *dunno);
76 -static void ticking_stop(H3270 *session); 76 +//static void ticking_stop(H3270 *session);
77 static void ctlr_add_ic(H3270 *session, int baddr, unsigned char ic); 77 static void ctlr_add_ic(H3270 *session, int baddr, unsigned char ic);
78 78
79 /** 79 /**
@@ -286,7 +286,7 @@ static void update_formatted(H3270 *hSession) @@ -286,7 +286,7 @@ static void update_formatted(H3270 *hSession)
286 /// 286 ///
287 static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno)) 287 static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
288 { 288 {
289 - ticking_start(hSession,True); 289 + hSession->cbk.set_timer(hSession,1);
290 } 290 }
291 291
292 /// 292 ///
@@ -294,8 +294,9 @@ static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GN @@ -294,8 +294,9 @@ static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GN
294 /// 294 ///
295 static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno)) 295 static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
296 { 296 {
297 - ticking_stop(hSession);  
298 - status_untiming(hSession); 297 + hSession->cbk.set_timer(hSession,0);
  298 +// ticking_stop(hSession);
  299 +// status_untiming(hSession);
299 300
300 if (hSession->ever_3270) 301 if (hSession->ever_3270)
301 hSession->ea_buf[-1].fa = FA_PRINTABLE | FA_MODIFY; 302 hSession->ea_buf[-1].fa = FA_PRINTABLE | FA_MODIFY;
@@ -1181,7 +1182,7 @@ enum pds ctlr_write(H3270 *hSession, unsigned char buf[], int buflen, Boolean er @@ -1181,7 +1182,7 @@ enum pds ctlr_write(H3270 *hSession, unsigned char buf[], int buflen, Boolean er
1181 } 1182 }
1182 wcc_keyboard_restore = WCC_KEYBOARD_RESTORE(buf[1]); 1183 wcc_keyboard_restore = WCC_KEYBOARD_RESTORE(buf[1]);
1183 if (wcc_keyboard_restore) 1184 if (wcc_keyboard_restore)
1184 - ticking_stop(hSession); 1185 + hSession->cbk.set_timer(hSession,0);
1185 1186
1186 if (wcc_keyboard_restore) 1187 if (wcc_keyboard_restore)
1187 { 1188 {
@@ -2676,21 +2677,21 @@ void mdt_clear(H3270 *hSession, int baddr) @@ -2676,21 +2677,21 @@ void mdt_clear(H3270 *hSession, int baddr)
2676 } 2677 }
2677 2678
2678 #if defined(X3270_DBCS) /*[*/ 2679 #if defined(X3270_DBCS) /*[*/
2679 -/*  
2680 - * DBCS state query.  
2681 - * Returns:  
2682 - * DBCS_NONE: Buffer position is SBCS.  
2683 - * DBCS_LEFT: Buffer position is left half of a DBCS character.  
2684 - * DBCS_RIGHT: Buffer position is right half of a DBCS character.  
2685 - * DBCS_SI: Buffer position is the SI terminating a DBCS subfield (treated  
2686 - * as DBCS_LEFT for wide cursor tests)  
2687 - * DBCS_SB: Buffer position is an SBCS character after an SI (treated as  
2688 - * DBCS_RIGHT for wide cursor tests) 2680 +/**
  2681 + * @brief DBCS state query.
2689 * 2682 *
2690 * Takes line-wrapping into account, which probably isn't done all that well. 2683 * Takes line-wrapping into account, which probably isn't done all that well.
  2684 + *
  2685 + * @return DBCS state
  2686 + *
  2687 + * @retval DBCS_NONE Buffer position is SBCS.
  2688 + * @retval DBCS_LEFT Buffer position is left half of a DBCS character.
  2689 + * @retval DBCS_RIGHT: Buffer position is right half of a DBCS character.
  2690 + * @retval DBCS_SI Buffer position is the SI terminating a DBCS subfield (treated as DBCS_LEFT for wide cursor tests)
  2691 + * @retval DBCS_SB Buffer position is an SBCS character after an SI (treated as DBCS_RIGHT for wide cursor tests)
  2692 + *
2691 */ 2693 */
2692 -enum dbcs_state  
2693 -ctlr_dbcs_state(int baddr) 2694 +enum dbcs_state ctlr_dbcs_state(int baddr)
2694 { 2695 {
2695 return dbcs? ea_buf[baddr].db: DBCS_NONE; 2696 return dbcs? ea_buf[baddr].db: DBCS_NONE;
2696 } 2697 }
@@ -2708,6 +2709,7 @@ ctlr_dbcs_state(int baddr) @@ -2708,6 +2709,7 @@ ctlr_dbcs_state(int baddr)
2708 //static void * tick_id; 2709 //static void * tick_id;
2709 //static struct timeval t_want; 2710 //static struct timeval t_want;
2710 2711
  2712 +/*
2711 /// @brief Return the difference in milliseconds between two timevals. 2713 /// @brief Return the difference in milliseconds between two timevals.
2712 static long delta_msec(struct timeval *t1, struct timeval *t0) 2714 static long delta_msec(struct timeval *t1, struct timeval *t0)
2713 { 2715 {
@@ -2731,7 +2733,9 @@ static int keep_ticking(H3270 *hSession) @@ -2731,7 +2733,9 @@ static int keep_ticking(H3270 *hSession)
2731 2733
2732 return 1; 2734 return 1;
2733 } 2735 }
  2736 +*/
2734 2737
  2738 +/*
2735 void ticking_start(H3270 *hSession, Boolean anyway) 2739 void ticking_start(H3270 *hSession, Boolean anyway)
2736 { 2740 {
2737 CHECK_SESSION_HANDLE(hSession); 2741 CHECK_SESSION_HANDLE(hSession);
@@ -2761,7 +2765,9 @@ void ticking_start(H3270 *hSession, Boolean anyway) @@ -2761,7 +2765,9 @@ void ticking_start(H3270 *hSession, Boolean anyway)
2761 } 2765 }
2762 2766
2763 } 2767 }
  2768 +*/
2764 2769
  2770 +/*
2765 static void ticking_stop(H3270 *hSession) 2771 static void ticking_stop(H3270 *hSession)
2766 { 2772 {
2767 CHECK_SESSION_HANDLE(hSession); 2773 CHECK_SESSION_HANDLE(hSession);
@@ -2787,3 +2793,4 @@ static void ticking_stop(H3270 *hSession) @@ -2787,3 +2793,4 @@ static void ticking_stop(H3270 *hSession)
2787 status_timing(hSession,&hSession->t_start, &t1); 2793 status_timing(hSession,&hSession->t_start, &t1);
2788 } 2794 }
2789 } 2795 }
  2796 +*/
src/core/keyboard/kybd.c
@@ -505,7 +505,7 @@ static void key_AID(H3270 *hSession, unsigned char aid_code) @@ -505,7 +505,7 @@ static void key_AID(H3270 *hSession, unsigned char aid_code)
505 505
506 hSession->aid = aid_code; 506 hSession->aid = aid_code;
507 ctlr_read_modified(hSession, hSession->aid, False); 507 ctlr_read_modified(hSession, hSession->aid, False);
508 - ticking_start(hSession,False); 508 + hSession->cbk.set_timer(hSession,1);
509 status_ctlr_done(hSession); 509 status_ctlr_done(hSession);
510 } 510 }
511 511
src/core/screen.c
@@ -733,6 +733,7 @@ static void status_printer(H3270 *session, int on, void *dunno) @@ -733,6 +733,7 @@ static void status_printer(H3270 *session, int on, void *dunno)
733 } 733 }
734 */ 734 */
735 735
  736 +/*
736 void status_timing(H3270 GNUC_UNUSED(*session), struct timeval GNUC_UNUSED(*t0), struct timeval GNUC_UNUSED(*t1)) 737 void status_timing(H3270 GNUC_UNUSED(*session), struct timeval GNUC_UNUSED(*t0), struct timeval GNUC_UNUSED(*t1))
737 { 738 {
738 } 739 }
@@ -744,6 +745,7 @@ void status_untiming(H3270 *session) @@ -744,6 +745,7 @@ void status_untiming(H3270 *session)
744 if(session->cbk.set_timer) 745 if(session->cbk.set_timer)
745 session->cbk.set_timer(session,0); 746 session->cbk.set_timer(session,0);
746 } 747 }
  748 +*/
747 749
748 /* 750 /*
749 static int logpopup(H3270 *session, void *widget, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg) 751 static int logpopup(H3270 *session, void *widget, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg)
src/include/ctlrc.h
@@ -71,17 +71,17 @@ LIB3270_INTERNAL void update_model_info(H3270 *session, unsigned int model, unsi @@ -71,17 +71,17 @@ LIB3270_INTERNAL void update_model_info(H3270 *session, unsigned int model, unsi
71 LIB3270_INTERNAL void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr); 71 LIB3270_INTERNAL void ctlr_set_rows_cols(H3270 *session, int mn, int ovc, int ovr);
72 LIB3270_INTERNAL void ctlr_erase(H3270 *session, int alt); 72 LIB3270_INTERNAL void ctlr_erase(H3270 *session, int alt);
73 73
74 -LIB3270_INTERNAL void ticking_start(H3270 *session, Boolean anyway); 74 +// LIB3270_INTERNAL void ticking_start(H3270 *session, Boolean anyway);
75 75
76 enum dbcs_state { 76 enum dbcs_state {
77 - DBCS_NONE = 0, /**< position is not DBCS */  
78 - DBCS_LEFT, /**< position is left half of DBCS character */  
79 - DBCS_RIGHT, /**< position is right half of DBCS character */  
80 - DBCS_SI, /**< position is SI terminating DBCS subfield */  
81 - DBCS_SB, /**< position is SBCS character after the SI */  
82 - DBCS_LEFT_WRAP, /**< position is left half of split DBCS */  
83 - DBCS_RIGHT_WRAP, /**< position is right half of split DBCS */  
84 - DBCS_DEAD /**< position is dead left-half DBCS */ 77 + DBCS_NONE = 0, ///< @brief position is not DBCS
  78 + DBCS_LEFT, ///< @brief position is left half of DBCS character
  79 + DBCS_RIGHT, ///< @brief position is right half of DBCS character
  80 + DBCS_SI, ///< @brief position is SI terminating DBCS subfield
  81 + DBCS_SB, ///< @brief position is SBCS character after the SI
  82 + DBCS_LEFT_WRAP, ///< @brief position is left half of split DBCS
  83 + DBCS_RIGHT_WRAP, ///< @brief position is right half of split DBCS
  84 + DBCS_DEAD ///< @brief position is dead left-half DBCS
85 }; 85 };
86 #define IS_LEFT(d) ((d) == DBCS_LEFT || (d) == DBCS_LEFT_WRAP) 86 #define IS_LEFT(d) ((d) == DBCS_LEFT || (d) == DBCS_LEFT_WRAP)
87 #define IS_RIGHT(d) ((d) == DBCS_RIGHT || (d) == DBCS_RIGHT_WRAP) 87 #define IS_RIGHT(d) ((d) == DBCS_RIGHT || (d) == DBCS_RIGHT_WRAP)
src/include/statusc.h
@@ -30,8 +30,8 @@ @@ -30,8 +30,8 @@
30 LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype); 30 LIB3270_INTERNAL void status_compose(int on, unsigned char c, enum keytype keytype);
31 LIB3270_INTERNAL void status_ctlr_done(H3270 *session); 31 LIB3270_INTERNAL void status_ctlr_done(H3270 *session);
32 32
33 -LIB3270_INTERNAL void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1);  
34 -LIB3270_INTERNAL void status_untiming(H3270 *session); 33 +// LIB3270_INTERNAL void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1);
  34 +// LIB3270_INTERNAL void status_untiming(H3270 *session);
35 35
36 LIB3270_INTERNAL void status_lu(H3270 *session, const char *); 36 LIB3270_INTERNAL void status_lu(H3270 *session, const char *);
37 LIB3270_INTERNAL void status_oerr(H3270 *session, int error_type); 37 LIB3270_INTERNAL void status_oerr(H3270 *session, int error_type);