Commit 327bd8040aeb2b29e5803e24ded4741d057bc70f

Authored by perry.werneck@gmail.com
1 parent b7c0601b

Removendo warnings "cast to integer of diferent size" quando compilando em win64

Showing 4 changed files with 31 additions and 31 deletions   Show diff stats
@@ -91,17 +91,17 @@ @@ -91,17 +91,17 @@
91 91
92 /*---[ Callbacks ]------------------------------------------------------------------------------------------*/ 92 /*---[ Callbacks ]------------------------------------------------------------------------------------------*/
93 93
94 -static void DefaultRemoveTimeOut(unsigned long timer);  
95 -static unsigned long DefaultAddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session)); 94 +static void DefaultRemoveTimeOut(void *timer);
  95 +static void * DefaultAddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session));
96 96
97 -static unsigned long DefaultAddInput(int source, H3270 *session, void (*fn)(H3270 *session));  
98 -static unsigned long DefaultAddExcept(int source, H3270 *session, void (*fn)(H3270 *session)); 97 +static void * DefaultAddInput(int source, H3270 *session, void (*fn)(H3270 *session));
  98 +static void * DefaultAddExcept(int source, H3270 *session, void (*fn)(H3270 *session));
99 99
100 #if !defined(_WIN32) /*[*/ 100 #if !defined(_WIN32) /*[*/
101 -static unsigned long DefaultAddOutput(int source, H3270 *session, void (*fn)(H3270 *session)); 101 +static void * DefaultAddOutput(int source, H3270 *session, void (*fn)(H3270 *session));
102 #endif 102 #endif
103 103
104 -static void DefaultRemoveInput(unsigned long id); 104 +static void DefaultRemoveInput(void *id);
105 105
106 static int DefaultProcessEvents(int block); 106 static int DefaultProcessEvents(int block);
107 107
@@ -171,7 +171,7 @@ typedef struct timeout @@ -171,7 +171,7 @@ typedef struct timeout
171 #define TN (timeout_t *)NULL 171 #define TN (timeout_t *)NULL
172 static timeout_t *timeouts = TN; 172 static timeout_t *timeouts = TN;
173 173
174 -static unsigned long DefaultAddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session)) 174 +static void * DefaultAddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session))
175 { 175 {
176 timeout_t *t_new; 176 timeout_t *t_new;
177 timeout_t *t; 177 timeout_t *t;
@@ -225,10 +225,10 @@ static unsigned long DefaultAddTimeOut(unsigned long interval_ms, H3270 *session @@ -225,10 +225,10 @@ static unsigned long DefaultAddTimeOut(unsigned long interval_ms, H3270 *session
225 225
226 trace("Timeout added: %p",t_new); 226 trace("Timeout added: %p",t_new);
227 227
228 - return (unsigned long) t_new; 228 + return t_new;
229 } 229 }
230 230
231 -static void DefaultRemoveTimeOut(unsigned long timer) 231 +static void DefaultRemoveTimeOut(void * timer)
232 { 232 {
233 timeout_t *st = (timeout_t *)timer; 233 timeout_t *st = (timeout_t *)timer;
234 timeout_t *t; 234 timeout_t *t;
@@ -262,7 +262,7 @@ typedef struct input { @@ -262,7 +262,7 @@ typedef struct input {
262 static input_t *inputs = (input_t *)NULL; 262 static input_t *inputs = (input_t *)NULL;
263 static Boolean inputs_changed = False; 263 static Boolean inputs_changed = False;
264 264
265 -static unsigned long DefaultAddInput(int source, H3270 *session, void (*fn)(H3270 *session)) 265 +static void * DefaultAddInput(int source, H3270 *session, void (*fn)(H3270 *session))
266 { 266 {
267 input_t *ip; 267 input_t *ip;
268 268
@@ -281,10 +281,10 @@ static unsigned long DefaultAddInput(int source, H3270 *session, void (*fn)(H327 @@ -281,10 +281,10 @@ static unsigned long DefaultAddInput(int source, H3270 *session, void (*fn)(H327
281 281
282 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip); 282 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip);
283 283
284 - return (unsigned long) ip; 284 + return ip;
285 } 285 }
286 286
287 -static unsigned long DefaultAddExcept(int source, H3270 *session, void (*fn)(H3270 *session)) 287 +static void * DefaultAddExcept(int source, H3270 *session, void (*fn)(H3270 *session))
288 { 288 {
289 #if defined(_WIN32) /*[*/ 289 #if defined(_WIN32) /*[*/
290 return 0; 290 return 0;
@@ -306,12 +306,12 @@ static unsigned long DefaultAddExcept(int source, H3270 *session, void (*fn)(H32 @@ -306,12 +306,12 @@ static unsigned long DefaultAddExcept(int source, H3270 *session, void (*fn)(H32
306 306
307 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip); 307 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip);
308 308
309 - return (unsigned long)ip; 309 + return ip;
310 #endif /*]*/ 310 #endif /*]*/
311 } 311 }
312 312
313 #if !defined(_WIN32) /*[*/ 313 #if !defined(_WIN32) /*[*/
314 -static unsigned long DefaultAddOutput(int source, H3270 *session, void (*fn)(H3270 *session)) 314 +static void * DefaultAddOutput(int source, H3270 *session, void (*fn)(H3270 *session))
315 { 315 {
316 input_t *ip; 316 input_t *ip;
317 317
@@ -330,11 +330,11 @@ static unsigned long DefaultAddOutput(int source, H3270 *session, void (*fn)(H32 @@ -330,11 +330,11 @@ static unsigned long DefaultAddOutput(int source, H3270 *session, void (*fn)(H32
330 330
331 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip); 331 Trace("%s: fd=%d callback=%p handle=%p",__FUNCTION__,source,fn,ip);
332 332
333 - return (unsigned long)ip; 333 + return ip;
334 } 334 }
335 #endif /*]*/ 335 #endif /*]*/
336 336
337 -static void DefaultRemoveInput(unsigned long id) 337 +static void DefaultRemoveInput(void *id)
338 { 338 {
339 input_t *ip; 339 input_t *ip;
340 input_t *prev = (input_t *)NULL; 340 input_t *prev = (input_t *)NULL;
@@ -404,7 +404,7 @@ static int DefaultProcessEvents(int block) @@ -404,7 +404,7 @@ static int DefaultProcessEvents(int block)
404 if ((unsigned long)ip->condition & InputReadMask) 404 if ((unsigned long)ip->condition & InputReadMask)
405 { 405 {
406 #if defined(_WIN32) 406 #if defined(_WIN32)
407 - ha[nha++] = (HANDLE)ip->source; 407 + ha[nha++] = (HANDLE) ip->source;
408 #else 408 #else
409 FD_SET(ip->source, &rfds); 409 FD_SET(ip->source, &rfds);
410 #endif 410 #endif
@@ -801,7 +801,7 @@ const char * KeysymToString(KeySym k) @@ -801,7 +801,7 @@ const char * KeysymToString(KeySym k)
801 801
802 /* Timeouts. */ 802 /* Timeouts. */
803 803
804 -unsigned long AddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session)) 804 +void * AddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)(H3270 *session))
805 { 805 {
806 CHECK_SESSION_HANDLE(session); 806 CHECK_SESSION_HANDLE(session);
807 if(callbacks->AddTimeOut) 807 if(callbacks->AddTimeOut)
@@ -809,13 +809,13 @@ unsigned long AddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc) @@ -809,13 +809,13 @@ unsigned long AddTimeOut(unsigned long interval_ms, H3270 *session, void (*proc)
809 return 0; 809 return 0;
810 } 810 }
811 811
812 -void RemoveTimeOut(unsigned long timer) 812 +void RemoveTimeOut(void * timer)
813 { 813 {
814 if(callbacks->RemoveTimeOut) 814 if(callbacks->RemoveTimeOut)
815 return callbacks->RemoveTimeOut(timer); 815 return callbacks->RemoveTimeOut(timer);
816 } 816 }
817 817
818 -unsigned long AddInput(int source, H3270 *session, void (*fn)(H3270 *session)) 818 +void * AddInput(int source, H3270 *session, void (*fn)(H3270 *session))
819 { 819 {
820 CHECK_SESSION_HANDLE(session); 820 CHECK_SESSION_HANDLE(session);
821 821
@@ -826,7 +826,7 @@ unsigned long AddInput(int source, H3270 *session, void (*fn)(H3270 *session)) @@ -826,7 +826,7 @@ unsigned long AddInput(int source, H3270 *session, void (*fn)(H3270 *session))
826 return 0; 826 return 0;
827 } 827 }
828 828
829 -unsigned long AddExcept(int source, H3270 *session, void (*fn)(H3270 *session)) 829 +void * AddExcept(int source, H3270 *session, void (*fn)(H3270 *session))
830 { 830 {
831 CHECK_SESSION_HANDLE(session); 831 CHECK_SESSION_HANDLE(session);
832 if(callbacks->AddExcept) 832 if(callbacks->AddExcept)
@@ -835,7 +835,7 @@ unsigned long AddExcept(int source, H3270 *session, void (*fn)(H3270 *session)) @@ -835,7 +835,7 @@ unsigned long AddExcept(int source, H3270 *session, void (*fn)(H3270 *session))
835 } 835 }
836 836
837 #if !defined(_WIN32) /*[*/ 837 #if !defined(_WIN32) /*[*/
838 -unsigned long AddOutput(int source, H3270 *session, void (*fn)(H3270 *session)) 838 +void * AddOutput(int source, H3270 *session, void (*fn)(H3270 *session))
839 { 839 {
840 CHECK_SESSION_HANDLE(session); 840 CHECK_SESSION_HANDLE(session);
841 if(callbacks->AddOutput) 841 if(callbacks->AddOutput)
@@ -844,7 +844,7 @@ unsigned long AddOutput(int source, H3270 *session, void (*fn)(H3270 *session)) @@ -844,7 +844,7 @@ unsigned long AddOutput(int source, H3270 *session, void (*fn)(H3270 *session))
844 } 844 }
845 #endif /*]*/ 845 #endif /*]*/
846 846
847 -void RemoveInput(unsigned long id) 847 +void RemoveInput(void * id)
848 { 848 {
849 if(callbacks->RemoveInput) 849 if(callbacks->RemoveInput)
850 callbacks->RemoveInput(id); 850 callbacks->RemoveInput(id);
@@ -2706,7 +2706,7 @@ ctlr_dbcs_state(int baddr) @@ -2706,7 +2706,7 @@ ctlr_dbcs_state(int baddr)
2706 static struct timeval t_start; 2706 static struct timeval t_start;
2707 static Boolean ticking = False; 2707 static Boolean ticking = False;
2708 static Boolean mticking = False; 2708 static Boolean mticking = False;
2709 -static unsigned long tick_id; 2709 +static void * tick_id;
2710 static struct timeval t_want; 2710 static struct timeval t_want;
2711 2711
2712 /* Return the difference in milliseconds between two timevals. */ 2712 /* Return the difference in milliseconds between two timevals. */
@@ -104,7 +104,7 @@ static unsigned char pa_xlate[] = { @@ -104,7 +104,7 @@ static unsigned char pa_xlate[] = {
104 }; 104 };
105 #define PF_SZ (sizeof(pf_xlate)/sizeof(pf_xlate[0])) 105 #define PF_SZ (sizeof(pf_xlate)/sizeof(pf_xlate[0]))
106 #define PA_SZ (sizeof(pa_xlate)/sizeof(pa_xlate[0])) 106 #define PA_SZ (sizeof(pa_xlate)/sizeof(pa_xlate[0]))
107 -static unsigned long unlock_id; 107 +static void * unlock_id;
108 static time_t unlock_delay_time; 108 static time_t unlock_delay_time;
109 #define UNLOCK_MS 350 /* 0.35s after last unlock */ 109 #define UNLOCK_MS 350 /* 0.35s after last unlock */
110 static Boolean key_Character(int code, Boolean with_ge, Boolean pasting,Boolean *skipped); 110 static Boolean key_Character(int code, Boolean with_ge, Boolean pasting,Boolean *skipped);
@@ -38,12 +38,12 @@ LIB3270_INTERNAL void xs_warning(const char *fmt, ...) printflike(1, 2); @@ -38,12 +38,12 @@ LIB3270_INTERNAL void xs_warning(const char *fmt, ...) printflike(1, 2);
38 LIB3270_INTERNAL char * xs_vsprintf(const char *fmt, va_list args); 38 LIB3270_INTERNAL char * xs_vsprintf(const char *fmt, va_list args);
39 39
40 40
41 -LIB3270_INTERNAL unsigned long AddInput(int, H3270 *session, void (*fn)(H3270 *session));  
42 -LIB3270_INTERNAL unsigned long AddExcept(int, H3270 *session, void (*fn)(H3270 *session));  
43 -LIB3270_INTERNAL unsigned long AddOutput(int, H3270 *session, void (*fn)(H3270 *session));  
44 -LIB3270_INTERNAL void RemoveInput(unsigned long);  
45 -LIB3270_INTERNAL unsigned long AddTimeOut(unsigned long msec, H3270 *session, void (*fn)(H3270 *session));  
46 -LIB3270_INTERNAL void RemoveTimeOut(unsigned long cookie); 41 +LIB3270_INTERNAL void * AddInput(int, H3270 *session, void (*fn)(H3270 *session));
  42 +LIB3270_INTERNAL void * AddExcept(int, H3270 *session, void (*fn)(H3270 *session));
  43 +LIB3270_INTERNAL void * AddOutput(int, H3270 *session, void (*fn)(H3270 *session));
  44 +LIB3270_INTERNAL void RemoveInput(void *);
  45 +LIB3270_INTERNAL void * AddTimeOut(unsigned long msec, H3270 *session, void (*fn)(H3270 *session));
  46 +LIB3270_INTERNAL void RemoveTimeOut(void *cookie);
47 47
48 LIB3270_INTERNAL const char * KeysymToString(KeySym k); 48 LIB3270_INTERNAL const char * KeysymToString(KeySym k);
49 LIB3270_INTERNAL KeySym StringToKeysym(char *s); 49 LIB3270_INTERNAL KeySym StringToKeysym(char *s);