[srvx-commits] CVS: services/src heap.c,1.24,1.25 helpserv.c,1.85,1.86 timeq.c,1.18,1.19
Brought to you by:
entrope
From: Entrope <en...@us...> - 2003-11-15 03:35:31
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv14692/src Modified Files: heap.c helpserv.c timeq.c Log Message: update to be autoconf-2.58-happy coincidentally get rid of the silly TIME_T_CAST Index: heap.c =================================================================== RCS file: /cvsroot/srvx/services/src/heap.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** heap.c 1 Sep 2003 14:44:26 -0000 1.24 --- heap.c 15 Nov 2003 03:35:26 -0000 1.25 *************** *** 213,216 **** int_comparator(const void *a, const void *b) { ! return TIME_T_CAST(a)-TIME_T_CAST(b); } --- 213,216 ---- int_comparator(const void *a, const void *b) { ! return (time_t)a-(time_t)b; } Index: helpserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/helpserv.c,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** helpserv.c 6 Nov 2003 14:41:37 -0000 1.85 --- helpserv.c 15 Nov 2003 03:35:26 -0000 1.86 *************** *** 931,935 **** helpserv_page(PGSRC_STATUS, HSMSG_PAGE_NEW_REQUEST, req->id, user->nick, user->handle_info ? user->handle_info->handle : "not authed"); } else if (hs->intervals[INTERVAL_STALE_DELAY] ! && (req->updated < TIME_T_CAST(now - hs->intervals[INTERVAL_STALE_DELAY])) && (!hs->req_maxlen || req->text->used < hs->req_maxlen)) { char buf[MAX_LINE_SIZE], updatestr[INTERVALLEN], timestr[MAX_LINE_SIZE]; --- 931,935 ---- helpserv_page(PGSRC_STATUS, HSMSG_PAGE_NEW_REQUEST, req->id, user->nick, user->handle_info ? user->handle_info->handle : "not authed"); } else if (hs->intervals[INTERVAL_STALE_DELAY] ! && (req->updated < (time_t)(now - hs->intervals[INTERVAL_STALE_DELAY])) && (!hs->req_maxlen || req->text->used < hs->req_maxlen)) { char buf[MAX_LINE_SIZE], updatestr[INTERVALLEN], timestr[MAX_LINE_SIZE]; *************** *** 2200,2204 **** for (unh = hs->unhandled; unh; unh = unh->next_unhandled) { queuesize++; ! if ((now - unh->opened) >= TIME_T_CAST hs->intervals[INTERVAL_WHINE_DELAY]) { helpserv_reqlist_append(&reqlist, unh); } --- 2200,2204 ---- for (unh = hs->unhandled; unh; unh = unh->next_unhandled) { queuesize++; ! if ((now - unh->opened) >= (time_t)hs->intervals[INTERVAL_WHINE_DELAY]) { helpserv_reqlist_append(&reqlist, unh); } *************** *** 2208,2212 **** char strwhinedelay[INTERVALLEN]; ! intervalString(strwhinedelay, TIME_T_CAST hs->intervals[INTERVAL_WHINE_DELAY]); #if ANNOYING_ALERT_PAGES tbl.length = reqlist.used + 1; --- 2208,2212 ---- char strwhinedelay[INTERVALLEN]; ! intervalString(strwhinedelay, (time_t)hs->intervals[INTERVAL_WHINE_DELAY]); #if ANNOYING_ALERT_PAGES tbl.length = reqlist.used + 1; *************** *** 2313,2317 **** } ! intervalString(stridledelay, TIME_T_CAST(hs->intervals[INTERVAL_IDLE_DELAY])); helpserv_page(PGSRC_STATUS, HSMSG_PAGE_IDLE_HEADER, mode_list.used, hs->helpchan->name, stridledelay); table_send(hs->helpserv, hs->page_targets[PGSRC_STATUS]->name, 0, page_type_funcs[hs->page_types[PGSRC_STATUS]], tbl); --- 2313,2317 ---- } ! intervalString(stridledelay, (time_t)hs->intervals[INTERVAL_IDLE_DELAY]); helpserv_page(PGSRC_STATUS, HSMSG_PAGE_IDLE_HEADER, mode_list.used, hs->helpchan->name, stridledelay); table_send(hs->helpserv, hs->page_targets[PGSRC_STATUS]->name, 0, page_type_funcs[hs->page_types[PGSRC_STATUS]], tbl); *************** *** 3144,3153 **** request->opened = time(NULL); } else { ! request->opened = TIME_T_CAST strtoul(str, NULL, 0); } str = database_get_data(rd->d.object, KEY_REQUEST_ASSIGNED, RECDB_QSTRING); if (str) ! request->assigned = TIME_T_CAST strtoul(str, NULL, 0); str = database_get_data(rd->d.object, KEY_REQUEST_HELPER, RECDB_QSTRING); --- 3144,3153 ---- request->opened = time(NULL); } else { ! request->opened = (time_t)strtoul(str, NULL, 0); } str = database_get_data(rd->d.object, KEY_REQUEST_ASSIGNED, RECDB_QSTRING); if (str) ! request->assigned = (time_t)strtoul(str, NULL, 0); str = database_get_data(rd->d.object, KEY_REQUEST_HELPER, RECDB_QSTRING); *************** *** 3340,3344 **** str = database_get_data(GET_RECORD_OBJECT(br), KEY_REGISTERED, RECDB_QSTRING); if (str) ! hs->registered = TIME_T_CAST strtol(str, NULL, 0); str = database_get_data(GET_RECORD_OBJECT(br), KEY_IDWRAP, RECDB_QSTRING); if (str) --- 3340,3344 ---- str = database_get_data(GET_RECORD_OBJECT(br), KEY_REGISTERED, RECDB_QSTRING); if (str) ! hs->registered = (time_t)strtol(str, NULL, 0); str = database_get_data(GET_RECORD_OBJECT(br), KEY_IDWRAP, RECDB_QSTRING); if (str) Index: timeq.c =================================================================== RCS file: /cvsroot/srvx/services/src/timeq.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** timeq.c 7 Jul 2003 16:29:34 -0000 1.18 --- timeq.c 15 Nov 2003 03:35:26 -0000 1.19 *************** *** 49,53 **** void *time; heap_peek(timeq, &time, 0); ! return TIME_T_CAST(time); } --- 49,53 ---- void *time; heap_peek(timeq, &time, 0); ! return (time_t)time; } *************** *** 60,64 **** ent->func = func; ent->data = data; ! w = (void*)TIME_T_CAST(when); heap_insert(timeq, w, ent); } --- 60,64 ---- ent->func = func; ent->data = data; ! w = (void*)when; heap_insert(timeq, w, ent); } *************** *** 76,80 **** struct timeq_entry *a = data; struct timeq_extra *b = extra; ! if (((b->mask & TIMEQ_IGNORE_WHEN) || (TIME_T_CAST(key) == b->when)) && ((b->mask & TIMEQ_IGNORE_FUNC) || (a->func == b->func)) && ((b->mask & TIMEQ_IGNORE_DATA) || (a->data == b->data))) { --- 76,80 ---- struct timeq_entry *a = data; struct timeq_extra *b = extra; ! if (((b->mask & TIMEQ_IGNORE_WHEN) || ((time_t)key == b->when)) && ((b->mask & TIMEQ_IGNORE_FUNC) || (a->func == b->func)) && ((b->mask & TIMEQ_IGNORE_DATA) || (a->data == b->data))) { *************** *** 110,114 **** while (heap_size(timeq) > 0) { heap_peek(timeq, &k, &d); ! if (TIME_T_CAST(k) > now) break; ent = d; heap_pop(timeq); --- 110,115 ---- while (heap_size(timeq) > 0) { heap_peek(timeq, &k, &d); ! if ((time_t)k > now) ! break; ent = d; heap_pop(timeq); |