********>Bugfix 60:
Author: Wei Zhang
Date: 03/24/2006

Programs: xleap

Description: The graphical part of xleap can fail on 64-bit machines,
             because some routines returning pointers were not properly
             prototyped, and were returning int instead.

Fix:  apply the following patch by this method:

       cd $AMBERHOME
       patch -p0 < bugfix.60 (this file)

------------------------------------------------------------------------------
Index: src/leap/src/Wc/MapAg.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Wc/MapAg.c,v
retrieving revision 7.2
diff -u -p -r7.2 MapAg.c
--- src/leap/src/Wc/MapAg.c	3 Mar 2004 20:53:10 -0000	7.2
+++ src/leap/src/Wc/MapAg.c	16 Mar 2006 23:50:21 -0000
@@ -16,6 +16,7 @@
 */
 
 #include 
+#include 
 #include "MapAgP.h"
 
 BEGIN_NOT_Cxx
Index: src/leap/src/Wc/WcSetValue.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Wc/WcSetValue.c,v
retrieving revision 7.1
diff -u -p -r7.1 WcSetValue.c
--- src/leap/src/Wc/WcSetValue.c	5 May 2003 15:40:15 -0000	7.1
+++ src/leap/src/Wc/WcSetValue.c	16 Mar 2006 23:50:21 -0000
@@ -458,27 +458,27 @@ static void WcxSetValuesFromParseResSpec
 		    for ( byte = 0 ; byte < to_val.size ; byte++ )
 			buf[byte] = converted_bytes[byte];
 
-		    switch(to_val.size)
-		    {
-		    case sizeof(char):
+                    if( to_val.size == sizeof(char) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(char*)buf );
-			break;
-#ifndef CRAY
-		    case sizeof(short):
+                    }
+                    else if( to_val.size == sizeof(short) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(short*)buf );
-			break;
-#endif
-		    case sizeof(int):
+                    }
+                    else if( to_val.size == sizeof(int) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(int*)buf );
-			break;
-#if defined(__alpha) || _MIPS_SZLONG == 64
-		    case sizeof(long):
+                    }
+                    else if( sizeof(long) > sizeof(int) && to_val.size == sizeof(long) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(long*)buf );
-			break;
-#endif
-		    default:
+                    }
+                    else
+                    {
 			XtSetArg( arg[argc], spec[inx].res, buf );
-		    }
+                    }
+                    
 		    argc++;
 		}
 		/* If the conversion fails, the converter issues a warning.
@@ -546,6 +546,7 @@ void WcSetValue( w, resSpec )
     {
 	stat = WcxResSpecParse(w, resSpec, &target, &res, &type, &value, &next);
 
+	
 	/* Error messages given by WcxResSpecFindSegments() via WcxBarf().
 	** We cannot continue if the parser barfs, we CAN continue if
 	** there are semantic problems detected here.
Index: src/leap/src/Xpm/parse.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xpm/parse.c,v
retrieving revision 7.0
diff -u -p -r7.0 parse.c
--- src/leap/src/Xpm/parse.c	9 Oct 1997 17:25:11 -0000	7.0
+++ src/leap/src/Xpm/parse.c	16 Mar 2006 23:50:21 -0000
@@ -42,6 +42,7 @@ char *xpmColorKeys[] = {
     "c",				/* key #5: color visual */
 };
 
+unsigned int atoui( char* p, unsigned int l, unsigned int *ui_return );
 
 /* function call in case of error, frees only locally allocated variables */
 #undef RETURN
Index: src/leap/src/Xpm/xpmP.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xpm/xpmP.h,v
retrieving revision 7.0
diff -u -p -r7.0 xpmP.h
--- src/leap/src/Xpm/xpmP.h	9 Oct 1997 17:25:11 -0000	7.0
+++ src/leap/src/Xpm/xpmP.h	16 Mar 2006 23:50:21 -0000
@@ -22,6 +22,7 @@
 #else  /* VMS */
 
 #include 
+#include 
 /* stdio.h doesn't declare popen on a Sequent DYNIX OS */
 #ifdef sequent
 extern FILE *popen();
Index: src/leap/src/Xraw/Arrow.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/Arrow.c,v
retrieving revision 1.2
diff -u -p -r1.2 Arrow.c
--- src/leap/src/Xraw/Arrow.c	5 May 2003 15:40:17 -0000	1.2
+++ src/leap/src/Xraw/Arrow.c	16 Mar 2006 23:50:21 -0000
@@ -14,7 +14,7 @@
 #include "ArrowP.h"
 
 #include "XrawDebug.h"
-
+#include "../Xmu/CharSet.h"
 
 #define CORE(w) (w)->core
 
Index: src/leap/src/Xraw/AsciiSrc.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/AsciiSrc.c,v
retrieving revision 1.3
diff -u -p -r1.3 AsciiSrc.c
--- src/leap/src/Xraw/AsciiSrc.c	5 May 2003 15:40:17 -0000	1.3
+++ src/leap/src/Xraw/AsciiSrc.c	16 Mar 2006 23:50:21 -0000
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-    
+#include     
 #include 
 #include 
 
Index: src/leap/src/Xraw/Scrollbar.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/Scrollbar.c,v
retrieving revision 1.2
diff -u -p -r1.2 Scrollbar.c
--- src/leap/src/Xraw/Scrollbar.c	5 May 2003 15:40:19 -0000	1.2
+++ src/leap/src/Xraw/Scrollbar.c	16 Mar 2006 23:50:21 -0000
@@ -1092,7 +1092,7 @@ static void Select( gw, event, params, n
 
     BAR(w).newLoc = newLoc;
     
-    PaintThumb(w, (Region)NULL, LOCATION);
+    PaintThumb(gw, (Region)NULL, LOCATION);
     PaintArrows(gw, Xaw_DOWN, (unsigned int)Xaw_BOTTOM);
     
     FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_INCREMENT, event);
@@ -1189,7 +1189,7 @@ static void Select( gw, event, params, n
 
     BAR(w).newLoc = newLoc;
     
-    PaintThumb(w, (Region)NULL, LOCATION);
+    PaintThumb(gw, (Region)NULL, LOCATION);
     PaintArrows(gw, Xaw_DOWN, (unsigned int)Xaw_TOP);
     
     FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_DECREMENT, event);
@@ -1440,7 +1440,7 @@ static void PageUpOrLeft( gw, event, par
 
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
 
   FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_PAGE_DECREMENT, event);
 
@@ -1486,7 +1486,7 @@ static void PageDownOrRight( gw, event, 
 
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
 
   FillXawScrollBarCallbackStruct(gw, (XawScrollBarCallbackStruct*)&bar_data,
 				 XawSB_PAGE_INCREMENT, event);
@@ -1530,7 +1530,7 @@ static void IncrementUpOrLeft( gw, event
   
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
   
   FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_DECREMENT, event);
 
Index: src/leap/src/Xraw/ScrolledTable.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/ScrolledTable.h,v
retrieving revision 1.2
diff -u -p -r1.2 ScrolledTable.h
--- src/leap/src/Xraw/ScrolledTable.h	5 May 2003 15:40:19 -0000	1.2
+++ src/leap/src/Xraw/ScrolledTable.h	16 Mar 2006 23:50:21 -0000
@@ -96,6 +96,7 @@ Commercial  usage is  also  possible  wi
 /*#                                                                       #*/
 /*#########################################################################*/
 extern WidgetClass scrolledTableWidgetClass;
+extern void XawScrolledTableSetLocation( Widget w, double xoff, double yoff );
 
 typedef struct _ScrolledTableClassRec *XrawScrolledTableWidgetClass;
 typedef struct _ScrolledTableRec      *XrawScrolledTableWidget;
Index: src/leap/src/Xraw/TextSink.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/TextSink.c,v
retrieving revision 1.3
diff -u -p -r1.3 TextSink.c
--- src/leap/src/Xraw/TextSink.c	5 May 2003 15:40:21 -0000	1.3
+++ src/leap/src/Xraw/TextSink.c	16 Mar 2006 23:50:21 -0000
@@ -197,14 +197,16 @@ Widget request, new;
  */
 
 static void
-Destroy(w)
+Destroy(Widget w)
 {
   TextSinkObject sink = (TextSinkObject) w;
 
   if (sink->text_sink.char_tabs != NULL)
     XtFree((char *) sink->text_sink.char_tabs);
+  
   if (sink->text_sink.tabs != NULL)
     XtFree((char *) sink->text_sink.tabs);
+
 }
 
 /*	Function Name: SetValues
Index: src/leap/src/leap/amber.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/amber.c,v
retrieving revision 7.18
diff -u -p -r7.18 amber.c
--- src/leap/src/leap/amber.c	23 May 2005 16:53:34 -0000	7.18
+++ src/leap/src/leap/amber.c	16 Mar 2006 23:50:21 -0000
@@ -43,6 +43,8 @@
 #include	"tools.h"
 #include	"amber.h"
 #include	"defaults.h"
+#include        "sort.h"
+#include        "zMatrix.h"
 
 #define FGETS(s,f)      { strcpy(s,""); fgets(s,sizeof(s),f); }
 
Index: src/leap/src/leap/atom.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/atom.h,v
retrieving revision 7.4
diff -u -p -r7.4 atom.h
--- src/leap/src/leap/atom.h	14 Jan 2002 01:29:41 -0000	7.4
+++ src/leap/src/leap/atom.h	16 Mar 2006 23:50:21 -0000
@@ -297,5 +297,6 @@ extern BOOL		bAtomSpaceConflict( ATOM aA
 extern double		dAtomVanderWaals( ATOM aAtom );
 extern int		iAtomSetTmpRadius( ATOM aAtom );
 
+extern void             AtomBondTo( ATOM aAtom1, ATOM aAtom2 );
 
 #endif /* ATOM_H */
Index: src/leap/src/leap/basics.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/basics.h,v
retrieving revision 7.14
diff -u -p -r7.14 basics.h
--- src/leap/src/leap/basics.h	13 Mar 2004 03:28:05 -0000	7.14
+++ src/leap/src/leap/basics.h	16 Mar 2006 23:50:21 -0000
@@ -641,8 +641,8 @@ extern BOOL     GbTestMemory;
 #include        "byteArray.h"
 */
 
-
-
+extern void            IMem();
+extern void            TMem();
 /*  sysdepend.c  */
 
 extern void             myPrintf(char *fmt,...);
Index: src/leap/src/leap/block.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/block.h,v
retrieving revision 7.1
diff -u -p -r7.1 block.h
--- src/leap/src/leap/block.h	10 Apr 1999 04:21:06 -0000	7.1
+++ src/leap/src/leap/block.h	16 Mar 2006 23:50:21 -0000
@@ -93,6 +93,6 @@ extern BOOL		bBlockRemoveChar( BLOCK bBl
 extern void		BlockEmpty( BLOCK bBlock );
 extern void		BlockDestroy( BLOCK *bPBlock );
 extern BOOL		bBlockReadLine( BLOCK bBlock, char *sLine );
-
+extern BOOL             bBlockAddChar( BLOCK bBlock, char c );
 
 #endif
Index: src/leap/src/leap/build.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/build.c,v
retrieving revision 7.7
diff -u -p -r7.7 build.c
--- src/leap/src/leap/build.c	6 Jan 2000 17:21:26 -0000	7.7
+++ src/leap/src/leap/build.c	16 Mar 2006 23:50:21 -0000
@@ -58,7 +58,8 @@
 #include	"parmLib.h"
 #include        "model.h"
 #include        "build.h"
-
+#include        "sort.h"
+#include        "graphUtil.h"
 
 #define         MAXNEWTONSTEPS  20
 
Index: src/leap/src/leap/build.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/build.h,v
retrieving revision 7.2
diff -u -p -r7.2 build.h
--- src/leap/src/leap/build.h	21 Sep 1999 21:00:57 -0000	7.2
+++ src/leap/src/leap/build.h	16 Mar 2006 23:50:21 -0000
@@ -38,7 +38,9 @@
 #ifndef	BUILD_H
 #define	BUILD_H
 
-
+#include "classes.h"
+#include "minimizer.h"
+#include "loop.h"
 /*  build.c  */
 
 extern void		BuildInternalsUsingFlags( LOOP *lPAtoms, FLAGS fForSet, 
Index: src/leap/src/leap/commands.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/commands.c,v
retrieving revision 7.52
diff -u -p -r7.52 commands.c
--- src/leap/src/leap/commands.c	29 Mar 2005 23:53:31 -0000	7.52
+++ src/leap/src/leap/commands.c	16 Mar 2006 23:50:21 -0000
@@ -73,6 +73,9 @@
 #include        "leap.h"
 #include        "octree.h"
 #include        "tripos.h"
+#include        "build.h"
+#include        "zMatrix.h"
+#include        "unitio.h"
 
 int     iMemDebug = 0;
 
@@ -5126,7 +5129,11 @@ OctTreePrintGrid( octTreeSolute, "Charge
                  *  Make a copy of ion unit and give it new point.
                  */
                 uPlace = (UNIT) oCopy( (OBJEKT)uIon1 );
-                ContainerCenterAt( (CONTAINER) uPlace, vNewPoint );
+                lAtoms = lLoop( (OBJEKT)uPlace, ATOMS );
+                aAtom  = (ATOM)oNext(&lAtoms);
+                AtomSetPosition( aAtom, vNewPoint );
+                AtomSetFlags( aAtom, ATOMPOSITIONKNOWN );
+                // ContainerCenterAt( (CONTAINER) uPlace, vNewPoint );
 
                 /*
                  *  Add ion to solute.
Index: src/leap/src/leap/commands.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/commands.h,v
retrieving revision 7.2
diff -u -p -r7.2 commands.h
--- src/leap/src/leap/commands.h	12 Jul 2001 22:31:25 -0000	7.2
+++ src/leap/src/leap/commands.h	16 Mar 2006 23:50:21 -0000
@@ -1,5 +1,6 @@
 /*
  *      File:   commands.h
+ * B
  *
  ************************************************************************
  *                            LEAP                                      *
@@ -66,5 +67,10 @@ typedef struct {
 typedef ALIASt	*ALIAS;
 
 extern	VARARRAY	GvaAlias;
-	
+
+OBJEKT
+oCmd_charge( int, ASSOC* );
+
+OBJEKT
+oCmd_check( int, ASSOC* );
 #endif
Index: src/leap/src/leap/database.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/database.c,v
retrieving revision 7.6
diff -u -p -r7.6 database.c
--- src/leap/src/leap/database.c	6 Jun 2002 15:49:56 -0000	7.6
+++ src/leap/src/leap/database.c	16 Mar 2006 23:50:21 -0000
@@ -111,6 +111,8 @@
 
 #include        "database.h"
 
+#include 	"stringExtra.h"
+
 #define TOTALCOLUMNS    16              /* Total number of columns allowed */
 
 #define ENTRYINTEGERSTR "int"
Index: src/leap/src/leap/fortran.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/fortran.c,v
retrieving revision 7.1
diff -u -p -r7.1 fortran.c
--- src/leap/src/leap/fortran.c	11 Apr 1999 05:35:06 -0000	7.1
+++ src/leap/src/leap/fortran.c	16 Mar 2006 23:50:21 -0000
@@ -63,7 +63,7 @@
 
 #include	"basics.h"
 
-
+#include        "stringExtra.h"
 
 
 /*
Index: src/leap/src/leap/graphUtil.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/graphUtil.c,v
retrieving revision 7.2
diff -u -p -r7.2 graphUtil.c
--- src/leap/src/leap/graphUtil.c	15 Jun 1999 00:34:08 -0000	7.2
+++ src/leap/src/leap/graphUtil.c	16 Mar 2006 23:50:21 -0000
@@ -49,7 +49,7 @@
 
 #include	"graphUtil.h"
 
-
+#include        "sort.h"
 
 
 /*
@@ -92,6 +92,8 @@ BOOL		bFound;
 	}
 	fPCallback( aStart );
     }
+
+    return bFound;
 }
 
 
Index: src/leap/src/leap/help.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/help.h,v
retrieving revision 7.2
diff -u -p -r7.2 help.h
--- src/leap/src/leap/help.h	15 Jun 1999 03:57:56 -0000	7.2
+++ src/leap/src/leap/help.h	16 Mar 2006 23:50:21 -0000
@@ -59,7 +59,7 @@ typedef HELPt*  HELP;
 
 extern void	HelpInitialize();
 extern void	HelpShutdown();
-
+extern void     HTInit();
 extern void	HelpLoop();
 extern HELP	hHelpNext();
 
Index: src/leap/src/leap/minimizer.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/minimizer.h,v
retrieving revision 7.2
diff -u -p -r7.2 minimizer.h
--- src/leap/src/leap/minimizer.h	13 Apr 1999 00:32:08 -0000	7.2
+++ src/leap/src/leap/minimizer.h	16 Mar 2006 23:50:21 -0000
@@ -45,7 +45,8 @@
 #ifndef VARARRAY_H
 #include        "varArray.h"
 #endif
- 
+#include        "atom.h"
+
 typedef struct  {
 	double          dMinRmsGradientSquared;
 	VARARRAY        vaAtoms;
Index: src/leap/src/leap/model.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/model.c,v
retrieving revision 7.5
diff -u -p -r7.5 model.c
--- src/leap/src/leap/model.c	6 Jan 2000 17:21:27 -0000	7.5
+++ src/leap/src/leap/model.c	16 Mar 2006 23:50:21 -0000
@@ -50,7 +50,11 @@ int		this = 0;
 
 #include        "model.h"
 
+#include        "sort.h"
 
+#include        "atom.h"
+
+#include        "zMatrix.h"
 
 
 
Index: src/leap/src/leap/molecule.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/molecule.h,v
retrieving revision 7.1
diff -u -p -r7.1 molecule.h
--- src/leap/src/leap/molecule.h	13 Apr 1999 01:57:32 -0000	7.1
+++ src/leap/src/leap/molecule.h	16 Mar 2006 23:50:21 -0000
@@ -83,7 +83,7 @@ typedef MOLECULEt	*MOLECULE;
 extern MOLECULE		mMoleculeCreate();
 extern void		MoleculeDelete(MOLECULE *mPMolecule);
 extern void		MoleculeDescribe(MOLECULE mMolecule);
-
+extern void             MoleculeDestroy(MOLECULE *mPMolecule);
 extern MOLECULE		mMoleculeDuplicate(MOLECULE mOld);
 extern void		MoleculeResetPointers(MOLECULE mMol);
 extern void		MoleculeCheck(MOLECULE mMol, int *iPErrors, int *iPWarnings);
Index: src/leap/src/leap/objekt.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/objekt.c,v
retrieving revision 7.2
diff -u -p -r7.2 objekt.c
--- src/leap/src/leap/objekt.c	12 Sep 1999 01:03:27 -0000	7.2
+++ src/leap/src/leap/objekt.c	16 Mar 2006 23:50:21 -0000
@@ -195,7 +195,6 @@ OBJEKT  o;
 void
 Destroy( OBJEKT  *oPObject )
 {
-
     if ( *oPObject == NULL ) 
 	return;
 
@@ -254,6 +253,7 @@ Destroy( OBJEKT  *oPObject )
 		*oPObject ));
             break;
     }
+    
 }
 
 
Index: src/leap/src/leap/parser.y
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/parser.y,v
retrieving revision 7.9
diff -u -p -r7.9 parser.y
--- src/leap/src/leap/parser.y	6 Nov 2002 16:05:41 -0000	7.9
+++ src/leap/src/leap/parser.y	16 Mar 2006 23:50:21 -0000
@@ -84,7 +84,9 @@
 #include	"parser.h"
 
 #include        "leap.h"
+#include        "block.h"
 
+#include        "help.h"
 
 #define         MESSAGEFILTER   MESSPARSER
 
Index: src/leap/src/leap/pdbFile.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/pdbFile.c,v
retrieving revision 7.20
diff -u -p -r7.20 pdbFile.c
--- src/leap/src/leap/pdbFile.c	17 May 2002 01:07:48 -0000	7.20
+++ src/leap/src/leap/pdbFile.c	16 Mar 2006 23:50:21 -0000
@@ -52,7 +52,8 @@
 #include        "minimizer.h"
 #include        "leap.h"
 #include	"defaults.h"
-
+#include        "build.h"
+#include        "atom.h"
 
 		/* PDBWRITEt is used to store data for writing PDB files */
 
Index: src/leap/src/leap/residue.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/residue.c,v
retrieving revision 7.7
diff -u -p -r7.7 residue.c
--- src/leap/src/leap/residue.c	12 Feb 2001 09:16:57 -0000	7.7
+++ src/leap/src/leap/residue.c	16 Mar 2006 23:50:21 -0000
@@ -57,6 +57,7 @@
 
 #include        "classes.h"
 
+#include        "build.h"
 
 /*
  *----------------------------------------------------------
@@ -408,8 +409,8 @@ FLAGS		fBondFlags;
 			ATOMPOSITIONKNOWN, 
 			0,
 			0, 
-			ATOMPOSITIONKNOWN,
-			&iDum, &iDum, &iDum );
+			ATOMPOSITIONKNOWN
+			);
 
                 /* Define the coordinates, and the flags */
                 /* if there are bonds out of the old RESIDUE, break them */
Index: src/leap/src/leap/residue.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/residue.h,v
retrieving revision 7.4
diff -u -p -r7.4 residue.h
--- src/leap/src/leap/residue.h	19 Jun 2002 16:41:57 -0000	7.4
+++ src/leap/src/leap/residue.h	16 Mar 2006 23:50:21 -0000
@@ -154,7 +154,7 @@ typedef struct {
 extern RESIDUE		rResidueCreate();
 extern void		ResidueDelete(RESIDUE *rPResidue);
 extern void		ResidueDescribe(RESIDUE rResidue);
-
+extern void             ResidueDestroy(RESIDUE *rPResidue);
 extern RESIDUE		rResidueDuplicate(RESIDUE rOld);
 extern void		ResidueResetPointers(RESIDUE rRes);
 extern void		ResidueCheck(RESIDUE rRes, 
Index: src/leap/src/leap/select.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/select.c,v
retrieving revision 7.1
diff -u -p -r7.1 select.c
--- src/leap/src/leap/select.c	15 Jun 1999 00:35:56 -0000	7.1
+++ src/leap/src/leap/select.c	16 Mar 2006 23:50:21 -0000
@@ -46,6 +46,9 @@
 
 #include	"select.h"
 
+#include        "graphUtil.h"
+
+#include        "build.h"
 
 /*
  *	SelectAtom
Index: src/leap/src/leap/select.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/select.h,v
retrieving revision 7.1
diff -u -p -r7.1 select.h
--- src/leap/src/leap/select.h	15 Jun 1999 03:58:05 -0000	7.1
+++ src/leap/src/leap/select.h	16 Mar 2006 23:50:21 -0000
@@ -45,6 +45,7 @@ extern void	SelectMoleculeWithAtom(UNIT 
 extern void	SelectEverything(UNIT uUnit, BOOL bOn);
 extern void	SelectChainBetween(UNIT uUnit, ATOM aA, ATOM aB, BOOL bOn);
 extern void	SelectRelaxInFramework(UNIT uUnit, MINIMIZER mMinimizer);
+extern BOOL     bSelectChainBetween( UNIT uUnit, ATOM aA, ATOM aB, BOOL bOn );
 
 #define	SelectSetFlags(u,f)	ContainerWithFlagsSetAtomFlags(u,ATOMSELECTED,f)
 #define	SelectResetFlags(u,f)\
Index: src/leap/src/leap/tLeap.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tLeap.c,v
retrieving revision 7.2
diff -u -p -r7.2 tLeap.c
--- src/leap/src/leap/tLeap.c	15 Jun 1999 03:58:06 -0000	7.2
+++ src/leap/src/leap/tLeap.c	16 Mar 2006 23:50:21 -0000
@@ -91,7 +91,7 @@
 
 #include        "getline.h"
 
-
+#include        "block.h"
 /*
  *******************************************************************
  *
@@ -101,7 +101,9 @@
  *      Amended: Vladimir Romanovski (1994)
  *        It was added the ``input-edit'' library facility.
  */
-
+void ParseInit( RESULTt *rPResult );
+void ParseArguments( int argc, char *argv[] );
+void ParseShutdown();
 static char *
 stripwhite (char *string)
 {
Index: src/leap/src/leap/tools.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tools.c,v
retrieving revision 7.21
diff -u -p -r7.21 tools.c
--- src/leap/src/leap/tools.c	20 Feb 2004 20:39:15 -0000	7.21
+++ src/leap/src/leap/tools.c	16 Mar 2006 23:50:21 -0000
@@ -59,7 +59,9 @@
 
 #include        "tools.h"
 
+#include        "mathop.h"
 
+#include        "sort.h"
 /*
  *      dToolAtomR
  *
Index: src/leap/src/leap/tools.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tools.h,v
retrieving revision 7.3
diff -u -p -r7.3 tools.h
--- src/leap/src/leap/tools.h	10 Aug 1999 08:47:44 -0000	7.3
+++ src/leap/src/leap/tools.h	16 Mar 2006 23:50:21 -0000
@@ -75,5 +75,6 @@ extern BOOL	bToolGeometricCenter( OBJEKT
 extern LIST	lToolListOfResidues( UNIT uUnit, LIST lResidues );
 extern void	ToolOctBoxCheck( UNIT uSolute, double *dPBuf, BOOL bMsg );
 
+extern void     ToolSetUnitBoxByCenters( UNIT uUnit );
 
 
Index: src/leap/src/leap/unit.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unit.c,v
retrieving revision 7.17
diff -u -p -r7.17 unit.c
--- src/leap/src/leap/unit.c	2 Jul 2004 00:27:04 -0000	7.17
+++ src/leap/src/leap/unit.c	16 Mar 2006 23:50:21 -0000
@@ -70,7 +70,6 @@
         Type definitions, static variables etc.
 */
 
-BOOL zbUnitIgnoreAngle();
 
 /*
  *----------------------------------------------------------------------
Index: src/leap/src/leap/unit.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unit.h,v
retrieving revision 7.4
diff -u -p -r7.4 unit.h
--- src/leap/src/leap/unit.h	2 Aug 2001 15:02:39 -0000	7.4
+++ src/leap/src/leap/unit.h	16 Mar 2006 23:50:21 -0000
@@ -205,8 +205,9 @@ extern void	UnitFindBoundingBox(UNIT uUn
 extern void	UnitSetUseBox(UNIT uUnit, BOOL b);
 extern void	UnitSetBoxOct(UNIT uUnit, BOOL b);
 extern void	UnitSetUseSolventCap(UNIT uUnit, BOOL b);
-
+extern void     UnitDestroy( UNIT *uPUnit );
 extern BOOL	zbUnitIgnoreHwHwOwAngle( STRING sA, STRING sB, STRING sC );
+extern BOOL     zbUnitIgnoreAngle( STRING sA, STRING sB, STRING sC );
 
 #define UnitUseParameters( u, p ) \
 	( ((UNIT)(u))->psParameters = (OBJEKT)(p),CDU(u) )
Index: src/leap/src/leap/unitio.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unitio.c,v
retrieving revision 7.44
diff -u -p -r7.44 unitio.c
--- src/leap/src/leap/unitio.c	21 Apr 2004 18:42:22 -0000	7.44
+++ src/leap/src/leap/unitio.c	16 Mar 2006 23:50:21 -0000
@@ -77,6 +77,9 @@
 #include        "avl.h"
 #include	"defaults.h"
 
+#include        "fortran.h"
+#include        "mathop.h"
+#include        "sort.h"
 int iFatal;
 
 /*
Index: src/leap/src/leap/xAction.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xAction.c,v
retrieving revision 7.9
diff -u -p -r7.9 xAction.c
--- src/leap/src/leap/xAction.c	20 Feb 2004 22:21:00 -0000	7.9
+++ src/leap/src/leap/xAction.c	16 Mar 2006 23:50:21 -0000
@@ -49,7 +49,7 @@
 #include        "basics.h"
 
 
-
+#include        "build.h"
 #include        "vector.h"
 #include        "matrix.h"
 #include        "threed.h"
@@ -1265,7 +1265,7 @@ zActionHandlePointerMove( TANK tTank, in
         case TANKDRAGROTATE:
             if ( tTank->tank.iButtonState == BPOINT ) {
                 zActionDrag( tTank );
-            } else if ( tTank->tank.iButtonState = BSHIFT_POINT ) {
+            } else if ( tTank->tank.iButtonState == BSHIFT_POINT ) {
                 zActionRotateAtoms(tTank);
             }
             goto DONE;
@@ -1945,6 +1945,8 @@ xtapActionCenterUnit( Widget wWidget, XE
     TankDisplay( (TANK)wWidget, FALSE );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -1957,6 +1959,8 @@ xtapActionSetCancelHit( Widget wWidget, 
 
     MESSAGE(( "ActionSetCancelHit\n" ));
     BasicsSetInterrupt();
+
+    return NULL;
 }
 
 
@@ -1986,6 +1990,8 @@ xtapActionMouseMotion( Widget wWidget, X
     ActionButtonMotion( wWidget, xePEvent->xbutton.x, xePEvent->xbutton.y );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2009,6 +2015,8 @@ xtapActionButtonADown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2029,6 +2037,8 @@ xtapActionButtonAUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2054,6 +2064,8 @@ xtapActionButtonBDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2075,6 +2087,8 @@ xtapActionButtonBUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2099,6 +2113,8 @@ xtapActionButtonCDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2118,6 +2134,8 @@ xtapActionButtonCUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2142,6 +2160,8 @@ xtapActionButtonDDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2161,6 +2181,8 @@ xtapActionButtonDUp( Widget wWidget, XEv
                         xePEvent->xbutton.x, xePEvent->xbutton.y,
                         xePEvent->xbutton.time );
     PopCurrentPrintSink();
+ 
+    return NULL;
 }
 
 
@@ -2187,6 +2209,8 @@ xtapActionButtonEDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2207,6 +2231,8 @@ xtapActionButtonEUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xTank.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xTank.c,v
retrieving revision 7.7
diff -u -p -r7.7 xTank.c
--- src/leap/src/leap/xTank.c	19 Feb 2004 03:13:26 -0000	7.7
+++ src/leap/src/leap/xTank.c	16 Mar 2006 23:50:21 -0000
@@ -2175,6 +2175,7 @@ XSetWindowAttributes    xswaWin;
 
     X3dBuildTransform( tTank->tank.x3dEngine );
     TankDisplay( tTank , FALSE );
+    return NULL;
 }
 
 
@@ -2261,6 +2262,7 @@ TankCreate( Widget wRequest, TANK tTank 
 
     tTank->tank.bPageFlipFront = TRUE;
     tTank->tank.bFastPageFlipLastTime = FALSE;  /* guess */
+    return NULL;
 }
 
 
@@ -2289,6 +2291,8 @@ TankDestroy( TANK tTank )
     if ( tTank->tank.vaAtomPtrs != NULL ) {
         VarArrayDestroy(&(tTank->tank.vaAtomPtrs) );
     }
+
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xaAngleParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaAngleParmTable.c,v
retrieving revision 7.3
diff -u -p -r7.3 xaAngleParmTable.c
--- src/leap/src/leap/xaAngleParmTable.c	7 Aug 2000 21:25:07 -0000	7.3
+++ src/leap/src/leap/xaAngleParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -51,6 +51,9 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
+
+#include        "../Wc/WcCreate.h"
 
 #define TYPE1C		0
 #define	TYPE2C		1
Index: src/leap/src/leap/xaAtomTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaAtomTable.c,v
retrieving revision 7.8
diff -u -p -r7.8 xaAtomTable.c
--- src/leap/src/leap/xaAtomTable.c	2 Mar 2004 02:01:55 -0000	7.8
+++ src/leap/src/leap/xaAtomTable.c	16 Mar 2006 23:50:21 -0000
@@ -56,7 +56,7 @@
 
 #include        "xaTable.h"
 #include        "xaAtomTable.h"
-
+#include        "../Wc/WcCreate.h"
 
 #define NAMEC           0
 #define TYPEC           1
@@ -512,6 +512,7 @@ static char *
 zXAATBeginAcceptTable( TABLE tTable )
 {
     DisplayerAccumulateUpdates();
+    return NULL;
 }
 
 
@@ -527,6 +528,7 @@ static char *
 zXAATEndAcceptTable( TABLE tTable )
 {
     DisplayerReleaseUpdates();
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xaBondParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaBondParmTable.c,v
retrieving revision 7.2
diff -u -p -r7.2 xaBondParmTable.c
--- src/leap/src/leap/xaBondParmTable.c	26 May 1999 20:35:43 -0000	7.2
+++ src/leap/src/leap/xaBondParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -52,6 +52,7 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
 
 #define TYPE1C		0
 #define	TYPE2C		1
Index: src/leap/src/leap/xaCommand.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaCommand.c,v
retrieving revision 7.6
diff -u -p -r7.6 xaCommand.c
--- src/leap/src/leap/xaCommand.c	5 May 2003 15:40:22 -0000	7.6
+++ src/leap/src/leap/xaCommand.c	16 Mar 2006 23:50:21 -0000
@@ -66,14 +66,14 @@
 
 #include	"xaCommand.h"
 
+#include        "../Wc/WcCreate.h"
 
 #define	EMPTY_LIST	"      "
 #define	XACEMPTYSTRING	"";
 
 extern BLOCK	GbCommand;
 
-extern Widget	WcFullNameToWidget();
-
+extern void ParseBlock( BLOCK bBlock, RESULTt* rPResult );
 	    
 /*
  *	zXACDisplayChildren
Index: src/leap/src/leap/xaHBondParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaHBondParmTable.c,v
retrieving revision 7.2
diff -u -p -r7.2 xaHBondParmTable.c
--- src/leap/src/leap/xaHBondParmTable.c	26 May 1999 22:56:56 -0000	7.2
+++ src/leap/src/leap/xaHBondParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -53,6 +53,8 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
+
 #define TYPE1C		0
 #define	TYPE2C		1
 #define	AC		2
Index: src/leap/src/leap/xaLeapc.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaLeapc.c,v
retrieving revision 7.9
diff -u -p -r7.9 xaLeapc.c
--- src/leap/src/leap/xaLeapc.c	27 Oct 2003 23:01:01 -0000	7.9
+++ src/leap/src/leap/xaLeapc.c	16 Mar 2006 23:50:21 -0000
@@ -71,7 +71,8 @@
 
 #include	"parser.h"
 #include        "block.h"
-
+#include        "../Xraw/Command.h"
+#include        "../Xraw/3d.h"
 #define ICON_NAME ("xleap_icon")
 
 extern VFUNCTION	GfAtomClassGraphicsCreator;
@@ -79,6 +80,10 @@ extern VFUNCTION	GfAtomClassGraphicsDest
 
 static int error_handler();
 
+void ParseInit( RESULTt *rPResult );
+void ParseArguments( int argc, char *argv[] );
+void ParseShutdown();
+void XAPEInitialize( XtAppContext app );
 
 /*
  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -102,7 +107,7 @@ GC              GgcLight;
 FILE           	*GfInput;
 
 static
-SetCommandColoursCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetCommandColoursCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char	*param = (char*)client_data;
   Pixel  background = 0;
@@ -123,7 +128,7 @@ SetCommandColoursCB( Widget w, XtPointer
 }
 
 static
-SetSensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetSensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char		*param = (char*)client_data;
   Widget	to_set;
@@ -141,7 +146,7 @@ SetSensitiveCB( Widget w, XtPointer clie
 }
 
 static
-SetInsensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetInsensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char		*param = (char*)client_data;
   Widget	to_set;
Index: src/leap/src/leap/xaParmEditor.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaParmEditor.c,v
retrieving revision 7.1
diff -u -p -r7.1 xaParmEditor.c
--- src/leap/src/leap/xaParmEditor.c	27 May 1999 01:38:59 -0000	7.1
+++ src/leap/src/leap/xaParmEditor.c	16 Mar 2006 23:50:21 -0000
@@ -73,7 +73,7 @@
 #include	"xaAngleParmTable.h"
 #include	"xaTorsionParmTable.h"
 #include	"xaHBondParmTable.h"
-
+#include        "../Wc/WcCreate.h"
 
 typedef	struct	{
 	Widget		wTop;
@@ -235,7 +235,7 @@ XAPEEditAtomParameters( Widget wCur, cad
   } else {
     MESSAGE(( "Creating Atom Parameter Table..." ));		
     XAAPTPopupTable( wCur, zwXAPETop(wCur), zpsXAPEParmSet( wCur ) ,
-		    zXAPEEditDone );
+	  zXAPEEditDone );
   }
 }
 
Index: src/leap/src/leap/xaTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTable.c,v
retrieving revision 7.10
diff -u -p -r7.10 xaTable.c
--- src/leap/src/leap/xaTable.c	2 Mar 2004 23:06:15 -0000	7.10
+++ src/leap/src/leap/xaTable.c	16 Mar 2006 23:50:21 -0000
@@ -51,6 +51,7 @@
 #include        "../Xraw/Scrollbar.h"
 #include        "../Xraw/Table2.h"
 #include        "../Wc/WcCreate.h"
+#include        "../Xraw/3d.h"
 
 #include        "basics.h"
 #include        "varArray.h"
@@ -546,6 +547,7 @@ XATSetWidgetFind(Widget wWid, caddr_t cl
 
     tTable->wFind = wWid;
 
+    return NULL;
 }
 
 /********************************************************************
@@ -565,6 +567,8 @@ XATVerifyChangedCell(Widget wWid, caddr_
 
     tTable->bTableChanged = TRUE;
 /* %%% TODO - call VerifyCell */
+
+    return NULL;
 }
 
 /********************************************************************
@@ -598,6 +602,8 @@ XATVerifyAddRow(Widget wWid, caddr_t cli
         tTable->find_row++;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -634,6 +640,8 @@ XATVerifyDeleteRow(Widget wWid, caddr_t 
         tTable->find_column = tTable->find_row = 0;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -669,6 +677,8 @@ XATAddRow(Widget wWid, caddr_t client_da
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -707,6 +717,8 @@ XATInsertRow(Widget wWid, caddr_t client
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -740,6 +752,8 @@ XATDeleteRow(Widget wWid, caddr_t client
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
Index: src/leap/src/leap/xaTable.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTable.h,v
retrieving revision 7.3
diff -u -p -r7.3 xaTable.h
--- src/leap/src/leap/xaTable.h	2 Mar 2004 02:01:55 -0000	7.3
+++ src/leap/src/leap/xaTable.h	16 Mar 2006 23:50:21 -0000
@@ -48,6 +48,8 @@
 
 #include "varArray.h"
 #include "xaLeap.h"
+#include "varArray.h"
+
 
 typedef char*   (*SFUNCTION)();
 typedef struct  {
Index: src/leap/src/leap/xaTools.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTools.c,v
retrieving revision 7.3
diff -u -p -r7.3 xaTools.c
--- src/leap/src/leap/xaTools.c	20 Jul 1999 03:43:21 -0000	7.3
+++ src/leap/src/leap/xaTools.c	16 Mar 2006 23:50:21 -0000
@@ -47,7 +47,7 @@
 
 #include	"xaLeap.h"
 #include	"xaTools.h"
-
+#include        "../Wc/WcCreate.h"
 
 /*
  *------------------------------------------------------------
Index: src/leap/src/leap/xaUnitEditor.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaUnitEditor.c,v
retrieving revision 7.10
diff -u -p -r7.10 xaUnitEditor.c
--- src/leap/src/leap/xaUnitEditor.c	5 May 2003 15:40:23 -0000	7.10
+++ src/leap/src/leap/xaUnitEditor.c	16 Mar 2006 23:50:21 -0000
@@ -68,16 +68,21 @@
 
 #include	"basics.h"
 #include        "classes.h"
+#include        "commands.h"
 #include	"varArray.h"
 #include	"minimizer.h"
 #include 	"xTank.h"
-
+#include        "select.h"
+#include        "build.h"
+#include        "model.h"
+#include        "graphUtil.h"
+#include        "leap.h"
 #include	"xaTools.h"
 #include	"xaLeap.h"
 #include	"xaCommand.h"
 #include	"xaUnitEditor.h"
 #include	"xaAtomTable.h"
-
+#include        "../Wc/WcCreate.h"
 extern int		GiUnitEditors;
 
 /*
@@ -297,7 +302,7 @@ XAUECheckUnitEdit( Widget wCur, caddr_t 
 	break;
       }
   }
-  
+  return NULL;
 }
 
 
@@ -465,6 +470,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -496,6 +502,7 @@ XAUEToggleShowPertNames( Widget wCur, ca
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -526,8 +533,9 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
-
+   
 
 
 
@@ -562,6 +570,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -596,6 +605,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -631,6 +641,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -666,6 +677,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -703,6 +715,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -735,6 +748,7 @@ Widget		wTank;
     }
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -775,13 +789,13 @@ int		iDum;
 
     ContainerResetAllAtomsFlags((CONTAINER) uUnit, ATOMNEEDSBUILD );
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
     MESSAGE(( "Building external coordinates for the UNIT\n" ));
 
 	/* Try to build geometries for simple rings */
 
-    BuildInternalsForSimpleRings( uUnit );
+    BuildInternalsForSimpleRings( (CONTAINER)uUnit );
 
 
 	/* Assign internal coordinates for all internals that */
@@ -829,6 +843,7 @@ int		iDum;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -860,7 +875,7 @@ int		iDum;
 
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
     MESSAGE(( "Building external coordinates for the UNIT\n" ));
 
@@ -917,6 +932,7 @@ int		iDum;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -937,6 +953,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
    TankSetState((TANK) wTank, TANKDRAW );
+   return NULL;
 }
 
 
@@ -954,6 +971,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKERASE );
+    return NULL;
 }
 
 
@@ -971,6 +989,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKSELECT );
+    return NULL;
 }
 
 
@@ -988,6 +1007,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKDRAGROTATE );
+    return NULL;
 }
 
 
@@ -1005,6 +1025,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKTWIST );
+    return NULL;
 }
 
 
@@ -1072,6 +1093,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1099,7 +1121,7 @@ Widget		wTank;
 
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
 		/* First turn off the ATOMTOUCHED flags for all ATOMs */
 
@@ -1121,7 +1143,8 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
-}
+    return NULL;
+} 
 
 
 /*
@@ -1146,7 +1169,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
 		/* First turn off the ATOMTOUCHED flags for all ATOMs */
 
@@ -1171,6 +1194,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1200,7 +1224,7 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
     lAtoms = lLoop((OBJEKT) uUnit, ATOMS );
     while ( aAtom = (ATOM)oNext(&lAtoms) ) {
 	if ( bAtomFlagsSet( aAtom, ATOMSELECTED ) ) {
@@ -1210,6 +1234,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1236,7 +1261,7 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
     lAtoms = lLoop((OBJEKT) uUnit, ATOMS );
     while ( aAtom = (ATOM)oNext(&lAtoms) ) {
 	if ( !bAtomFlagsSet( aAtom, ATOMSELECTED ) ) {
@@ -1246,6 +1271,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1270,11 +1296,12 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
     if ( uUnit == NULL ) 
-	return;
+	return NULL;
     ContainerResetAllAtomsFlags((CONTAINER) uUnit, ATOMNOTDISPLAYED );
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1311,6 +1338,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1364,6 +1392,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 /*
@@ -1406,9 +1435,9 @@ XAUESensitiveUnit( Widget wCur, caddr_t 
 	unit->bTableExist = FALSE;
       }
   }
+    return NULL;
 }
 
-
 /*
  *	XAUEEditSelectedAtoms
  *
@@ -1475,6 +1504,7 @@ XAUEEditSelectedAtoms( Widget wCur, cadd
   
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1508,6 +1538,7 @@ ATOM		aAtom;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1541,13 +1572,13 @@ ATOM		aAtom;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
 
 
 
-
 /*
  *	XAUEPrintAllInternals
  *
@@ -1609,6 +1640,7 @@ STRING		s1, s2, s3, s4;
     }
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1653,6 +1685,7 @@ UNIT		uUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1694,6 +1727,7 @@ UNIT		uUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL; 
 }
 
 
@@ -1734,13 +1768,13 @@ UNIT		uUnit, uOtherUnit, uTempUnit;
 	VP0(( "Import: no unit selected.\n" ));
     	DisplayerReleaseUpdates(); 
     	PopCurrentPrintSink();
-	return;
+	return NULL;
     }
     if ( iObjectType(uOtherUnit) != UNITid ) {
 	VP0(( "Only UNITs can be imported.\n" ));
     	DisplayerReleaseUpdates(); 
     	PopCurrentPrintSink();
-	return;
+	return NULL;
     }
 
 		/* Make a copy of the other UNIT and join it to the first */
@@ -1753,6 +1787,7 @@ UNIT		uUnit, uOtherUnit, uTempUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1774,7 +1809,7 @@ UNIT		uUnit;
 		/* If a MINIMIZER is defined then do not exit */
 
 
-    if ( zmXAUEMinimizer(wCur) != NULL ) return;
+    if ( zmXAUEMinimizer(wCur) != NULL ) return NULL;
 
     MESSAGE(( "Discarding changes\n" ));
 
@@ -1790,6 +1825,7 @@ UNIT		uUnit;
     GiUnitEditors--;
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1831,6 +1867,7 @@ XAUETankWidgetRegister( Widget wCur, cad
 
     zXAUESetTank( wCur, wCur );
 
+    return NULL;
 }
 
 
@@ -1861,6 +1898,7 @@ int		iSink;
     if (zwXAUETank(wCur) != (Widget)NULL)
       TankDefinePrintSink((TANK) zwXAUETank(wCur), iSink);
 
+    return NULL;
 }
 
 
@@ -1899,6 +1937,7 @@ XAUERegisterUnitEditor( Widget wShell, c
 	       (GENP)wShell );
   
   GiUnitEditors++;
+  return NULL;
 }
 
 
@@ -2002,6 +2041,5 @@ XAUEInitialize( XtAppContext app )
     WCLREG( "XAUERegisterUnitEditor", XAUERegisterUnitEditor );
 
     WCLREG( "XAUESensitiveUnit",    XAUESensitiveUnit    );
-    WCLREG( "XAUECheckUnitEdit",    XAUECheckUnitEdit    );
-
+    WCLREG( "XAUECheckUnitEdit",    XAUECheckUnitEdit    );       
 }
------------------------------------------------------------------------------

Temporary workarounds: build xleap in 32-bit mode