Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Irene
  • Loading branch information
vatton committed Nov 15, 2006
1 parent 8f891c6 commit 0389481
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 179 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -19,7 +19,7 @@ LIBPNG = libpng

#MKP: adding davlib
SUBDIRS = @SUBDIRS@ tools thotlib batch drawlib indexlib annotlib amaya thot @DAVDIR@
EXTRA_SUBDIRS= misc pluginlib $(LIBRAPTOR) $(REDLAND) $(LIBWWW) $(WX_BUILDDIR) $(GL_BUILDDIR)
EXTRA_SUBDIRS= misc $(LIBRAPTOR) $(REDLAND) $(LIBWWW) $(WX_BUILDDIR) $(GL_BUILDDIR)

prefix = @prefix@
exec_prefix = @exec_prefix@
Expand Down
1 change: 0 additions & 1 deletion Options.in
Expand Up @@ -39,7 +39,6 @@ AMAYA_ANNOT_INCLUDES=@AMAYA_ANNOT_INCLUDES@
AMAYA_ANNOT_EXTRA_LIBS=@AMAYA_ANNOT_EXTRA_LIBS@

IMGLIBS=@IMGLIBS@
EXTRA_LIBS=@EXTRA_LIBS@
EXTRA_INCLUDES=@EXTRA_INCLUDES@

EXPAT_INCLUDES=
Expand Down
6 changes: 1 addition & 5 deletions amaya-src.nsi
Expand Up @@ -262,10 +262,6 @@ Section "Amaya" SecAmaya
File /r templates\*
SetOutPath "$INSTDIR\Amaya\resources"
File /r resources\*
SetOutPath "$INSTDIR\Amaya\plugintest"
File /r plugintest\*
SetOutPath "$INSTDIR\Amaya\pluginlib"
File /r pluginlib\*
SetOutPath "$INSTDIR\Amaya\libpng"
File /r libpng\*
SetOutPath "$INSTDIR\Amaya\libjpeg"
Expand Down Expand Up @@ -420,4 +416,4 @@ Function un.onInit

!insertmacro MUI_UNGETLANGUAGE

FunctionEnd
FunctionEnd
56 changes: 23 additions & 33 deletions amaya/AHTBridge.c
Expand Up @@ -39,7 +39,7 @@
#define THD_TRACE 1
#endif

#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
/* Private functions */
static void RequestRegisterReadXtevent (SOCKET);
static void RequestKillReadXtevent (SOCKET);
Expand Down Expand Up @@ -78,18 +78,11 @@ typedef struct sStatus {
int except;
} SocketStatus;
#endif /* _WX */
#if defined(_NOGUI)
typedef struct sStatus {
int read;
int write;
int except;
} SocketStatus;
#endif /* #ifdef _NOGUI */
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
#define SOCK_TABLE_SIZE 67
#define HASH(s) ((s) % SOCK_TABLE_SIZE)
static SocketStatus persSockets[SOCK_TABLE_SIZE];
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */

/*--------------------------------------------------------------------
AHTCallback_bridge
Expand Down Expand Up @@ -419,7 +412,7 @@ int AHTEvent_unregister (SOCKET sock, HTEventType type)
----------------------------------------------------------------------*/
void RequestKillAllXtevents (AHTReqContext * me)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int sock = INVSOC;

return;
Expand All @@ -441,7 +434,7 @@ void RequestKillAllXtevents (AHTReqContext * me)
RequestKillReadXtevent (sock);
RequestKillWriteXtevent (sock);
RequestKillExceptXtevent (sock);
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -450,7 +443,7 @@ void RequestKillAllXtevents (AHTReqContext * me)
----------------------------------------------------------------------*/
static void RequestRegisterReadXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -474,7 +467,7 @@ static void RequestRegisterReadXtevent (SOCKET sock)
persSockets[v].read, sock);
#endif /* DEBUG_LIBWWW */
}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -483,7 +476,7 @@ static void RequestRegisterReadXtevent (SOCKET sock)
----------------------------------------------------------------------*/
static void RequestKillReadXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -505,7 +498,7 @@ static void RequestKillReadXtevent (SOCKET sock)
#endif /* _WX */

}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -514,7 +507,7 @@ static void RequestKillReadXtevent (SOCKET sock)
----------------------------------------------------------------------*/
static void RequestRegisterWriteXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -539,7 +532,7 @@ static void RequestRegisterWriteXtevent (SOCKET sock)
#endif /* DEBUG_LIBWWW */

}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -549,7 +542,7 @@ static void RequestRegisterWriteXtevent (SOCKET sock)
----------------------------------------------------------------------*/
static void RequestKillWriteXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -572,7 +565,7 @@ static void RequestKillWriteXtevent (SOCKET sock)
#endif /* _WX */

}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -581,7 +574,7 @@ static void RequestKillWriteXtevent (SOCKET sock)
----------------------------------------------------------------------*/
static void RequestRegisterExceptXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -606,7 +599,7 @@ static void RequestRegisterExceptXtevent (SOCKET sock)
persSockets[v].except, sock);
#endif /* DEBUG_LIBWWW */
}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -616,7 +609,7 @@ static void RequestRegisterExceptXtevent (SOCKET sock)
----------------------------------------------------------------------*/
static void RequestKillExceptXtevent (SOCKET sock)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
int v;

v = HASH (sock);
Expand All @@ -637,7 +630,7 @@ static void RequestKillExceptXtevent (SOCKET sock)
persSockets[v].except = 0;
#endif /* _WX */
}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
Expand All @@ -661,9 +654,6 @@ struct _AmayaTimer {
#ifdef _WX
wxAmayaTimer * xt_timer;
#endif /* _WX */
#ifdef _NOGUI
unsigned int xt_timer;
#endif /* #ifdef _NOGUI */
};
typedef struct _AmayaTimer AmayaTimer;

Expand Down Expand Up @@ -766,20 +756,20 @@ void TimerCallbackWX( void * p_context )
----------------------------------------------------------------------*/
void KillAllTimers (void)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
/* @@@ maybe add something else to kill the Xt things */
if (Timers)
HTList_delete (Timers);
Timers = NULL;
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
AMAYA_SetTimer
----------------------------------------------------------------------*/
void AMAYA_SetTimer (HTTimer *libwww_timer)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
HTList *cur, *last;
AmayaTimer *me;

Expand Down Expand Up @@ -837,15 +827,15 @@ void AMAYA_SetTimer (HTTimer *libwww_timer)
me->xt_timer->Start( me->libwww_timer->millis, TRUE );
#endif /* _WX */

#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

/*----------------------------------------------------------------------
AMAYA_DeleteTimer
----------------------------------------------------------------------*/
void AMAYA_DeleteTimer (HTTimer *libwww_timer)
{
#if defined(_GTK) || defined(_WX) || defined(_NOGUI)
#if defined(_GTK) || defined(_WX)
HTList *cur, *last;
AmayaTimer *me;

Expand Down Expand Up @@ -876,6 +866,6 @@ void AMAYA_DeleteTimer (HTTimer *libwww_timer)
HTList_removeObject (Timers, me);
TtaFreeMemory (me);
}
#endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
#endif /* defined(_GTK) || defined(_WX) */
}

6 changes: 3 additions & 3 deletions amaya/Makefile.in
Expand Up @@ -21,7 +21,7 @@ LIBS = $(AMAYA_ANNOT_LIBS) $(AMAYA_DAV_LIBS) \
-L../thotlib -L.. -lThotEditor \
$(AMAYA_OPTION_EXTRA_LIBS) $(IMGLIBS) $(EXPAT_LIBRARIES) \
$(AMAYA_LIBWWW_LIBS) \
@LIBS@ @EXTRA_LIBS@ $(GL_LIBRARIES) $(GTK_GL_LIBRARIES) $(FREETYPE_LIBRARIES) $(XFT_LIBRARIES) \
@LIBS@ $(GL_LIBRARIES) $(GTK_GL_LIBRARIES) $(FREETYPE_LIBRARIES) $(XFT_LIBRARIES) \
$(GTK_LIBRARIES) $(WX_LIBRARIES)

AMAYA = @top_srcdir@/amaya
Expand Down Expand Up @@ -112,7 +112,7 @@ amaya_comp_redland: @MAKEREDLAND@ force
#include the fragment "amaya/Makefile.math" for math if configured in
@math_frag@

#include the fragment "annotlib//Makefile.annot" for annotations if configured in
#include the fragment "annotlib/Makefile.annot" for annotations if configured in
@annot_frag@

#include the fragment "davlib/Makefile.dav" for webdav if configured in
Expand All @@ -132,7 +132,7 @@ amaya_comp_redland: @MAKEREDLAND@ force
ALL_AMAYA_OPTIONS= $(AMAYA_OPTIONS) \
$(AMAYA_LIBWWW_OPTIONS) \
$(AMAYA_MATH_OPTIONS) $(AMAYA_SVG_OPTIONS) $(AMAYA_TEMPLATES_OPTIONS) \
$(AMAYA_ANNOT_OPTIONS) $(AMAYA_DAV_OPTIONS) $(EXPAT_OPTIONS) \
$(AMAYA_ANNOT_OPTIONS) $(AMAYA_DAV_OPTIONS) $(EXPAT_OPTIONS)

AMAYA_OPTION_INCLUDES= \
$(AMAYA_LIBWWW_INCLUDES) $(AMAYA_MATH_INCLUDES) \
Expand Down

0 comments on commit 0389481

Please sign in to comment.