--- usf_export-dist/Makefile_osx_template	2011-04-08 10:54:06.000000000 +0200
+++ usf_export/Makefile_osx_template	2016-10-07 13:54:40.000000000 +0200
@@ -1,5 +1,5 @@
 #
-OBJ=	PROGRAMNAME.o ../gklib/osx_kleylib  ../ccp4libs_latest_m32_osx/libccp4f.a  ../ccp4libs_latest_m32_osx/libccp4c.a
+OBJ=	PROGRAMNAME.o ../gklib/osx_kleylib  @PREFIX@/lib/libccp4f.0.dylib  @PREFIX@/lib/libccp4c.0.dylib
 EXEC =	PROGRAMNAME
 INCL=	Makefile_osx
 SUBS = 
@@ -9,11 +9,11 @@
 
 fc =	 gfortran -DOSX
 
-opt= -O -u -ffixed-line-length-132 -m32 -I..
-link= -O
+opt= -O -std=legacy -ffixed-line-length-132 -m64 -I..
+link= -O ../gklib/osx_kleylib @PREFIX@/lib/libccp4f.0.dylib @PREFIX@/lib/libccp4c.0.dylib
 
 $(EXEC):	$(OBJ) $(SUBS)
-	$(fc) $(link) -o $(EXEC) $(SUBS) $(OBJ) $(STATIC) -m32 ; strip $(EXEC)
+	$(fc) $(link) -o $(EXEC) $(SUBS) $(OBJ) $(STATIC) -m64 ; strip $(EXEC)
 
 PROGRAMNAME.o:	PROGRAMNAME.fpp $(INCL)
 	$(fc) $(opt) -c PROGRAMNAME.fpp
--- usf_export-dist/gklib/make_fresh_gklib.csh	2011-04-08 10:52:34.000000000 +0200
+++ usf_export/gklib/make_fresh_gklib.csh	2016-10-07 13:54:40.000000000 +0200
@@ -29,7 +29,7 @@
 set lib=osx_kleylib
 ##set subdir=os
 
-set fort="gfortran -D$OS -m$int_size -O -u -check_bounds -std=legacy -ffixed-line-length-132"
+set fort="gfortran -D$OS -m$int_size -O -u -fcheck=bounds -std=legacy -ffixed-line-length-132"
 
 set ccom="gcc -c -g -D$OS -m$int_size"
 
--- usf_export-dist/gklib/f2c.h	1969-12-31 16:00:00.000000000 -0800
+++ usf_export/gklib/f2c.h	2014-03-09 19:52:06.000000000 -0700
@@ -0,0 +1,223 @@
+/* f2c.h  --  Standard Fortran to C header file */
+
+/**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
+
+	- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
+
+#ifndef F2C_INCLUDE
+#define F2C_INCLUDE
+
+typedef long int integer;
+typedef unsigned long int uinteger;
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
+typedef long int logical;
+typedef short int shortlogical;
+typedef char logical1;
+typedef char integer1;
+#ifdef INTEGER_STAR_8	/* Adjust for integer*8. */
+typedef long long longint;		/* system-dependent */
+typedef unsigned long long ulongint;	/* system-dependent */
+#define qbit_clear(a,b)	((a) & ~((ulongint)1 << (b)))
+#define qbit_set(a,b)	((a) |  ((ulongint)1 << (b)))
+#endif
+
+#define TRUE_ (1)
+#define FALSE_ (0)
+
+/* Extern is for use with -E */
+#ifndef Extern
+#define Extern extern
+#endif
+
+/* I/O stuff */
+
+#ifdef f2c_i2
+/* for -i2 */
+typedef short flag;
+typedef short ftnlen;
+typedef short ftnint;
+#else
+typedef long int flag;
+typedef long int ftnlen;
+typedef long int ftnint;
+#endif
+
+/*external read, write*/
+typedef struct
+{	flag cierr;
+	ftnint ciunit;
+	flag ciend;
+	char *cifmt;
+	ftnint cirec;
+} cilist;
+
+/*internal read, write*/
+typedef struct
+{	flag icierr;
+	char *iciunit;
+	flag iciend;
+	char *icifmt;
+	ftnint icirlen;
+	ftnint icirnum;
+} icilist;
+
+/*open*/
+typedef struct
+{	flag oerr;
+	ftnint ounit;
+	char *ofnm;
+	ftnlen ofnmlen;
+	char *osta;
+	char *oacc;
+	char *ofm;
+	ftnint orl;
+	char *oblnk;
+} olist;
+
+/*close*/
+typedef struct
+{	flag cerr;
+	ftnint cunit;
+	char *csta;
+} cllist;
+
+/*rewind, backspace, endfile*/
+typedef struct
+{	flag aerr;
+	ftnint aunit;
+} alist;
+
+/* inquire */
+typedef struct
+{	flag inerr;
+	ftnint inunit;
+	char *infile;
+	ftnlen infilen;
+	ftnint	*inex;	/*parameters in standard's order*/
+	ftnint	*inopen;
+	ftnint	*innum;
+	ftnint	*innamed;
+	char	*inname;
+	ftnlen	innamlen;
+	char	*inacc;
+	ftnlen	inacclen;
+	char	*inseq;
+	ftnlen	inseqlen;
+	char 	*indir;
+	ftnlen	indirlen;
+	char	*infmt;
+	ftnlen	infmtlen;
+	char	*inform;
+	ftnint	informlen;
+	char	*inunf;
+	ftnlen	inunflen;
+	ftnint	*inrecl;
+	ftnint	*innrec;
+	char	*inblank;
+	ftnlen	inblanklen;
+} inlist;
+
+#define VOID void
+
+union Multitype {	/* for multiple entry points */
+	integer1 g;
+	shortint h;
+	integer i;
+	/* longint j; */
+	real r;
+	doublereal d;
+	complex c;
+	doublecomplex z;
+	};
+
+typedef union Multitype Multitype;
+
+/*typedef long int Long;*/	/* No longer used; formerly in Namelist */
+
+struct Vardesc {	/* for Namelist */
+	char *name;
+	char *addr;
+	ftnlen *dims;
+	int  type;
+	};
+typedef struct Vardesc Vardesc;
+
+struct Namelist {
+	char *name;
+	Vardesc **vars;
+	int nvars;
+	};
+typedef struct Namelist Namelist;
+
+#define abs(x) ((x) >= 0 ? (x) : -(x))
+#define dabs(x) (doublereal)abs(x)
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#define dmin(a,b) (doublereal)min(a,b)
+#define dmax(a,b) (doublereal)max(a,b)
+#define bit_test(a,b)	((a) >> (b) & 1)
+#define bit_clear(a,b)	((a) & ~((uinteger)1 << (b)))
+#define bit_set(a,b)	((a) |  ((uinteger)1 << (b)))
+
+/* procedure parameter types for -A and -C++ */
+
+#define F2C_proc_par_types 1
+#ifdef __cplusplus
+typedef int /* Unknown procedure type */ (*U_fp)(...);
+typedef shortint (*J_fp)(...);
+typedef integer (*I_fp)(...);
+typedef real (*R_fp)(...);
+typedef doublereal (*D_fp)(...), (*E_fp)(...);
+typedef /* Complex */ VOID (*C_fp)(...);
+typedef /* Double Complex */ VOID (*Z_fp)(...);
+typedef logical (*L_fp)(...);
+typedef shortlogical (*K_fp)(...);
+typedef /* Character */ VOID (*H_fp)(...);
+typedef /* Subroutine */ int (*S_fp)(...);
+#else
+typedef int /* Unknown procedure type */ (*U_fp)();
+typedef shortint (*J_fp)();
+typedef integer (*I_fp)();
+typedef real (*R_fp)();
+typedef doublereal (*D_fp)(), (*E_fp)();
+typedef /* Complex */ VOID (*C_fp)();
+typedef /* Double Complex */ VOID (*Z_fp)();
+typedef logical (*L_fp)();
+typedef shortlogical (*K_fp)();
+typedef /* Character */ VOID (*H_fp)();
+typedef /* Subroutine */ int (*S_fp)();
+#endif
+/* E_fp is for real functions when -R is not specified */
+typedef VOID C_f;	/* complex function */
+typedef VOID H_f;	/* character function */
+typedef VOID Z_f;	/* double complex function */
+typedef doublereal E_f;	/* real function with -R not specified */
+
+/* undef any lower-case symbols that your C compiler predefines, e.g.: */
+
+#ifndef Skip_f2c_Undefs
+#undef cray
+#undef gcos
+#undef mc68010
+#undef mc68020
+#undef mips
+#undef pdp11
+#undef sgi
+#undef sparc
+#undef sun
+#undef sun2
+#undef sun3
+#undef sun4
+#undef u370
+#undef u3b
+#undef u3b2
+#undef u3b5
+#undef unix
+#undef vax
+#endif
+#endif
--- usf_export-dist/gklib/pckrho.c	1969-12-31 16:00:00.000000000 -0800
+++ usf_export/gklib/pckrho.c	2014-03-09 19:52:15.000000000 -0700
@@ -0,0 +1,123 @@
+/* pckrho.f -- translated by f2c (version 20090411).
+   You must link the resulting object file with libf2c:
+	on Microsoft Windows system, link with libf2c.lib;
+	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
+	or, if you install libf2c.a in a standard place, with -lf2c -lm
+	-- in that order, at the end of the command line, as in
+		cc *.o -lf2c -lm
+	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
+
+		http://www.netlib.org/f2c/libf2c.zip
+*/
+
+#include "f2c.h"
+
+
+
+
+/* Subroutine */ int pckrho_(real *sav, integer *ix, integer *iy, integer *iz,
+	 integer *level, real *rho, integer *jx, integer *jy, integer *uvw)
+{
+    /* System generated locals */
+    integer sav_dim1, sav_dim2, sav_offset, rho_dim1, rho_offset, i__1, i__2;
+
+    /* Local variables */
+    static integer i__, j;
+
+
+/*          call pckrho (savrho, imxyz(1), imxyz(2), imxyz(3), i, */
+/*     $          rho, imxyz(iuvw(1)), imxyz(iuvw(2)), iuvw) */
+
+/* ---	Pack from a general level into in-core array, orderered (x,y,z) */
+
+
+
+/* ode ... */
+
+/* xyz */
+/*        print *,'IX,IY,IZ    - ',ix, iy, iz */
+/*        print *,'JX,JY,LEVEL - ',jx,jy,level */
+/*        print *,'UVW         - ',uvw */
+
+    /* Parameter adjustments */
+    sav_dim1 = *ix;
+    sav_dim2 = *iy;
+    sav_offset = 1 + sav_dim1 * (1 + sav_dim2);
+    sav -= sav_offset;
+    rho_dim1 = *jx;
+    rho_offset = 1 + rho_dim1;
+    rho -= rho_offset;
+    --uvw;
+
+    /* Function Body */
+    if (uvw[1] == 1 && uvw[2] == 2 && uvw[3] == 3) {
+	i__1 = *iy;
+	for (i__ = 1; i__ <= i__1; ++i__) {
+	    i__2 = *ix;
+	    for (j = 1; j <= i__2; ++j) {
+/* L100: */
+		sav[j + (i__ + *level * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    } else if (uvw[1] == 1 && uvw[2] == 3 && uvw[3] == 2) {
+	i__2 = *iz;
+	for (i__ = 1; i__ <= i__2; ++i__) {
+	    i__1 = *ix;
+	    for (j = 1; j <= i__1; ++j) {
+/* L110: */
+		sav[j + (*level + i__ * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    } else if (uvw[1] == 2 && uvw[2] == 1 && uvw[3] == 3) {
+	i__1 = *iy;
+	for (j = 1; j <= i__1; ++j) {
+	    i__2 = *ix;
+	    for (i__ = 1; i__ <= i__2; ++i__) {
+/* L120: */
+		sav[i__ + (j + *level * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    } else if (uvw[1] == 2 && uvw[2] == 3 && uvw[3] == 1) {
+	i__2 = *iz;
+	for (i__ = 1; i__ <= i__2; ++i__) {
+	    i__1 = *iy;
+	    for (j = 1; j <= i__1; ++j) {
+/* L130: */
+		sav[*level + (j + i__ * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    } else if (uvw[1] == 3 && uvw[2] == 1 && uvw[3] == 2) {
+	i__1 = *ix;
+	for (i__ = 1; i__ <= i__1; ++i__) {
+/* xyz */
+/*          call ivalut (' I(x) now :',1,i) */
+	    i__2 = *iz;
+	    for (j = 1; j <= i__2; ++j) {
+/* xyz */
+/*            call ivalut (' J(z) now :',1,j) */
+/*            call rvalut (' RHO(j,i) :',1,rho(j,i)) */
+/*            call rvalut (' SAV(I,LEVEL,J) :',1,sav(i,level,j)) */
+/* L140: */
+		sav[i__ + (*level + j * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    } else if (uvw[1] == 3 && uvw[2] == 2 && uvw[3] == 1) {
+	i__2 = *iy;
+	for (i__ = 1; i__ <= i__2; ++i__) {
+	    i__1 = *iz;
+	    for (j = 1; j <= i__1; ++j) {
+/* L150: */
+		sav[*level + (i__ + j * sav_dim2) * sav_dim1] = rho[j + i__ * 
+			rho_dim1];
+	    }
+	}
+    }
+
+    return 0;
+} /* pckrho_ */
+
--- usf_export-dist/gklib/pckrho.f	2010-02-02 09:15:11.000000000 -0800
+++ usf_export/gklib/pckrho.f	1969-12-31 16:00:00.000000000 -0800
@@ -1,57 +0,0 @@
-c
-c
-c
-	subroutine pckrho (sav, ix, iy, iz, level, rho, jx, jy, uvw)
-c
-c          call pckrho (savrho, imxyz(1), imxyz(2), imxyz(3), i,
-c     $          rho, imxyz(iuvw(1)), imxyz(iuvw(2)), iuvw)
-c
-c ---	Pack from a general level into in-core array, orderered (x,y,z)
-c
-	implicit none
-c
-	integer ix, iy, iz, level, jx, jy, uvw(3)
-	real sav(ix,iy,iz), rho(jx, jy)
-	integer i, j
-c
-code ...
-c
-cxyz
-c        print *,'IX,IY,IZ    - ',ix, iy, iz
-c        print *,'JX,JY,LEVEL - ',jx,jy,level
-c        print *,'UVW         - ',uvw
-c
-	if (uvw(1) .eq. 1 .and. uvw(2) .eq. 2 .and. uvw(3) .eq. 3) then
-	  do 100 i=1,iy
-	  do 100 j=1,ix
-100	    sav(j,i,level) = rho(j,i)
-	else if (uvw(1) .eq. 1 .and. uvw(2) .eq. 3 .and. uvw(3) .eq. 2) then
-	  do 110 i=1,iz
-	  do 110 j=1,ix
-110	    sav(j,level,i) = rho(j,i)
-	else if (uvw(1) .eq. 2 .and. uvw(2) .eq. 1 .and. uvw(3) .eq. 3) then
-	  do 120 j=1,iy
-	  do 120 i=1,ix
-120	    sav(i,j,level) = rho(j,i)
-	else if (uvw(1) .eq. 2 .and. uvw(2) .eq. 3 .and. uvw(3) .eq. 1) then
-	  do 130 i=1,iz
-	  do 130 j=1,iy
-130	    sav(level,j,i) = rho(j,i)
-	else if (uvw(1) .eq. 3 .and. uvw(2) .eq. 1 .and. uvw(3) .eq. 2) then
-	  do 140 i=1,ix
-cxyz
-c          call ivalut (' I(x) now :',1,i)
-	  do 140 j=1,iz
-cxyz
-c            call ivalut (' J(z) now :',1,j)
-c            call rvalut (' RHO(j,i) :',1,rho(j,i))
-c            call rvalut (' SAV(I,LEVEL,J) :',1,sav(i,level,j))
-140	    sav(i,level,j) = rho(j,i)
-	else if (uvw(1) .eq. 3 .and. uvw(2) .eq. 2 .and. uvw(3) .eq. 1) then
-	  do 150 i=1,iy
-	  do 150 j=1,iz
-150	    sav(level,i,j) = rho(j,i)
-	end if
-c
-	return
-	end
--- usf_export-dist/gklib/fmalloc.c	2010-02-02 18:15:11.000000000 +0100
+++ usf_export/gklib/fmalloc.c	2016-10-07 13:54:40.000000000 +0200
@@ -21,7 +21,7 @@
 #ifdef ALPHA
 typedef long address_type;
 #else
-typedef int address_type;
+typedef void *address_type;
 #endif
 
 
--- usf_export-dist/ave/ave.f	2010-01-19 17:49:30.000000000 +0100
+++ usf_export/ave/ave.f	2016-10-07 13:54:40.000000000 +0200
@@ -31,7 +31,7 @@
 c      real mapa(1), mapb(1)
 c      integer maskb(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/coma/coma.f	2008-06-25 17:08:36.000000000 +0200
+++ usf_export/coma/coma.f	2016-10-07 13:54:40.000000000 +0200
@@ -31,7 +31,7 @@
 c      real mapin(1),mapout(1),mapdum(1),mapi(1),mapj(1)
 c      integer maski(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr,ieptr,igptr
       integer*8 fmalloc
 #else
--- usf_export-dist/comap/comap.f	2004-07-01 13:00:24.000000000 +0200
+++ usf_export/comap/comap.f	2016-10-07 13:54:40.000000000 +0200
@@ -22,7 +22,7 @@
 c      real mapa(1), mapb(1), mapc(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/comdem/comdem.f	2004-07-01 13:00:36.000000000 +0200
+++ usf_export/comdem/comdem.f	2016-10-07 13:54:40.000000000 +0200
@@ -21,7 +21,7 @@
 c      real mapa(1), mapb(1), mapc(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/dataman/dataman.f	2006-12-08 16:11:26.000000000 +0100
+++ usf_export/dataman/dataman.f	2016-10-07 13:54:40.000000000 +0200
@@ -26,7 +26,7 @@
 c
 c      integer hkl(1),morbit(1),rfree(1),malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr,ieptr,ifptr,igptr,ihptr
       integer*8 fmalloc
 #else
--- usf_export-dist/essens/essens.f	2004-07-01 12:50:36.000000000 +0200
+++ usf_export/essens/essens.f	2016-10-07 13:54:40.000000000 +0200
@@ -31,7 +31,7 @@
 c      real mapa(1), mapb(1)
 c      integer maskb(1), maskx(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr
       integer*8 fmalloc
 #else
--- usf_export-dist/imp/imp.f	2008-06-26 11:35:22.000000000 +0200
+++ usf_export/imp/imp.f	2016-10-07 13:54:40.000000000 +0200
@@ -25,7 +25,7 @@
 c      integer maskb(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/lsqman/lsqman.f	2008-11-26 19:05:00.000000000 +0100
+++ usf_export/lsqman/lsqman.f	2016-10-07 13:54:40.000000000 +0200
@@ -9,7 +9,7 @@
       character*12 prognm,vers
       parameter (prognm = 'LSQMAN', vers = '081126/9.7.9')
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/mama/mama.f	2010-02-03 16:58:39.000000000 +0100
+++ usf_export/mama/mama.f	2016-10-07 13:54:40.000000000 +0200
@@ -22,7 +22,7 @@
 c      integer maska(1),shadow(1),ibuff(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/mapfix/mapfix.f	2010-02-02 18:32:24.000000000 +0100
+++ usf_export/mapfix/mapfix.f	2016-10-07 13:54:40.000000000 +0200
@@ -19,7 +19,7 @@
 c      real mapa(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr
       integer*8 fmalloc
 #else
--- usf_export-dist/mave/mave.f	2008-09-01 14:33:32.000000000 +0200
+++ usf_export/mave/mave.f	2016-10-07 13:54:40.000000000 +0200
@@ -29,7 +29,7 @@
 c      real mapa(1), mapb(1)
 c      integer maskb(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr
       integer*8 fmalloc
 #else
--- usf_export-dist/prof/prof.f	2008-06-25 17:12:20.000000000 +0200
+++ usf_export/prof/prof.f	2016-10-07 13:54:40.000000000 +0200
@@ -31,7 +31,7 @@
 c      real mapa(1),mapb(1),mapc(1),mapd(1)
 c      integer maska(1),maskb(1),maskc(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr,ieptr,ifptr,igptr
       integer*8 fmalloc
 #else
--- usf_export-dist/solex/solex.f	2005-06-22 18:31:44.000000000 +0200
+++ usf_export/solex/solex.f	2016-10-07 13:54:40.000000000 +0200
@@ -27,7 +27,7 @@
 c      real mapa(1)
 c      integer maskb(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr
       integer*8 fmalloc
 #else
--- usf_export-dist/spancsi/spancsi.f	2008-06-25 13:09:48.000000000 +0200
+++ usf_export/spancsi/spancsi.f	2016-10-07 13:54:40.000000000 +0200
@@ -23,7 +23,7 @@
 c      real mapa(1), mapb(1), mapc(1)
 c      integer maskb(1), malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr
       integer*8 fmalloc
 #else
--- usf_export-dist/ncs6d/ncs6d.f	2008-06-25 16:57:56.000000000 +0200
+++ usf_export/ncs6d/ncs6d.f	2016-10-07 13:54:40.000000000 +0200
@@ -19,7 +19,7 @@
 c      real mapa(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr
       integer*8 fmalloc
 #else
--- usf_export-dist/o2d/o2d.f	2010-09-03 12:16:22.000000000 +0200
+++ usf_export/o2d/o2d.f	2016-10-07 13:54:40.000000000 +0200
@@ -64,7 +64,7 @@
       character prgnam*10,version*20
       parameter (prgnam = 'O2D', version = '070118/5.6.2')
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr,icptr,idptr
       integer*8 fmalloc
 #else
--- usf_export-dist/mapman/mapman.f	2010-02-03 09:19:43.000000000 +0100
+++ usf_export/mapman/mapman.f	2016-10-07 13:54:40.000000000 +0200
@@ -21,7 +21,7 @@
 c      real mapa(1),buffer(1)
 c      integer malloc
 c
-#ifdef ALPHA
+#if defined(ALPHA) || defined(__LP64__)
       integer*8 iaptr,ibptr
       integer*8 fmalloc
 #else
@@ -5281,7 +5281,7 @@
       integer imap,iunit,length,nxyz(3),i1,i2,i,indxra,ierr
       integer*2 first(256)
 c
-      logical litend,little,lbrix,lturbo
+      logical usf_litend,little,lbrix,lturbo
 c
       character brick*(*),how*(*),str*512
 c
@@ -5310,7 +5310,7 @@
         return
       end if
 c
-      little = litend()
+      little = usf_litend()
       if (little) then
         call prompt (' Little-endian machine; will swap bytes')
       else
--- usf_export-dist/gklib/putlin.f	2010-02-02 18:15:11.000000000 +0100
+++ usf_export/gklib/putlin.f	2016-10-07 13:54:40.000000000 +0200
@@ -1,7 +1,7 @@
 c
 c=====================================================
 c
-      subroutine putlin (iunit,line,lstop,ierr)
+      subroutine usf_putlin (iunit,line,lstop,ierr)
 c
 c ... PUTLIN - write LINE (1:leng1) to stream IUNIT
 c
--- usf_export-dist/mapman/mapman_subs.f	2010-02-03 09:19:43.000000000 +0100
+++ usf_export/mapman/mapman_subs.f	2016-10-07 13:54:40.000000000 +0200
@@ -374,7 +374,7 @@
 	integer*2 header(256)
 	byte box(8,8,8), v(4)
 	real prod,sigma
-        logical little,litend,lbrix
+        logical little,usf_litend,lbrix
         character str*512
 	equivalence (iv, v(1))
 c
@@ -382,7 +382,7 @@
 c
         ierr = -1
 c
-        little = litend()
+        little = usf_litend()
 c
 c ... set all four bytes of IV to zero
 c
@@ -3941,7 +3941,7 @@
 c
 c
 c
-      logical function litend ()
+      logical function usf_litend ()
 C
 C Check endedness, return true if little-ended (Vax-like),
 C false if big-ended (IBM-like)
@@ -3955,7 +3955,7 @@
 code ...
 c
       i=1
-      litend = (b(1) .ne. 0)
+      usf_litend = (b(1) .ne. 0)
 c
       return
       end
--- usf_export-dist/mappage/mappage.f	2008-07-10 15:17:54.000000000 +0200
+++ usf_export/mappage/mappage.f	2016-10-07 13:54:40.000000000 +0200
@@ -71,7 +71,7 @@
 	character file*80
 	integer i, j, level
 	integer*2 first(256)
-        logical  litend
+        logical  usf_litend
 c
       call gainit ('MAPPAGE','930615/1.0')
 c
@@ -118,7 +118,7 @@
 c ---	  Write out first record
 	    indxra = 1
 C+ Byte-swap header for little-ended machines only
-	    if (litend()) call bytswp (first)
+	    if (usf_litend()) call bytswp (first)
 	    write (12, rec=indxra) first
 	  end if
 100	  call paged (rho, imxyz(1), imxyz(2), i)
@@ -515,7 +515,7 @@
 c
 c
 c
-      logical function litend ()
+      logical function usf_litend ()
 C
 C Check endedness, return true if little-ended (Vax-like),
 C false if big-ended (IBM-like)
@@ -529,7 +529,7 @@
 code ...
 c
       i=1
-      litend = (b(1) .ne. 0)
+      usf_litend = (b(1) .ne. 0)
 c
       return
       end
--- usf_export-dist/moleman2/mole1_subs.f	2004-10-18 16:27:02.000000000 +0200
+++ usf_export/moleman2/mole1_subs.f	2016-10-07 13:54:40.000000000 +0200
@@ -959,56 +959,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Average temperature-factor per residue'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Min ',xmin,' Max ',xmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Ave ',ave,' Sdv ',sdv
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',ndo
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'XLABEL Residue',.false.,ierr)
+        call usf_putlin (iunit,'XLABEL Residue',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
+        call usf_putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',0,ndo+1,0,xmax+0.01*(xmax-xmin)
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
+        call usf_putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,ndo)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1078,56 +1078,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Radial temperature-factor plot'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',kmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Bin size (A) : ',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'XLABEL Distance from Centre-of-Gravity (A)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'YLABEL Average B in bin (A**2)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',-1,bin*float(kmax+1),0,1.01*bmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XLIMIT 0',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,kmax)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1203,56 +1203,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Average occupancy per residue'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Min ',xmin,' Max ',xmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Ave ',ave,' Sdv ',sdv
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',ndo
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'XLABEL Residue',.false.,ierr)
+        call usf_putlin (iunit,'XLABEL Residue',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
+        call usf_putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',0,ndo+1,0,xmax+0.01*(xmax-xmin)
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
+        call usf_putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,ndo)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1322,56 +1322,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Radial occupancy plot'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',kmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Bin size (A) : ',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'XLABEL Distance from Centre-of-Gravity (A)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'YLABEL Average B in bin (A**2)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',-1,bin*float(kmax+1),0,1.01*bmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XLIMIT 0',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,kmax)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1791,11 +1791,11 @@
       write (f4,5000,err=1000) 'REMARK',line(1:leng1(line))
 c
       line = 'REMARK Generated from PDB file '//pdbfil
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       line = 'REMARK Selected atoms: '//selstr
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       write (f4,5000,err=1000) 'REMARK'
@@ -1922,7 +1922,7 @@
       write (f4,5000,err=1000) 'REMARK',line(1:leng1(line))
 c
       line = 'REMARK Generated from PDB file '//pdbfil
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       write (f4,5000,err=1000) 'REMARK'
--- usf_export-dist/moleman2/moleman2_subs.f	2010-02-03 09:35:53.000000000 +0100
+++ usf_export/moleman2/moleman2_subs.f	2016-10-07 13:54:40.000000000 +0200
@@ -959,56 +959,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Average temperature-factor per residue'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Min ',xmin,' Max ',xmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Ave ',ave,' Sdv ',sdv
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',ndo
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'XLABEL Residue',.false.,ierr)
+        call usf_putlin (iunit,'XLABEL Residue',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
+        call usf_putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',0,ndo+1,0,xmax+0.01*(xmax-xmin)
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
+        call usf_putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,ndo)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1078,56 +1078,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Radial temperature-factor plot'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',kmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Bin size (A) : ',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'XLABEL Distance from Centre-of-Gravity (A)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'YLABEL Average B in bin (A**2)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',-1,bin*float(kmax+1),0,1.01*bmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XLIMIT 0',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,kmax)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1203,56 +1203,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Average occupancy per residue'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Min ',xmin,' Max ',xmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Ave ',ave,' Sdv ',sdv
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',ndo
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'XLABEL Residue',.false.,ierr)
+        call usf_putlin (iunit,'XLABEL Residue',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
+        call usf_putlin (iunit,'YLABEL Average B-factor',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',0,ndo+1,0,xmax+0.01*(xmax-xmin)
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
+        call usf_putlin (iunit,'XLIMIT 1.0 1.0',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,ndo)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1322,56 +1322,56 @@
 c
         call stamp (line)
         line = 'REMARK '//line
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Radial occupancy plot'//
      +    ' for selected atoms'
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Generated from PDB file '//pdbfil
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         line = 'REMARK Selected atoms: '//selstr
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'NPOINT',kmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'REMARK Bin size (A) : ',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'COLOUR 4',.false.,ierr)
+        call usf_putlin (iunit,'COLOUR 4',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'XLABEL Distance from Centre-of-Gravity (A)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
-        call putlin (iunit,
+        call usf_putlin (iunit,
      +    'YLABEL Average B in bin (A**2)',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XYVIEW',-1,bin*float(kmax+1),0,1.01*bmax
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         write (line,*) 'XLIMIT 0',bin
         call pretty (line)
-        call putlin (iunit,line,.false.,ierr)
+        call usf_putlin (iunit,line,.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
-        call putlin (iunit,'YVALUE *',.false.,ierr)
+        call usf_putlin (iunit,'YVALUE *',.false.,ierr)
         if (ierr .ne. 0) goto 1000
         write (iunit,'(10f8.2)',err=1000) (rbuf(i),i=1,kmax)
 c
-        call putlin (iunit,'END',.false.,ierr)
+        call usf_putlin (iunit,'END',.false.,ierr)
         if (ierr .ne. 0) goto 1000
 c
         close (iunit)
@@ -1791,11 +1791,11 @@
       write (f4,5000,err=1000) 'REMARK',line(1:leng1(line))
 c
       line = 'REMARK Generated from PDB file '//pdbfil
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       line = 'REMARK Selected atoms: '//selstr
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       write (f4,5000,err=1000) 'REMARK'
@@ -1922,7 +1922,7 @@
       write (f4,5000,err=1000) 'REMARK',line(1:leng1(line))
 c
       line = 'REMARK Generated from PDB file '//pdbfil
-      call putlin (f4,line,.false.,ierr)
+      call usf_putlin (f4,line,.false.,ierr)
       if (ierr .ne. 0) goto 1000
 c
       write (f4,5000,err=1000) 'REMARK'
--- usf_export-dist/oops/oops.f	2000-12-12 00:35:08.000000000 +0100
+++ usf_export/oops/oops.f	2016-10-07 13:54:40.000000000 +0200
@@ -1912,15 +1912,15 @@
         else
           myline = '<html><head><title>OOPS Critique of model ' //
      +      molnam // '</title>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
          myline = '</head><body bgcolor="#fefefe">'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
            myline = '<h1>OOPS Critique of model ' //
      +      molnam // '</h1>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
           myline = '<table border=3 cellspacing=3> <tr> ' //
      +      '<th>Residue</th><th>Remarks</th></tr>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
         end if
       end if
       write (*,*)
@@ -2645,7 +2645,7 @@
             call pretty (gktext)
             myline = '<tr><td>' // gktext(1:leng1(gktext)) //
      +               '</td><td>'
-            call putlin (kunit,myline,.false.,ierr)
+            call usf_putlin (kunit,myline,.false.,ierr)
           end if
 c
           line = filnam
@@ -3122,11 +3122,11 @@
         call gkdate (myline)
         myline = '</table><hr noshade>Generated at ' //
      +    myline(1:leng1(myline))
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         myline = 'by ' // prognm // ' version ' // vers
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         myline = '</body></html>'
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         close (kunit)
       end if
 c
--- usf_export-dist/oops2/oops2.f	2007-02-22 14:03:38.000000000 +0100
+++ usf_export/oops2/oops2.f	2016-10-07 13:54:40.000000000 +0200
@@ -1876,15 +1876,15 @@
         else
           myline = '<html><head><title>OOPS Critique of model ' //
      +      molnam // '</title>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
          myline = '</head><body bgcolor="#fefefe">'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
            myline = '<h1>OOPS Critique of model ' //
      +      molnam // '</h1>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
           myline = '<table border=3 cellspacing=3> <tr> ' //
      +      '<th>Residue</th><th>Remarks</th></tr>'
-          call putlin (kunit,myline,.false.,ierr)
+          call usf_putlin (kunit,myline,.false.,ierr)
         end if
       end if
       write (*,*)
@@ -2807,7 +2807,7 @@
             call pretty (gktext)
             myline = '<tr><td>' // gktext(1:leng1(gktext)) //
      +               '</td><td>'
-            call putlin (kunit,myline,.false.,ierr)
+            call usf_putlin (kunit,myline,.false.,ierr)
           end if
 c
           line = filnam
@@ -3337,11 +3337,11 @@
         call gkdate (myline)
         myline = '</table><hr noshade>Generated at ' //
      +    myline(1:leng1(myline))
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         myline = 'by ' // prognm // ' version ' // vers
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         myline = '</body></html>'
-        call putlin (kunit,myline,.false.,ierr)
+        call usf_putlin (kunit,myline,.false.,ierr)
         close (kunit)
       end if
 c
