version 1.85, 2003/10/21 16:22:57
|
version 1.86, 2003/10/22 11:03:08
|
Line 107 static SocketStatus persSockets[SOCK_TAB
|
Line 107 static SocketStatus persSockets[SOCK_TAB
|
the state of the request and, if it's an asynchronous request, deletes |
the state of the request and, if it's an asynchronous request, deletes |
the memory allocated to it. |
the memory allocated to it. |
-------------------------------------------------------------------*/ |
-------------------------------------------------------------------*/ |
#ifdef _MOTIF |
|
void *AHTCallback_bridge (caddr_t cd, int *s, XtInputId * id) |
void *AHTCallback_bridge (caddr_t cd, int *s, XtInputId * id) |
{ |
{ |
|
#ifdef _MOTIF |
int status; /* the status result of the libwwww call */ |
int status; /* the status result of the libwwww call */ |
HTEventType type = HTEvent_ALL; |
HTEventType type = HTEvent_ALL; |
int v; |
int v; |
Line 149 void *AHTCallback_bridge (caddr_t cd, in
|
Line 149 void *AHTCallback_bridge (caddr_t cd, in
|
} |
} |
|
|
/*** CanDoStop_set (TRUE); **/ |
/*** CanDoStop_set (TRUE); **/ |
|
#endif /* _MOTIF */ |
|
|
return (0); |
return (0); |
} |
} |
#endif /* _MOTIF */ |
|
|
|
#ifdef _GTK |
#ifdef _GTK |
static void AHTCallback_bridgeGTK (gpointer data, gint source, GdkInputCondition condition) |
static void AHTCallback_bridgeGTK (gpointer data, gint source, GdkInputCondition condition) |
Line 404 int AHTEvent_unregister (SOCKET sock, HT
|
Line 404 int AHTEvent_unregister (SOCKET sock, HT
|
return (status); |
return (status); |
} |
} |
|
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
|
/* Private functions */ |
/* Private functions */ |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 414 int AHTEvent_unregister (SOCKET sock, HT
|
Line 413 int AHTEvent_unregister (SOCKET sock, HT
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void RequestKillAllXtevents (AHTReqContext * me) |
void RequestKillAllXtevents (AHTReqContext * me) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int sock = INVSOC; |
int sock = INVSOC; |
|
|
return; |
return; |
Line 437 void RequestKillAllXtevents (AHTReqConte
|
Line 437 void RequestKillAllXtevents (AHTReqConte
|
RequestKillReadXtevent (sock); |
RequestKillReadXtevent (sock); |
RequestKillWriteXtevent (sock); |
RequestKillWriteXtevent (sock); |
RequestKillExceptXtevent (sock); |
RequestKillExceptXtevent (sock); |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 445 void RequestKillAllXtevents (AHTReqConte
|
Line 446 void RequestKillAllXtevents (AHTReqConte
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestRegisterReadXtevent (SOCKET sock) |
static void RequestRegisterReadXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
|
|
v = HASH (sock); |
v = HASH (sock); |
Line 475 static void RequestRegisterReadXtevent (
|
Line 477 static void RequestRegisterReadXtevent (
|
persSockets[v].read, sock); |
persSockets[v].read, sock); |
#endif /* DEBUG_LIBWWW */ |
#endif /* DEBUG_LIBWWW */ |
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 484 static void RequestRegisterReadXtevent (
|
Line 486 static void RequestRegisterReadXtevent (
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestKillReadXtevent (SOCKET sock) |
static void RequestKillReadXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
|
|
v = HASH (sock); |
v = HASH (sock); |
Line 507 static void RequestKillReadXtevent (SOCK
|
Line 510 static void RequestKillReadXtevent (SOCK
|
#endif /* !_GTK */ |
#endif /* !_GTK */ |
|
|
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 515 static void RequestKillReadXtevent (SOCK
|
Line 519 static void RequestKillReadXtevent (SOCK
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestRegisterWriteXtevent (SOCKET sock) |
static void RequestRegisterWriteXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
v = HASH (sock); |
v = HASH (sock); |
|
|
Line 544 static void RequestRegisterWriteXtevent
|
Line 549 static void RequestRegisterWriteXtevent
|
#endif /* DEBUG_LIBWWW */ |
#endif /* DEBUG_LIBWWW */ |
|
|
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 553 static void RequestRegisterWriteXtevent
|
Line 559 static void RequestRegisterWriteXtevent
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestKillWriteXtevent (SOCKET sock) |
static void RequestKillWriteXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
|
|
v = HASH (sock); |
v = HASH (sock); |
Line 577 static void RequestKillWriteXtevent (SOC
|
Line 584 static void RequestKillWriteXtevent (SOC
|
#endif /* _GTK */ |
#endif /* _GTK */ |
|
|
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 585 static void RequestKillWriteXtevent (SOC
|
Line 593 static void RequestKillWriteXtevent (SOC
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestRegisterExceptXtevent (SOCKET sock) |
static void RequestRegisterExceptXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
|
|
v = HASH (sock); |
v = HASH (sock); |
Line 614 static void RequestRegisterExceptXtevent
|
Line 623 static void RequestRegisterExceptXtevent
|
persSockets[v].except, sock); |
persSockets[v].except, sock); |
#endif /* DEBUG_LIBWWW */ |
#endif /* DEBUG_LIBWWW */ |
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 623 static void RequestRegisterExceptXtevent
|
Line 633 static void RequestRegisterExceptXtevent
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static void RequestKillExceptXtevent (SOCKET sock) |
static void RequestKillExceptXtevent (SOCKET sock) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
int v; |
int v; |
|
|
v = HASH (sock); |
v = HASH (sock); |
Line 645 static void RequestKillExceptXtevent (SO
|
Line 656 static void RequestKillExceptXtevent (SO
|
#endif /* _GTK */ |
#endif /* _GTK */ |
|
|
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 686 static HTList *Timers = NULL;
|
Line 698 static HTList *Timers = NULL;
|
called by the system event loop. Timers shouldn't be restarted |
called by the system event loop. Timers shouldn't be restarted |
on exiting. |
on exiting. |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
#ifdef _MOTIF |
|
void *TimerCallback (XtPointer cdata, XtIntervalId *id) |
void *TimerCallback (XtPointer cdata, XtIntervalId *id) |
{ |
{ |
|
#ifdef _MOTIF |
HTList *cur, *last; |
HTList *cur, *last; |
AmayaTimer *me; |
AmayaTimer *me; |
HTTimer *libwww_timer; |
HTTimer *libwww_timer; |
Line 714 void *TimerCallback (XtPointer cdata, Xt
|
Line 726 void *TimerCallback (XtPointer cdata, Xt
|
TtaFreeMemory (me); |
TtaFreeMemory (me); |
HTTimer_dispatch (libwww_timer); |
HTTimer_dispatch (libwww_timer); |
} |
} |
|
#endif /* _MOTIF */ |
|
|
return (0); |
return (0); |
|
|
} |
} |
#endif /* _MOTIF */ |
|
|
|
#ifdef _GTK |
#ifdef _GTK |
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 764 gboolean TimerCallbackGTK (gpointer id)
|
Line 778 gboolean TimerCallbackGTK (gpointer id)
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void KillAllTimers (void) |
void KillAllTimers (void) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
/* @@@ maybe add something else to kill the Xt things */ |
/* @@@ maybe add something else to kill the Xt things */ |
if (Timers) |
if (Timers) |
HTList_delete (Timers); |
HTList_delete (Timers); |
Timers = NULL; |
Timers = NULL; |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 775 void KillAllTimers (void)
|
Line 791 void KillAllTimers (void)
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void AMAYA_SetTimer (HTTimer *libwww_timer) |
void AMAYA_SetTimer (HTTimer *libwww_timer) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
HTList *cur, *last; |
HTList *cur, *last; |
AmayaTimer *me; |
AmayaTimer *me; |
|
|
Line 836 void AMAYA_SetTimer (HTTimer *libwww_tim
|
Line 853 void AMAYA_SetTimer (HTTimer *libwww_tim
|
(gpointer) me); |
(gpointer) me); |
#endif /* _GTK */ |
#endif /* _GTK */ |
|
|
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
} |
} |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
Line 843 void AMAYA_SetTimer (HTTimer *libwww_tim
|
Line 861 void AMAYA_SetTimer (HTTimer *libwww_tim
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
void AMAYA_DeleteTimer (HTTimer *libwww_timer) |
void AMAYA_DeleteTimer (HTTimer *libwww_timer) |
{ |
{ |
|
#if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) |
HTList *cur, *last; |
HTList *cur, *last; |
AmayaTimer *me; |
AmayaTimer *me; |
|
|
Line 873 void AMAYA_DeleteTimer (HTTimer *libwww_
|
Line 892 void AMAYA_DeleteTimer (HTTimer *libwww_
|
HTList_removeObject (Timers, me); |
HTList_removeObject (Timers, me); |
TtaFreeMemory (me); |
TtaFreeMemory (me); |
} |
} |
} |
|
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
#endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */ |
|
} |
|
|