diff -ruN usf_export-dist/Makefile_osx_template usf_export/Makefile_osx_template --- usf_export-dist/Makefile_osx_template 2011-04-08 01:54:06.000000000 -0700 +++ usf_export/Makefile_osx_template 2014-03-09 19:51:45.000000000 -0700 @@ -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.dylib @PREFIX@/lib/libccp4c.dylib EXEC = PROGRAMNAME INCL= Makefile_osx SUBS = diff -ruN usf_export-dist/gklib/f2c.h usf_export/gklib/f2c.h --- 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 diff -ruN usf_export-dist/gklib/pckrho.c usf_export/gklib/pckrho.c --- 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_ */ + diff -ruN usf_export-dist/gklib/pckrho.f usf_export/gklib/pckrho.f --- 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