[PATCH] 64 bit "int" -> "intptr_t" fixes for x86_64 with gcc-4.0.1

John Ellson <[email protected]>
Newsgroups gmane.comp.web.amaya.devel
Organization INRIA
Message-ID <[email protected]>
These patches allowed me to build Amaya with:
    ../configure  --with-wx --disable-redland --disable-annot
(I get other errors during linking to redland and annot.)

The patches are against CVS today.

John
amaya.patch (text/x-diff, 31.3 KB)
Index: amaya/AHTBridge.c
===================================================================
RCS file: /sources/public/Amaya/amaya/AHTBridge.c,v
retrieving revision 1.102
diff -u -r1.102 AHTBridge.c
--- amaya/AHTBridge.c	31 May 2005 08:59:00 -0000	1.102
+++ amaya/AHTBridge.c	17 Aug 2005 11:47:19 -0000
@@ -121,7 +121,7 @@
    int 		       socket;
    ms_t                now = HTGetTimeInMillis();
    
-   socket = (SOCKET) data;
+   socket = (SOCKET) ((intptr_t) data);
    v = HASH (socket);
 
    /* convert the FD into an HTEventType which will allow us to find the
Index: amaya/AHTURLTools.c
===================================================================
RCS file: /sources/public/Amaya/amaya/AHTURLTools.c,v
retrieving revision 1.192
diff -u -r1.192 AHTURLTools.c
--- amaya/AHTURLTools.c	8 Jun 2005 09:50:38 -0000	1.192
+++ amaya/AHTURLTools.c	17 Aug 2005 11:47:19 -0000
@@ -1296,7 +1296,7 @@
   ----------------------------------------------------------------------*/
 void ExtractTarget (char *aName, char *target)
 {
-   int    lg, i;
+   intptr_t    lg, i;
    char  *ptr;
    char  *oldptr;
 
@@ -1318,7 +1318,7 @@
 	  }
 	while (ptr);
 
-	i = (int) (oldptr) - (int) (aName);	/* name length */
+	i = (intptr_t) (oldptr) - (intptr_t) (aName);	/* name length */
 	if (i > 1)
 	  {
 	     aName[i - 1] = EOS;
Index: amaya/EDITimage.c
===================================================================
RCS file: /sources/public/Amaya/amaya/EDITimage.c,v
retrieving revision 1.181
diff -u -r1.181 EDITimage.c
--- amaya/EDITimage.c	15 Jun 2005 16:05:38 -0000	1.181
+++ amaya/EDITimage.c	17 Aug 2005 11:47:19 -0000
@@ -97,11 +97,11 @@
   char               tempname[MAX_LENGTH];
   char              *name;
   int                i, c1, cN;
-  int                val;
+  intptr_t           val;
   ThotBool           change, isHTML;
 
   isHTML = FALSE;
-  val = (int) data;
+  val = (intptr_t) data;
   switch (ref - BaseImage)
     {
     case FormAlt:
Index: amaya/EDITstyle.c
===================================================================
RCS file: /sources/public/Amaya/amaya/EDITstyle.c,v
retrieving revision 1.166
diff -u -r1.166 EDITstyle.c
--- amaya/EDITstyle.c	7 Jul 2005 16:33:32 -0000	1.166
+++ amaya/EDITstyle.c	17 Aug 2005 11:47:20 -0000
@@ -1918,9 +1918,9 @@
   ----------------------------------------------------------------------*/
 void StyleCallbackDialogue (int ref, int typedata, char  *data)
 {
-  int               val;
+  intptr_t          val;
 
-  val = (int) data;
+  val = (intptr_t) data;
 #ifdef DEBUG_CLASS_INTERF
   if (typedata == INTEGER_DATA)
     fprintf (stderr, "StyleCallbackDialogue(%d,%d) \n", ref, (int) data);
Index: amaya/HTMLbook.c
===================================================================
RCS file: /sources/public/Amaya/amaya/HTMLbook.c,v
retrieving revision 1.131
diff -u -r1.131 HTMLbook.c
--- amaya/HTMLbook.c	4 Jul 2005 13:39:33 -0000	1.131
+++ amaya/HTMLbook.c	17 Aug 2005 11:47:20 -0000
@@ -568,9 +568,9 @@
   ----------------------------------------------------------------------*/
 void CallbackPrint (int ref, int typedata, char *data)
 {
-  int                 val;
+  intptr_t            val;
 
-  val = (int) data;
+  val = (intptr_t) data;
   switch (ref - BasePrint)
     {
     case FormPrint:
Index: amaya/MENUconf.c
===================================================================
RCS file: /sources/public/Amaya/amaya/MENUconf.c,v
retrieving revision 1.229
diff -u -r1.229 MENUconf.c
--- amaya/MENUconf.c	19 Jul 2005 15:19:06 -0000	1.229
+++ amaya/MENUconf.c	17 Aug 2005 11:47:21 -0000
@@ -1072,7 +1072,7 @@
   ----------------------------------------------------------------------*/
 static void CacheCallbackDialog (int ref, int typedata, char *data)
 {
-  int                 val;
+  intptr_t            val;
 
   if (ref == -1)
     {
@@ -1082,7 +1082,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - CacheBase)
 	{
 	case CacheMenu:
@@ -1394,7 +1394,7 @@
   ----------------------------------------------------------------------*/
 static void ProxyCallbackDialog (int ref, int typedata, char *data)
 {
-  int                 val;
+  intptr_t            val;
 
   if (ref == -1)
     {
@@ -1404,7 +1404,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - ProxyBase)
 	{
 	case ProxyMenu:
@@ -2102,7 +2102,7 @@
   ----------------------------------------------------------------------*/
 static void GeneralCallbackDialog (int ref, int typedata, char *data)
 {
-  int                 val;
+  intptr_t            val;
 
   if (ref == -1)
     {
@@ -2112,7 +2112,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - GeneralBase)
 	{
 	case GeneralMenu:
@@ -2585,7 +2585,7 @@
   ----------------------------------------------------------------------*/
 static void PublishCallbackDialog (int ref, int typedata, char *data)
 {
-  int                 val;
+  intptr_t            val;
 
   if (ref == -1)
     {
@@ -2595,7 +2595,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - PublishBase)
 	{
 	case PublishMenu:
@@ -3051,7 +3051,7 @@
   ----------------------------------------------------------------------*/
 static void BrowseCallbackDialog (int ref, int typedata, char *data)
 {
-  int               val;
+  intptr_t          val;
 
   if (ref == -1)
     /* removes the network conf menu */
@@ -3059,7 +3059,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - BrowseBase)
         {
         case BrowseMenu:
@@ -3415,7 +3415,7 @@
   ----------------------------------------------------------------------*/
 static void ColorCallbackDialog (int ref, int typedata, char *data)
 {
-  int val;
+  intptr_t val;
 
   if (ref == -1)
     {
@@ -3425,7 +3425,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - ColorBase)
 	{
 	case ColorMenu:
@@ -3781,7 +3781,7 @@
   ----------------------------------------------------------------------*/
 static void GeometryCallbackDialog (int ref, int typedata, char *data)
 {
-  int val;
+  intptr_t val;
 
   TtaDestroyDialogue (GeometryBase + GeometryMenu);
   if (ref == -1)
@@ -3792,7 +3792,7 @@
   else
     {
       /* has the user changed the options? */
-      val = (int) data;
+      val = (intptr_t) data;
       switch (ref - GeometryBase)
 	{
 	case GeometryMenu:
Index: amaya/Mathedit.c
===================================================================
RCS file: /sources/public/Amaya/amaya/Mathedit.c,v
retrieving revision 1.265
diff -u -r1.265 Mathedit.c
--- amaya/Mathedit.c	8 Jun 2005 08:15:22 -0000	1.265
+++ amaya/Mathedit.c	17 Aug 2005 11:47:21 -0000
@@ -1681,7 +1681,7 @@
 static void CallbackMaths (int ref, int typedata, char *data)
 {
   Document           doc;
-  int                val = (int) data;
+  intptr_t           val = (intptr_t) data;
 
   ref -= MathsDialogue;
   if (ref == MenuMaths1)
@@ -1727,7 +1727,7 @@
 			 gpointer   data )
 {
   InitMaths = FALSE;
-  TtaDestroyDialogue ((int) data);
+  TtaDestroyDialogue ((intptr_t) data);
   return TRUE;
 }
 #endif /* _GTK */
Index: amaya/SVGedit.c
===================================================================
RCS file: /sources/public/Amaya/amaya/SVGedit.c,v
retrieving revision 1.98
diff -u -r1.98 SVGedit.c
--- amaya/SVGedit.c	30 May 2005 14:35:34 -0000	1.98
+++ amaya/SVGedit.c	17 Aug 2005 11:47:22 -0000
@@ -2059,7 +2059,7 @@
 static void CallbackGraph (int ref, int typedata, char *data)
 {
   Document           doc;
-  int                val = (int) data;
+  intptr_t           val = (intptr_t) data;
 
   ref -= GraphDialogue;
   if (ref == MenuGraph1)
@@ -2099,7 +2099,7 @@
 			 gpointer   data )
 {
   PaletteDisplayed = FALSE;
-  TtaDestroyDialogue ((int) data);
+  TtaDestroyDialogue ((intptr_t) data);
   return TRUE;
 }
 #endif /* _GTK */
Index: amaya/UIcss.c
===================================================================
RCS file: /sources/public/Amaya/amaya/UIcss.c,v
retrieving revision 1.166
diff -u -r1.166 UIcss.c
--- amaya/UIcss.c	30 May 2005 14:35:34 -0000	1.166
+++ amaya/UIcss.c	17 Aug 2005 11:47:22 -0000
@@ -669,11 +669,12 @@
   Element         firstSel, lastSel;
   char           *ptr = NULL, *localname = NULL;
   int             j, firstChar, lastChar;
-  int             val, sty;
+  intptr_t        val;
+  int             sty;
   CSSCategory     category;
   ThotBool        found;
 
-  val = (int) data;
+  val = (intptr_t) data;
   category = CSS_Unknown;
   sty = 0; /* document style order */
   switch (ref - BaseCSS)
Index: amaya/init.c
===================================================================
RCS file: /sources/public/Amaya/amaya/init.c,v
retrieving revision 1.1140
diff -u -r1.1140 init.c
--- amaya/init.c	16 Aug 2005 13:15:09 -0000	1.1140
+++ amaya/init.c	17 Aug 2005 11:47:23 -0000
@@ -620,7 +620,7 @@
   ----------------------------------------------------------------------*/
 void ExtractParameters (char *aName, char *parameters)
 {
-  int            lg, i;
+  intptr_t            lg, i;
   char          *ptr;
   char          *oldptr;
 
@@ -642,7 +642,7 @@
         }
       while (ptr);
 
-      i = (int) (oldptr) - (int) (aName);	/* name length */
+      i = (intptr_t) (oldptr) - (intptr_t) (aName);	/* name length */
       if (i > 1)
         {
           aName[i - 1] = EOS;
@@ -5847,7 +5847,7 @@
   char              tempfile[MAX_LENGTH];
   char              tempname[MAX_LENGTH];
   char              sep, *ptr;
-  int               val;
+  intptr_t          val;
 #if defined(_WINGUI) || defined(_WX) 
   int               i;
 #endif /* defined(_WINGUI) || defined(_WX) */
@@ -5857,7 +5857,7 @@
     sep = URL_SEP;
   else
     sep = DIR_SEP;
-  val = (int) data;
+  val = (intptr_t) data;
   if (ref - BaseDialog == OptionMenu)
     /* a popup menu corresponding to a SELECT element */
     ReturnOption = val;
Index: amaya/libmanag.c
===================================================================
RCS file: /sources/public/Amaya/amaya/libmanag.c,v
retrieving revision 1.51
diff -u -r1.51 libmanag.c
--- amaya/libmanag.c	27 Jun 2005 14:39:06 -0000	1.51
+++ amaya/libmanag.c	17 Aug 2005 11:47:24 -0000
@@ -606,7 +606,7 @@
 void CallbackLibrary (int ref, int typedata, char *data)
 {
 #ifdef _SVG
-  int                 val;
+  intptr_t            val;
   Document            svgDoc, res, libDoc;
   char               *id, *buffer;
   char                tempname[MAX_LENGTH], pathname[MAX_LENGTH];
@@ -615,7 +615,7 @@
   Element             copiedElement, el = NULL;
   PRule               PRuleSearch;
 
-  val = (int) data + 1;
+  val = (intptr_t) data + 1;
   switch (ref - BaseLibrary)
     {
     case FormLibrary:
Index: amaya/trans.c
===================================================================
RCS file: /sources/public/Amaya/amaya/trans.c,v
retrieving revision 1.166
diff -u -r1.166 trans.c
--- amaya/trans.c	7 Jun 2005 13:37:11 -0000	1.166
+++ amaya/trans.c	17 Aug 2005 11:47:24 -0000
@@ -2394,9 +2394,9 @@
 void TransCallbackDialog (int ref, int typedata, char* data)
 {
   strTransDesc        *trans = NULL;
-  int                  val;
+  intptr_t             val;
 
-  val = (int) data;
+  val = (intptr_t) data;
   switch (ref - TransBaseDialog)
     {
     case TransMenu:
Index: davlib/davlibUI.c
===================================================================
RCS file: /sources/public/Amaya/davlib/davlibUI.c,v
retrieving revision 1.21
diff -u -r1.21 davlibUI.c
--- davlib/davlibUI.c	7 Jun 2005 13:37:11 -0000	1.21
+++ davlib/davlibUI.c	17 Aug 2005 11:47:25 -0000
@@ -1113,7 +1113,7 @@
       switch (ref - DAVBase)
         {
 	case DAVPreferencesDlg:
-	  switch ((int)data) 
+	  switch ((intptr_t)data) 
 	    {
 	    case 1:
 	      SetDAVConf();
@@ -1138,7 +1138,7 @@
 	  break;
 
 	case DAVradioDepth :
-	  switch ((int)data) 
+	  switch ((intptr_t)data) 
 	    {
 	    case 0:
 	      strcpy (GProp_DAV.radioDepth, "0");
@@ -1150,7 +1150,7 @@
 	  break;
                    
 	case DAVradioTimeout :
-	  switch ((int)data) 
+	  switch ((intptr_t)data) 
 	    {
 	    case 0:
 	      strcpy (GProp_DAV.radioTimeout, "Infinite");
@@ -1162,11 +1162,11 @@
 	  break;
 	  
 	case DAVnumberTimeout :
-	  GProp_DAV.numberTimeout = (int)data;
+	  GProp_DAV.numberTimeout = (intptr_t)data;
 	  break;                   
 	  
 	case DAVradioLockScope :
-	  switch ((int)data) 
+	  switch ((intptr_t)data) 
 	    {
 	    case 0:
 	      strcpy (GProp_DAV.radioLockScope, "exclusive");
@@ -1178,7 +1178,7 @@
 	  break;
 	  
 	case DAVtoggleAwareness :
-	  switch ((int)data) 
+	  switch ((intptr_t)data) 
 	    {
 	    case 0:
 	      GProp_DAV.toggleAwareness1 = !GProp_DAV.toggleAwareness1;
Index: thotlib/dialogue/appdialogue.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/appdialogue.c,v
retrieving revision 1.497
diff -u -r1.497 appdialogue.c
--- thotlib/dialogue/appdialogue.c	22 Jun 2005 06:34:12 -0000	1.497
+++ thotlib/dialogue/appdialogue.c	17 Aug 2005 11:47:26 -0000
@@ -1971,7 +1971,7 @@
 {
   GdkEventKey *event;
   GtkWidget *entry;
-  int frame;  
+  intptr_t frame;  
   char *text;
   
   if (all_event->type == GDK_KEY_PRESS)
@@ -1979,7 +1979,7 @@
       event = (GdkEventKey *) all_event;      
       if (event->keyval == GDK_Escape)
 	{
-	  frame = (int) user_data;
+	  frame = (intptr_t) user_data;
 	  entry = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (w), 
 						     "entry");
 	  RemoveSignalGTK (GTK_OBJECT(entry), "activate");
@@ -2466,9 +2466,9 @@
 -------------------------------------------------------------------------*/
 void RemoveSignalGTK (GtkObject *w, gchar *signal_name)
 {
-  guint id;
+  intptr_t id;
   id = 0;
-  id = (guint)gtk_object_get_data (GTK_OBJECT (w), signal_name);
+  id = (intptr_t)gtk_object_get_data (GTK_OBJECT (w), signal_name);
   if (id)
     {
       gtk_signal_disconnect (GTK_OBJECT (w), id);
@@ -3222,7 +3222,7 @@
 	   gtk_object_set_data(GTK_OBJECT(statusbar), "MainSerie", 	   
 			       (gpointer)gtk_statusbar_get_context_id(GTK_STATUSBAR (statusbar), "MainSerie"));
 	   gtk_statusbar_push(GTK_STATUSBAR(statusbar),
-			      (guint)gtk_object_get_data (GTK_OBJECT(statusbar), "MainSerie"),
+			      (intptr_t)gtk_object_get_data (GTK_OBJECT(statusbar), "MainSerie"),
 			      "");
 	   
 	   /* The hbox which includes the logo and Comboboxzone (URL) */
@@ -4295,23 +4295,23 @@
 	(*(Proc3)ThotLocalActions[T_rcinsertpaste]) (
 		(void *)TRUE,
 		(void *)FALSE,
-		(void *)((int) data + 1) );
+		(void *)((intptr_t) data + 1) );
 	break;
       case NumMenuPaste:
 	(*(Proc3)ThotLocalActions[T_rcinsertpaste]) (
 		(void *)FALSE,
 		(void *)TRUE,
-	       	(void *)((int) data + 1));
+	       	(void *)((intptr_t) data + 1));
 	break;
       case NumMenuInclude:
 	(*(Proc3)ThotLocalActions[T_rcinsertpaste]) (
 		(void *)FALSE,
 		(void *)FALSE,
-	       	(void *)((int) data + 1));
+	       	(void *)((intptr_t) data + 1));
 	break;
       case NumMenuElChoice:
 	(*(Proc2)ThotLocalActions[T_rchoice]) (
-		(void *)((int) data + 1),
+		(void *)((intptr_t) data + 1),
 		(void *)NULL);
 	break;
       case NumSelectNatureName:
@@ -4326,7 +4326,7 @@
       case NumMenuAttrEnumNeeded:
 	(*(Proc3)ThotLocalActions[T_rattrreq]) (
 		(void *)ref,
-		(void *)((int) data),
+		(void *)((intptr_t) data),
 		(void *)data);
 	break;
       case NumMenuAttr:
@@ -4335,7 +4335,7 @@
       case NumMenuAttrEnum:
 	(*(Proc3)ThotLocalActions[T_rattrval]) (
 		(void *)ref,
-		(void *)((int) data),
+		(void *)((intptr_t) data),
 	       	(void *)data);
 	break;
 	
@@ -4349,7 +4349,7 @@
       case NumMenuAlphaLanguage:
 	(*(Proc3)ThotLocalActions[T_rattrlang]) (
 		(void *)ref,
-		(void *)((int) data),
+		(void *)((intptr_t) data),
 		(void *)NULL);
 	break;
       case NumFormClose:
@@ -4380,7 +4380,7 @@
       case NumTogglePatternUnchanged:
 	(*(Proc3)ThotLocalActions[T_present]) (
 		(void *)ref,
-		(void *)(int) data,
+		(void *)(intptr_t) data,
 		(void *)NULL);
 	break;
       case NumSelectPattern:
@@ -4395,7 +4395,7 @@
       case NumMenuPresentStandard:
 	(*(Proc2)ThotLocalActions[T_presentstd]) (
 		(void *)ref,
-		(void *)((int) data));
+		(void *)((intptr_t) data));
 	break;
       case NumFormSearchText:
       case NumMenuReplaceMode:
@@ -4404,7 +4404,7 @@
 	/* sous-menu mode de remplacement */
 	(*(Proc3)ThotLocalActions[T_searchtext]) (
 		(void *)ref,
-		(void *)((int) data),
+		(void *)((intptr_t) data),
 	       	(void *)NULL);
 	break;
       case NumZoneTextSearch:
@@ -4420,10 +4420,10 @@
       case NumMenuOrSearchText:
 	(*(Proc2)ThotLocalActions[T_locatesearch]) (
 		(void *)ref,
-		(void *)((int) data));
+		(void *)((intptr_t) data));
 	break;  
       case NumFormElemToBeCreated:
-	CallbackElemToBeCreated (ref, (int)data, NULL);
+	CallbackElemToBeCreated (ref, (intptr_t)data, NULL);
 	break;
       case NumSelectElemToBeCreated:
 	CallbackElemToBeCreated (ref, 0, data);
@@ -4438,7 +4438,7 @@
 #endif /* #if defined(_GTK) */
 	    (*(Proc3)ThotLocalActions[T_rattr]) (
 		(void *)ref,
-		(void *)((int) data),
+		(void *)((intptr_t) data),
 		(void *)ActiveFrame);
 	  }
 	break;
@@ -4477,7 +4477,7 @@
 #endif /* #if defined(_GTK) */
 	      (*(Proc3)ThotLocalActions[T_rattr]) (
 			(void *)ref,
-			(void *)((int) data),
+			(void *)((intptr_t) data),
 			(void *)frame);
 	      return;
 	    }
@@ -4493,7 +4493,7 @@
 	      TtaSetDialoguePosition ();
 #endif /* #if defined(_GTK) */
 	      (*(Proc3)ThotLocalActions[T_rselect]) ((void *)ref,
-						     (void *)((int) data + 1),
+						     (void *)((intptr_t) data + 1),
 						     (void *)frame);
 	      return;
 	    }
@@ -4523,7 +4523,7 @@
 
       if (ptrmenu)
 	{
-	  item = (int) data;
+	  item = (intptr_t) data;
 	  if (item < ptrmenu->ItemsNb && ptrmenu->ItemsList != NULL)
 	    {
 	      for (i = 0; i <= item; i++)
Index: thotlib/dialogue/appli.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/appli.c,v
retrieving revision 1.524
diff -u -r1.524 appli.c
--- thotlib/dialogue/appli.c	20 Jul 2005 16:18:46 -0000	1.524
+++ thotlib/dialogue/appli.c	17 Aug 2005 11:47:27 -0000
@@ -402,7 +402,7 @@
 #ifdef _GTK
 gboolean KillFrameGTK (GtkWidget *widget, GdkEvent *event, gpointer f)
 {
-  return KillFrameCallback( (int)f );
+  return KillFrameCallback( (intptr_t)f );
 }
 #endif /* _GTK */
 
@@ -870,10 +870,10 @@
 gboolean FrameResizedGTK (GtkWidget *w, GdkEventConfigure *event, gpointer data)
 {
   ViewFrame          *pFrame;
-  int            frame;
+  intptr_t            frame;
   int            width, height;
  
-  frame = (int) data;
+  frame = (intptr_t) data;
   width = event->width;
   height = event->height; 
   if (width <= 0 || height <= 0 || frame == 0 || frame > MAX_FRAME)
@@ -953,11 +953,11 @@
 gboolean ExposeCallbackGTK (ThotWidget widget, GdkEventExpose *event, gpointer data)
 {
   ViewFrame           *pFrame;
-  int                  frame;
+  intptr_t             frame;
   unsigned int         x, y;
   unsigned int         w, h;
 
-  frame = (int) data;
+  frame = (intptr_t) data;
   x = event->area.x;
   y = event->area.y;
   w = event->area.width;
@@ -1689,9 +1689,9 @@
             else
               title_string = text;
             gtk_statusbar_pop (GTK_STATUSBAR(FrameTable[frame].WdStatus),
-                               (guint)gtk_object_get_data (GTK_OBJECT(FrameTable[frame].WdStatus), "MainSerie"));
+                               (intptr_t)gtk_object_get_data (GTK_OBJECT(FrameTable[frame].WdStatus), "MainSerie"));
             gtk_statusbar_push (GTK_STATUSBAR(FrameTable[frame].WdStatus),
-                                (guint)gtk_object_get_data (GTK_OBJECT(FrameTable[frame].WdStatus), "MainSerie"),
+                                (intptr_t)gtk_object_get_data (GTK_OBJECT(FrameTable[frame].WdStatus), "MainSerie"),
                                 title_string);
             gtk_widget_show_all (GTK_WIDGET(FrameTable[frame].WdStatus));
 #endif /* _GTK */
@@ -2430,14 +2430,14 @@
 {
   Document            doc; 
   ViewFrame          *pFrame;
-  int                 frame;
+  intptr_t            frame;
   int                 view;
   static int          Motion_y = 0;
   static int          Motion_x = 0;
   GdkModifierType state = (GdkModifierType)GDK_BUTTON1_MOTION_MASK;
   int x,y;
   
-  frame = (int) data;
+  frame = (intptr_t) data;
   if (frame < 1)
     return FALSE;
 
@@ -2927,17 +2927,17 @@
 gboolean FrameCallbackGTK (GtkWidget *widget, GdkEventButton *event,
                            gpointer data)
 {
-  int                 frame;
+  intptr_t            frame;
   GtkEntry            *textzone;
   static int          timer = None;
   Document            document;
   View                view;
 
-  frame = (int )data;
+  frame = (intptr_t)data;
 #ifdef _GL
   GL_prepare (frame);  
 #endif /* _GL */
-  frame = (int )data;
+  frame = (intptr_t)data;
   if (FrameTable[frame].FrDoc == 0 ||
       documentDisplayMode[FrameTable[frame].FrDoc - 1] == NoComputedDisplay)
     /* don't manage a document with NoComputedDisplay mode */
Index: thotlib/dialogue/callback.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/callback.c,v
retrieving revision 1.57
diff -u -r1.57 callback.c
--- thotlib/dialogue/callback.c	7 Jun 2005 13:37:11 -0000	1.57
+++ thotlib/dialogue/callback.c	17 Aug 2005 11:47:27 -0000
@@ -591,15 +591,15 @@
 ThotBool CallRadioGTK (ThotWidget w, struct Cat_Context *catalogue)
 {
   register int        i;
-  register int        index;
-  register int        entry;
+  register intptr_t   index;
+  register intptr_t   entry;
   struct E_List      *adbloc;
 
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) == FALSE)
     {
       /* Prevent to unselect an element directly...
 	 you must select another one to unselect others  */
-      index = (guint) gtk_object_get_data (GTK_OBJECT (w), "toggled");
+      index = (intptr_t) gtk_object_get_data (GTK_OBJECT (w), "toggled");
       gtk_signal_handler_block (GTK_OBJECT(w), index);
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
       gtk_signal_handler_unblock (GTK_OBJECT(w), index); 
@@ -635,7 +635,7 @@
 	    {
 	      if (adbloc->E_ThotWidget[i] != w) 
 		{
-		  index = (guint) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]), "toggled");
+		  index = (intptr_t) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]), "toggled");
 		  gtk_signal_handler_block (GTK_OBJECT(adbloc->E_ThotWidget[i]), index);
 		  
 		  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (adbloc->E_ThotWidget[i]), FALSE);
@@ -996,7 +996,7 @@
   ----------------------------------------------------------------------*/
 void CallValueSet (ThotWidget w, struct Cat_Context *catalogue, caddr_t call_d)
 {
-  int               val, val1;
+  intptr_t          val, val1;
   char              text[11];
   ThotWidget        wtext;
 
@@ -1013,19 +1013,19 @@
 	    /* cas ou le caractere - a ete tape, on met val a 0 */
 	    val = 0;
 	  else
-	    sscanf (text, "%d", &val);
+	    sscanf (text, "%ld", &val);
 	  /* Est-ce une valeur valide ? */
-	  if (val < (int) catalogue->Cat_Entries->E_ThotWidget[2])
-	    val1 = (int) catalogue->Cat_Entries->E_ThotWidget[2];
-	  else if (val > (int) catalogue->Cat_Entries->E_ThotWidget[3])
-	    val1 = (int) catalogue->Cat_Entries->E_ThotWidget[3];
+	  if (val < (intptr_t) catalogue->Cat_Entries->E_ThotWidget[2])
+	    val1 = (intptr_t) catalogue->Cat_Entries->E_ThotWidget[2];
+	  else if (val > (intptr_t) catalogue->Cat_Entries->E_ThotWidget[3])
+	    val1 = (intptr_t) catalogue->Cat_Entries->E_ThotWidget[3];
 	  else
 	    val1 = val;	/* valeur inchangee */
 	  
 	  /* Est-ce qu'il faut changer le contenu du widget ? */
 	  if (val != val1)
 	    {
-	      sprintf (text, "%d", val1);
+	      sprintf (text, "%ld", val1);
 	      /* Desactive la procedure de Callback */
 	      if (catalogue->Cat_React)
 		RemoveSignalGTK (GTK_OBJECT(wtext), "changed"); 
Index: thotlib/dialogue/colors.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/colors.c,v
retrieving revision 1.108
diff -u -r1.108 colors.c
--- thotlib/dialogue/colors.c	8 Jun 2005 08:15:22 -0000	1.108
+++ thotlib/dialogue/colors.c	17 Aug 2005 11:47:27 -0000
@@ -161,7 +161,7 @@
   ----------------------------------------------------------------------*/
 gboolean ColorsExposeGTK (GtkWidget *widget, GdkEventExpose *ev, gpointer data)
 {
-  int color = (int) data;
+  intptr_t color = (intptr_t) data;
   GdkWindow *window = GTK_WIDGET(widget)->window;
   gdk_rgb_gc_set_foreground (TtLineGC, ColorPixel (color));
   gdk_draw_rectangle (window, TtLineGC, TRUE, 0, 0, 20, 20);
@@ -228,7 +228,7 @@
   ----------------------------------------------------------------------*/
 gboolean ColorsPressGTK (GtkWidget *widget, gpointer data)
 {
-  int color = (int)data;
+  intptr_t color = (intptr_t)data;
   
   if (ApplyFg)
     {
Index: thotlib/dialogue/dialogapi.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/dialogapi.c,v
retrieving revision 1.404
diff -u -r1.404 dialogapi.c
--- thotlib/dialogue/dialogapi.c	14 Jun 2005 12:39:15 -0000	1.404
+++ thotlib/dialogue/dialogapi.c	17 Aug 2005 11:47:28 -0000
@@ -2751,7 +2751,7 @@
    register int        ent;
    ThotBool            visible;
    struct E_List      *adbloc;
-   guint               id_toggled;
+   intptr_t            id_toggled;
    struct Cat_Context *catalogue;
 
    catalogue = CatEntry (ref);
@@ -2789,7 +2789,7 @@
 		  i = C_NUMBER;
 		else if (ent == val)
 		  {
-		    id_toggled  = (guint) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
+		    id_toggled  = (intptr_t) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
 							       "toggled");
 		    gtk_signal_handler_block (GTK_OBJECT(adbloc->E_ThotWidget[i]), 
 					      id_toggled);
@@ -2798,7 +2798,7 @@
 		  }
 		else
 		  {
-		    id_toggled  = (guint) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
+		    id_toggled  = (intptr_t) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
 							       "toggled");
 		    gtk_signal_handler_block (GTK_OBJECT(adbloc->E_ThotWidget[i]), 
 					      id_toggled);
@@ -2824,7 +2824,7 @@
 		  i = C_NUMBER;
 		else
 		  {
-		    id_toggled  = (guint) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
+		    id_toggled  = (intptr_t) gtk_object_get_data (GTK_OBJECT (adbloc->E_ThotWidget[i]),
 							       "toggled");
 		    gtk_signal_handler_unblock (GTK_OBJECT(adbloc->E_ThotWidget[i]), 
 						id_toggled); 
@@ -4348,8 +4348,8 @@
 	catalogue->Cat_ListLength = number;
 	w = (ThotWidget) catalogue->Cat_Entries;
 	/* delete the old list elements */
-	if ((gint)gtk_object_get_data(GTK_OBJECT(w), "GList") > 0)
-	  gtk_list_clear_items (GTK_LIST (w), 0, (gint)gtk_object_get_data(GTK_OBJECT (w), "GList"));
+	if ((intptr_t)gtk_object_get_data(GTK_OBJECT(w), "GList") > 0)
+	  gtk_list_clear_items (GTK_LIST (w), 0, (intptr_t)gtk_object_get_data(GTK_OBJECT (w), "GList"));
 	/* add the new list elements */
 	gtk_list_append_items (GTK_LIST(w), item);
 	/* update the number of list element */
@@ -5125,8 +5125,8 @@
 	     return;
 	  }
 	/* Est-ce une valeur valide ? */
-	if (val < (int) catalogue->Cat_Entries->E_ThotWidget[2]
-	    || val > (int) catalogue->Cat_Entries->E_ThotWidget[3])
+	if (val < (intptr_t) catalogue->Cat_Entries->E_ThotWidget[2]
+	    || val > (intptr_t) catalogue->Cat_Entries->E_ThotWidget[3])
 	  {
 	     TtaError (ERR_invalid_reference);
 	     return;
Index: thotlib/dialogue/input.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/input.c,v
retrieving revision 1.241
diff -u -r1.241 input.c
--- thotlib/dialogue/input.c	12 Jul 2005 13:39:15 -0000	1.241
+++ thotlib/dialogue/input.c	17 Aug 2005 11:47:29 -0000
@@ -665,9 +665,9 @@
   unsigned int        state, save;
   int                 status;
   int                 PicMask;
-  int                 frame;
+  intptr_t            frame;
 
-  frame = (int) data;
+  frame = (intptr_t) data;
   if (frame > MAX_FRAME)
     frame = 0;
   FrameToView (frame, &document, &view);
@@ -755,11 +755,11 @@
   ----------------------------------------------------------------------*/
 gboolean GtkLiningDown (gpointer data)
 {
-  int       frame;
+  intptr_t  frame;
   Document  doc; 
   int       view;
   
-  frame = (int) data; 
+  frame = (intptr_t) data; 
   FrameToView (frame, &doc, &view);
   TtcLineDown (doc, view);
   /* As this is a timeout function, return TRUE so that it
@@ -771,11 +771,11 @@
   ----------------------------------------------------------------------*/
 gboolean GtkLiningUp (gpointer data)
 {
-  int       frame;
+  intptr_t  frame;
   Document  doc; 
   int       view;
   
-  frame = (int) data; 
+  frame = (intptr_t) data; 
   FrameToView (frame, &doc, &view);
   TtcLineUp (doc, view);
   /* As this is a timeout function, return TRUE so that it
@@ -792,7 +792,7 @@
   ----------------------------------------------------------------------*/
 gboolean KeyScrolledGTK (GtkWidget *w, GdkEvent* event, gpointer data)
 {
-  int                 frame;
+  intptr_t            frame;
   GdkEventKey         *eventkey;
   GdkEventButton      *eventmouse;
   Document            doc; 
@@ -803,7 +803,7 @@
   GdkModifierType state;
   GtkEntry           *textzone;
 
-  frame = (int) data; 
+  frame = (intptr_t) data; 
   FrameToView (frame, &doc, &view);
   textzone = 0;
   if (timer != None)
Index: thotlib/dialogue/printmenu.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/dialogue/printmenu.c,v
retrieving revision 1.172
diff -u -r1.172 printmenu.c
--- thotlib/dialogue/printmenu.c	27 Jun 2005 14:04:08 -0000	1.172
+++ thotlib/dialogue/printmenu.c	17 Aug 2005 11:47:29 -0000
@@ -357,7 +357,7 @@
        printArgc++;
 #else /* _WINDOWS */
 #ifndef _WX
-       sprintf (&cmd[i], " -w%u", (unsigned int) FrRef[0]);
+       sprintf (&cmd[i], " -w%lu", (intptr_t) FrRef[0]);
 #else /* _WX */
        sprintf (&cmd[i], " -w%u", (unsigned int) FrameTable[0].WdFrame);
 #endif /* _WX */
Index: thotlib/editing/checkermenu.c
===================================================================
RCS file: /sources/public/Amaya/thotlib/editing/checkermenu.c,v
retrieving revision 1.75
diff -u -r1.75 checkermenu.c
--- thotlib/editing/checkermenu.c	30 May 2005 14:35:35 -0000	1.75
+++ thotlib/editing/checkermenu.c	17 Aug 2005 11:47:29 -0000
@@ -786,7 +786,7 @@
     switch (ref - SpellingBase)
       {
       case ChkrMenuIgnore:
-	switch ((int) data)
+	switch ((intptr_t) data)
 	  {
 	  case 0:
 	    /* ignorer les mots ecrits en majuscule */
@@ -820,7 +820,7 @@
 	break;
       case ChkrMenuOR:
 	/* definition du sens de correction OU? */
-	switch ((int) data)
+	switch ((intptr_t) data)
 	  {
 	  case 0:	/* ElemIsBefore la selection */
 	    ChkrRange->SStartToEnd = FALSE;
@@ -838,7 +838,7 @@
 	/* La premiere fois on initialise le domaine de recherche */
 	if (FirstStep)
 	  {
-	    InitSearchDomain ((int) data, ChkrRange);
+	    InitSearchDomain ((intptr_t) data, ChkrRange);
 	    /* On prepare la recheche suivante */
 #ifdef _GTK
 	    if (ChkrRange->SStartToEnd)
@@ -878,7 +878,7 @@
       case ChkrFormCorrect:
 	/* retour de la feuille de dialogue CORRECTION */
 	/* effectuer l'action demandee */
-	ApplyCommand ((int) data);
+	ApplyCommand ((intptr_t) data);
 	break;
       }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.