| diff -r -c3 xglk.orig/xglk_loop.c xglk/xglk_loop.c | |
| *** xglk.orig/xglk_loop.c Sun Jun 6 17:07:45 1999 | |
| --- xglk/xglk_loop.c Tue May 15 12:25:10 2001 | |
| *************** | |
| #include <sys/time.h> | |
| + #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <X11/keysym.h> | |
| #include <X11/Xatom.h> | |
| *************** | |
| void xglk_event_poll(event_t *ev, glui32 millisec) | |
| { | |
| struct timeval tv, curtime, outtime; | |
| - struct timezone tz; | |
| /* just check for a timer event, nothing else. */ | |
| eventloop_event = ev; | |
| if (millisec) { | |
| if (lasttime.tv_sec == 0) | |
| ! gettimeofday(&lasttime, &tz); | |
| outtime.tv_sec = lasttime.tv_sec + (millisec/1000); | |
| outtime.tv_usec = lasttime.tv_usec + ((millisec%1000)*1000); | |
| if (outtime.tv_usec >= 1000000) { | |
| void xglk_event_poll(event_t *ev, glui32 millisec) | |
| { | |
| struct timeval tv, curtime, outtime; | |
| /* just check for a timer event, nothing else. */ | |
| eventloop_event = ev; | |
| if (millisec) { | |
| if (lasttime.tv_sec == 0) | |
| ! gettimeofday(&lasttime, NULL); | |
| outtime.tv_sec = lasttime.tv_sec + (millisec/1000); | |
| outtime.tv_usec = lasttime.tv_usec + ((millisec%1000)*1000); | |
| if (outtime.tv_usec >= 1000000) { | |
| *************** | |
| } | |
| if (millisec) { | |
| ! gettimeofday(&curtime, &tz); | |
| if (curtime.tv_sec > outtime.tv_sec | |
| || (curtime.tv_sec == outtime.tv_sec | |
| && curtime.tv_usec > outtime.tv_usec)) { | |
| } | |
| if (millisec) { | |
| ! gettimeofday(&curtime, NULL); | |
| if (curtime.tv_sec > outtime.tv_sec | |
| || (curtime.tv_sec == outtime.tv_sec | |
| && curtime.tv_usec > outtime.tv_usec)) { | |
| *************** | |
| int eventp; | |
| int firsttime = TRUE; | |
| struct timeval tv, curtime, outtime; | |
| - struct timezone tz; | |
| eventloop_event = ev; | |
| xglk_perform_click(mouse_Reset, NULL, 0, 0); | |
| if (millisec) { | |
| if (lasttime.tv_sec == 0) | |
| ! gettimeofday(&lasttime, &tz); | |
| outtime.tv_sec = lasttime.tv_sec + (millisec/1000); | |
| outtime.tv_usec = lasttime.tv_usec + ((millisec%1000)*1000); | |
| if (outtime.tv_usec >= 1000000) { | |
| int eventp; | |
| int firsttime = TRUE; | |
| struct timeval tv, curtime, outtime; | |
| eventloop_event = ev; | |
| xglk_perform_click(mouse_Reset, NULL, 0, 0); | |
| if (millisec) { | |
| if (lasttime.tv_sec == 0) | |
| ! gettimeofday(&lasttime, NULL); | |
| outtime.tv_sec = lasttime.tv_sec + (millisec/1000); | |
| outtime.tv_usec = lasttime.tv_usec + ((millisec%1000)*1000); | |
| if (outtime.tv_usec >= 1000000) { | |
| *************** | |
| } | |
| if (millisec && !firsttime) { | |
| ! gettimeofday(&curtime, &tz); | |
| if (curtime.tv_sec > outtime.tv_sec | |
| || (curtime.tv_sec == outtime.tv_sec | |
| && curtime.tv_usec > outtime.tv_usec)) { | |
| } | |
| if (millisec && !firsttime) { | |
| ! gettimeofday(&curtime, NULL); | |
| if (curtime.tv_sec > outtime.tv_sec | |
| || (curtime.tv_sec == outtime.tv_sec | |
| && curtime.tv_usec > outtime.tv_usec)) { | |
| diff -r -c3 xglk.orig/xglk_msg.c xglk/xglk_msg.c | |
| *** xglk.orig/xglk_msg.c Thu Apr 13 02:31:54 2000 | |
| --- xglk/xglk_msg.c Tue May 15 12:25:40 2001 | |
| *************** | |
| int init_xmsg() | |
| { | |
| - struct timezone tz; | |
| - | |
| message_size = 80; | |
| message = (char *)malloc(message_size * sizeof(char)); | |
| if (!message) | |
| *************** | |
| LIBRARYNAME, LIBRARYVERSION); | |
| messagelen = strlen(message); | |
| messagesticky = FALSE; | |
| ! gettimeofday(&messagetime, &tz); | |
| messagetime.tv_sec += TIMEOUT; | |
| return TRUE; | |
| LIBRARYNAME, LIBRARYVERSION); | |
| messagelen = strlen(message); | |
| messagesticky = FALSE; | |
| ! gettimeofday(&messagetime, NULL); | |
| messagetime.tv_sec += TIMEOUT; | |
| return TRUE; | |
| *************** | |
| void xmsg_set_message(char *str, int sticky) | |
| { | |
| - struct timezone tz; | |
| - | |
| if (!message) | |
| return; | |
| if (!str) | |
| *************** | |
| xmsg_redraw(); | |
| messagesticky = sticky; | |
| ! gettimeofday(&messagetime, &tz); | |
| messagetime.tv_sec += TIMEOUT; | |
| } | |
| void xmsg_check_timeout() | |
| { | |
| - struct timezone tz; | |
| struct timeval tv; | |
| if (messagesticky) | |
| return; | |
| ! gettimeofday(&tv, &tz); | |
| if (tv.tv_sec > messagetime.tv_sec | |
| || (tv.tv_sec == messagetime.tv_sec && tv.tv_usec > messagetime.tv_usec)) { | |
| xmsg_set_message(NULL, TRUE); | |
| xmsg_redraw(); | |
| messagesticky = sticky; | |
| ! gettimeofday(&messagetime, NULL); | |
| messagetime.tv_sec += TIMEOUT; | |
| } | |
| void xmsg_check_timeout() | |
| { | |
| struct timeval tv; | |
| if (messagesticky) | |
| return; | |
| ! gettimeofday(&tv, NULL); | |
| if (tv.tv_sec > messagetime.tv_sec | |
| || (tv.tv_sec == messagetime.tv_sec && tv.tv_usec > messagetime.tv_usec)) { | |
| xmsg_set_message(NULL, TRUE); | |
Xet Storage Details
- Size:
- 4.94 kB
- Xet hash:
- ddf6d19e633cfa68380b2324fe724db5f5c003c8b24f9aacfda44801ca721c05
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.