Ignore:
Timestamp:
Jan 31, 2012 12:13:39 PM (11 years ago)
Author:
srkline
Message:

Changes to the XOP code to upgrade to ToolKit? v6. Changes are the ones outlined in the Appendix A of the TK6 manual. SOme of the XOP support routines and the #pragma for 2-byte structures have changed. Per Howard Rodstein, there is no need to change the c files to cpp. c should work and compile just fine.

These changes work correctly on my mac. Next is to make sure that they work correctly on the two build machines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/XOP_Dev/MonteCarlo/DebyeSpheres.c

    r815 r834  
    1010 
    1111// Prototypes 
    12 HOST_IMPORT void main(IORecHandle ioRecHandle); 
     12HOST_IMPORT int main(IORecHandle ioRecHandle); 
    1313 
    1414// Custom error codes 
    15 #define REQUIRES_IGOR_200 1 + FIRST_XOP_ERR 
     15//#define REQUIRES_IGOR_200 1 + FIRST_XOP_ERR 
    1616#define NON_EXISTENT_WAVE 2 + FIRST_XOP_ERR 
    1717#define REQUIRES_SP_OR_DP_WAVE 3 + FIRST_XOP_ERR 
     
    107107// 
    108108    npt = (int) WavePoints(p->xwavH);   //wavePoints returns long, number of XYZ points 
    109         xv = WaveData(p->xwavH);                //xyz locations 
    110         yv = WaveData(p->ywavH); 
    111         zv = WaveData(p->zwavH); 
    112         rv = WaveData(p->rhowavH); 
     109        xv = (double*)WaveData(p->xwavH);               //xyz locations 
     110        yv = (double*)WaveData(p->ywavH); 
     111        zv = (double*)WaveData(p->zwavH); 
     112        rv = (double*)WaveData(p->rhowavH); 
    113113     
    114114         
     
    204204        // 
    205205    npt = (int) WavePoints(p->xwavH);   //wavePoints returns long, number of XYZ points 
    206         xv = WaveData(p->xwavH);                //xyz locations 
    207         yv = WaveData(p->ywavH); 
    208         zv = WaveData(p->zwavH); 
     206        xv = (double*)WaveData(p->xwavH);               //xyz locations 
     207        yv = (double*)WaveData(p->ywavH); 
     208        zv = (double*)WaveData(p->zwavH); 
    209209         
    210210        p1 = (int) p->p1; 
     
    290290         
    291291         
    292         xv = WaveData(p->xwavH);                //xyz locations 
    293         yv = WaveData(p->ywavH); 
    294         zv = WaveData(p->zwavH); 
    295         bv = WaveData(p->bwavH); 
     292        xv = (double*)WaveData(p->xwavH);               //xyz locations 
     293        yv = (double*)WaveData(p->ywavH); 
     294        zv = (double*)WaveData(p->zwavH); 
     295        bv = (double*)WaveData(p->bwavH); 
    296296         
    297297        grid = p->grid; 
     
    420420    numBins = (int) WavePoints(p->bwavH);       //wavePoints returns long, number of points in bin wave 
    421421         
    422         xv = WaveData(p->xwavH);                //xyz locations 
    423         yv = WaveData(p->ywavH); 
    424         zv = WaveData(p->zwavH); 
    425         rho = WaveData(p->rhowavH); 
    426         SLDLook = WaveData(p->SLDLookH); 
    427         PSFid = WaveData(p->PSFidH);                    //this one is 2D 
     422        xv = (double*)WaveData(p->xwavH);               //xyz locations 
     423        yv = (double*)WaveData(p->ywavH); 
     424        zv = (double*)WaveData(p->zwavH); 
     425        rho = (double*)WaveData(p->rhowavH); 
     426        SLDLook = (double*)WaveData(p->SLDLookH); 
     427        PSFid = (double*)WaveData(p->PSFidH);                   //this one is 2D 
    428428         
    429429        p1 = (int) p->p1; 
     
    517517        return kExpectedNT_FP64; 
    518518    } 
    519         x = WaveData(p->bwavH); 
     519        x = (double*)WaveData(p->bwavH); 
    520520        n = (int)(p->nIn);                      // not sure that the negative input will be properly cast to int 
    521521         
Note: See TracChangeset for help on using the changeset viewer.