- Timestamp:
- Jul 6, 2012 5:29:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r838 r857 831 831 Return(0) 832 832 Endif 833 End 834 835 //function to test a file to see if it is a DIV file 836 // 837 // returns truth 0/1 838 // 839 // called by many procedures (both external and local) 840 // 841 Function CheckIfDIVData(fname) 842 String fname 843 844 845 Variable refnum,totalBytes 846 // String testStr="" 847 848 Open/R/T="????TEXT" refNum as fname 849 if(strlen(s_filename) == 0) //user cancel (/Z not used, so V_flag not set) 850 return(0) 851 endif 852 853 //get the total number of bytes in the file 854 FStatus refNum 855 totalBytes = V_logEOF 856 //Print totalBytes 857 if(totalBytes < 100) 858 Close refNum 859 return(0) //not a raw file 860 endif 861 // FSetPos refNum,75 862 // FReadLine/N=3 refNum,testStr 863 Close refNum 864 865 if(totalBytes == 66116) // && ( cmpstr(testStr,"RAW")==0 || cmpstr(testStr,"SIM")==0)) 866 //true, is raw data file 867 Return(1) 868 else 869 //some other file 870 Return(0) 871 Endif 872 833 873 End 834 874
Note: See TracChangeset
for help on using the changeset viewer.