Changeset 998 for sans


Ignore:
Timestamp:
May 11, 2016 3:39:58 PM (7 years ago)
Author:
srkline
Message:

fixes to update to Toolkit 7, Xcode 7, and 64-bit compile

Location:
sans/XOP_Dev/SANSAnalysis
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sans/XOP_Dev/SANSAnalysis/XOP/Func2D.c

    r834 r998  
    1616#include <math.h> 
    1717#include "Func2D.h"                                             // declarations for the 2D functions in this file 
     18#include "c_disperser.h"                // declaration of weight_dispersion function 
    1819 
    1920int 
     
    136137                                        // will produce a NAN at phi_cyl=0 and 45 degrees 
    137138                                        pars[5] = acos(-1.0)/n_slices * i_theta; 
    138                                         if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
     139                                        if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
    139140                                                //continue; 
    140141                                                pars[5] += 0.00001; 
     
    264265                                        // TODO: integrate from 0 to pi/2 instead of 0 to pi 
    265266                                        pars[8] = acos(-1.0)/n_slices * i_theta; 
    266                                         if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
     267                                        if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
    267268                                                //continue; 
    268269                                                pars[8] += 0.00001; 
     
    404405                                        // will produce a NAN at phi_cyl=0 and 45 degrees 
    405406                                        pars[5] = acos(-1.0)/n_slices * i_theta; 
    406                                         if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
     407                                        if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
    407408                                                //continue; 
    408409                                                pars[5] += 0.00001; 
     
    551552                                        pars[6] = acos(-1.0)/n_slices * i_theta; 
    552553                                         
    553                                          if( fabs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
     554                                         if( abs(i_theta / n_slices) - 0.5 < 0.000001 ) { 
    554555                                                //continue; 
    555556                                                pars[6] += 0.00001; 
  • sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.c

    r834 r998  
    1818#include "Func2D.h" 
    1919 
    20 static long 
     20static XOPIORecResult 
    2121RegisterFunction() 
    2222{ 
    2323        int funcIndex; 
    2424         
    25         funcIndex = GetXOPItem(0);                      // Which function invoked ? 
     25        funcIndex = (int)GetXOPItem(0);                 // Which function invoked ? 
    2626        switch (funcIndex) { 
    2727                // 
     
    2929                // 
    3030                case 0:                                                 // y = MultiShellX(w,x) (curve fitting function). 
    31                         return((long)MultiShellSphereX);        // This function is called using the direct method. 
     31                        return((XOPIORecResult)MultiShellSphereX);      // This function is called using the direct method. 
    3232                        break; 
    3333                case 1:                                                 // y = PolyMultiShellX(w,x) (curve fitting function). 
    34                         return((long)PolyMultiShellX);  // This function is called using the direct method. 
     34                        return((XOPIORecResult)PolyMultiShellX);        // This function is called using the direct method. 
    3535                        break; 
    3636                case 2:                                                 // y = SphereFormX(w,x) (curve fitting function). 
    37                         return((long)SphereFormX);      // This function is called using the direct method. 
     37                        return((XOPIORecResult)SphereFormX);    // This function is called using the direct method. 
    3838                        break; 
    3939                case 3:                                                 // y = CoreShellX(w,x) (curve fitting function). 
    40                         return((long)CoreShellSphereX); // This function is called using the direct method. 
     40                        return((XOPIORecResult)CoreShellSphereX);       // This function is called using the direct method. 
    4141                        break; 
    4242                case 4:                                                 // y = PolyCoreX(w,x) (curve fitting function). 
    43                         return((long)PolyCoreFormX);    // This function is called using the direct method. 
     43                        return((XOPIORecResult)PolyCoreFormX);  // This function is called using the direct method. 
    4444                        break; 
    4545                case 5:                                                 // y = PolyCoreShellRatioX(w,x) (curve fitting function). 
    46                         return((long)PolyCoreShellRatioX);      // This function is called using the direct method. 
     46                        return((XOPIORecResult)PolyCoreShellRatioX);    // This function is called using the direct method. 
    4747                        break; 
    4848                case 6:                                                 // y = Vesicle_ULX(w,x) (curve fitting function). 
    49                         return((long)VesicleFormX);     // This function is called using the direct method. 
     49                        return((XOPIORecResult)VesicleFormX);   // This function is called using the direct method. 
    5050                        break; 
    5151                case 7:                                                 // y = SchulzSpheresX(w,x) (curve fitting function). 
    52                         return((long)SchulzSpheresX);   // This function is called using the direct method. 
     52                        return((XOPIORecResult)SchulzSpheresX); // This function is called using the direct method. 
    5353                        break; 
    5454                case 8:                                                 // y = PolyRectSpheresX(w,x) (curve fitting function). 
    55                         return((long)PolyRectSpheresX); // This function is called using the direct method. 
     55                        return((XOPIORecResult)PolyRectSpheresX);       // This function is called using the direct method. 
    5656                        break; 
    5757                case 9:                                                 // y = PolyHardSphereIntensityX(w,x) (curve fitting function). 
    58                         return((long)PolyHardSpheresX); // This function is called using the direct method. 
     58                        return((XOPIORecResult)PolyHardSpheresX);       // This function is called using the direct method. 
    5959                        break; 
    6060                case 10:                                                        // y = BimodalSchulzSpheresX(w,x) (curve fitting function). 
    61                         return((long)BimodalSchulzSpheresX);    // This function is called using the direct method. 
     61                        return((XOPIORecResult)BimodalSchulzSpheresX);  // This function is called using the direct method. 
    6262                        break; 
    6363                case 11:                                                        // y = GaussPolySphereX(w,x) (curve fitting function). 
    64                         return((long)GaussSpheresX);    // This function is called using the direct method. 
     64                        return((XOPIORecResult)GaussSpheresX);  // This function is called using the direct method. 
    6565                        break; 
    6666                case 12:                                                        // y = LogNormalPolySphereX(w,x) (curve fitting function). 
    67                         return((long)LogNormalSphereX); // This function is called using the direct method. 
     67                        return((XOPIORecResult)LogNormalSphereX);       // This function is called using the direct method. 
    6868                        break; 
    6969                case 13:                                                        // y = BinaryHSX(w,x) (curve fitting function). 
    70                         return((long)BinaryHSX);        // This function is called using the direct method. 
     70                        return((XOPIORecResult)BinaryHSX);      // This function is called using the direct method. 
    7171                        break; 
    7272                case 14:                                                        // y = BinaryHS_PSF11X(w,x) (curve fitting function). 
    73                         return((long)BinaryHS_PSF11X);  // This function is called using the direct method. 
     73                        return((XOPIORecResult)BinaryHS_PSF11X);        // This function is called using the direct method. 
    7474                        break; 
    7575        case 15:                                                        // y = BinaryHS_PSF12X(w,x) (curve fitting function). 
    76                         return((long)BinaryHS_PSF12X);  // This function is called using the direct method. 
     76                        return((XOPIORecResult)BinaryHS_PSF12X);        // This function is called using the direct method. 
    7777                        break; 
    7878                case 16:                                                        // y = BinaryHS_PSF22X(w,x) (curve fitting function). 
    79                         return((long)BinaryHS_PSF22X);  // This function is called using the direct method. 
     79                        return((XOPIORecResult)BinaryHS_PSF22X);        // This function is called using the direct method. 
    8080                        break; 
    8181                        //  
     
    8383                        // 
    8484                case 17:                                                        // y = CylinderFormX(w,x) (curve fitting function). 
    85                         return((long)CylinderFormX);    // This function is called using the direct method. 
     85                        return((XOPIORecResult)CylinderFormX);  // This function is called using the direct method. 
    8686                        break; 
    8787                case 18:                                                        // y = EllipCylFit76X(w,x) (curve fitting function). 
    88                         return((long)EllipCyl76X);      // This function is called using the direct method. 
     88                        return((XOPIORecResult)EllipCyl76X);    // This function is called using the direct method. 
    8989                        break; 
    9090                case 19:                                                        // y = EllipCylFit20X(w,x) (curve fitting function). 
    91                         return((long)EllipticalCylinderX);      // This function is called using the direct method. 
     91                        return((XOPIORecResult)EllipticalCylinderX);    // This function is called using the direct method. 
    9292                        break; 
    9393                case 20:                                                        // y = TriaxialEllipsoidX(w,x) (curve fitting function). 
    94                         return((long)TriaxialEllipsoidX);       // This function is called using the direct method. 
     94                        return((XOPIORecResult)TriaxialEllipsoidX);     // This function is called using the direct method. 
    9595                        break; 
    9696                case 21:                                                        // y = ParallelepipedX(w,x) (curve fitting function). 
    97                         return((long)ParallelepipedX);  // This function is called using the direct method. 
     97                        return((XOPIORecResult)ParallelepipedX);        // This function is called using the direct method. 
    9898                        break; 
    9999                case 22:                                                        // y = HollowCylinderX(w,x) (curve fitting function). 
    100                         return((long)HollowCylinderX);  // This function is called using the direct method. 
     100                        return((XOPIORecResult)HollowCylinderX);        // This function is called using the direct method. 
    101101                        break; 
    102102                case 23:                                                        // y = EllipsoidFormX(w,x) (curve fitting function). 
    103                         return((long)EllipsoidFormX);   // This function is called using the direct method. 
     103                        return((XOPIORecResult)EllipsoidFormX); // This function is called using the direct method. 
    104104                        break;         
    105105                case 24:                                                        // y = Cyl_PolyRadiusX(w,x) (curve fitting function). 
    106                         return((long)Cyl_PolyRadiusX);  // This function is called using the direct method. 
     106                        return((XOPIORecResult)Cyl_PolyRadiusX);        // This function is called using the direct method. 
    107107                        break;   
    108108                case 25:                                                        // y = Cyl_PolyLengthX(w,x) (curve fitting function). 
    109                         return((long)Cyl_PolyLengthX);  // This function is called using the direct method. 
     109                        return((XOPIORecResult)Cyl_PolyLengthX);        // This function is called using the direct method. 
    110110                        break;  
    111111                case 26:                                                        // y = CoreShellCylinderX(w,x) (curve fitting function). 
    112                         return((long)CoreShellCylinderX);       // This function is called using the direct method. 
     112                        return((XOPIORecResult)CoreShellCylinderX);     // This function is called using the direct method. 
    113113                        break; 
    114114                case 27:                                        // y = OblateFormX(w,x) (curve fitting function). 
    115                         return((long)OblateFormX);      // This function is called using the direct method. 
     115                        return((XOPIORecResult)OblateFormX);    // This function is called using the direct method. 
    116116                        break; 
    117117                case 28:                                        // y = ProlateFormX(w,x) (curve fitting function). 
    118                         return((long)ProlateFormX);     // This function is called using the direct method. 
     118                        return((XOPIORecResult)ProlateFormX);   // This function is called using the direct method. 
    119119                        break; 
    120120                case 29:                                        // y = FlexExclVolCylX(w,x) (curve fitting function). 
    121                         return((long)FlexExclVolCylX);  // This function is called using the direct method. 
     121                        return((XOPIORecResult)FlexExclVolCylX);        // This function is called using the direct method. 
    122122                        break;                         
    123123                case 30:                                        // y = FlexCyl_PolyLenX(w,x) (curve fitting function). 
    124                         return((long)FlexCyl_PolyLenX); // This function is called using the direct method. 
     124                        return((XOPIORecResult)FlexCyl_PolyLenX);       // This function is called using the direct method. 
    125125                        break; 
    126126                case 31:                                        // y = FlexCyl_PolyRadX(w,x) (curve fitting function). 
    127                         return((long)FlexCyl_PolyRadX); // This function is called using the direct method. 
     127                        return((XOPIORecResult)FlexCyl_PolyRadX);       // This function is called using the direct method. 
    128128                        break; 
    129129                case 32:                                        // y = FlexCyl_EllipX(w,x) (curve fitting function). 
    130                         return((long)FlexCyl_EllipX);   // This function is called using the direct method. 
     130                        return((XOPIORecResult)FlexCyl_EllipX); // This function is called using the direct method. 
    131131                        break; 
    132132                case 33:                                        // y = PolyCoShCylinderX(w,x) (curve fitting function). 
    133                         return((long)PolyCoShCylinderX);        // This function is called using the direct method. 
     133                        return((XOPIORecResult)PolyCoShCylinderX);      // This function is called using the direct method. 
    134134                        break; 
    135135                case 34:                                        // y = StackedDisksX(w,x) (curve fitting function). 
    136                         return((long)StackedDiscsX);    // This function is called using the direct method. 
     136                        return((XOPIORecResult)StackedDiscsX);  // This function is called using the direct method. 
    137137                        break; 
    138138                case 35:                                        // y = LamellarFFX(w,x) (curve fitting function). 
    139                         return((long)LamellarFFX);      // This function is called using the direct method. 
     139                        return((XOPIORecResult)LamellarFFX);    // This function is called using the direct method. 
    140140                        break; 
    141141                case 36:                                        // y = LamellarFF_HGX(w,x) (curve fitting function). 
    142                         return((long)LamellarFF_HGX);   // This function is called using the direct method. 
     142                        return((XOPIORecResult)LamellarFF_HGX); // This function is called using the direct method. 
    143143                        break; 
    144144                case 37:                                        // y = LamellarPSX(w,x) (curve fitting function). 
    145                         return((long)LamellarPSX);      // This function is called using the direct method. 
     145                        return((XOPIORecResult)LamellarPSX);    // This function is called using the direct method. 
    146146                        break; 
    147147                case 38:                                        // y = LamellarPS_HGX(w,x) (curve fitting function). 
    148                         return((long)LamellarPS_HGX);   // This function is called using the direct method. 
     148                        return((XOPIORecResult)LamellarPS_HGX); // This function is called using the direct method. 
    149149                        break; 
    150150                        // 
     
    152152                        // 
    153153                case 39:                                                        // y = TeubnerStreyModelX(w,x) (curve fitting function). 
    154                         return((long)TeubnerStreyModelX);       // This function is called using the direct method. 
     154                        return((XOPIORecResult)TeubnerStreyModelX);     // This function is called using the direct method. 
    155155                        break; 
    156156                case 40:                                                        // y = Power_Law_ModelX(w,x) (curve fitting function). 
    157                         return((long)Power_Law_ModelX); // This function is called using the direct method. 
     157                        return((XOPIORecResult)Power_Law_ModelX);       // This function is called using the direct method. 
    158158                        break; 
    159159                case 41:                                                        // y = Peak_Lorentz_ModelX(w,x) (curve fitting function). 
    160                         return((long)Peak_Lorentz_ModelX);      // This function is called using the direct method. 
     160                        return((XOPIORecResult)Peak_Lorentz_ModelX);    // This function is called using the direct method. 
    161161                        break; 
    162162                case 42:                                                        // y = Peak_Gauss_ModelX(w,x) (curve fitting function). 
    163                         return((long)Peak_Gauss_ModelX);        // This function is called using the direct method. 
     163                        return((XOPIORecResult)Peak_Gauss_ModelX);      // This function is called using the direct method. 
    164164                        break; 
    165165                case 43:                                                        // y = Lorentz_ModelX(w,x) (curve fitting function). 
    166                         return((long)Lorentz_ModelX);   // This function is called using the direct method. 
     166                        return((XOPIORecResult)Lorentz_ModelX); // This function is called using the direct method. 
    167167                        break; 
    168168                case 44:                                                        // y = FractalX(w,x) (curve fitting function). 
    169                         return((long)FractalX); // This function is called using the direct method. 
     169                        return((XOPIORecResult)FractalX);       // This function is called using the direct method. 
    170170                        break; 
    171171                case 45:                                                        // y = DAB_ModelX(w,x) (curve fitting function). 
    172                         return((long)DAB_ModelX);       // This function is called using the direct method. 
     172                        return((XOPIORecResult)DAB_ModelX);     // This function is called using the direct method. 
    173173                        break; 
    174174                case 46:                                                        // y = OneLevelX(w,x) (curve fitting function). 
    175                         return((long)OneLevelX);        // This function is called using the direct method. 
     175                        return((XOPIORecResult)OneLevelX);      // This function is called using the direct method. 
    176176                        break; 
    177177                case 47:                                                        // y = TwoLevelX(w,x) (curve fitting function). 
    178                         return((long)TwoLevelX);        // This function is called using the direct method. 
     178                        return((XOPIORecResult)TwoLevelX);      // This function is called using the direct method. 
    179179                        break; 
    180180                case 48:                                                        // y = ThreeLevelX(w,x) (curve fitting function). 
    181                         return((long)ThreeLevelX);      // This function is called using the direct method. 
     181                        return((XOPIORecResult)ThreeLevelX);    // This function is called using the direct method. 
    182182                        break; 
    183183                case 49:                                                        // y = FourLevelX(w,x) (curve fitting function). 
    184                         return((long)FourLevelX);       // This function is called using the direct method. 
     184                        return((XOPIORecResult)FourLevelX);     // This function is called using the direct method. 
    185185                        break; 
    186186                        // 
     
    188188                        // 
    189189                case 50:                                                        // y = HardSphereStructX(w,x) (curve fitting function). 
    190                         return((long)HardSphereStructX);        // This function is called using the direct method. 
     190                        return((XOPIORecResult)HardSphereStructX);      // This function is called using the direct method. 
    191191                        break; 
    192192                case 51:                                                        // y = SquareWellStructX(w,x) (curve fitting function). 
    193                         return((long)SquareWellStructX);        // This function is called using the direct method. 
     193                        return((XOPIORecResult)SquareWellStructX);      // This function is called using the direct method. 
    194194                        break; 
    195195                case 52:                                                        // y = StickyHS_StructX(w,x) (curve fitting function). 
    196                         return((long)StickyHS_StructX); // This function is called using the direct method. 
     196                        return((XOPIORecResult)StickyHS_StructX);       // This function is called using the direct method. 
    197197                        break; 
    198198                case 53:                                                        // y = HayterPenfoldMSAX(w,x) (curve fitting function). 
    199                         return((long)HayterPenfoldMSAX);        // This function is called using the direct method. 
     199                        return((XOPIORecResult)HayterPenfoldMSAX);      // This function is called using the direct method. 
    200200                        break; 
    201201                case 54:                                                        // y = DiamCylX(a,b) (utility). 
    202                         return((long)DiamCylX);                 // This function is called using the direct method. 
     202                        return((XOPIORecResult)DiamCylX);                       // This function is called using the direct method. 
    203203                        break; 
    204204                case 55:                                                        // y = DiamEllipX(a,b) (utility). 
    205                         return((long)DiamEllipX);                       // This function is called using the direct method. 
     205                        return((XOPIORecResult)DiamEllipX);                     // This function is called using the direct method. 
    206206                        break; 
    207207                        // 
    208208                        // Resolution Smearing Functions 
    209209                case 56:                                                        // y = Smear_Model_20_X (utility). 
    210                         return((long)Smear_Model_20_X);                 // This function is called using the direct method. 
     210                        return((XOPIORecResult)Smear_Model_20_X);                       // This function is called using the direct method. 
    211211                        break; 
    212212                case 57:                                                        // y =Smear_Model_76_X (utility). 
    213                         return((long)Smear_Model_76_X);                 // This function is called using the direct method. 
     213                        return((XOPIORecResult)Smear_Model_76_X);                       // This function is called using the direct method. 
    214214                        break;   
    215215                case 58:                                                        // y =Smear_Model_76_X (utility). 
    216                         return((long)SmearedCyl_PolyRadiusX);                   // This function is called using the direct method. 
     216                        return((XOPIORecResult)SmearedCyl_PolyRadiusX);                 // This function is called using the direct method. 
    217217                        break; 
    218218// 2D Functions from DANSE 
    219219                case 59:                                                        // y = f(c,y,x) 
    220                         return((long)Cylinder_2D);                      // This function is called using the direct method. 
     220                        return((XOPIORecResult)Cylinder_2D);                    // This function is called using the direct method. 
    221221                        break; 
    222222                case 60:                                                        // y = f(c,y,x) 
    223                         return((long)Cylinder_2D_Weight2D);                     // This function is called using the direct method. 
     223                        return((XOPIORecResult)Cylinder_2D_Weight2D);                   // This function is called using the direct method. 
    224224                        break; 
    225225                case 61:                                                        // y = f(c,y,x) 
    226                         return((long)CoreShellCylinder_2D);                     // This function is called using the direct method. 
     226                        return((XOPIORecResult)CoreShellCylinder_2D);                   // This function is called using the direct method. 
    227227                        break; 
    228228                case 62:                                                        // y = f(c,y,x) 
    229                         return((long)CoreShellCylinder_2D_Weight2D);                    // This function is called using the direct method. 
     229                        return((XOPIORecResult)CoreShellCylinder_2D_Weight2D);                  // This function is called using the direct method. 
    230230                        break; 
    231231                case 63:                                                        // y = f(c,y,x) 
    232                         return((long)Ellipsoid_2D);                     // This function is called using the direct method. 
     232                        return((XOPIORecResult)Ellipsoid_2D);                   // This function is called using the direct method. 
    233233                        break; 
    234234                case 64:                                                        // y = f(c,y,x) 
    235                         return((long)Ellipsoid_2D_Weight2D);                    // This function is called using the direct method. 
     235                        return((XOPIORecResult)Ellipsoid_2D_Weight2D);                  // This function is called using the direct method. 
    236236                        break; 
    237237                case 65:                                                        // y = f(c,y,x) 
    238                         return((long)EllipticalCylinder_2D);                    // This function is called using the direct method. 
     238                        return((XOPIORecResult)EllipticalCylinder_2D);                  // This function is called using the direct method. 
    239239                        break; 
    240240                case 66:                                                        // y = f(c,y,x) 
    241                         return((long)EllipticalCylinder_2D_Weight2D);                   // This function is called using the direct method. 
     241                        return((XOPIORecResult)EllipticalCylinder_2D_Weight2D);                 // This function is called using the direct method. 
    242242                        break; 
    243243                case 67:                                                        // y = f(c,y,x) 
    244                         return((long)Sphere_2D);                        // This function is called using the direct method. 
     244                        return((XOPIORecResult)Sphere_2D);                      // This function is called using the direct method. 
    245245                        break; 
    246246/// new models added in 2008 
    247247                case 68:                                                        // y = f(c,y,x) 
    248                         return((long)SpherocylinderX);                  // This function is called using the direct method. 
     248                        return((XOPIORecResult)SpherocylinderX);                        // This function is called using the direct method. 
    249249                        break; 
    250250                case 69:                                                        // y = f(c,y,x) 
    251                         return((long)ConvexLensX);                      // This function is called using the direct method. 
     251                        return((XOPIORecResult)ConvexLensX);                    // This function is called using the direct method. 
    252252                        break; 
    253253                case 70:                                                        // y = f(c,y,x) 
    254                         return((long)DumbbellX);                        // This function is called using the direct method. 
     254                        return((XOPIORecResult)DumbbellX);                      // This function is called using the direct method. 
    255255                        break; 
    256256                case 71:                                                        // y = f(c,y,x) 
    257                         return((long)CappedCylinderX);                  // This function is called using the direct method. 
     257                        return((XOPIORecResult)CappedCylinderX);                        // This function is called using the direct method. 
    258258                        break; 
    259259                case 72:                                                        // y = f(c,y,x) 
    260                         return((long)BarbellX);                 // This function is called using the direct method. 
     260                        return((XOPIORecResult)BarbellX);                       // This function is called using the direct method. 
    261261                        break; 
    262262                case 73:                                                        // y = f(c,y,x) 
    263                         return((long)Lamellar_ParaCrystalX);                    // This function is called using the direct method. 
     263                        return((XOPIORecResult)Lamellar_ParaCrystalX);                  // This function is called using the direct method. 
    264264                        break; 
    265265                        // 
    266266                case 74:                                                        // y = f(c,y,x) 
    267                         return((long)BCC_ParaCrystalX);                 // This function is called using the direct method. 
     267                        return((XOPIORecResult)BCC_ParaCrystalX);                       // This function is called using the direct method. 
    268268                        break; 
    269269                case 75:                                                        // y = f(c,y,x) 
    270                         return((long)FCC_ParaCrystalX);                 // This function is called using the direct method. 
     270                        return((XOPIORecResult)FCC_ParaCrystalX);                       // This function is called using the direct method. 
    271271                        break; 
    272272                case 76:                                                        // y = f(c,y,x) 
    273                         return((long)SC_ParaCrystalX);                  // This function is called using the direct method. 
     273                        return((XOPIORecResult)SC_ParaCrystalX);                        // This function is called using the direct method. 
    274274                        break; 
    275275                case 77:                                                        // y = f(c,y,x) 
    276                         return((long)OneShellX);                        // This function is called using the direct method. 
     276                        return((XOPIORecResult)OneShellX);                      // This function is called using the direct method. 
    277277                        break; 
    278278                case 78:                                                        // y = f(c,y,x) 
    279                         return((long)TwoShellX);                        // This function is called using the direct method. 
     279                        return((XOPIORecResult)TwoShellX);                      // This function is called using the direct method. 
    280280                        break; 
    281281                case 79:                                                        // y = f(c,y,x) 
    282                         return((long)ThreeShellX);                      // This function is called using the direct method. 
     282                        return((XOPIORecResult)ThreeShellX);                    // This function is called using the direct method. 
    283283                        break; 
    284284                case 80:                                                        // y = f(c,y,x) 
    285                         return((long)FourShellX);                       // This function is called using the direct method. 
     285                        return((XOPIORecResult)FourShellX);                     // This function is called using the direct method. 
    286286                        break; 
    287287                case 81:                                                        // y = f(c,y,x) 
    288                         return((long)PolyOneShellX);                    // This function is called using the direct method. 
     288                        return((XOPIORecResult)PolyOneShellX);                  // This function is called using the direct method. 
    289289                        break; 
    290290                case 82:                                                        // y = f(c,y,x) 
    291                         return((long)PolyTwoShellX);                    // This function is called using the direct method. 
     291                        return((XOPIORecResult)PolyTwoShellX);                  // This function is called using the direct method. 
    292292                        break; 
    293293                case 83:                                                        // y = f(c,y,x) 
    294                         return((long)PolyThreeShellX);                  // This function is called using the direct method. 
     294                        return((XOPIORecResult)PolyThreeShellX);                        // This function is called using the direct method. 
    295295                        break; 
    296296                case 84:                                                        // y = f(c,y,x) 
    297                         return((long)PolyFourShellX);                   // This function is called using the direct method. 
     297                        return((XOPIORecResult)PolyFourShellX);                 // This function is called using the direct method. 
    298298                        break; 
    299299                        // 
    300300                case 85:                                                        // y = f(c,y,x) 
    301                         return((long)BroadPeakX);                       // This function is called using the direct method. 
     301                        return((XOPIORecResult)BroadPeakX);                     // This function is called using the direct method. 
    302302                        break; 
    303303                case 86:                                                        // y = f(c,y,x) 
    304                         return((long)CorrLengthX);                      // This function is called using the direct method. 
     304                        return((XOPIORecResult)CorrLengthX);                    // This function is called using the direct method. 
    305305                        break; 
    306306                case 87:                                                        // y = f(c,y,x) 
    307                         return((long)TwoLorentzianX);                   // This function is called using the direct method. 
     307                        return((XOPIORecResult)TwoLorentzianX);                 // This function is called using the direct method. 
    308308                        break; 
    309309                case 88:                                                        // y = f(c,y,x) 
    310                         return((long)TwoPowerLawX);                     // This function is called using the direct method. 
     310                        return((XOPIORecResult)TwoPowerLawX);                   // This function is called using the direct method. 
    311311                        break; 
    312312                case 89:                                                        // y = f(c,y,x) 
    313                         return((long)PolyGaussCoilX);                   // This function is called using the direct method. 
     313                        return((XOPIORecResult)PolyGaussCoilX);                 // This function is called using the direct method. 
    314314                        break; 
    315315                case 90:                                                        // y = f(c,y,x) 
    316                         return((long)GaussLorentzGelX);                 // This function is called using the direct method. 
     316                        return((XOPIORecResult)GaussLorentzGelX);                       // This function is called using the direct method. 
    317317                        break; 
    318318                case 91:                                                        // y = f(c,y,x) 
    319                         return((long)GaussianShellX);                   // This function is called using the direct method. 
     319                        return((XOPIORecResult)GaussianShellX);                 // This function is called using the direct method. 
    320320                        break; 
    321321                case 92:                                                        // y = f(c,y,x) 
    322                         return((long)FuzzySpheresX);                    // This function is called using the direct method. 
     322                        return((XOPIORecResult)FuzzySpheresX);                  // This function is called using the direct method. 
    323323                        break; 
    324324                case 93:                                                        // y = f(c,y,x) 
    325                         return((long)PolyCoreBicelleX);                 // This function is called using the direct method. 
     325                        return((XOPIORecResult)PolyCoreBicelleX);                       // This function is called using the direct method. 
    326326                        break; 
    327327                case 94:                                                        // y = f(c,y,x) 
    328                         return((long)CSParallelepipedX);                        // This function is called using the direct method. 
     328                        return((XOPIORecResult)CSParallelepipedX);                      // This function is called using the direct method. 
    329329                        break; 
    330330                case 95:                                                        //One Yukawa 
    331                         return((long)OneYukawaX);       // This function is called using the direct method. 
     331                        return((XOPIORecResult)OneYukawaX);     // This function is called using the direct method. 
    332332                        break; 
    333333                case 96:                                                        // Two Yukawa 
    334                         return((long)TwoYukawaX);       // This function is called using the direct method. 
     334                        return((XOPIORecResult)TwoYukawaX);     // This function is called using the direct method. 
    335335                        break; 
    336336        } 
    337         return NIL; 
     337        return 0; 
    338338} 
    339339 
     
    346346XOPEntry(void) 
    347347{        
    348         long result = 0; 
     348        XOPIORecResult result = 0; 
    349349         
    350350        switch (GetXOPMessage()) { 
     
    366366*/ 
    367367HOST_IMPORT int                                         // was void 
    368 main(IORecHandle ioRecHandle) 
     368XOPMain(IORecHandle ioRecHandle) 
    369369{        
    370370        XOPInit(ioRecHandle);                                                   // Do standard XOP initialization. 
    371371        SetXOPEntry(XOPEntry);                                                  // Set entry point for future calls. 
    372372         
    373         if (igorVersion < 600) {                                                // checks required for ThreadSafe declarations 
    374                 SetXOPResult(IGOR_OBSOLETE); 
     373        if (igorVersion < 620) {                                                // checks required for ThreadSafe declarations 
     374                SetXOPResult(OLD_IGOR); 
    375375                return EXIT_FAILURE;                                    // added for TK6 
    376376        } 
  • sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.h

    r834 r998  
    66/* Prototypes */ 
    77// for TK6 
    8 HOST_IMPORT int main(IORecHandle ioRecHandle); 
     8HOST_IMPORT int XOPMain(IORecHandle ioRecHandle); 
    99 
    1010// Custom error codes 
    11 //#define REQUIRES_IGOR_200 1 + FIRST_XOP_ERR 
     11#define OLD_IGOR 1 + FIRST_XOP_ERR 
    1212#define NON_EXISTENT_WAVE 2 + FIRST_XOP_ERR 
    1313#define REQUIRES_SP_OR_DP_WAVE 3 + FIRST_XOP_ERR 
  • sans/XOP_Dev/SANSAnalysis/XOP/SANSAnalysis.r

    r756 r998  
    66 
    77resource 'vers' (1) {                                           /* XOP version info */ 
    8 0x01, 0x02, final, 0x00, 0,                             /* version bytes and country integer */ 
    9 "1.1", 
    10 "1.1, NIST Center for Neutron Research" 
     8    0x01, 0x02, final, 0x00, 0,                         /* version bytes and country integer */ 
     9    "1.1", 
     10    "1.1, NIST Center for Neutron Research" 
    1111}; 
    1212 
    1313resource 'vers' (2) {                                           /* Igor version info */ 
    14 0x02, 0x00, release, 0x00, 0,                   /* version bytes and country integer */ 
    15 "6.00", 
    16 "(for Igor 6.00 or later)" 
     14    0x06, 0x20, release, 0x00, 0,                       /* version bytes and country integer */ 
     15    "6.20", 
     16    "(for Igor 6.20 or later)" 
    1717}; 
    1818 
     
    2020{ 
    2121        /* [1] */ 
    22         "SANS Analysis requires Igor Pro 6.0 or later", 
     22        "SANS Analysis requires Igor Pro 6.2 or later", 
    2323        /* [2] */ 
    2424        "Wave does not exist.", 
  • sans/XOP_Dev/SANSAnalysis/XOP/StructureFactor.c

    r834 r998  
    197197        double *qw;                     //pointer to q wave 
    198198        double *cw;                     //pointer to coef wave 
    199         long npnts,i;                   //number of points in waves 
     199        CountInt npnts,i;                       //number of points in waves 
    200200         
    201201         
     
    224224        qw = (double*)WaveData(p->QHandle);                                      
    225225        cw = (double*)WaveData(p->CoefHandle);                                   
    226         npnts = WavePoints(p->QHandle);                                         // Number of points in q wave. 
     226        npnts = (CountInt)WavePoints(p->QHandle);                                               // Number of points in q wave. 
    227227         
    228228        phi = cw[0]; 
     
    283283        double *qw;                     //pointer to q wave 
    284284        double *cw;                     //pointer to coef wave 
    285         long npnts,i;                   //number of points in waves 
     285        CountInt npnts,i;                       //number of points in waves 
    286286         
    287287         
     
    310310        qw = (double*)WaveData(p->QHandle);                                      
    311311        cw = (double*)WaveData(p->CoefHandle);                                   
    312         npnts = WavePoints(p->QHandle);                                         // Number of points in q wave. 
     312        npnts = (CountInt)WavePoints(p->QHandle);                                               // Number of points in q wave. 
    313313         
    314314        phi = cw[0]; 
  • sans/XOP_Dev/SANSAnalysis/lib/2Y_PairCorrelation.c

    r761 r998  
    112112{ 
    113113        double* data = malloc( sizeof(double) * N * 2); 
    114         int n,error,k; 
     114        int nn,error,k; 
    115115        double alpha,real,imag; 
    116116        double Pi = 3.14159265358979323846264338327950288;   /* pi */ 
    117117 
    118118         
    119         for ( n = 0; n < N; n++ ) { 
    120                 data[2*n] = n * ( Sq[n] - 1 ); 
    121                 data[2*n+1] = 0; 
     119        for ( nn = 0; nn < N; nn++ ) { 
     120                data[2*nn] = nn * ( Sq[nn] - 1 ); 
     121                data[2*nn+1] = 0; 
    122122        } 
    123123        //      printf("start of new fft\n"); 
Note: See TracChangeset for help on using the changeset viewer.