Changes from tags/4.1.0 at r1896 to tags/4.2.0 at r1896
- Location:
- tags
- Files:
-
- 92 added
- 8 deleted
- 76 edited
-
4.2.0/nexus_scons_utils.py (added)
-
4.2.0/applications/nxdiff (added)
-
4.2.0/applications/nxconvert_common.c (added)
-
4.2.0/applications/nxvalidate.c (added)
-
4.2.0/applications/nxconvert_common.h (added)
-
4.2.0/applications/NXdir/main.cpp (modified) (1 diff)
-
4.2.0/applications/NXdir/Makefile.am (modified) (1 diff)
-
4.2.0/applications/NXdir/data.cpp (modified) (1 diff)
-
4.2.0/applications/SConscript (added)
-
4.2.0/applications/NXbrowse.c (modified) (6 diffs)
-
4.2.0/applications/nxingest (added)
-
4.2.0/applications/nxingest/nxingest.txt (added)
-
4.2.0/applications/nxingest/nxingest_parse.h (added)
-
4.2.0/applications/nxingest/nxingest_main.cpp (added)
-
4.2.0/applications/nxingest/nxingest.h (added)
-
4.2.0/applications/nxingest/nxingest_debug.cpp (added)
-
4.2.0/applications/nxingest/.nxs (added)
-
4.2.0/applications/nxingest/nxingest_main.h (added)
-
4.2.0/applications/nxingest/nxingest_debug.h (added)
-
4.2.0/applications/nxingest/nxingest_time.cpp (added)
-
4.2.0/applications/nxingest/nxingest_utils.cpp (added)
-
4.2.0/applications/nxingest/gpl.txt (added)
-
4.2.0/applications/nxingest/nxingest_nexus.cpp (added)
-
4.2.0/applications/nxingest/nxingest_time.h (added)
-
4.2.0/applications/nxingest/nxingest_utils.h (added)
-
4.2.0/applications/nxingest/nxingest_nexus.h (added)
-
4.2.0/applications/nxingest/Makefile.am (added)
-
4.2.0/applications/nxingest/nxingest_parse.cpp (added)
-
4.2.0/applications/NXtranslate/binary/BinaryRetriever.cpp (modified) (3 diffs)
-
4.2.0/applications/NXtranslate/retriever.cpp (modified) (3 diffs)
-
4.2.0/applications/NXtranslate/attr.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/xml_parser.cpp (modified) (7 diffs)
-
4.2.0/applications/NXtranslate/node_util.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/main.cpp (modified) (6 diffs)
-
4.2.0/applications/NXtranslate/node.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/Makefile.am (modified) (1 diff)
-
4.2.0/applications/NXtranslate/sns_histogram/string_location_format.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/nexus_util.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/spec/SPEClib.h (modified) (1 diff)
-
4.2.0/applications/NXtranslate/xml_parser.h (modified) (1 diff)
-
4.2.0/applications/NXtranslate/FRM2/frm2_retriever.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/nexus_retriever.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/IPNS_CPP/Header.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/IPNS_CPP/ipns_retriever.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/IPNS_CPP/TimeField.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/IPNS_CPP/Runfile.cpp (modified) (2 diffs)
-
4.2.0/applications/NXtranslate/IPNS_CPP/DetectorMap.cpp (modified) (1 diff)
-
4.2.0/applications/NXtranslate/esrf_edf/edf_reader.h (modified) (1 diff)
-
4.2.0/applications/NXtranslate/text_collist/collist_retriever.cpp (modified) (1 diff)
-
4.2.0/applications/NXsummary/main.cpp (modified) (1 diff)
-
4.2.0/applications/NXsummary/data_util.cpp (modified) (1 diff)
-
4.2.0/applications/NXsummary/Makefile.am (modified) (1 diff)
-
4.2.0/applications/nxconvert.c (modified) (6 diffs)
-
4.2.0/applications/Makefile.am (modified) (4 diffs)
-
4.2.0/scripts/nxbuild.in (modified) (1 diff)
-
4.2.0/src/SConscript (added)
-
4.2.0/src/nxxml.c (modified) (28 diffs)
-
4.2.0/src/nexus_symbols.txt (modified) (1 diff)
-
4.2.0/src/napi_exports.c (modified) (1 diff)
-
4.2.0/src/napi4.c (modified) (27 diffs)
-
4.2.0/src/nxstack.c (modified) (1 diff)
-
4.2.0/src/napi5.c (modified) (24 diffs)
-
4.2.0/src/nxio.c (modified) (17 diffs)
-
4.2.0/src/napi_exports.h (modified) (1 diff)
-
4.2.0/src/nxio.h (modified) (2 diffs)
-
4.2.0/src/nexus_symbols_win.txt (modified) (1 diff)
-
4.2.0/src/stptok.c (modified) (2 diffs)
-
4.2.0/src/napi.c (modified) (15 diffs)
-
4.2.0/src/Makefile.am (modified) (3 diffs)
-
4.2.0/src/nxdataset.c (modified) (2 diffs)
-
4.2.0/src/napi_exports2.c (modified) (1 diff)
-
4.2.0/src/nx_stptok.h (added)
-
4.2.0/bindings/Makefile.am (modified) (2 diffs)
-
4.2.0/bindings/swig/Makefile.am (modified) (3 diffs)
-
4.1.0/bindings/swig/nxdataset.c (deleted)
-
4.1.0/bindings/swig/nxpython_test.py (deleted)
-
4.1.0/bindings/swig/nxpython.py (deleted)
-
4.1.0/bindings/swig/nxdataset.h (deleted)
-
4.2.0/bindings/java/org/nexusformat/NexusFile.java (modified) (5 diffs)
-
4.2.0/bindings/python (added)
-
4.2.0/bindings/python/nxstest.py (added)
-
4.2.0/bindings/python/README.html (added)
-
4.2.0/bindings/python/nxs (added)
-
4.2.0/bindings/python/nxs/napi.py (added)
-
4.2.0/bindings/python/nxs/__init__.py (added)
-
4.2.0/bindings/python/Makefile.am (added)
-
4.2.0/bindings/python/run_nxstest (added)
-
4.2.0/bindings/cpp (added)
-
4.2.0/bindings/cpp/NeXusStream.hpp (added)
-
4.2.0/bindings/cpp/NeXusException.hpp (added)
-
4.2.0/bindings/cpp/SConscript (added)
-
4.2.0/bindings/cpp/NeXusFile.hpp (added)
-
4.2.0/bindings/cpp/Makefile.am (added)
-
4.2.0/bindings/cpp/NeXusStream.cpp (added)
-
4.2.0/bindings/cpp/NeXusException.cpp (added)
-
4.2.0/bindings/cpp/NeXusFile.cpp (added)
-
4.2.0/bindings/idl (added)
-
4.2.0/bindings/idl/NXtest.hdf (added)
-
4.2.0/bindings/idl/write_test.pro (added)
-
4.2.0/bindings/idl/recursivesearch.pro (added)
-
4.2.0/bindings/idl/NeXusIDL-API.def (added)
-
4.2.0/bindings/idl/README.html (added)
-
4.2.0/bindings/idl/NXtest.h5 (added)
-
4.2.0/bindings/idl/recursiveread.pro (added)
-
4.2.0/bindings/idl/build_testmodule.pro (added)
-
4.2.0/bindings/idl/nxext.xml (added)
-
4.2.0/bindings/idl/nxext.hdf (added)
-
4.2.0/bindings/idl/data (added)
-
4.2.0/bindings/idl/data/dmc01.h5 (added)
-
4.2.0/bindings/idl/data/dmc02.h5 (added)
-
4.2.0/bindings/idl/data/focus2007n001335.hdf (added)
-
4.2.0/bindings/idl/data/dmc01.xml (added)
-
4.2.0/bindings/idl/data/dmc01.hdf (added)
-
4.2.0/bindings/idl/data/dmc02.xml (added)
-
4.2.0/bindings/idl/data/dmc02.hdf (added)
-
4.2.0/bindings/idl/Makefile.am (added)
-
4.2.0/bindings/idl/read_test.pro (added)
-
4.2.0/bindings/idl/handle.c (added)
-
4.2.0/bindings/idl/NeXusIDL-API.dlm (added)
-
4.2.0/bindings/idl/testfocus.pro (added)
-
4.2.0/bindings/idl/testidlnapi (added)
-
4.2.0/bindings/idl/nxext.h5 (added)
-
4.2.0/bindings/idl/handle.h (added)
-
4.2.0/bindings/idl/build_win.bat (added)
-
4.2.0/bindings/idl/NeXusIDL-API.export (added)
-
4.2.0/bindings/idl/NeXusIDL-API.c (added)
-
4.2.0/bindings/idl/NXtest.xml (added)
-
4.2.0/Windows_extra (added)
-
4.2.0/Windows_extra/include (added)
-
4.2.0/Windows_extra/include/nxconfig.h (added)
-
4.2.0/Windows_extra/libNeXus-0.def (added)
-
4.2.0/configure.ac (modified) (30 diffs)
-
4.2.0/README.developers (modified) (1 diff)
-
4.2.0/doc/Makefile.am (modified) (1 diff)
-
4.2.0/doc/doxygen/Doxyfile.in (modified) (3 diffs)
-
4.2.0/doc/doxygen/Makefile.am (modified) (1 diff)
-
4.2.0/doc/tech_ref/Makefile.am (modified) (3 diffs)
-
4.2.0/SConstruct (added)
-
4.2.0/autogen.sh (modified) (4 diffs)
-
4.2.0/NEWS (modified) (1 diff)
-
4.2.0/test/SConscript (added)
-
4.2.0/test/napi_test_cpp.cxx (added)
-
4.2.0/test/testsuite.at (modified) (20 diffs)
-
4.2.0/test/leak_test2.cxx (modified) (1 diff)
-
4.2.0/test/napi_test.c (modified) (8 diffs)
-
4.2.0/test/data/dmc01.h5 (modified) (previous)
-
4.2.0/test/data/dmc02.h5 (modified) (previous)
-
4.2.0/test/data/dmc01.hdf (modified) (previous)
-
4.2.0/test/data/dmc02.hdf (modified) (previous)
-
4.2.0/test/Makefile.am (modified) (13 diffs)
-
4.2.0/test/atlocal.in (modified) (1 diff)
-
4.2.0/nexus_spec.in (modified) (2 diffs)
-
4.2.0/include/napi4.h (modified) (2 diffs)
-
4.2.0/include/napi5.h (modified) (2 diffs)
-
4.2.0/include/napiconfig.h (modified) (1 diff)
-
4.2.0/include/Makefile.am (modified) (1 diff)
-
4.2.0/include/napi.h (modified) (11 diffs)
-
4.2.0/autoversion.sh (modified) (2 diffs)
-
4.2.0/contrib/applications/Makefile.am (modified) (1 diff)
-
4.2.0/contrib/applications/CBFLib (added)
-
4.2.0/contrib/applications/CBFLib/cbf2nx.c (added)
-
4.2.0/contrib/applications/CBFLib/Makefile.am (added)
-
4.2.0/contrib/applications/CBFLib/README (added)
-
4.2.0/contrib/bindings/Makefile.am (modified) (1 diff)
-
4.2.0/contrib/bindings/java (added)
-
4.2.0/contrib/bindings/java/org (added)
-
4.2.0/contrib/bindings/java/org/nexusformat (added)
-
4.2.0/contrib/bindings/java/org/nexusformat/utils (added)
-
4.2.0/contrib/bindings/java/org/nexusformat/utils/NXutil.java (added)
-
4.2.0/contrib/bindings/python (added)
-
4.2.0/contrib/bindings/python/Makefile.am (added)
-
4.1.0/contrib/bindings/nxpylib (deleted)
-
4.1.0/contrib/bindings/nxpython (deleted)
-
4.1.0/contrib/bindings/README.python (deleted)
-
4.2.0/Makefile.am (modified) (1 diff)
-
4.1.0/INSTALL (deleted)
Legend:
- Unmodified
- Added
- Removed
-
tags/4.2.0/applications/NXdir/main.cpp
r1896 r1896 28 28 #include <string> 29 29 #include <vector> 30 #include < stdlib.h>30 #include <cstdlib> 31 31 #include <fstream> 32 #include <stdio.h> 32 #include <cstdio> 33 #include <cstring> 33 34 34 35 // -------------------- begin TIMING TEST stuff -
tags/4.2.0/applications/NXdir/Makefile.am
r1896 r1896 36 36 nxdir.h nxdir_help.h 37 37 nxdir_LDADD = $(LIBNEXUS) 38 nxdir_LDFLAGS = -static $(LDFLAGS)38 nxdir_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 39 39 EXTRA_DIST = CHANGES LICENSE README TODO 40 40 -
tags/4.2.0/applications/NXdir/data.cpp
r1896 r1896 26 26 #include <iostream> 27 27 #include "nxdir.h" 28 #include <cstring> 28 29 #include <string> 29 30 #include <map> -
tags/4.2.0/applications/NXbrowse.c
r1896 r1896 224 224 { 225 225 int status, dataType, dataRank, dataDimensions[NX_MAXRANK], length; 226 NXname name, class, nxurl;226 NXname name, nxclass, nxurl; 227 227 228 228 if (NXinitgroupdir (fileId) != NX_OK) return NX_ERROR; 229 229 do { 230 status = NXgetnextentry (fileId, name, class, &dataType);230 status = NXgetnextentry (fileId, name, nxclass, &dataType); 231 231 if (status == NX_ERROR) break; 232 232 if (status == NX_OK) { 233 if (strncmp( class,"CDF",3) == 0){233 if (strncmp(nxclass,"CDF",3) == 0){ 234 234 ; 235 235 } 236 else if (strcmp( class,"SDS") == 0){236 else if (strcmp(nxclass,"SDS") == 0){ 237 237 printf (" NX Data : %s", name); 238 238 if (NXopendata (fileId, name) != NX_OK) return NX_ERROR; … … 245 245 } else { 246 246 length = sizeof(nxurl); 247 if(NXisexternalgroup(fileId, name, class,nxurl,length) == NX_OK){248 printf (" NX external Group: %s (%s), linked to: %s \n",name, class,nxurl);247 if(NXisexternalgroup(fileId, name,nxclass,nxurl,length) == NX_OK){ 248 printf (" NX external Group: %s (%s), linked to: %s \n",name,nxclass,nxurl); 249 249 } else { 250 printf (" NX Group : %s (%s)\n", name, class);251 if((status = NXopengroup(fileId,name, class)) != NX_OK){250 printf (" NX Group : %s (%s)\n", name, nxclass); 251 if((status = NXopengroup(fileId,name,nxclass)) != NX_OK){ 252 252 return status; 253 253 } … … 354 354 for(i=0; i<total_size / dataDimensions[dataRank-1]; i++) 355 355 { 356 PrintData ( dataBuffer + i * dataDimensions[dataRank-1], dataType, dataDimensions[dataRank-1]);356 PrintData ((char*)dataBuffer + i * dataDimensions[dataRank-1], dataType, dataDimensions[dataRank-1]); 357 357 PrintData ("\n", NX_CHAR, 1); 358 358 } … … 636 636 void PrintData (void *data, int dataType, int numElements) 637 637 { 638 WriteData (stdout, data, dataType, numElements);638 WriteData (stdout, (char*)data, dataType, numElements); 639 639 } 640 640 /* Searches group for requested group and return its class */ … … 642 642 { 643 643 int status, dataType; 644 NXname name, class;644 NXname name, nxclass; 645 645 646 646 NXinitgroupdir (fileId); 647 647 do { 648 status = NXgetnextentry (fileId, name, class, &dataType);648 status = NXgetnextentry (fileId, name, nxclass, &dataType); 649 649 if (status == NX_ERROR) return NX_ERROR; 650 650 if (status == NX_OK) { 651 651 if (StrEq (groupName, name)) { 652 strcpy (groupClass, class);652 strcpy (groupClass, nxclass); 653 653 if (!strncmp(groupClass,"NX",2)) { 654 654 return NX_OK; … … 672 672 { 673 673 int status, dataType; 674 NXname name, class;674 NXname name, nxclass; 675 675 676 676 NXinitgroupdir (fileId); 677 677 do { 678 status = NXgetnextentry (fileId, name, class, &dataType);678 status = NXgetnextentry (fileId, name, nxclass, &dataType); 679 679 if (status == NX_ERROR) return NX_ERROR; 680 680 if (status == NX_OK) { 681 681 if (StrEq(dataName,name)) { 682 if (!strncmp( class,"SDS",3)) { /* Data has class "SDS" */682 if (!strncmp(nxclass,"SDS",3)) { /* Data has class "SDS" */ 683 683 return NX_OK; 684 684 } -
tags/4.2.0/applications/NXtranslate/binary/BinaryRetriever.cpp
r1896 r1896 3 3 #include <stdexcept> 4 4 #include <vector> 5 #include <cstdlib> 6 #include <cstring> 5 7 #include "napiconfig.h" 6 8 #include "binary/BinaryRetriever.hpp" … … 14 16 using std::endl; 15 17 16 static const string INT8("INT8");17 static const string INT16("INT16");18 static const string INT32("INT32");19 static const string UINT8("UINT8");20 static const string UINT16("UINT16");21 static const string UINT32("UINT32");22 static const string FLOAT32("FLOAT32");23 static const string FLOAT64("FLOAT64");24 static const string BYTE("BYTE");25 26 static const int DEFAULT_TYPE=NX_UINT32;18 static const string myINT8("INT8"); 19 static const string myINT16("INT16"); 20 static const string myINT32("INT32"); 21 static const string myUINT8("UINT8"); 22 static const string myUINT16("UINT16"); 23 static const string myUINT32("UINT32"); 24 static const string myFLOAT32("FLOAT32"); 25 static const string myFLOAT64("FLOAT64"); 26 static const string myBYTE("BYTE"); 27 28 static const int NX_DEFAULT_TYPE=NX_UINT32; 27 29 28 30 /** … … 94 96 static int getDataType(const string &str_type){ 95 97 if(str_type.empty()){ 96 return DEFAULT_TYPE;97 }else if(str_type== INT8){98 return NX_DEFAULT_TYPE; 99 }else if(str_type==myINT8){ 98 100 return NX_INT8; 99 }else if(str_type== INT16){101 }else if(str_type==myINT16){ 100 102 return NX_INT16; 101 }else if(str_type== INT32){103 }else if(str_type==myINT32){ 102 104 return NX_INT32; 103 }else if(str_type== UINT8){105 }else if(str_type==myUINT8){ 104 106 return NX_UINT8; 105 }else if(str_type== UINT16){107 }else if(str_type==myUINT16){ 106 108 return NX_UINT16; 107 }else if(str_type== UINT32){109 }else if(str_type==myUINT32){ 108 110 return NX_UINT32; 109 }else if(str_type== FLOAT32){111 }else if(str_type==myFLOAT32){ 110 112 return NX_FLOAT32; 111 }else if(str_type== FLOAT64){113 }else if(str_type==myFLOAT64){ 112 114 return NX_FLOAT64; 113 }else if(str_type== BYTE){115 }else if(str_type==myBYTE){ 114 116 return NX_CHAR; 115 117 }else{ -
tags/4.2.0/applications/NXtranslate/retriever.cpp
r1896 r1896 1 1 #include <stdexcept> 2 #include <map> 2 3 #include "retriever.h" 3 4 #include "nexus_retriever.h" … … 37 38 #endif 38 39 40 using std::map; 39 41 using std::string; 40 42 using std::invalid_argument; 41 43 42 // Implementation of a pure virtual destructor. This makes the compiler happy. 43 Retriever::~Retriever(){} 44 typedef Ptr<Retriever> RetrieverPtr; 44 45 45 // factory method 46 Retriever::RetrieverPtr Retriever::getInstance(const string & type, const string &source){ 46 // hold a map of retrievers that have been instantiated so it can be cached 47 map<string, RetrieverPtr> retrievers; 48 49 RetrieverPtr getNewInstance(const string & type, 50 const string & source) { 47 51 // return appropriate retriever based on type 48 52 if(type==NexusRetriever::MIME_TYPE){ … … 109 113 throw invalid_argument("do not understand mime_type ("+type+") in retriever_factory"); 110 114 } 115 116 // Implementation of a pure virtual destructor. This makes the compiler happy. 117 Retriever::~Retriever(){} 118 119 // factory method 120 Retriever::RetrieverPtr Retriever::getInstance(const string & type, 121 const string &source){ 122 map<string, RetrieverPtr>::iterator existing = retrievers.find(source); 123 if (existing != retrievers.end()) { 124 return (existing->second); 125 } 126 else { 127 RetrieverPtr retriever = getNewInstance(type, source); 128 retrievers.insert(make_pair(source, retriever)); 129 return retriever; 130 } 131 } -
tags/4.2.0/applications/NXtranslate/attr.cpp
r1896 r1896 1 1 #include <napi.h> 2 #include <stdlib.h> 2 #include <cstdlib> 3 #include <cstring> 3 4 #include <stdexcept> 4 5 #include <vector> -
tags/4.2.0/applications/NXtranslate/xml_parser.cpp
r1896 r1896 3 3 #include <iostream> 4 4 #include <string> 5 #include <cstring> 6 #include <algorithm> 5 7 #include <stdarg.h> 6 8 #include <stdexcept> … … 16 18 #include "tree.hh" 17 19 #include "nxtranslate_debug.h" 20 #ifdef USE_TIMING 21 #include <sstream> 22 #endif 18 23 19 24 // ----- start of declaring debug levels … … 62 67 int status; // status of parsing 63 68 bool is_link; // whether the current node is a link 64 map<string,string> map; // store macros for replacement69 std::map<string,string> map; // store macros for replacement 65 70 vector<StrVector> loc_to_source; // mapping for links 66 71 NodeVector nodes; // vector to current node listing … … 70 75 vector<RetrieverPtr> retrievers; // vector of retrievers (for nesting) 71 76 }UserData; 77 78 #ifdef USE_TIMING 79 static time_t start_time = time(NULL); 80 static time_t intermediate_time = time(NULL); 81 extern string print_time(const time_t & start, 82 const time_t & stop) { 83 double seconds = difftime(stop, start); 84 long minutes = static_cast<long>(seconds/60.); 85 seconds = seconds - 60. * static_cast<double>(minutes); 86 std::stringstream result; 87 result << minutes << "m" << seconds << "s"; 88 return result.str(); 89 } 90 #endif 72 91 73 92 // variable so the line and column numbers can be accessed … … 525 544 extern bool xml_parser::parse_xml_file(const std::map<string,string> &map, 526 545 const string &filename, 527 NXhandle *handle){ 546 NXhandle *handle, 547 const bool timing){ 528 548 #ifdef DEBUG3_XML_PARSER 529 549 std::cout << "xml_parser::parse_xml_file" << std::endl; … … 551 571 return true; // return generic error 552 572 573 #ifdef USE_TIMING 574 if (timing) { 575 cout << print_time(intermediate_time) << " to add new information" << endl; 576 intermediate_time = time(NULL); 577 } 578 #endif 579 553 580 // work on links 554 581 try{ … … 559 586 } 560 587 588 #ifdef USE_TIMING 589 if (timing) { 590 cout << print_time(intermediate_time) << " to create links" << endl; 591 intermediate_time = time(NULL); 592 } 593 #endif 594 561 595 // return that everything went well 562 596 return false; -
tags/4.2.0/applications/NXtranslate/node_util.cpp
r1896 r1896 1 1 #include <iostream> 2 2 #include <string> 3 #include <cstring> 3 4 #include <stdexcept> 4 5 #include <vector> -
tags/4.2.0/applications/NXtranslate/main.cpp
r1896 r1896 4 4 #include <map> 5 5 #include <string> 6 #include <cstring> 6 7 #include "xml_parser.h" 7 8 #include <napi.h> … … 23 24 NXaccess base; 24 25 bool append; 26 bool timing; 25 27 std::map<string,string> map; 26 28 }Options; … … 100 102 cout << " -D <macro> Specify a macro. The macro should be in the form of\n" 101 103 << " \"FILE=old_nexus.nxs\". The \"=\" is required." << endl; 104 #ifdef USE_TIMING 105 cout << " --timing Print out timing information for the execution of the program." << endl; 106 #endif 102 107 } 103 108 104 109 int main(int argc, char *argv[]){ 110 #ifdef USE_TIMING 111 time_t start_time = time(NULL); 112 #endif 105 113 Options options; 106 114 options.base=NXACC_CREATE; 107 115 options.append=false; 116 options.timing=false; 108 117 109 118 // parse the command line options (i=0 is the program name … … 152 161 string key=split(arg1); 153 162 options.map.insert(make_pair(key,arg1)); 163 }else if(starts_with(arg1, "--timing")) { 164 options.timing = true; 154 165 #ifdef HDF4 155 166 }else if(starts_with(arg1,"--hdf4")){ … … 212 223 213 224 // parse the file 214 bool result=xml_parser::parse_xml_file(options.map,options.infile,&handle); 225 bool result=xml_parser::parse_xml_file(options.map,options.infile,&handle, 226 options.timing); 215 227 216 228 // close the output file … … 222 234 std::perror("ERROR DELETING FILE"); 223 235 } 224 236 237 #ifdef USE_TIMING 238 if (options.timing) { 239 cout << print_time(start_time) << " total time" << endl; 240 } 241 #endif 225 242 return result; 226 243 } -
tags/4.2.0/applications/NXtranslate/node.cpp
r1896 r1896 1 1 #include <napi.h> 2 #include <stdlib.h> 2 #include <cstdlib> 3 #include <cstring> 3 4 #include <stdexcept> 4 5 #include <vector> -
tags/4.2.0/applications/NXtranslate/Makefile.am
r1896 r1896 66 66 esrf_edf/libEdf.la 67 67 68 nxtranslate_LDFLAGS = -static $(LDFLAGS)68 nxtranslate_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 69 69 70 70 #EXTRA_DIST = CHANGES LICENSE README TODO -
tags/4.2.0/applications/NXtranslate/sns_histogram/string_location_format.cpp
r1896 r1896 4 4 #include <sstream> 5 5 #include <iostream> 6 #include <algorithm> 6 7 7 8 using std::string; -
tags/4.2.0/applications/NXtranslate/nexus_util.cpp
r1896 r1896 3 3 #include <stdexcept> 4 4 #include <string> 5 #include <cstring> 6 #include <cstdlib> 5 7 #include <vector> 6 8 #include "nexus_util.h" -
tags/4.2.0/applications/NXtranslate/spec/SPEClib.h
r1896 r1896 25 25 #include <cstdio> 26 26 #include <cctype> 27 #include <cstdlib> 27 28 #include <fstream> 28 29 #include <iomanip> -
tags/4.2.0/applications/NXtranslate/xml_parser.h
r1896 r1896 6 6 #include <map> 7 7 8 #ifdef USE_TIMING 9 #include <time.h> 10 #include <string> 11 extern std::string print_time(const time_t & start, 12 const time_t & stop = time(NULL)); 13 #endif 14 15 8 16 namespace xml_parser{ 9 17 extern bool parse_xml_file(const std::map<std::string,std::string>&map, 10 const std::string &filename, NXhandle *handle); 18 const std::string &filename, NXhandle *handle, 19 const bool timing); 11 20 } 12 21 #endif -
tags/4.2.0/applications/NXtranslate/FRM2/frm2_retriever.cpp
r1896 r1896 13 13 #include "../tree.hh" 14 14 #include <math.h> 15 #include <cstring> 16 #include <cstdlib> 15 17 16 18 using std::ifstream; -
tags/4.2.0/applications/NXtranslate/nexus_retriever.cpp
r1896 r1896 2 2 #include <stdexcept> 3 3 #include <string> 4 #include <cstring> 4 5 #include "nexus_retriever.h" 5 6 #include "nexus_util.h" -
tags/4.2.0/applications/NXtranslate/IPNS_CPP/Header.cpp
r1896 r1896 1 #include <cstring> 1 2 #include "Header.h" 2 3 #include "RandomAccessRunfile.h" -
tags/4.2.0/applications/NXtranslate/IPNS_CPP/ipns_retriever.cpp
r1896 r1896 1 1 #include <stdexcept> 2 2 #include <string> 3 #include <cstring> 4 #include <cstdlib> 3 5 #include "ipns_retriever.h" 4 6 #include "../node.h" -
tags/4.2.0/applications/NXtranslate/IPNS_CPP/TimeField.cpp
r1896 r1896 1 #include <cstring> 1 2 #include "TimeField.h" 2 3 #include "RandomAccessRunfile.h" -
tags/4.2.0/applications/NXtranslate/IPNS_CPP/Runfile.cpp
r1896 r1896 1 #include <string> 2 #include <cstring> 3 #include <stdexcept> 4 #include <algorithm> 1 5 #include "Runfile.h" 2 #include <string>3 #include <stdexcept>4 6 //#include <algorithm.h> 5 7 float PI = 3.14159; … … 963 965 } 964 966 sort(overflows.begin(), overflows.end()); 965 966 967 967 968 } -
tags/4.2.0/applications/NXtranslate/IPNS_CPP/DetectorMap.cpp
r1896 r1896 1 #include <cstring> 1 2 #include "DetectorMap.h" 2 3 #include "RandomAccessRunfile.h" -
tags/4.2.0/applications/NXtranslate/esrf_edf/edf_reader.h
r1896 r1896 27 27 #include <map> 28 28 #include <string> 29 #include <cstring> 30 #include <cstdlib> 29 31 30 32 using namespace std; -
tags/4.2.0/applications/NXtranslate/text_collist/collist_retriever.cpp
r1896 r1896 3 3 #include <stdexcept> 4 4 #include <string> 5 #include <cstring> 5 6 #include <vector> 6 7 #include "collist_retriever.h" -
tags/4.2.0/applications/NXsummary/main.cpp
r1896 r1896 29 29 #include <sstream> 30 30 #include <string> 31 #include <cstring> 31 32 #include <vector> 32 33 #include "data_util.hpp" -
tags/4.2.0/applications/NXsummary/data_util.cpp
r1896 r1896 2 2 #include <sstream> 3 3 #include <stdexcept> 4 #include <cstring> 4 5 #include "data_util.hpp" 5 6 #include "nxsummary.hpp" -
tags/4.2.0/applications/NXsummary/Makefile.am
r1896 r1896 37 37 nxsummary_SOURCES = data_util.cpp main.cpp string_util.cpp preferences.cpp output.cpp 38 38 nxsummary_LDADD = $(LIBNEXUS) 39 nxsummary_LDFLAGS = -static $(LDFLAGS)39 nxsummary_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 40 40 EXTRA_DIST = LICENSE tclap/AUTHORS tclap/COPYING tclap/README 41 41 include $(top_srcdir)/build_rules.am -
tags/4.2.0/applications/nxconvert.c
r1896 r1896 30 30 #include <unistd.h> 31 31 #include "napi.h" 32 33 static int WriteGroup (int write_data); 34 static int WriteAttributes (int write_data); 35 36 static NXhandle inId, outId; 37 38 #define NX_XML 0 39 #define NX_HDF4 1 40 #define NX_HDF5 2 41 #define NX_DTD 3 32 #include "nxconvert_common.h" 42 33 43 34 static void print_usage() 44 35 { 45 printf("Usage: nxconvert [ -x | -h4 | -h5 | - o keepws] [ infile ] [ outfile ]\n");36 printf("Usage: nxconvert [ -x | -h4 | -h5 | -d | -o keepws | -o table ] [ infile ] [ outfile ]\n"); 46 37 } 47 38 48 39 #define NXCONVERT_EXIT_ERROR exit(1) 49 40 50 static const char* nx_formats[] = { "XML", "HDF4", "HDF5", "DTD", NULL };41 static const char* definition_name = "BASE"; 51 42 52 43 int main(int argc, char *argv[]) … … 54 45 char inFile[256], outFile[256], *stringPtr; 55 46 int opt, nx_format = -1, nx_write_access = 0; 56 int nx_write_data = 1;57 47 int nx_read_access = NXACC_READ; 58 48 … … 73 63 break; 74 64 75 /*76 65 case 'd': 77 nx_format = NX_D TD;66 nx_format = NX_DEFINITION; 78 67 nx_write_access |= NXACC_CREATEXML; 79 nx_write_data = 0; 68 if (optarg != NULL && *optarg != '\0') 69 { 70 definition_name = optarg; 71 } 80 72 break; 81 */82 73 83 74 case 'h': … … 105 96 nx_write_access |= NXACC_NOSTRIP; 106 97 nx_read_access |= NXACC_NOSTRIP; 98 } 99 else if (!strcmp(optarg, "table")) 100 { 101 nx_write_access |= NXACC_TABLE; 107 102 } 108 103 else … … 149 144 printf("Converting %s to %s NeXus file %s\n", inFile, nx_formats[nx_format], outFile); 150 145 151 /* Open NeXus input file and NeXus output file */ 152 if (NXopen (inFile, nx_read_access, &inId) != NX_OK) { 153 printf ("NX_ERROR: Can't open %s\n", inFile); 146 if (convert_file(nx_format, inFile, nx_read_access, outFile, nx_write_access) != NX_OK) { 154 147 NXCONVERT_EXIT_ERROR; 155 }156 157 if (NXopen (outFile, nx_write_access, &outId) != NX_OK) {158 printf ("NX_ERROR: Can't open %s\n", outFile);159 NXCONVERT_EXIT_ERROR;160 }161 162 /* Output global attributes */163 if (WriteAttributes (nx_write_data) != NX_OK)164 {165 NXCONVERT_EXIT_ERROR;166 }167 /* Recursively cycle through the groups printing the contents */168 if (WriteGroup (nx_write_data) != NX_OK)169 {170 NXCONVERT_EXIT_ERROR;171 }172 /* Close the input and output files */173 if (NXclose (&outId) != NX_OK)174 {175 NXCONVERT_EXIT_ERROR;176 }177 if (NXclose (&inId) != NX_OK)178 {179 NXCONVERT_EXIT_ERROR;180 148 } 181 149 printf("Convertion successful.\n"); … … 183 151 } 184 152 185 /* Prints the contents of each group as XML tags and values */186 int WriteGroup (int write_data)187 {188 int status, dataType, dataRank, dataDimensions[NX_MAXRANK], dataLen;189 NXname name, class;190 void *dataBuffer;191 192 do {193 status = NXgetnextentry (inId, name, class, &dataType);194 if (status == NX_ERROR) return NX_ERROR;195 if (status == NX_OK) {196 if (!strncmp(class,"NX",2)) {197 if (NXopengroup (inId, name, class) != NX_OK) return NX_ERROR;198 if (NXmakegroup (outId, name, class) != NX_OK) return NX_ERROR;199 if (NXopengroup (outId, name, class) != NX_OK) return NX_ERROR;200 if (WriteGroup (write_data) != NX_OK) return NX_ERROR;201 }202 else if (!strncmp(class,"SDS",3)) {203 if (NXopendata (inId, name) != NX_OK) return NX_ERROR;204 if (NXgetinfo (inId, &dataRank, dataDimensions, &dataType) != NX_OK) return NX_ERROR;205 if (NXmakedata (outId, name, dataType, dataRank, dataDimensions) != NX_OK) return NX_ERROR;206 if (NXopendata (outId, name) != NX_OK) return NX_ERROR;207 if (WriteAttributes (write_data) != NX_OK) return NX_ERROR;208 if (write_data == 1)209 {210 if (NXmalloc (&dataBuffer, dataRank, dataDimensions, dataType) != NX_OK) return NX_ERROR;211 if (NXgetdata (inId, dataBuffer) != NX_OK) return NX_ERROR;212 if (NXputdata (outId, dataBuffer) != NX_OK) return NX_ERROR;213 if (NXfree((void**)&dataBuffer) != NX_OK) return NX_ERROR;214 }215 if (NXclosedata (inId) != NX_OK) return NX_ERROR;216 if (NXclosedata (outId) != NX_OK) return NX_ERROR;217 }218 }219 else if (status == NX_EOD) {220 if (NXclosegroup (inId) != NX_OK) return NX_ERROR;221 if (NXclosegroup (outId) != NX_OK) return NX_ERROR;222 return NX_OK;223 }224 } while (status == NX_OK);225 return NX_OK;226 }227 228 int WriteAttributes (int write_data)229 {230 int status, i, attrLen, attrType;231 NXname attrName;232 void *attrBuffer;233 234 i = 0;235 do {236 status = NXgetnextattr (inId, attrName, &attrLen, &attrType);237 if (status == NX_ERROR) return NX_ERROR;238 if (status == NX_OK) {239 if (strcmp(attrName, "NeXus_version") && strcmp(attrName, "XML_version") &&240 strcmp(attrName, "HDF_version") && strcmp(attrName, "HDF5_Version") &&241 strcmp(attrName, "file_name") && strcmp(attrName, "file_time")) {242 attrLen++; /* Add space for string termination */243 if (NXmalloc((void**)&attrBuffer, 1, &attrLen, attrType) != NX_OK) return NX_ERROR;244 if (NXgetattr (inId, attrName, attrBuffer, &attrLen , &attrType) != NX_OK) return NX_ERROR;245 if (write_data == 1)246 {247 if (NXputattr (outId, attrName, attrBuffer, attrLen , attrType) != NX_OK) return NX_ERROR;248 }249 else250 {251 if (NXputattr (outId, attrName, attrBuffer, attrLen , attrType) != NX_OK) return NX_ERROR;252 }253 if (NXfree((void**)&attrBuffer) != NX_OK) return NX_ERROR;254 }255 i++;256 }257 } while (status != NX_EOD);258 return NX_OK;259 }260 -
tags/4.2.0/applications/Makefile.am
r1896 r1896 31 31 LIBNEXUS90=$(top_builddir)/bindings/f90/libNeXus90.la 32 32 AM_CPPFLAGS=-I. -I$(top_srcdir)/include 33 AM_FCFLAGS=-I$(top_builddir)/bindings/f90 33 34 35 EXTRA_DIST=SConscript 36 37 if HAVE_XML 38 NXINGEST = nxingest 39 endif 34 40 if HAVE_LIBXML2 35 41 NXTRANSLATE=NXtranslate 36 42 NXSUMMARY=NXsummary 37 43 endif 38 SUBDIRS = NXdir $(NXTRANSLATE) $(NXSUMMARY) 44 SUBDIRS = NXdir $(NXTRANSLATE) $(NXSUMMARY) $(NXINGEST) 39 45 #if HAVE_HDF4 40 46 #HDF4_TARGETS = NXtoNX4 … … 48 54 endif 49 55 50 bin_PROGRAMS = nxbrowse nx2dtd nxconvert $(F90_TARGETS)56 bin_PROGRAMS = nxbrowse nx2dtd nxconvert nxvalidate $(F90_TARGETS) 51 57 52 nxconvert_SOURCES = nxconvert.c 58 nxconvert_SOURCES = nxconvert.c nxconvert_common.c nxconvert_common.h 53 59 nxconvert_LDADD = $(LIBNEXUS) 54 nxconvert_LDFLAGS = -static $(LDFLAGS) 60 nxconvert_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 61 62 nxvalidate_SOURCES = nxvalidate.c nxconvert_common.c nxconvert_common.h 63 nxvalidate_LDADD = $(LIBNEXUS) 64 nxvalidate_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 55 65 56 66 nxbrowse_SOURCES = NXbrowse.c 57 67 nxbrowse_LDADD = $(LIBNEXUS) 58 nxbrowse_LDFLAGS = -static $(LDFLAGS)68 nxbrowse_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 59 69 60 70 #NXtoXML_SOURCES = NXtoXML.c … … 64 74 nx2dtd_SOURCES = NXtoDTD.c 65 75 nx2dtd_LDADD = $(LIBNEXUS) 66 nx2dtd_LDFLAGS = -static $(LDFLAGS)76 nx2dtd_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 67 77 68 78 #NXtoNX4_SOURCES = NXtoNX4.c … … 75 85 NXdump_LDADD = $(LIBNEXUS90) 76 86 NXdump_LINK = $(FCLINK) 77 NXdump_LDFLAGS = -static $(LDFLAGS)87 NXdump_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 78 88 79 89 NXbrowse90_SOURCES = NXbrowse90.f90 80 90 NXbrowse90_LDADD = $(LIBNEXUS90) 81 91 NXbrowse90_LINK = $(FCLINK) 82 NXbrowse90_LDFLAGS = -static $(LDFLAGS)92 NXbrowse90_LDFLAGS = -static @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 83 93 84 94 include $(top_srcdir)/build_rules.am -
tags/4.2.0/scripts/nxbuild.in
r1896 r1896 39 39 libexecdir="@libexecdir@" 40 40 datadir="@datadir@" 41 datarootdir="@datarootdir@" 41 42 libdir="@libdir@" 42 43 infodir="@infodir@" -
tags/4.2.0/src/nxxml.c
r1896 r1896 50 50 mxml_node_t *currentChild; 51 51 int currentAttribute; 52 int options; /**< additional information about the node */ 52 53 }xmlStack; 54 55 /* 56 * Freddie Akeroyd, 19/03/2008 57 * 58 * Add in support for table style data writing - this is 59 * indicated internally via the XMLSTACK_OPTION_TABLE flag 60 * and separates the dimensions and data into separate nodes contained 61 * in DIMS_NODE_NAME and DATA_NODE_NAME. This is a first commit and 62 * involves some code duplication that will need to be cleaned up later. 63 * Also writing in table style is only enabled for 1D arrays as 64 * I haven't done slab writing yet which the nexus test program uses 65 * for writing 2D arrays. 66 * 67 * Table output is enabled by opening a file with (NXACC_CREATEXML | NXACC_TABLE) 68 * 69 * See http://trac.nexusformat.org/code/ticket/111 for further details 70 */ 71 #define XMLSTACK_OPTION_TABLE 0x1 /**< indicates table option in xmlStack */ 72 73 /** 74 * Freddie Akeroyd 14/7/2008 75 * Add NeXus schema support - this uses BASE.xsd as the initial file 76 */ 77 #define NEXUS_SCHEMA_VERSION "3.0" /**< version of NeXus definition schema */ 78 #define NEXUS_SCHEMA_NAMESPACE "http://definition.nexusformat.org/schema/" NEXUS_SCHEMA_VERSION /**< XML schema namespace specified by xmlns */ 79 #define NEXUS_SCHEMA_FILE NEXUS_SCHEMA_NAMESPACE "/BASE.xsd" /**< location of default schema file for namespace */ 80 53 81 /*---------------------------------------------------------------------*/ 54 82 typedef struct { 55 83 mxml_node_t *root; /* root node */ 56 84 int readOnly; /* read only flag */ 85 int tableStyle; /**< whether to output data in XML table style */ 57 86 int stackPointer; /* stack pointer */ 58 87 char filename[1024]; /* file name, for NXflush, NXclose */ … … 118 147 mxmlSetErrorCallback(errorCallbackForMxml); 119 148 149 xmlHandle->tableStyle = ((am & NXACC_TABLE) ? 1 : 0); 120 150 /* 121 151 open file 122 152 */ 123 153 strncpy(xmlHandle->filename,filename,1023); 124 switch(am ){154 switch(am & NXACCMASK_REMOVEFLAGS){ 125 155 case NXACC_READ: 126 156 xmlHandle->readOnly = 1; … … 141 171 xmlHandle->stack[0].currentChild = NULL; 142 172 xmlHandle->stack[0].currentAttribute = 0; 173 xmlHandle->stack[0].options = 0; 143 174 fclose(fp); 144 175 break; … … 150 181 mxmlElementSetAttr(current,"XML_version","mxml"); 151 182 mxmlElementSetAttr(current,"file_name",filename); 183 mxmlElementSetAttr(current,"xmlns", NEXUS_SCHEMA_NAMESPACE); 184 mxmlElementSetAttr(current,"xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"); 185 mxmlElementSetAttr(current,"xsi:schemaLocation", 186 NEXUS_SCHEMA_NAMESPACE " " NEXUS_SCHEMA_FILE); 152 187 time_buffer = NXIformatNeXusTime(); 153 188 if(time_buffer != NULL){ … … 158 193 xmlHandle->stack[0].currentChild = NULL; 159 194 xmlHandle->stack[0].currentAttribute = 0; 195 xmlHandle->stack[0].options = 0; 160 196 break; 161 197 default: … … 306 342 xmlHandle->stack[xmlHandle->stackPointer].currentChild = NULL; 307 343 xmlHandle->stack[xmlHandle->stackPointer].currentAttribute = 0; 344 xmlHandle->stack[xmlHandle->stackPointer].options = 0; 308 345 return NX_OK; 309 346 } … … 370 407 return typestring; 371 408 } 409 372 410 /*------------------------------------------------------------------------*/ 411 NXstatus NXXmakedatatable (NXhandle fid, 412 CONSTCHAR *name, int datatype, 413 int rank, int dimensions[]){ 414 pXMLNexus xmlHandle = NULL; 415 mxml_node_t *dataNode = NULL, *dataNodeRoot = NULL, *dimsNode = NULL, *dimsNodeRoot = NULL; 416 mxml_node_t *newData = NULL; 417 mxml_node_t *current; 418 char *typestring; 419 int i, ndata; 420 static int one = 1; 421 422 xmlHandle = (pXMLNexus)fid; 423 assert(xmlHandle); 424 425 if(isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ 426 NXIReportError(NXpData,"Close dataset before trying to create a dataset"); 427 return NX_ERROR; 428 } 429 if(dimensions[0] < 0){ 430 dimensions[0] = 1; 431 } 432 433 current = xmlHandle->stack[xmlHandle->stackPointer].current; 434 435 dimsNodeRoot = mxmlFindElement(current, current, DIMS_NODE_NAME, NULL, NULL, MXML_DESCEND_FIRST); 436 if (dimsNodeRoot == NULL) 437 { 438 dimsNodeRoot = mxmlNewElement(current, DIMS_NODE_NAME); 439 } 440 dimsNode = mxmlNewElement(dimsNodeRoot, name); 441 mxmlNewOpaque(dimsNode, ""); 442 typestring = buildTypeString(datatype,rank,dimensions); 443 if(typestring != NULL){ 444 mxmlElementSetAttr(dimsNode,TYPENAME,typestring); 445 free(typestring); 446 } else { 447 NXIReportError(NXpData,"Failed to allocate typestring"); 448 return NX_ERROR; 449 } 450 ndata = 1; 451 for(i=0; i<rank; i++) 452 { 453 ndata *= dimensions[i]; 454 } 455 dataNodeRoot = current; 456 for(i=0; i<ndata; i++) 457 { 458 dataNodeRoot = mxmlFindElement(dataNodeRoot, current, DATA_NODE_NAME, NULL, NULL, (i == 0 ? MXML_DESCEND_FIRST : MXML_NO_DESCEND) ); 459 if (dataNodeRoot == NULL) 460 { 461 dataNodeRoot = mxmlNewElement(current, DATA_NODE_NAME); 462 } 463 dataNode = mxmlNewElement(dataNodeRoot,name); 464 newData = (mxml_node_t *)malloc(sizeof(mxml_node_t)); 465 if(!newData){ 466 NXIReportError(NXpData,"Failed to allocate space for dataset"); 467 return NX_ERROR; 468 } 469 memset(newData,0,sizeof(mxml_node_t)); 470 mxmlAdd(dataNode, MXML_ADD_AFTER, MXML_ADD_TO_PARENT, newData); 471 newData->type = MXML_CUSTOM; 472 /* newData->value.custom.data = createNXDataset(rank,datatype,dimensions); */ 473 newData->value.custom.data = createNXDataset(1,datatype,&one); 474 if(!newData->value.custom.data){ 475 NXIReportError(NXpData,"Failed to allocate space for dataset"); 476 return NX_ERROR; 477 } 478 newData->value.custom.destroy = destroyDataset; 479 } 480 return NX_OK; 481 } 482 373 483 NXstatus NXXmakedata (NXhandle fid, 374 484 CONSTCHAR *name, int datatype, … … 380 490 char *typestring; 381 491 382 xmlHandle = (pXMLNexus)fid; 383 assert(xmlHandle); 492 493 xmlHandle = (pXMLNexus)fid; 494 assert(xmlHandle); 495 496 if (xmlHandle->tableStyle && datatype != NX_CHAR && dimensions[0] != NX_UNLIMITED && rank == 1) 497 { 498 return NXXmakedatatable(fid,name,datatype,rank,dimensions); 499 } 384 500 385 501 if(isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ … … 389 505 if(dimensions[0] < 0){ 390 506 dimensions[0] = 1; 391 }392 if ((datatype == NX_CHAR) && (rank > 1)) {393 NXIReportError(NXpData,"NeXus XML-API does not yet support multi-dimensional character arrays");394 return NX_ERROR;395 507 } 396 508 … … 461 573 } 462 574 /*-----------------------------------------------------------------------*/ 575 NXstatus NXXopendatatable (NXhandle fid, CONSTCHAR *name){ 576 pXMLNexus xmlHandle = NULL; 577 mxml_node_t *dataNode = NULL, *dimsNode = NULL; 578 char error[1024]; 579 580 xmlHandle = (pXMLNexus)fid; 581 assert(xmlHandle); 582 583 584 if(isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ 585 /* 586 silently fix this 587 */ 588 xmlHandle->stackPointer--; 589 if(xmlHandle->stackPointer < 0){ 590 xmlHandle->stackPointer = 0; 591 } 592 } 593 594 dimsNode = mxmlFindElement(xmlHandle->stack[xmlHandle->stackPointer].current, 595 xmlHandle->stack[xmlHandle->stackPointer].current, 596 DIMS_NODE_NAME, 597 NULL, 598 NULL, 599 MXML_DESCEND_FIRST); 600 601 if(!dimsNode){ 602 snprintf(error,1023,"Failed to open dataset %s",name); 603 NXIReportError(NXpData,error); 604 return NX_ERROR; 605 } 606 607 dataNode = mxmlFindElement(dimsNode, 608 dimsNode, 609 name, 610 NULL, 611 NULL, 612 MXML_DESCEND_FIRST); 613 if(dataNode == NULL){ 614 dataNode = searchSDSLinks(xmlHandle,name); 615 } 616 if(!dataNode){ 617 snprintf(error,1023,"Failed to open dataset %s",name); 618 NXIReportError(NXpData,error); 619 return NX_ERROR; 620 } 621 xmlHandle->stackPointer++; 622 xmlHandle->stack[xmlHandle->stackPointer].current = dataNode; 623 xmlHandle->stack[xmlHandle->stackPointer].currentChild = NULL; 624 xmlHandle->stack[xmlHandle->stackPointer].currentAttribute = 0; 625 xmlHandle->stack[xmlHandle->stackPointer].options = XMLSTACK_OPTION_TABLE; 626 return NX_OK; 627 } 628 629 463 630 NXstatus NXXopendata (NXhandle fid, CONSTCHAR *name){ 464 631 pXMLNexus xmlHandle = NULL; 465 mxml_node_t *dataNode = NULL ;632 mxml_node_t *dataNode = NULL, *current = NULL; 466 633 char error[1024]; 467 634 468 635 xmlHandle = (pXMLNexus)fid; 469 636 assert(xmlHandle); 637 638 /* is this a table style node ? */ 639 current = xmlHandle->stack[xmlHandle->stackPointer].current; 640 dataNode = mxmlFindElement(current, 641 current, 642 DATA_NODE_NAME, 643 NULL, 644 NULL, 645 MXML_DESCEND_FIRST); 646 if (dataNode != NULL) 647 { 648 dataNode = mxmlFindElement(dataNode, 649 dataNode, 650 name, 651 NULL, 652 NULL, 653 MXML_DESCEND_FIRST); 654 } 655 if (dataNode != NULL) 656 { 657 return NXXopendatatable(fid, name); 658 } 470 659 471 660 if(isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ … … 497 686 xmlHandle->stack[xmlHandle->stackPointer].currentChild = NULL; 498 687 xmlHandle->stack[xmlHandle->stackPointer].currentAttribute = 0; 688 xmlHandle->stack[xmlHandle->stackPointer].options = 0; 499 689 return NX_OK; 500 690 } 501 691 /*----------------------------------------------------------------------*/ 692 502 693 NXstatus NXXclosedata (NXhandle fid){ 503 694 pXMLNexus xmlHandle = NULL; … … 525 716 return NULL; 526 717 } 718 719 /* we only havv to deal with non-character data here */ 720 NXstatus NXXputdatatable (NXhandle fid, void *data){ 721 pXMLNexus xmlHandle = NULL; 722 mxml_node_t *userData = NULL; 723 mxml_node_t *current = NULL; 724 mxml_node_t *nodeRoot = NULL; 725 mxml_node_t *dataNodeRoot = NULL; 726 mxml_node_t *dataNode = NULL; 727 const char* name; 728 pNXDS dataset; 729 int i, offset, length, type, rank, dim[NX_MAXRANK]; 730 char *pPtr = NULL; 731 xmlHandle = (pXMLNexus)fid; 732 assert(xmlHandle); 733 /* current points at the Idims node as done in NXXopendatatable */ 734 current = xmlHandle->stack[xmlHandle->stackPointer].current; 735 name = current->value.element.name; 736 /* we want to walk all Idata nodes and set name */ 737 nodeRoot = current->parent->parent; 738 dataNodeRoot = nodeRoot; 739 offset = 0; 740 for(i=0; dataNodeRoot != NULL; i++) 741 { 742 dataNodeRoot = mxmlFindElement(dataNodeRoot, nodeRoot, DATA_NODE_NAME, NULL, NULL, (i == 0 ? MXML_DESCEND_FIRST : MXML_NO_DESCEND) ); 743 if (dataNodeRoot != NULL) 744 { 745 dataNode = mxmlFindElement(dataNodeRoot,dataNodeRoot,name,NULL,NULL,MXML_DESCEND_FIRST); 746 if (dataNode != NULL) 747 { 748 userData = findData(dataNode); 749 assert(userData != NULL); 750 dataset = (pNXDS)userData->value.custom.data; 751 assert(dataset); 752 length = getNXDatasetByteLength(dataset); 753 memcpy(dataset->u.ptr,(char*)data + offset,length); 754 offset += length; 755 } 756 } 757 } 758 return NX_OK; 759 } 760 527 761 /*------------------------------------------------------------------------*/ 528 762 NXstatus NXXputdata (NXhandle fid, void *data){ … … 531 765 mxml_node_t *current = NULL; 532 766 pNXDS dataset; 533 int length, type, rank, dim[NX_MAXRANK];767 int i, length, type, rank, dim[NX_MAXRANK]; 534 768 char *pPtr = NULL; 535 769 536 770 xmlHandle = (pXMLNexus)fid; 537 771 assert(xmlHandle); 772 773 if (xmlHandle->stack[xmlHandle->stackPointer].options & XMLSTACK_OPTION_TABLE) 774 { 775 return NXXputdatatable(fid,data); 776 } 538 777 539 778 if(!isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ … … 551 790 */ 552 791 if(NXXgetinfo(fid,&rank, dim, &type) == NX_OK){ 553 pPtr = (char *)malloc((dim[0]+1)*sizeof(char)); 792 length = 1; 793 for(i=0; i<rank; i++) 794 { 795 length *= dim[i]; 796 } 797 pPtr = (char *)malloc((length+1)*sizeof(char)); 554 798 if(pPtr != NULL){ 555 memcpy(pPtr,data, dim[0]);556 pPtr[ dim[0]] = '\0';799 memcpy(pPtr,data,length); 800 pPtr[length] = '\0'; 557 801 mxmlSetOpaque(userData,(const char *)pPtr); 558 802 free(pPtr); 559 803 } 560 804 } 561 mxmlSetOpaque(userData,(const char *)data); 805 else 806 { 807 NXIReportError(NXpData,"Unable to determine size of character dataset"); 808 return NX_ERROR; 809 } 562 810 } else { 563 811 dataset = (pNXDS)userData->value.custom.data; … … 568 816 return NX_OK; 569 817 } 818 819 NXstatus NXXgetdatatable (NXhandle fid, void *data){ 820 pXMLNexus xmlHandle = NULL; 821 mxml_node_t *userData = NULL; 822 mxml_node_t *current = NULL; 823 mxml_node_t *nodeRoot = NULL; 824 mxml_node_t *dataNodeRoot = NULL; 825 mxml_node_t *dataNode = NULL; 826 const char* name; 827 pNXDS dataset; 828 int i, offset, length, type, rank, dim[NX_MAXRANK]; 829 xmlHandle = (pXMLNexus)fid; 830 assert(xmlHandle); 831 832 /* current points at the Idims node as done in NXXopendatatable */ 833 current = xmlHandle->stack[xmlHandle->stackPointer].current; 834 name = current->value.element.name; 835 /* we want to walk all Idata nodes and set name */ 836 nodeRoot = current->parent->parent; 837 dataNodeRoot = nodeRoot; 838 offset = 0; 839 for(i=0; dataNodeRoot != NULL; i++) 840 { 841 dataNodeRoot = mxmlFindElement(dataNodeRoot, nodeRoot, DATA_NODE_NAME, NULL, NULL, (i == 0 ? MXML_DESCEND_FIRST : MXML_NO_DESCEND) ); 842 if (dataNodeRoot != NULL) 843 { 844 dataNode = mxmlFindElement(dataNodeRoot,dataNodeRoot,name,NULL,NULL,MXML_DESCEND_FIRST); 845 if (dataNode != NULL) 846 { 847 userData = findData(dataNode); 848 assert(userData != NULL); 849 dataset = (pNXDS)userData->value.custom.data; 850 assert(dataset); 851 length = getNXDatasetByteLength(dataset); 852 memcpy((char*)data + offset, dataset->u.ptr, length); 853 offset += length; 854 } 855 } 856 } 857 return NX_OK; 858 } 859 860 570 861 /*------------------------------------------------------------------------*/ 571 862 NXstatus NXXgetdata (NXhandle fid, void *data){ … … 574 865 mxml_node_t *current = NULL; 575 866 pNXDS dataset; 576 int length, type, rank, dim[NX_MAXRANK]; 577 578 xmlHandle = (pXMLNexus)fid; 579 assert(xmlHandle); 867 int i, length, type, rank, dim[NX_MAXRANK]; 868 869 xmlHandle = (pXMLNexus)fid; 870 assert(xmlHandle); 871 872 if (xmlHandle->stack[xmlHandle->stackPointer].options & XMLSTACK_OPTION_TABLE) 873 { 874 return NXXgetdatatable(fid,data); 875 } 580 876 581 877 if(!isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ … … 592 888 */ 593 889 if(NXXgetinfo(fid,&rank, dim, &type) == NX_OK){ 594 strncpy((char *)data,userData->value.opaque,dim[0]); 890 length = 1; 891 for(i=0; i<rank; i++) 892 { 893 length *= dim[i]; 894 } 895 strncpy((char *)data,userData->value.opaque,length); 595 896 } else { 596 897 strcpy((char *)data,nxitrim(userData->value.opaque)); … … 636 937 dimension[0]= strlen(userData->value.opaque); 637 938 } else { 939 *iType = translateTypeCode(attr); 638 940 analyzeDim(attr,rank,dimension,iType); 639 *rank = 1; 640 *iType = NX_CHAR; 941 if (dimension[0] == -1) /* 1D strings are NX_CHAR not NX_CHAR[] so length will not be correct */ 942 { 943 dimension[0] = strlen(userData->value.opaque); 944 } 945 641 946 } 642 947 } else { … … 734 1039 return 1; 735 1040 } 1041 1042 NXstatus NXXputslabtable (NXhandle fid, void *data, 1043 int iStart[], int iSize[]){ 1044 return NX_OK; 1045 } 736 1046 /*----------------------------------------------------------------------*/ 737 1047 NXstatus NXXputslab (NXhandle fid, void *data, … … 746 1056 xmlHandle = (pXMLNexus)fid; 747 1057 assert(xmlHandle); 1058 1059 if (xmlHandle->stack[xmlHandle->stackPointer].options & XMLSTACK_OPTION_TABLE) 1060 { 1061 return NXXputslabtable(fid,data,iStart,iSize); 1062 } 748 1063 749 1064 if(!isDataNode(xmlHandle->stack[xmlHandle->stackPointer].current)){ … … 984 1299 const char *attribute = NULL; 985 1300 char error[1024]; 986 c har *attData = NULL;1301 const char *attData = NULL; 987 1302 int iValue, nx_type; 988 1303 float fValue; … … 1024 1339 switch(nx_type){ 1025 1340 case NX_CHAR: 1026 strncpy((char *)data, attribute, *datalen); 1027 *datalen = strlen(attribute); 1341 /* enforce NULL termination regardless of length of datalen */ 1342 strncpy((char *)data, attribute, *datalen-1); 1343 ((char*)data)[*datalen-1] = '\0'; 1344 /* *datalen = strlen(attribute); */ 1345 *datalen = strlen((char*)data); 1028 1346 *iType = NX_CHAR; 1029 1347 break; … … 1064 1382 return NX_OK; 1065 1383 } 1384 1385 /* find the next node, ignoring Idata */ 1386 static mxml_node_t* find_node(mxml_node_t* node, int next) 1387 { 1388 int done = 0; 1389 mxml_node_t* parent_next = NULL; /* parent to use if we are in an Idims search */ 1390 if (node == NULL) 1391 { 1392 return NULL; 1393 } 1394 if ( (node->parent != NULL) && !strcmp(node->parent->value.element.name, DIMS_NODE_NAME) ) 1395 { 1396 parent_next = node->parent->next; 1397 } 1398 else 1399 { 1400 parent_next = NULL; 1401 } 1402 if (next) 1403 { 1404 if (node->next != NULL) 1405 { 1406 node = node->next; 1407 } 1408 else 1409 { 1410 node = parent_next; 1411 } 1412 } 1413 while(node != NULL && !done) 1414 { 1415 if ( (node->parent != NULL) && !strcmp(node->parent->value.element.name, DIMS_NODE_NAME) ) 1416 { 1417 parent_next = node->parent->next; 1418 } 1419 else 1420 { 1421 parent_next = NULL; 1422 } 1423 if ( (node->type != MXML_ELEMENT) || !strcmp(node->value.element.name, DATA_NODE_NAME) ) 1424 { 1425 if (node->next != NULL) 1426 { 1427 node = node->next; 1428 } 1429 else 1430 { 1431 node = parent_next; 1432 } 1433 continue; 1434 } 1435 if (!strcmp(node->value.element.name, DIMS_NODE_NAME)) 1436 { 1437 node = node->child; 1438 continue; 1439 } 1440 done = 1; 1441 } 1442 return node; 1443 } 1444 1066 1445 /*====================== search functions =================================*/ 1067 1446 NXstatus NXXgetnextentry (NXhandle fid,NXname name, 1068 1447 NXname nxclass, int *datatype){ 1069 1448 pXMLNexus xmlHandle = NULL; 1070 mxml_node_t *next = NULL, *userData ;1449 mxml_node_t *next = NULL, *userData, *node = NULL; 1071 1450 int stackPtr; 1072 1451 const char *target = NULL, *attname = NULL; … … 1090 1469 initialization of search 1091 1470 */ 1092 xmlHandle->stack[stackPtr].currentChild = 1093 xmlHandle->stack[stackPtr].current->child; 1471 node = find_node(xmlHandle->stack[stackPtr].current->child, 0); 1094 1472 } else { 1095 1473 /* 1096 1474 proceed 1097 1475 */ 1098 xmlHandle->stack[stackPtr].currentChild =1099 xmlHandle->stack[stackPtr].currentChild->next;1100 }1101 next = xmlHandle->stack[stackPtr].currentChild;1476 node = find_node(xmlHandle->stack[stackPtr].currentChild, 1); 1477 } 1478 xmlHandle->stack[stackPtr].currentChild = node; 1479 next = node; 1102 1480 if(next == NULL){ 1103 1481 return NX_EOD; … … 1236 1614 NXname pName, NXname pClass){ 1237 1615 pXMLNexus xmlHandle = NULL; 1238 mxml_node_t * child = NULL;1616 mxml_node_t *node = NULL, *child = NULL; 1239 1617 mxml_node_t *current = NULL; 1240 1618 const char *nameAtt = NULL; … … 1256 1634 strcpy(pClass,current->value.element.name); 1257 1635 1636 /* count all child nodes, but need to ignore DATA_NODE_NAME and 1637 * descend into DIMS_NODE_NAME 1638 */ 1258 1639 childCount = 0; 1259 child = current->child; 1260 while(child != NULL){ 1261 childCount++; 1262 child = child->next; 1640 node = current->child; 1641 while(node != NULL) 1642 { 1643 if (!strcmp(node->value.element.name, DATA_NODE_NAME)) 1644 { 1645 ; /* names also exist in DIMS_NODE_NAME so do nothing here */ 1646 } 1647 else if (!strcmp(node->value.element.name, DIMS_NODE_NAME)) 1648 { 1649 child = node->child; 1650 while(child != NULL) 1651 { 1652 /* not sure why this check is needed, but you double count otherwise */ 1653 if (child->type == MXML_ELEMENT) 1654 { 1655 childCount++; 1656 } 1657 child = child->next; 1658 } 1659 } 1660 else 1661 { 1662 childCount++; 1663 } 1664 node = node->next; 1263 1665 } 1264 1666 *iN = childCount; … … 1269 1671 pXMLNexus xmlHandle = NULL; 1270 1672 mxml_node_t *current = NULL; 1271 int stackPtr, currentAtt ;1673 int stackPtr, currentAtt, skip; 1272 1674 1273 1675 xmlHandle = (pXMLNexus)fid; … … 1281 1683 hide type and group name attributes 1282 1684 */ 1283 if(!isDataNode(current)) { 1284 *iN = current->value.element.num_attrs -1; 1285 return NX_OK; 1286 } 1287 if(mxmlElementGetAttr(current,TYPENAME) != NULL){ 1288 *iN = current->value.element.num_attrs -1; 1685 skip=0; 1686 if(isDataNode(current)) { 1687 /* data nodes may have type */ 1688 if(mxmlElementGetAttr(current,TYPENAME) != NULL) skip=1; 1289 1689 } else { 1290 *iN = current->value.element.num_attrs; 1291 } 1690 /* group nodes (except root) have name */ 1691 if(mxmlElementGetAttr(current,"name") != NULL) skip=1; 1692 } 1693 *iN = current->value.element.num_attrs - skip; 1292 1694 return NX_OK; 1293 1695 } -
tags/4.2.0/src/nexus_symbols.txt
r1896 r1896 54 54 NXMEnableErrorReporting 55 55 nximakenamedlink_ 56 createNXDataset 57 createTextNXDataset 58 dropNXDataset 59 getNXDatasetByteLength 60 getNXDatasetDim 61 getNXDatasetLength 62 getNXDatasetRank 63 getNXDatasetText 64 getNXDatasetType 65 getNXDatasetValue 66 getNXDatasetValueAt 67 putNXDatasetValue 68 putNXDatasetValueAt 69 nxigetrawinfo_ -
tags/4.2.0/src/napi_exports.c
r1896 r1896 8 8 9 9 #define CALL_MODE __stdcall 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif /* __cplusplus */ 14 10 15 #include "napi_exports.h" 16 17 #ifdef __cplusplus 18 } 19 #endif /* __cplusplus */ -
tags/4.2.0/src/napi4.c
r1896 r1896 53 53 char iAccess[2]; 54 54 } NexusFile, *pNexusFile; 55 55 /*-------------------------------------------------------------------*/ 56 static void ignoreError(void *data, char *text){ 57 } 56 58 /*--------------------------------------------------------------------*/ 57 59 … … 174 176 int32 i, iN, iA, iD1, iD2; 175 177 NXname pNam; 176 int32 iDim[ MAX_VAR_DIMS];178 int32 iDim[H4_MAX_VAR_DIMS]; 177 179 178 180 self = NXIassert (fid); … … 292 294 int iRet; 293 295 int32 iData, iAtt, iRank, iType; 294 int32 iDim[ MAX_VAR_DIMS];296 int32 iDim[H4_MAX_VAR_DIMS]; 295 297 NXname pNam; 296 298 … … 337 339 { 338 340 int i; 339 int32 groupID, iA, iD1, iD2, iDim[ MAX_VAR_DIMS];341 int32 groupID, iA, iD1, iD2, iDim[H4_MAX_VAR_DIMS]; 340 342 NXname pText; 341 343 342 344 buffer[0] = '\0'; 343 for(i = 0; i <pFile->iStackPtr; i++){345 for(i = 1; i <= pFile->iStackPtr; i++){ 344 346 strncat(buffer,"/",bufLen-strlen(buffer)); 345 groupID = Vattach(pFile->iVID,pFile->iStack[pFile->iStackPtr].iVref, 346 "r"); 347 Vgetname(groupID, pText); 348 strncat(buffer,pText,bufLen-strlen(buffer)); 349 Vdetach(groupID); 347 groupID = Vattach(pFile->iVID,pFile->iStack[i].iVref, "r"); 348 if (groupID != -1) 349 { 350 if (Vgetname(groupID, pText) != -1) { 351 strncat(buffer,pText,bufLen-strlen(buffer)); 352 } else { 353 NXIReportError (NXpData, "ERROR: NXIbuildPath cannot get vgroup name"); 354 } 355 Vdetach(groupID); 356 } 357 else 358 { 359 NXIReportError (NXpData, "ERROR: NXIbuildPath cannot attach to vgroup"); 360 } 350 361 } 351 362 if(pFile->iCurrentSDS != 0){ 352 strncat(buffer,"/",bufLen-strlen(buffer)); 353 SDgetinfo(pFile->iCurrentSDS,pText,&iA,iDim,&iD1,&iD2); 354 strncat(buffer,pText,bufLen-strlen(buffer)); 363 if (SDgetinfo(pFile->iCurrentSDS,pText,&iA,iDim,&iD1,&iD2) != -1) { 364 strncat(buffer,"/",bufLen-strlen(buffer)); 365 strncat(buffer,pText,bufLen-strlen(buffer)); 366 } 367 else 368 { 369 NXIReportError (NXpData, "ERROR: NXIbuildPath cannot read SDS"); 370 } 355 371 } 356 372 } … … 374 390 375 391 *pHandle = NULL; 392 393 /* mask off any options for now */ 394 am = (NXaccess)(am & NXACCMASK_REMOVEFLAGS); 376 395 /* map Nexus NXaccess types to HDF4 types */ 377 396 if (am == NXACC_CREATE) { … … 651 670 char pBuffer[256]; 652 671 int i, iRet, type; 653 int32 myDim[ MAX_VAR_DIMS];672 int32 myDim[H4_MAX_VAR_DIMS]; 654 673 655 674 pFile = NXIassert (fid); … … 780 799 int32 iNew, iRet, type; 781 800 char pBuffer[256]; 782 int i ;783 int32 myDim[ MAX_VAR_DIMS];801 int i, compress_level; 802 int32 myDim[H4_MAX_VAR_DIMS]; 784 803 comp_info compstruct; 785 804 … … 891 910 892 911 /* compress SD data set */ 912 compress_level = 6; 913 if( (compress_type / 100) == NX_COMP_LZW ) 914 { 915 compress_level = compress_type % 100; 916 compress_type = NX_COMP_LZW; 917 } 893 918 894 919 if(compress_type == NX_COMP_LZW) 895 920 { 896 compstruct.deflate.level = 6;921 compstruct.deflate.level = compress_level; 897 922 iRet = SDsetcompress(iNew, COMP_CODE_DEFLATE, &compstruct); 898 923 if (iRet < 0) … … 950 975 pNexusFile pFile; 951 976 int32 iRank, iAtt, iType, iRet; 952 int32 iSize[ MAX_VAR_DIMS];953 int compress_typei = COMP_CODE_NONE;977 int32 iSize[H4_MAX_VAR_DIMS]; 978 comp_coder_t compress_typei = COMP_CODE_NONE; 954 979 NXname pBuffer; 955 980 char pError[512]; 956 981 comp_info compstruct; 982 int compress_level = 6; 957 983 958 984 pFile = NXIassert (fid); … … 971 997 { 972 998 compress_typei = COMP_CODE_DEFLATE; 999 } 1000 else if ( (compress_type / 100) == NX_COMP_LZW ) 1001 { 1002 compress_typei = COMP_CODE_DEFLATE; 1003 compress_level = compress_type % 100; 1004 compress_type = NX_COMP_LZW; 973 1005 } 974 1006 else if (compress_type == NX_COMP_RLE) … … 991 1023 if(compress_type == NX_COMP_LZW) 992 1024 { 993 compstruct.deflate.level = 6;1025 compstruct.deflate.level = compress_level; 994 1026 } 995 1027 else if(compress_type == NX_COMP_HUF) … … 1089 1121 { 1090 1122 pNexusFile pFile; 1091 int32 iStart[ MAX_VAR_DIMS], iSize[MAX_VAR_DIMS], iStride[MAX_VAR_DIMS];1123 int32 iStart[H4_MAX_VAR_DIMS], iSize[H4_MAX_VAR_DIMS], iStride[H4_MAX_VAR_DIMS]; 1092 1124 NXname pBuffer; 1093 1125 int32 iRank, iAtt, iType, iRet, i; … … 1102 1134 } 1103 1135 /* first read dimension information */ 1104 memset (iStart, 0, MAX_VAR_DIMS * sizeof (int32));1136 memset (iStart, 0, H4_MAX_VAR_DIMS * sizeof (int32)); 1105 1137 SDgetinfo (pFile->iCurrentSDS, pBuffer, &iRank, iSize, &iType, &iAtt); 1106 1138 … … 1113 1145 iRet = SDwritedata (pFile->iCurrentSDS, iStart, iStride, iSize, data); 1114 1146 if (iRet < 0) { 1147 /* HEprint(stdout,0); */ 1115 1148 sprintf (pError, "ERROR: failure to write data to %s", pBuffer); 1116 1149 NXIReportError (NXpData, pError); … … 1200 1233 pNexusFile pFile; 1201 1234 int iRet; 1202 int32 iStride[ MAX_VAR_DIMS];1203 int32 myStart[ MAX_VAR_DIMS], mySize[MAX_VAR_DIMS];1235 int32 iStride[H4_MAX_VAR_DIMS]; 1236 int32 myStart[H4_MAX_VAR_DIMS], mySize[H4_MAX_VAR_DIMS]; 1204 1237 int32 i, iRank, iType, iAtt; 1205 1238 NXname pBuffer; … … 1214 1247 } 1215 1248 /* initialise stride to 1 */ 1216 for (i = 0; i < MAX_VAR_DIMS; i++) {1249 for (i = 0; i < H4_MAX_VAR_DIMS; i++) { 1217 1250 iStride[i] = 1; 1218 1251 } … … 1256 1289 { 1257 1290 pNexusFile pFile; 1258 1291 ErrFunc oldErr; 1292 int datalen, type = NX_CHAR; 1293 1259 1294 pFile = NXIassert (fid); 1260 1295 … … 1265 1300 sRes->iTag = DFTAG_NDG; 1266 1301 sRes->iRef = SDidtoref (pFile->iCurrentSDS); 1267 NXIbuildPath(pFile,sRes->targetPath,1024); 1302 oldErr = NXMGetError(); 1303 NXMSetError(NXpData, ignoreError); 1304 datalen = 1024; 1305 memset(&sRes->targetPath,0,1024); 1306 if(NX4getattr(fid,"target",&sRes->targetPath,&datalen,&type) != NX_OK) 1307 { 1308 NXIbuildPath(pFile,sRes->targetPath,1024); 1309 } 1310 NXMSetError(NXpData,oldErr); 1268 1311 return NX_OK; 1269 1312 } … … 1453 1496 int iRet, iStackPtr, iCurDir; 1454 1497 int32 iTemp, iD1, iD2, iA; 1455 int32 iDim[ MAX_VAR_DIMS];1498 int32 iDim[H4_MAX_VAR_DIMS]; 1456 1499 1457 1500 pFile = NXIassert (fid); … … 1536 1579 { 1537 1580 pNexusFile pFile; 1538 int32 iStart[ MAX_VAR_DIMS], iSize[MAX_VAR_DIMS];1581 int32 iStart[H4_MAX_VAR_DIMS], iSize[H4_MAX_VAR_DIMS]; 1539 1582 NXname pBuffer; 1540 1583 int32 iRank, iAtt, iType; … … 1548 1591 } 1549 1592 /* first read dimension information */ 1550 memset (iStart, 0, MAX_VAR_DIMS * sizeof (int32));1593 memset (iStart, 0, H4_MAX_VAR_DIMS * sizeof (int32)); 1551 1594 SDgetinfo (pFile->iCurrentSDS, pBuffer, &iRank, iSize, &iType, &iAtt); 1552 1595 /* actually read */ … … 1563 1606 pNexusFile pFile; 1564 1607 NXname pBuffer; 1565 int32 iAtt, myDim[ MAX_VAR_DIMS], i, iRank, mType;1608 int32 iAtt, myDim[H4_MAX_VAR_DIMS], i, iRank, mType; 1566 1609 1567 1610 pFile = NXIassert (fid); … … 1593 1636 { 1594 1637 pNexusFile pFile; 1595 int32 myStart[ MAX_VAR_DIMS], mySize[MAX_VAR_DIMS];1638 int32 myStart[H4_MAX_VAR_DIMS], mySize[H4_MAX_VAR_DIMS]; 1596 1639 int32 i, iRank, iType, iAtt; 1597 1640 NXname pBuffer; … … 1796 1839 if ((*datalen <= iLen) && 1797 1840 (*iType == DFNT_UINT8 || *iType == DFNT_CHAR8 || *iType == DFNT_UCHAR8)) { 1798 iLen = *datalen - 1; 1841 iLen = *datalen - 1; /* this enforces NULL termination regardless of size of datalen */ 1799 1842 } 1800 1843 memcpy (data, pData, iLen); … … 1812 1855 int iRet; 1813 1856 int32 iData, iAtt, iRank, iType; 1814 int32 iDim[ MAX_VAR_DIMS];1857 int32 iDim[H4_MAX_VAR_DIMS]; 1815 1858 NXname pNam; 1816 1859 … … 1904 1947 1905 1948 pFile = NXIassert (fid); 1906 NXIKillAttDir ( fid);1949 NXIKillAttDir (pFile); 1907 1950 iRet = NXIInitAttDir (pFile); 1908 1951 if (iRet == NX_ERROR) … … 1921 1964 1922 1965 pFile = NXIassert (fid); 1923 NXIKillDir ( fid);1966 NXIKillDir (pFile); 1924 1967 iRet = NXIInitDir (pFile); 1925 1968 if (iRet < 0) { -
tags/4.2.0/src/nxstack.c
r1896 r1896 45 45 pFileStack pNew = NULL; 46 46 47 pNew = malloc(sizeof(fileStack));47 pNew = (pFileStack)malloc(sizeof(fileStack)); 48 48 if(pNew == NULL){ 49 49 return NULL; -
tags/4.2.0/src/napi5.c
r1896 r1896 135 135 size_t rdcc_nbytes; 136 136 double rdcc_w0; 137 138 /* mask of any options for now */ 139 am = (NXaccess)(am & NXACCMASK_REMOVEFLAGS); 137 140 138 141 /* turn off the automatic HDF error handling */ … … 378 381 } 379 382 iVID = iRet; 380 strncpy(pFile->name_ref,pBuffer,1023);381 383 aid2 = H5Screate(H5S_SCALAR); 382 384 aid1 = H5Tcopy(H5T_C_S1); … … 460 462 } 461 463 atype=H5Tcopy(H5T_C_S1); 462 H5Tset_size(atype, 128);464 H5Tset_size(atype,sizeof(data)); 463 465 iRet = H5Aread(attr1, atype, data); 464 466 if (strcmp(data, nxclass) == 0) { … … 616 618 hsize_t size[H5S_MAX_RANK]; 617 619 hsize_t maxdims[H5S_MAX_RANK]; 620 int compress_level; 618 621 619 622 pFile = NXI5assert (fid); … … 652 655 /* 653 656 * This assumes string lenght is in the last dimensions and 654 * the logic must be the same as used in NX5get glab and NX5getinfo657 * the logic must be the same as used in NX5getslab and NX5getinfo 655 658 * 656 659 * search for tests on H5T_STRING 657 660 */ 658 661 byte_zahl=dimensions[rank-1]; 659 dimensions[rank-1]=1;660 662 for(i = 0; i < rank; i++) 661 663 { 662 664 mydim1[i] = dimensions[i]; 663 665 } 664 dimensions[rank-1] = byte_zahl; 665 dataspace=H5Screate_simple(rank,mydim1,NULL); 666 mydim1[rank-1] = 1; 667 if (dimensions[rank-1] > 1) 668 { 669 mydim[rank-1] = maxdims[rank-1] = size[rank-1] = 1; 670 } 671 if (chunkdims[rank-1] > 1) 672 { 673 chunkdims[rank-1] = 1; 674 } 675 if (dimensions[0] == NX_UNLIMITED) 676 { 677 mydim1[0] = 1; 678 maxdims[0] = H5S_UNLIMITED; 679 } 680 dataspace=H5Screate_simple(rank,mydim1,maxdims); 666 681 } else { 667 682 if (dimensions[0] == NX_UNLIMITED) … … 681 696 /* H5Tset_strpad(H5T_STR_SPACEPAD); */ 682 697 } 698 compress_level = 6; 699 if ( (compress_type / 100) == NX_COMP_LZW ) 700 { 701 compress_level = compress_type % 100; 702 compress_type = NX_COMP_LZW; 703 } 683 704 if(compress_type == NX_COMP_LZW) 684 705 { … … 689 710 return NX_ERROR; 690 711 } 691 H5Pset_deflate(cparms, 6);712 H5Pset_deflate(cparms,compress_level); 692 713 iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1, 693 714 dataspace, cparms); … … 886 907 887 908 NXstatus NX5putattr (NXhandle fid, CONSTCHAR *name, void *data, 888 int datalen, int iType) 909 910 int datalen, int iType) 889 911 { 890 912 pNexusFile5 pFile; … … 910 932 iRet=H5Adelete(vid,name); 911 933 if (iRet<0) { 912 NXIReportError (NXpData, "ERROR: Old attribute cannot removed! ");934 NXIReportError (NXpData, "ERROR: Old attribute cannot be removed! "); 913 935 killAttVID(pFile,vid); 914 936 return NX_ERROR; … … 944 966 hsize_t myStart[H5S_MAX_RANK]; 945 967 hsize_t mySize[H5S_MAX_RANK]; 946 hsize_t size[ 1],maxdims[H5S_MAX_RANK];968 hsize_t size[H5S_MAX_RANK],maxdims[H5S_MAX_RANK]; 947 969 hid_t filespace,dataspace; 948 970 … … 954 976 } 955 977 rank = H5Sget_simple_extent_ndims(pFile->iCurrentS); 978 iRet = H5Sget_simple_extent_dims(pFile->iCurrentS, NULL, maxdims); 956 979 for(i = 0; i < rank; i++) 957 980 { 958 981 myStart[i] = iStart[i]; 959 982 mySize[i] = iSize[i]; 960 } 961 iRet = H5Sget_simple_extent_dims(pFile->iCurrentS, NULL, maxdims); 983 size[i] = iSize[i]; 984 } 985 if (H5Tget_class(pFile->iCurrentT) == H5T_STRING) 986 { 987 mySize[rank - 1] = 1; 988 size[rank - 1] = 1; 989 myStart[rank - 1] = 0; 990 } 962 991 dataspace = H5Screate_simple (rank, mySize, NULL); 963 992 if (maxdims[0] == NX_UNLIMITED) … … 965 994 size[0]=iStart[0] + iSize[0]; 966 995 iRet = H5Dextend(pFile->iCurrentD, size); 996 if (iRet < 0) 997 { 998 NXIReportError (NXpData, "ERROR: extend slab failed"); 999 return NX_ERROR; 1000 } 1001 967 1002 filespace = H5Dget_space(pFile->iCurrentD); 968 1003 … … 979 1014 iRet = H5Dwrite(pFile->iCurrentD, pFile->iCurrentT, dataspace, 980 1015 filespace, H5P_DEFAULT,data); 1016 if (iRet < 0) 1017 { 1018 NXIReportError (NXpData, "ERROR: writing slab failed"); 1019 } 981 1020 iRet = H5Sclose(filespace); 982 1021 } else { … … 993 1032 iRet = H5Dwrite(pFile->iCurrentD, pFile->iCurrentT, dataspace, 994 1033 pFile->iCurrentS, H5P_DEFAULT,data); 1034 if (iRet < 0) 1035 { 1036 NXIReportError (NXpData, "ERROR: writing slab failed"); 1037 } 995 1038 } 996 1039 /* deal with HDF errors */ … … 998 1041 if (iRet < 0) 999 1042 { 1000 NXIReportError (NXpData, "ERROR: writing slab failed");1043 NXIReportError (NXpData, "ERROR: closing slab failed"); 1001 1044 return NX_ERROR; 1002 1045 } … … 1285 1328 } else { 1286 1329 atype=H5Tcopy(H5T_C_S1); 1287 H5Tset_size(atype, 64);1330 H5Tset_size(atype,sizeof(data)); 1288 1331 H5Aread(attr_id, atype, data); 1289 1332 strcpy(pClass,data); … … 1506 1549 type=H5T_C_S1; 1507 1550 atype=H5Tcopy(type); 1508 H5Tset_size(atype, 128);1551 H5Tset_size(atype,sizeof(data)); 1509 1552 iRet = H5Aread(attr1, atype, data); 1510 1553 strcpy(nxclass,data); … … 1713 1756 H5S_ALL, H5P_DEFAULT,tmp_data); 1714 1757 data1 = tmp_data + myStart[0]; 1715 strncpy( data,data1,(hsize_t)iSize[0]);1758 strncpy((char*)data,data1,(hsize_t)iSize[0]); 1716 1759 free(tmp_data); 1717 1760 } else { … … 1755 1798 vid = getAttVID(pFile); 1756 1799 1800 pName[0] = '\0'; 1757 1801 idx=pFile->iAtt5.iCurrentIDX; 1758 1802 iRet=0; … … 1784 1828 } 1785 1829 strcpy(pName, iname); 1830 free(iname); 1786 1831 iname = NULL; 1787 free(iname);1788 1832 } else { 1789 1833 strcpy(pName,"What is this?"); … … 1819 1863 { 1820 1864 pNexusFile5 pFile; 1821 int iNew, iRet, vid ;1865 int iNew, iRet, vid, asize; 1822 1866 hid_t type, atype = -1, glob; 1823 1867 char pBuffer[256]; … … 1841 1885 if (type==H5T_C_S1) 1842 1886 { 1887 atype = H5Aget_type(pFile->iCurrentA); 1888 asize = H5Tget_size(atype); 1889 H5Tclose(atype); 1843 1890 atype=H5Tcopy(type); 1844 1891 H5Tset_size(atype,*datalen); 1892 // use these two lines and remove the strlen one to not force NULL termination 1893 // H5Tset_strpad(atype, H5T_STR_NULLPAD); 1894 // *datalen = asize; 1845 1895 iRet = H5Aread(pFile->iCurrentA, atype, data); 1846 *datalen =strlen(data);1896 *datalen = strlen((char*)data); 1847 1897 } else { 1848 1898 iRet = H5Aread(pFile->iCurrentA, type, data); … … 1951 2001 1952 2002 pFile = NXI5assert (fid); 1953 NXI5KillAttDir ( fid);2003 NXI5KillAttDir (pFile); 1954 2004 return NX_OK; 1955 2005 } … … 1962 2012 1963 2013 pFile = NXI5assert (fid); 1964 NXI5KillDir ( fid);2014 NXI5KillDir (pFile); 1965 2015 return NX_OK; 1966 2016 } -
tags/4.2.0/src/nxio.c
r1896 r1896 228 228 actual stuff for implementing the callback functions 229 229 =====================================================================*/ 230 231 /* 232 * if passed NX_CHAR, then returns dimension of -1 and the caller 233 * needs to do a strlen() or equivalent 234 */ 230 235 void analyzeDim(const char *typeString, int *rank, 231 236 int *iDim, int *type){ 232 237 char dimString[132]; 233 238 char dim[20]; 234 char *dimStart, *dimEnd; 239 const char *dimStart, *dimEnd; 240 char* dimTemp; 235 241 int myRank; 236 242 237 243 if(strchr(typeString,(int)'[') == NULL){ 244 *rank = 1; 238 245 switch(*type){ 239 246 case NX_INT8: … … 250 257 break; 251 258 case NX_CHAR: 252 iDim[0] = -1; 259 iDim[0] = -1; /* length unknown, caller needs to determine later */ 260 break; 261 default: 262 mxml_error("ERROR: (analyzeDim) unknown type code %d for typeString %s", *type, typeString); 253 263 break; 254 264 } … … 270 280 memset(dimString,0,132); 271 281 memcpy(dimString,dimStart,(dimEnd-dimStart)*sizeof(char)); 272 dim Start= stptok(dimString,dim,19,",");282 dimTemp = stptok(dimString,dim,19,","); 273 283 myRank = 0; 274 while(dim Start!= NULL){284 while(dimTemp != NULL){ 275 285 iDim[myRank] = atoi(dim); 276 dim Start = stptok(dimStart,dim,19,",");286 dimTemp = stptok(dimTemp,dim,19,","); 277 287 myRank++; 278 288 } … … 281 291 } 282 292 /*--------------------------------------------------------------------*/ 283 int translateTypeCode(c har *code){293 int translateTypeCode(const char *code){ 284 294 int i, result = -1; 285 295 … … 292 302 return result; 293 303 } 304 305 /* 306 * This is used to locate an Idims node from the new style table data layout 307 */ 308 static mxml_node_t* findDimsNode(mxml_node_t *node) 309 { 310 mxml_node_t *tnode = NULL; 311 const char* name = node->value.element.name; 312 if ( (node->parent != NULL) && !strcmp(node->parent->value.element.name, DATA_NODE_NAME) ) 313 { 314 tnode = mxmlFindElement(node->parent->parent, node->parent->parent, DIMS_NODE_NAME, NULL, NULL, MXML_DESCEND_FIRST); 315 if (tnode != NULL) 316 { 317 tnode = mxmlFindElement(tnode,tnode,name,NULL,NULL,MXML_DESCEND_FIRST); 318 } 319 } 320 return tnode; 321 } 322 294 323 /*---------------------------------------------------------------------*/ 295 static void analyzeDataType(mxml_node_t *parent, int *rank, int *type, 324 /*return 1 if in table mode , 0 if not */ 325 static int analyzeDataType(mxml_node_t *parent, int *rank, int *type, 296 326 int *iDim){ 297 327 const char *typeString; 328 mxml_node_t* tnode; 298 329 mxml_type_t myType; 299 330 int i, nx_type = -1; 331 int table_mode = 0; 300 332 301 333 *rank = 1; … … 306 338 get the type attribute. No attribute means: plain text 307 339 */ 340 tnode = findDimsNode(parent); 341 if (tnode != NULL) 342 { 343 table_mode = 1; 344 parent = tnode; 345 } 308 346 typeString = mxmlElementGetAttr(parent,TYPENAME); 309 347 if(typeString == NULL){ 310 return ;348 return table_mode; 311 349 } 312 350 … … 321 359 typeString); 322 360 *type =NX_CHAR; 323 return ;361 return table_mode; 324 362 } 325 363 … … 327 365 328 366 analyzeDim(typeString, rank, iDim, type); 367 if (table_mode) 368 { 369 *rank = 1; 370 iDim[0] = 1; 371 } 372 return table_mode; 329 373 } 330 374 /*-------------------------------------------------------------------*/ … … 359 403 mxml_type_t nexusTypeCallback(mxml_node_t *parent){ 360 404 const char *typeString; 405 mxml_node_t * tnode; 361 406 362 407 if(strstr(parent->value.element.name,"?xml") != NULL || 363 strstr(parent->value.element.name,"NX") != NULL){ 408 !strncmp(parent->value.element.name,"NX",2) || 409 !strcmp(parent->value.element.name,DATA_NODE_NAME) || 410 !strcmp(parent->value.element.name,DIMS_NODE_NAME)){ 364 411 return MXML_ELEMENT; 365 412 } else { 413 /* data nodes do not habe TYPENAME in table style but are always CUSTOM */ 414 if (parent->parent != NULL && !strcmp(parent->parent->value.element.name, DATA_NODE_NAME)) 415 { 416 return MXML_CUSTOM; 417 } 418 if (parent->parent != NULL && !strcmp(parent->parent->value.element.name, DIMS_NODE_NAME)) 419 { 420 return MXML_OPAQUE; 421 } 366 422 typeString = mxmlElementGetAttr(parent,TYPENAME); 367 423 if(typeString == NULL){ … … 387 443 long address, maxAddress; 388 444 pNXDS dataset = NULL; 389 int i ;445 int i, table_mode; 390 446 391 447 parent = node->parent; 392 analyzeDataType(parent,&rank,&type,iDim);393 if(iDim[0] == -1 ){448 table_mode = analyzeDataType(parent,&rank,&type,iDim); 449 if(iDim[0] == -1 || !strcmp(parent->parent->value.element.name, DIMS_NODE_NAME)){ 394 450 iDim[0] = strlen(buffer); 395 451 node->value.custom.data = strdup(buffer); … … 476 532 char *buffer, *bufPtr; 477 533 pNXDS dataset; 478 int bufsize, i, length, currentLen; 479 534 int bufsize, i, length, currentLen, table_style = 0; 535 int is_definition = 0; 536 /* this is set by nxconvert when making a definiton */ 537 is_definition = (getenv("NX_IS_DEFINITION") != NULL); 538 539 if (!strcmp(node->parent->parent->value.element.name, DATA_NODE_NAME)) 540 { 541 table_style = 1; 542 } 480 543 /* 481 544 allocate output buffer … … 505 568 */ 506 569 type = getNXDatasetType(dataset); 507 length = getNXDatasetLength(dataset); 570 if (is_definition) { 571 length = 1; 572 } else { 573 length = getNXDatasetLength(dataset); 574 } 508 575 if(dataset->format != NULL){ 509 576 strcpy(format,dataset->format); … … 515 582 actually get the data out 516 583 */ 517 currentLen = col; 518 myxml_add_char('\n',&bufPtr,&buffer,&bufsize); 519 stringIntoBuffer(&buffer,&bufPtr,&bufsize,indent); 520 for(i = 0; i < length; i++){ 521 formatNumber(getNXDatasetValueAt(dataset,i),pNumber,79,format,type); 522 if(currentLen + strlen(pNumber) > MXML_WRAP){ 523 /* 524 wrap line 525 */ 584 if (table_style) 585 { 586 for(i = 0; i < length; i++){ 587 formatNumber(getNXDatasetValueAt(dataset,i),pNumber,79,format,type); 588 stringIntoBuffer(&buffer,&bufPtr,&bufsize,pNumber); 589 } 590 } 591 else 592 { 593 currentLen = col; 526 594 myxml_add_char('\n',&bufPtr,&buffer,&bufsize); 527 595 stringIntoBuffer(&buffer,&bufPtr,&bufsize,indent); 528 currentLen = col; 529 } 530 stringIntoBuffer(&buffer,&bufPtr,&bufsize,pNumber); 531 myxml_add_char(' ',&bufPtr,&buffer,&bufsize); 532 currentLen += strlen(pNumber) + 1; 596 for(i = 0; i < length; i++){ 597 formatNumber(getNXDatasetValueAt(dataset,i),pNumber,79,format,type); 598 if(currentLen + strlen(pNumber) > MXML_WRAP){ 599 /* 600 wrap line 601 */ 602 myxml_add_char('\n',&bufPtr,&buffer,&bufsize); 603 stringIntoBuffer(&buffer,&bufPtr,&bufsize,indent); 604 currentLen = col; 605 } 606 stringIntoBuffer(&buffer,&bufPtr,&bufsize,pNumber); 607 myxml_add_char(' ',&bufPtr,&buffer,&bufsize); 608 currentLen += strlen(pNumber) + 1; 609 } 533 610 } 534 611 myxml_add_char('\0',&bufPtr,&buffer,&bufsize); … … 543 620 return 0; 544 621 } 622 if(strcmp(node->value.element.name,DIMS_NODE_NAME) == 0){ 623 return 0; 624 } 625 if(strcmp(node->value.element.name,DATA_NODE_NAME) == 0){ 626 return 0; 627 } 545 628 if(strcmp(node->value.element.name,"NAPIlink") == 0){ 546 629 return 0; … … 551 634 static int isTextData(mxml_node_t *node){ 552 635 const char *attr = NULL; 553 int rank, type = 0, iDim[NX_MAXRANK];554 636 555 637 if(!isDataNode(node)){ … … 563 645 return 1; 564 646 } 565 analyzeDim(attr,&rank,iDim,&type); 566 if(type == NX_CHAR){ 647 if(strstr(attr,"NX_CHAR") != NULL){ 567 648 return 1; 568 649 } else { … … 580 661 581 662 if(strstr(node->value.element.name,"?xml") != NULL){ 663 return NULL; 664 } 665 if (node->parent != NULL && !strcmp(node->parent->value.element.name, DATA_NODE_NAME)) 666 { 667 return NULL; 668 } 669 if (where == MXML_WS_BEFORE_CLOSE && !strcmp(node->value.element.name, DATA_NODE_NAME)) 670 { 582 671 return NULL; 583 672 } -
tags/4.2.0/src/napi_exports.h
r1896 r1896 256 256 return NXmakenamedlink(fid, newname, pLink); 257 257 } 258 259 NXstatus CALL_MODE NXIGETRAWINFO(NXhandle handle, int* rank, int dimension[], int* datatype) 260 { 261 return NXgetrawinfo(handle, rank, dimension, datatype); 262 } 263 -
tags/4.2.0/src/nxio.h
r1896 r1896 30 30 #define TYPENAME "NAPItype" 31 31 32 #define DIMS_NODE_NAME "columns" 33 #define DATA_NODE_NAME "row" 34 32 35 mxml_type_t nexusTypeCallback(mxml_node_t *parent); 33 36 const char *NXwhitespaceCallback(mxml_node_t *node, int where); … … 39 42 void getNumberText(int nx_type, char *typestring, int typeLen); 40 43 void destroyDataset(void *data); 41 int translateTypeCode(c har *code);44 int translateTypeCode(const char *code); 42 45 int isDataNode(mxml_node_t *node); 43 46 void analyzeDim(const char *typeString, int *rank, -
tags/4.2.0/src/nexus_symbols_win.txt
r1896 r1896 22 22 NXIGETNEXTATTR@16 23 23 NXIGETNEXTENTRY@16 24 NXIGETRAWINFO@16 24 25 NXIGETSLAB@16 25 26 NXIINITATTRDIR@4 -
tags/4.2.0/src/stptok.c
r1896 r1896 13 13 #include <string.h> 14 14 #include <stdlib.h> 15 #include "nx_stptok.h" 15 16 16 17 char *stptok(const char *s, char *tok, size_t toklen, char *brk) … … 38 39 } 39 40 /*---------------------------------------------------------------------------*/ 40 char *SkipSpace(char *pText)41 static char *SkipSpace(char *pText) 41 42 { 42 43 char *pRes; -
tags/4.2.0/src/napi.c
r1896 r1896 36 36 #include "nxstack.h" 37 37 38 /** 39 * \mainpage NeXus API documentation 40 * \section sec_purpose Purpose of API 41 * The NeXus Application Program Interface is a suite of subroutines, written in C but with wrappers in Fortran 77 and 90. 42 * The subroutines call HDF routines to read and write the NeXus files with the correct structure. 43 * An API serves a number of useful purposes: 44 * - It simplifies the reading and writing of NeXus files. 45 * - It ensures a certain degree of compliance with the NeXus standard. 46 * - It allows the development of sophisticated input/output features such as automatic unit conversion. This has not been implemented yet. 47 * - It hides the implementation details of the format. In particular, the API can read and write HDF4, 48 HDF5 (and shortly XML) files using the same routines. 49 * For these reasons, we request that all NeXus files are written using the supplied API. We cannot be 50 * sure that anything written using the underlying HDF API will be recognized by NeXus-aware utilities. 51 * 52 * \section sec_core Core API 53 * The core API provides the basic routines for reading, writing and navigating NeXus files. It is designed to be modal; 54 * there is a hidden state that determines which groups and data sets are open at any given moment, and 55 * subsequent operations are implicitly performed on these entities. This cuts down the number of parameters 56 * to pass around in API calls, at the cost of forcing a certain pre-approved mode d'emploi. This mode d'emploi 57 * will be familiar to most: it is very similar to navigating a directory hierarchy; in our case, NeXus groups are the 58 * directories, which contain data sets and/or other directories. 59 * 60 * The core API comprises several functional groups which are listed on the \b Modules tab 61 * 62 * C programs that call the above routines should include the following header file: 63 * \code 64 * #include "napi.h" 65 * \endcode 66 */ 67 68 69 38 70 /*--------------------------------------------------------------------- 39 71 Recognized and handled napimount URLS … … 54 86 #define PATHSEP "/" 55 87 #endif 56 extern char *stptok(char *s, char *tok, size_t toklen, char *brk); 88 89 #include "nx_stptok.h" 90 57 91 /*--------------------------------------------------------------------- 58 92 wrapper for getenv. This is a future proofing thing for porting to OS … … 93 127 while(pPtr != NULL){ 94 128 length = strlen(pathPrefix) + strlen(startName) + strlen(PATHSEP) + 2; 95 testPath = malloc(length*sizeof(char));129 testPath = (char*)malloc(length*sizeof(char)); 96 130 if(testPath == NULL){ 97 131 return strdup(startName); … … 251 285 NXhandle hfile; 252 286 287 *gHandle = NULL; 253 288 fileStack = makeFileStack(); 254 289 if(fileStack == NULL){ … … 275 310 char error[1024]; 276 311 char *filename = NULL; 312 int my_am = (am & NXACCMASK_REMOVEFLAGS); 277 313 278 314 /* configure fortify … … 297 333 if(am & NXACC_NOSTRIP){ 298 334 fHandle->stripFlag = 0; 299 am -= NXACC_NOSTRIP;300 } 301 302 if ( am==NXACC_CREATE) {335 am = (NXaccess)(am & ~NXACC_NOSTRIP); 336 } 337 338 if (my_am==NXACC_CREATE) { 303 339 /* HDF4 will be used ! */ 304 340 hdf_type=1; 305 341 filename = strdup(userfilename); 306 } else if ( am==NXACC_CREATE4) {342 } else if (my_am==NXACC_CREATE4) { 307 343 /* HDF4 will be used ! */ 308 344 hdf_type=1; 309 345 filename = strdup(userfilename); 310 } else if ( am==NXACC_CREATE5) {346 } else if (my_am==NXACC_CREATE5) { 311 347 /* HDF5 will be used ! */ 312 348 hdf_type=2; 313 349 filename = strdup(userfilename); 314 } else if ( am==NXACC_CREATEXML) {350 } else if (my_am==NXACC_CREATEXML) { 315 351 /* XML will be used ! */ 316 352 hdf_type=3; … … 422 458 int status; 423 459 pFileStack fileStack = NULL; 424 425 460 pNexusFunction pFunc=NULL; 461 if (*fid == NULL) 462 { 463 return NX_OK; 464 } 426 465 fileStack = (pFileStack)*fid; 427 466 pFunc = peekFileOnStack(fileStack); … … 433 472 if(fileStackDepth(fileStack) < 0){ 434 473 killFileStack(fileStack); 435 } 474 *fid = NULL; 475 } 476 /* we can't set fid to NULL always as the handle points to a stack of files for external file support */ 436 477 /* 437 478 Fortify_CheckAllMemory(); 438 479 */ 480 439 481 return status; 440 482 } … … 613 655 { 614 656 pNexusFunction pFunc = handleToNexusFunc(fid); 615 return pFunc->nxputattr(pFunc->pNexusData, name, data, datalen, iType); 657 if (datalen > 1 && iType != NX_CHAR) 658 { 659 NXIReportError(NXpData,"NXputattr: numeric arrays are not allowed as attributes - only character strings and single numbers"); 660 return NX_ERROR; 661 } 662 else 663 { 664 return pFunc->nxputattr(pFunc->pNexusData, name, data, datalen, iType); 665 } 616 666 } 617 667 … … 807 857 return status; 808 858 } 809 859 /*---------------------------------------------------------------------------*/ 860 NXstatus NXgetrawinfo (NXhandle fid, int *rank, 861 int dimension[], int *iType) 862 { 863 int status; 864 char *pPtr = NULL; 865 866 pNexusFunction pFunc = handleToNexusFunc(fid); 867 status = pFunc->nxgetinfo(pFunc->pNexusData, rank, dimension, iType); 868 return status; 869 } 810 870 /*-------------------------------------------------------------------------*/ 811 871 … … 954 1014 } 955 1015 /*------------------------------------------------------------------------*/ 956 NXstatus NXisexternalgroup(NXhandle fid, CONSTCHAR *name, CONSTCHAR * class,1016 NXstatus NXisexternalgroup(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, 957 1017 char *url, int urlLen){ 958 1018 int status, attStatus, length = 1023, type = NX_CHAR; … … 962 1022 pNexusFunction pFunc = handleToNexusFunc(fid); 963 1023 964 status = pFunc->nxopengroup(pFunc->pNexusData, name, class);1024 status = pFunc->nxopengroup(pFunc->pNexusData, name,nxclass); 965 1025 if(status != NX_OK){ 966 1026 return status; … … 984 1044 } 985 1045 /*------------------------------------------------------------------------*/ 986 NXstatus NXlinkexternal(NXhandle fid, CONSTCHAR *name, CONSTCHAR * class,1046 NXstatus NXlinkexternal(NXhandle fid, CONSTCHAR *name, CONSTCHAR *nxclass, 987 1047 CONSTCHAR *url){ 988 1048 int status, type = NX_CHAR, length; 989 1049 pNexusFunction pFunc = handleToNexusFunc(fid); 990 1050 991 status = pFunc->nxopengroup(pFunc->pNexusData,name, class);1051 status = pFunc->nxopengroup(pFunc->pNexusData,name,nxclass); 992 1052 if(status != NX_OK){ 993 1053 return status; … … 1353 1413 if (gmt_offset < 0) 1354 1414 { 1355 time_format = "%04d-%02d-%02d %02d:%02d:%02d-%02d%02d";1415 time_format = "%04d-%02d-%02dT%02d:%02d:%02d-%02d:%02d"; 1356 1416 } 1357 1417 else 1358 1418 { 1359 time_format = "%04d-%02d-%02d %02d:%02d:%02d+%02d%02d";1419 time_format = "%04d-%02d-%02dT%02d:%02d:%02d+%02d:%02d"; 1360 1420 } 1361 1421 sprintf(time_buffer, time_format, … … 1372 1432 else 1373 1433 { 1374 strcpy(time_buffer, "1970-01-01 00:00:00+0000");1434 strcpy(time_buffer, "1970-01-01T00:00:00+00:00"); 1375 1435 } 1376 1436 return time_buffer; -
tags/4.2.0/src/Makefile.am
r1896 r1896 41 41 42 42 if HAVE_XML 43 XMLSRC = nxxml.c nxio.c nxio.h nxdataset.h nxdataset.c43 XMLSRC = nxxml.c nxio.c nxio.h 44 44 endif 45 45 ## the LIBS variable should contain all needed libs for the HDF support … … 76 76 #SUBDIRS=nxdict 77 77 78 libNeXus_la_SOURCES = napi.c napiu.c nxstack.c nxstack.h stptok.c $(H4SRC) $(H5SRC) $(XMLSRC) $(MINGW_SRC)78 libNeXus_la_SOURCES = napi.c napiu.c nxstack.c nxstack.h stptok.c nxdataset.c nxdataset.h nx_stptok.h $(H4SRC) $(H5SRC) $(XMLSRC) $(MINGW_SRC) 79 79 libNeXus_la_LDFLAGS = -export-symbols nexus_symbols.sym @SHARED_LDFLAGS@ @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ $(LDFLAGS) 80 80 libNeXus_la_DEPENDENCIES = nexus_symbols.sym … … 93 93 ## endif 94 94 95 EXTRA_DIST=nexus_symbols.txt nexus_symbols_win.txt 95 EXTRA_DIST=nexus_symbols.txt nexus_symbols_win.txt SConscript 96 96 CLEANFILES=libNeXus.def libNeXus.dll.lib libNeXus.dll.exp nexus_symbols.sym 97 97 -
tags/4.2.0/src/nxdataset.c
r1896 r1896 47 47 length *= dim[i]; 48 48 } 49 pNew->u.ptr = malloc(length*getTypeSize(typecode)); 49 /* add +1 in case of string NULL termination */ 50 pNew->u.ptr = malloc(length*getTypeSize(typecode)+1); 50 51 51 52 if(pNew->dim == NULL || pNew->u.ptr == NULL){ … … 60 61 } 61 62 pNew->magic = MAGIC; 62 memset(pNew->u.ptr,0,length*getTypeSize(typecode)); 63 /* add +1 in case of string NULL termination - see above */ 64 memset(pNew->u.ptr,0,length*getTypeSize(typecode)+1); 63 65 return pNew; 64 66 } -
tags/4.2.0/src/napi_exports2.c
r1896 r1896 8 8 9 9 #define CALL_MODE __cdecl 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif /* __cplusplus */ 14 10 15 #include "napi_exports.h" 16 17 #ifdef __cplusplus 18 } 19 #endif /* __cplusplus */ 20 -
tags/4.2.0/bindings/Makefile.am
r1896 r1896 27 27 # 28 28 #==================================================================== 29 if HAVE_CPP 30 CPPSUB = cpp 31 endif 29 32 if HAVE_F77 30 33 F77SUB = f77 … … 39 42 SWIGSUB = swig 40 43 endif 41 SUBDIRS = $(F77SUB) $(F90SUB) $(JAVASUB) $(SWIGSUB) 44 if HAVE_IDL 45 IDLSUB = idl 46 endif 47 if HAVE_PYTHON 48 PYSUB = python 49 endif 50 SUBDIRS = $(CPPSUB) $(F77SUB) $(F90SUB) $(JAVASUB) $(SWIGSUB) $(IDLSUB) $(PYSUB) -
tags/4.2.0/bindings/swig/Makefile.am
r1896 r1896 28 28 # 29 29 #==================================================================== 30 AM_CPPFLAGS=-I$(top_srcdir)/include 30 AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src 31 31 lib_LTLIBRARIES=$(LIBNXTCL) $(LIBNXSCHEME) $(LIBNXGUILE) # $(LIBNXPERL) 32 python_LTLIBRARIES=$(LIBNXPYTHON)33 32 bin_PROGRAMS=$(NXINTER) $(NXGUILE) 34 33 35 # python wrapper 36 if HAVE_SWIG 37 if HAVE_PYTHON 38 NXPYTHONWRAP=nxpython.py 39 nodist_python_PYTHON=$(NXPYTHONWRAP) 40 LIBNXPYTHON=libnxpython.la 41 libnxpython_la_SOURCES=$(COMMON_SRC) 42 nodist_libnxpython_la_SOURCES=$(PYTHONWRAP) 43 libnxpython_la_CFLAGS=-I$(PYTHONROOT)/include/python$(PYTHON_VERSION) -I$(PYTHONROOT)/include $(CFLAGS) 44 libnxpython_la_LDFLAGS=-L$(PYTHONROOT)/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(top_builddir)/src/libNeXus.la @SHARED_LDFLAGS@ $(LDFLAGS) 45 PYTHONWRAP=nxpython_wrap.c 46 endif 47 nxpython_wrap.c: nxinter.i nxdataset.i 48 $(SWIG) -I$(srcdir) -o $@ -python -module nxpython -interface libnxpython nxinter.i 49 endif 34 # old python wrapper 35 #python_LTLIBRARIES=$(LIBNXPYTHON) 36 #if HAVE_SWIG 37 #if HAVE_PYTHON 38 #NXPYTHONWRAP=nxpython.py 39 #nodist_python_PYTHON=$(NXPYTHONWRAP) 40 #LIBNXPYTHON=libnxpython.la 41 #libnxpython_la_SOURCES=$(COMMON_SRC) 42 #nodist_libnxpython_la_SOURCES=$(PYTHONWRAP) 43 #libnxpython_la_CFLAGS=-I$(PYTHONROOT)/include/python$(PYTHON_VERSION) -I$(PYTHONROOT)/include $(CFLAGS) 44 #libnxpython_la_LDFLAGS=-L$(PYTHONROOT)/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) $(top_builddir)/src/libNeXus.la @SHARED_LDFLAGS@ $(LDFLAGS) 45 #PYTHONWRAP=nxpython_wrap.c 46 #endif 47 #nxpython_wrap.c: nxinter.i nxdataset.i 48 # $(SWIG) -I$(srcdir) -o $@ -python -module nxpython -interface libnxpython nxinter.i 49 #endif 50 50 51 51 # perl wrapper (not working yet) … … 120 120 121 121 DOC_SRC = nxinter.tex 122 swigdocdir = $(NXDOCDIR)123 swigdoc_DATA = $(DOC_OUTPUT)124 122 if HAVE_LATEX 125 123 DOC_OUTPUT=nxinter.ps nxinter.pdf … … 128 126 latex nxinter.tex 129 127 dvips -f nxinter.dvi > nxinter.ps 128 129 nxinter.pdf : nxinter.ps 130 130 ps2pdf12 nxinter.ps nxinter.pdf 131 131 endif 132 swigdocdir = $(NXDOCDIR)/swig 133 swigdoc_DATA = $(DOC_OUTPUT) 134 135 EXAMPLE_FILES = nxdstest.tcl nxexam.tcl nxintertest.tcl 136 swigexampledir = $(NXEXAMPLEDIR)/swig 137 swigexample_DATA = $(EXAMPLE_FILES) 132 138 133 139 include $(top_srcdir)/build_rules.am 134 140 135 # if we have XML support, we already have nxdataset unless 136 # we are on windows when it is hidden 137 if HAVE_XML 138 if MINGW_MSYS 139 NXDATASET=nxdataset.c 140 endif 141 else 142 NXDATASET=nxdataset.c 143 endif 141 COMMON_SRC=nxinterhelper.c 144 142 145 COMMON_SRC=nxinterhelper.c $(NXDATASET) 146 147 EXTRA_DIST=nxinter.i nxdataset.i nxdataset.h nxinterhelper.h \ 148 $(DOC_OUTPUT) $(DOC_SRC) nxpython_test.py 143 EXTRA_DIST=nxinter.i nxdataset.i nxinterhelper.h \ 144 $(DOC_OUTPUT) $(DOC_SRC) $(EXAMPLE_FILES) 149 145 150 146 BUILT_SOURCES=$(TCLWRAP) $(GUILEWRAP) $(PYTHONWRAP) $(SCHEMEWRAP) $(NXPYTHONWRAP) -
tags/4.2.0/bindings/java/org/nexusformat/NexusFile.java
r1896 r1896 37 37 public final static int NXACC_CREATE5 = 5; 38 38 public final static int NXACC_CREATEXML = 6; 39 public final static int NXACC_NOSTRIP = 128; 39 40 40 41 /** … … 125 126 * <DD>For opening a file for reading. 126 127 * </dl> 128 * <DT>NXACC_NOSTRIP 129 * <DD>To keep leading and trailing whitespace on strings 130 * </dl> 127 131 * @exception NexusException when the file could not be found or 128 132 * an HDF error occurred. … … 448 452 protected native void nxputdata(int handle, byte array[]); 449 453 protected native void nxputslab(int handle, byte array[], 450 int start[],int end[]);454 int start[],int size[]); 451 455 protected native void nxputattr(int handle, String name, 452 456 byte array[], int type); … … 480 484 * @param start An integer array of dimension rank which holds the 481 485 * startcoordinates of the data subset in the larger dataset. 482 * @param endAn integer array of dimension rank which holds the486 * @param size An integer array of dimension rank which holds the 483 487 * size in each dimension of the data subset to write. 484 488 * @exception NexusException when an HDF error occurs. 485 489 */ 486 public void putslab(Object array, int start[], int end[]) throws490 public void putslab(Object array, int start[], int size[]) throws 487 491 NexusException 488 492 { … … 497 501 throw new NexusException(he.getMessage()); 498 502 } 499 nxputslab(handle,data,start, end);503 nxputslab(handle,data,start,size); 500 504 data = null; 501 505 } -
tags/4.2.0/configure.ac
r1896 r1896 29 29 dnl 30 30 31 AC_PREREQ(2. 52)31 AC_PREREQ(2.61) 32 32 AC_REVISION($Revision$) 33 AC_INIT([NeXus Library], [4. 1.0], [nexus-developers@nexusformat.org], [nexus])34 AC_COPYRIGHT([Copyright (C) 2004 Freddie Akeroyd33 AC_INIT([NeXus Library], [4.2.0], [nexus-developers@nexusformat.org], [nexus]) 34 AC_COPYRIGHT([Copyright (C) 2004 NeXus International Advisory Committee 35 35 This software is covered by the GNU LESSER GENERAL PUBLIC LICENSE 36 36 see file COPYING for further information]) … … 39 39 AC_CONFIG_SRCDIR([src/napi.c]) 40 40 AC_CANONICAL_TARGET 41 AC_CANONICAL_BUILD 41 42 42 43 dnl $EGREP is used in macros included from acinclude.m4 … … 58 59 59 60 AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug],[Turn off optimisation]), [enable_debug=$enableval],[enable_debug=no]) 61 62 AC_ARG_ENABLE([32bit], AC_HELP_STRING([--enable-32bit],[build 32bit binary on 64 bit computer]), [enable_32bit=$enableval],[enable_32bit=no]) 60 63 61 64 dnl Checks for programs. … … 77 80 else 78 81 CXX= 82 fi 83 84 AC_ARG_WITH([f77], AC_HELP_STRING([--with-f77=f77 compiler], [Specify name of FORTRAN 77 compiler]), 85 [with_f77=$withval], [with_f77=no]) 86 if test x"$with_f77" != x"no" ; then 87 if test x"$with_f77" != x"yes" ; then F77="$with_f77"; fi 88 AC_PROG_F77 89 dnl Check FORTRAN compiler options 90 dnl AC_CHECK_F77_OPTION([-Wno-globals]) 91 dnl AC_CHECK_F77_OPTION([-fno-common]) # use with caution 92 mytop=`pwd` 93 dnl get right F77 include option 94 AC_CHECK_F77_OPTION([-I$mytop/bindings/f77],[ INCLUDE 'napif.inc']) 95 AC_F77_LIBRARY_LDFLAGS 96 else 97 F77= 79 98 fi 80 99 … … 103 122 fi 104 123 105 AC_ARG_WITH([f77], AC_HELP_STRING([--with-f77=f77 compiler], [Specify name of FORTRAN 77 compiler]),106 [with_f77=$withval], [with_f77=no])107 if test x"$with_f77" != x"no" ; then108 if test x"$with_f77" != x"yes" ; then F77="$with_f77"; fi109 AC_PROG_F77110 dnl Check FORTRAN compiler options111 dnl AC_CHECK_F77_OPTION([-Wno-globals])112 dnl AC_CHECK_F77_OPTION([-fno-common]) # use with caution113 mytop=`pwd`114 dnl get right F77 include option115 AC_CHECK_F77_OPTION([-I$mytop/bindings/f77],[ INCLUDE 'napif.inc'])116 AC_F77_LIBRARY_LDFLAGS117 else118 F77=119 fi120 121 124 java_host="linux" 122 javaroot="" 123 with_java=no 125 JAVAROOT="" 124 126 AC_ARG_WITH([java-home], AC_HELP_STRING([--with-java-home=JAVA SDK Home], [Specify location of top directory of JAVA SDK i.e. where the bin, lib and include directories live]), 125 127 [], [with_java_home=$withval]) 126 128 if test -d "$with_java_home"; then 127 javaroot="$with_java_home"128 AC_MSG_NOTICE([Java SDK home is $ javaroot])129 JAVAINCLUDE="-I$ javaroot/include"130 AC_PATH_PROGS(JAVAC,gcj javac,,[$ javaroot/bin])129 JAVAROOT="$with_java_home" 130 AC_MSG_NOTICE([Java SDK home is $JAVAROOT]) 131 JAVAINCLUDE="-I$JAVAROOT/include" 132 AC_PATH_PROGS(JAVAC,gcj javac,,[$JAVAROOT/bin]) 131 133 if test `basename "$JAVAC"` = "gcj"; then 132 134 JAVACFLAGS="-C" # force creation of .class files 133 135 fi 134 AC_PATH_PROGS(JAVA,gij java,,[$ javaroot/bin])135 AC_PATH_PROGS(JAVAH,gcjh javah,,[$ javaroot/bin])136 AC_PATH_PROGS(JAVADOC,javadoc,,[$ javaroot/bin:$PATH])137 AC_PATH_PROGS(JAR,jar fastjar,,[$ javaroot/bin:$PATH])136 AC_PATH_PROGS(JAVA,gij java,,[$JAVAROOT/bin]) 137 AC_PATH_PROGS(JAVAH,gcjh javah,,[$JAVAROOT/bin]) 138 AC_PATH_PROGS(JAVADOC,javadoc,,[$JAVAROOT/bin:$PATH]) 139 AC_PATH_PROGS(JAR,jar fastjar,,[$JAVAROOT/bin:$PATH]) 138 140 fi 139 141 … … 165 167 # JAVAINCLUDE= 166 168 #fi 169 170 AC_ARG_WITH([contrib], AC_HELP_STRING([--with-contrib=names_of_apps_to_build], [Specify a list of targets from the contrib directory to build]), 171 [CONTRIB=$withval], [CONTRIB=no]) 172 AM_CONDITIONAL(BUILD_CONTRIB, [test "$CONTRIB" != "no"]) 173 AC_SUBST(CBFLIBROOT) 174 AC_ARG_WITH([cbflib], 175 AC_HELP_STRING([--with-cbflib=/path/to/cbflib], 176 [Specify location of CBFLib files]), 177 [if test $withval != no; then CBFLIBROOT=$withval; fi]) 178 AM_CONDITIONAL(HAVE_CBFLIB, [test "$CBFLIBROOT" != ""]) 179 180 AC_SUBST(IDLROOT) 181 AC_ARG_WITH([idlroot], 182 AC_HELP_STRING([--with-idlroot=/path/to/idlroot], 183 [Specify root directory of system idl installation]), 184 [if test $withval != no; then IDLROOT=$withval; fi]) 185 AM_CONDITIONAL(HAVE_IDL, [test "$IDLROOT" != ""]) 186 187 IDLDLM="\${prefix}/lib" 188 AC_SUBST(IDLDLM) 189 AC_ARG_WITH([idldlm], 190 AC_HELP_STRING([--with-idldlm=/path/to/idldlm], 191 [Specify location ito install idl dlm files to]), 192 [if test $withval != no; then IDLDLM=$withval; fi]) 193 194 AC_ARG_WITH([doxygen], AC_HELP_STRING([--with-doxygen=/path/to/doxygen], [Specify path to doxygen]), [with_doxygen=$withval], [with_doxygen=no]) 195 if test x"$with_doxygen" != x"no" ; then 196 if test x"$with_doxygen" != x"yes" ; then DOXYGEN="$with_doxygen"; fi 197 AC_CHECK_PROGS(DOXYGEN,[doxygen]) 198 AC_CHECK_PROGS(DOT,[dot]) 199 AC_CHECK_PROGS(PDFLATEX,[pdflatex]) 200 AC_PROG_CXX 201 else 202 DOXYGEN= 203 PDFLATEX= 204 DOT= 205 fi 206 167 207 AC_SUBST(FCFLAGS) 168 208 AC_SUBST(JAVACFLAGS) … … 180 220 181 221 AM_PROG_GCJ 222 AM_PROG_CC_C_O 182 223 183 224 AC_PROG_LIBTOOL … … 198 239 if test x$with_python != xno; then 199 240 AC_CHECK_ROOT([python],[PYTHONROOT],[/usr /usr/local],[bin/python]) 200 if test x$PYTHONROOT != x; then PYTHON=$PYTHONROOT/bin/python; fi 241 if test x$PYTHONROOT != x; then 242 if test -r "$PYTHONROOT/bin/python"; then PYTHON="$PYTHONROOT/bin/python"; fi 243 if test -r "$PYTHONROOT/python"; then PYTHON="$PYTHONROOT/python"; fi 244 fi 201 245 AM_PATH_PYTHON(,, :) 202 246 fi 203 247 204 248 AC_ARG_WITH([swig], AC_HELP_STRING([--with-swig=swig compiler], [Specify path of swig compiler]), [with_swig=$withval], [with_swig=]) 205 if test x$with_ python != xno -o x$with_tcl != xno -o x$with_guile != xno; then249 if test x$with_tcl != xno -o x$with_guile != xno; then 206 250 if test x$with_swig != xyes; then 207 251 SWIG=$with_swig … … 217 261 AC_CHECK_PROGS(GUILE,[guile]) 218 262 AC_CHECK_PROGS(LATEX,[latex]) 219 AC_CHECK_PROGS(PDFLATEX,[pdflatex]) 220 AC_CHECK_PROGS(DOXYGEN,[doxygen]) 221 AC_CHECK_PROGS(DOT,[dot]) 263 AC_CHECK_PROGS(WGET,[wget]) 264 AC_CHECK_PROGS(XMLLINT,[xmllint]) 222 265 223 266 … … 253 296 AM_CONDITIONAL(HAVE_MS_LIB, [test ! -z "$MS_LIB"]) 254 297 298 # strict aliasing causes issues with casts from NXmalloc() 299 CFLAGS="-fno-strict-aliasing" 300 CXXFLAGS="-fno-strict-aliasing" 301 255 302 # check for debug 256 303 if test "$enable_debug" = "yes"; then 257 CFLAGS="-O0 -g" 258 CXXFLAGS="-O0 -g" 304 CFLAGS="$CFLAGS -O0 -g" 305 CXXFLAGS="$CXXFLAGS -O0 -g" 306 fi 307 308 if test "$enable_32bit" = "yes"; then 309 CFLAGS="$CFLAGS -m32" 310 CXXFLAGS="$CXXFLAGS -m32" 259 311 fi 260 312 … … 296 348 297 349 HDF_EXT=a # library file extent to look for with HDF libraries 350 HDF5_EXT=so # library file extent to look for with HDF5 libraries 298 351 299 352 AC_SUBST(LIBXML2_CFLAGS) 300 353 LIBXML2_CFLAGS='`xml2-config --cflags`' 354 355 # set up for linux here - mac is covered in the case $host statement 356 AS_CASE([$build_cpu], [x86|i386|i686], [IDLCPU=x86], [IDLCPU=$build_cpu]) 357 if test $enable_32bit = yes; then 358 IDL_HOST="bin.linux.x86" # force 32 bit on a 64 bit machine 359 else 360 IDL_HOST="bin.linux.$IDLCPU" 361 fi 362 AC_SUBST(IDL_HOST) 301 363 302 364 case $host in … … 316 378 MINGW_MSYS=yes 317 379 HDF_EXT=dll 380 HDF5_EXT=dll 318 381 LIBXML2_CFLAGS=-I/usr/local/include 319 382 java_host="win32" … … 330 393 CFLAGS="$CFLAGS -g" 331 394 FFLAGS="$FFLAGS -g" 395 HDF5_EXT=dylib 332 396 dnl This is a hack for libtool - for some reason the F77 tag 333 397 dnl does not get set with the commands to create a shared library … … 349 413 dnl archive_cmds='$CC -dynamiclib -single_module' 350 414 dnl fi 415 if test $enable_32bit = yes; then 416 IDL_HOST="bin.darwin.i386" # force 32bit build 417 else 418 IDL_HOST="bin.darwin.x86_64" 419 fi 351 420 ;; 352 421 esac … … 354 423 if test ! -z "$JAVAINCLUDE" -a ! -z "$java_host"; then 355 424 # avoid adding /usr/include/linux to include path 356 if test "$ javaroot" != "/usr" -a "$javaroot" != "/usr/"; then357 JAVAINCLUDE="$JAVAINCLUDE -I$ javaroot/include/$java_host"425 if test "$JAVAROOT" != "/usr" -a "$JAVAROOT" != "/usr/"; then 426 JAVAINCLUDE="$JAVAINCLUDE -I$JAVAROOT/include/$java_host" 358 427 fi 359 428 fi … … 375 444 AC_HELP_STRING([--with-hdf4=/path/to/hdf4], 376 445 [Specify location of HDF4 files]), 377 [if test $withval != no ; then H4ROOT=$withval; fi])446 [if test $withval != no -a $withval != yes; then H4ROOT=$withval; fi]) 378 447 AC_ARG_WITH([hdf5], 379 448 AC_HELP_STRING([--with-hdf5=/path/to/hdf5], 380 449 [Specify location of HDF5 files]), 381 [if test $withval != no ; then H5ROOT=$withval; fi])450 [if test $withval != no -a $withval != yes; then H5ROOT=$withval; fi]) 382 451 AC_ARG_WITH([xml], 383 452 AC_HELP_STRING([--with-xml=/path/to/mxml], 384 453 [Specify location of MXML library files]), 385 [if test $withval != no ; then MXMLROOT=$withval; fi])454 [if test $withval != no -a $withval != yes; then MXMLROOT=$withval; fi]) 386 455 dnl otherwise try and find HDF path, but not if 387 456 dnl e.g. --without-hdf4 has been specified (hence check on $with_hdf4 != no ) 388 457 dnl first HDF4 389 HDF4SEARCH="/usr/local/hdf4 /usr/local/hdf /usr/local /sw /usr" 458 EXTRA_LDPATH="" 459 EXTRA_LD_LIBRARY_PATH="" 460 AC_SUBST(EXTRA_LD_LIBRARY_PATH) 461 HDF4SEARCH="/usr/local/hdf4 /usr/local/hdf /usr/local /sw /opt/local /usr" 390 462 if test "$with_hdf4" != "no" -a -z "$H4ROOT"; then 391 463 AC_MSG_CHECKING(for location of HDF4 libraries) … … 411 483 fi 412 484 if test "$H4ROOT"; then 413 H4VERSION=`grep LIBVER_STRING ${H4ROOT}/include/${H4INCSUBROOT}/hfile.h | cut -d '"' -f 2 | cut -d ' ' -f4,6 | tr ' ,' '. '` 485 H4MAJORVERSION=`grep LIBVER_MAJOR ${H4ROOT}/include/${H4INCSUBROOT}/hfile.h | awk '{ print $3}'` 486 H4MINORVERSION=`grep LIBVER_MINOR ${H4ROOT}/include/${H4INCSUBROOT}/hfile.h | awk '{ print $3}'` 487 H4RELEASE=`grep LIBVER_RELEASE ${H4ROOT}/include/${H4INCSUBROOT}/hfile.h | awk '{ print $3}'` 488 H4VERSION=$H4MAJORVERSION.$H4MINORVERSION.$H4RELEASE 414 489 case $H4VERSION in 415 490 4.[[12]]*) 416 HDF4_LDFLAGS=" -lmfhdf -ldf";491 HDF4_LDFLAGS=""; 417 492 for j in lib lib64; do 418 if test -d $H4ROOT/$j/$H4LIBSUBROOT; then HDF4_LDFLAGS="-L$H4ROOT/$j/$H4LIBSUBROOT $HDF4_LDFLAGS"; fi 493 if test -d $H4ROOT/$j/$H4LIBSUBROOT; then 494 HDF4_LDFLAGS="-L$H4ROOT/$j/$H4LIBSUBROOT $HDF4_LDFLAGS" 495 EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$H4ROOT/$j/$H4LIBSUBROOT 496 fi 419 497 done 498 EXTRA_LDPATH="$EXTRA_LDPATH $HDF4_LDFLAGS" 499 HDF4_LDFLAGS="$HDF4_LDFLAGS -lmfhdf -ldf"; 420 500 if test -z "$H4INCSUBROOT"; then 421 501 HDF4_CPPFLAGS="-I$H4ROOT/include -DHDF4" … … 433 513 434 514 dnl HDF5 435 HDF5SEARCH="/usr/local/hdf5 /usr/local/hdf /usr/local /sw / usr"515 HDF5SEARCH="/usr/local/hdf5 /usr/local/hdf /usr/local /sw /opt/local /usr" 436 516 if test "$with_hdf5" != "no" -a -z "$H5ROOT"; then 437 517 AC_MSG_CHECKING(for location of HDF5 libraries) 438 518 for i in $HDF5SEARCH; do 439 519 for j in lib lib64; do 440 if test -z "$H5ROOT" -a -r ${i}/$j/libhdf5.$HDF _EXT; then H5ROOT=$i; fi520 if test -z "$H5ROOT" -a -r ${i}/$j/libhdf5.$HDF5_EXT; then H5ROOT=$i; fi 441 521 done 442 522 done … … 450 530 H5VERSION=`grep H5_VERS_INFO ${H5ROOT}/include/H5public.h | cut -d '"' -f 2 | cut -d ' ' -f 4` 451 531 case $H5VERSION in 452 1.[[6 ]]*)453 HDF5_LDFLAGS=" -lhdf5 -lz"532 1.[[68]]*) 533 HDF5_LDFLAGS="" 454 534 for j in lib lib64; do 455 if test -d $H5ROOT/$j; then HDF5_LDFLAGS="-L$H5ROOT/$j $HDF5_LDFLAGS"; fi 535 if test -d $H5ROOT/$j; then 536 HDF5_LDFLAGS="-L$H5ROOT/$j $HDF5_LDFLAGS" 537 EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$H5ROOT/$j 538 fi 456 539 done 457 HDF5_CPPFLAGS="-I$H5ROOT/include -DHDF5";; 540 EXTRA_LDPATH="$EXTRA_LDPATH $HDF5_LDFLAGS" 541 HDF5_LDFLAGS="$HDF5_LDFLAGS -lhdf5 -lz" 542 HDF5_CPPFLAGS="-I$H5ROOT/include -DHDF5 -DH5_USE_16_API";; 458 543 *) AC_MSG_WARN([The HDF 5 installation has not the right version ($H5VERSION). You need at least 1.6]) 459 544 H5ROOT="";; … … 480 565 XML_LDFLAGS="-L$MXMLROOT/lib $XML_LDFLAGS" 481 566 XML_CPPFLAGS="-I$MXMLROOT/include -DNXXML" 567 # meed to allow for lib64 568 # EXTRA_LDPATH="$EXTRA_LDPATH $XML_LDFLAGS" 569 # export LD_LIBRARY_PATH=$MXMLROOT/lib:$LD_LIBRARY_PATH 482 570 fi 483 571 AC_SUBST(XML_LDFLAGS) 484 572 AC_SUBST(XML_CPPFLAGS) 573 574 if test ! -z "$EXTRA_LDPATH"; then 575 LDFLAGS="$LDFLAGS $EXTRA_LDPATH" 576 fi 485 577 if test -d /usr/local/lib; then 486 578 LDFLAGS="$LDFLAGS -L/usr/local/lib" 487 579 fi 580 # for Mac/fink when hdf and hdf5 are not taken from fink, but jpeg is 581 if test -d /sw/lib; then 582 LDFLAGS="$LDFLAGS -L/sw/lib" 583 fi 584 # for Mac/Macports when you are not using fink at all. 585 if test -d /opt/local/lib; then 586 LDFLAGS="$LDFLAGS -L/opt/local/lib" 587 fi 588 589 # remove initial : 590 if test ! -z "$EXTRA_LD_LIBRARY_PATH"; then 591 EXTRA_LD_LIBRARY_PATH=`expr substr "$EXTRA_LD_LIBRARY_PATH" 2 1024` 592 fi 593 if test ! -z "$LD_LIBRARY_PATH"; then 594 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${EXTRA_LD_LIBRARY_PATH} 595 else 596 export LD_LIBRARY_PATH=${EXTRA_LD_LIBRARY_PATH} 597 fi 598 488 599 AC_SUBST(LIBG2C) 489 600 … … 499 610 AC_CHECK_LIB(rpc, xdr_float) 500 611 AC_CHECK_LIB(dl, dlopen) 612 AC_CHECK_LIB(pthread, pthread_create) 501 613 AC_CHECK_LIB(z, gzopen) 502 614 AC_CHECK_LIB(jpeg, jpeg_CreateCompress) … … 509 621 dnl Checks for header files. 510 622 AC_HEADER_STDC 511 AC_CHECK_HEADERS([stdlib.h string.h]) 623 AC_HEADER_SYS_WAIT 624 AC_CHECK_HEADERS([stdlib.h string.h stdint.h]) 512 625 513 626 dnl Checks for typedefs, structures, and compiler characteristics. 514 627 AC_C_CONST 515 628 AC_TYPE_SIZE_T 629 AC_TYPE_INT8_T 630 AC_TYPE_UINT8_T 631 AC_TYPE_INT16_T 632 AC_TYPE_UINT16_T 633 AC_TYPE_INT32_T 634 AC_TYPE_UINT32_T 516 635 AC_TYPE_INT64_T 517 636 AC_TYPE_UINT64_T 518 637 AC_TYPE_LONG_LONG_INT 519 638 AC_TYPE_UNSIGNED_LONG_LONG_INT 639 AC_CHECK_SIZEOF([int]) 640 AC_CHECK_SIZEOF([long int]) 641 AC_CHECK_SIZEOF([long long int]) 520 642 AC_STRUCT_TM 643 644 AC_SYS_LARGEFILE 645 case "$ac_cv_sys_file_offset_bits" in 646 "no" | "unknown" | "") 647 ;; 648 *) 649 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" 650 CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" 651 ;; 652 esac 521 653 522 654 if test $MINGW_MSYS = yes; then … … 529 661 530 662 dnl Checks for library functions. 531 AC_FUNC_MALLOC 532 AC_FUNC_MEMCMP 533 AC_FUNC_MKTIME 534 AC_FUNC_STRFTIME 535 AC_CHECK_FUNCS([ftime memset strchr strdup strrchr strstr tzset]) 536 537 AM_CONDITIONAL(HAVE_F77, [test ! -z "$F77"]) 538 AM_CONDITIONAL(HAVE_F90, [test ! -z "$FC"]) 663 #this can cause link errors with rpl_malloc undefined 664 #AC_FUNC_MALLOC 665 #this no needed 666 #AC_FUNC_MEMCMP 667 #this hangs on FC9 at the moment 668 #AC_FUNC_MKTIME 669 670 #AC_FUNC_STRFTIME 671 672 AC_CHECK_FUNCS([ftime memset strchr strdup strrchr strstr tzset mkstemp]) 673 674 AM_CONDITIONAL(HAVE_CPP, [test ! -z "$CXX"]) 675 AM_CONDITIONAL(HAVE_F77, [test "$with_f77" != "no"]) 676 AM_CONDITIONAL(HAVE_F90, [test "$with_f90" != "no"]) 539 677 AM_CONDITIONAL(HAVE_PYTHON, [test ! -z "$PYTHONROOT"]) 540 678 AM_CONDITIONAL(HAVE_TCL, [test ! -z "$TCLROOT"]) 541 679 AM_CONDITIONAL(HAVE_GUILE, [test ! -z "$GUILEROOT"]) 542 680 AM_CONDITIONAL(HAVE_SWIG, [test ! -z "$SWIG"]) 543 AM_CONDITIONAL(HAVE_JAVA, [test ! -z "$JAVA" ])544 AM_CONDITIONAL(HAVE_JAVAC, [test ! -z "$JAVAC" ])545 AM_CONDITIONAL(HAVE_JAVADOC, [test ! -z "$JAVADOC" ])681 AM_CONDITIONAL(HAVE_JAVA, [test ! -z "$JAVA" -a ! -z "$JAVAROOT"]) 682 AM_CONDITIONAL(HAVE_JAVAC, [test ! -z "$JAVAC" -a ! -z "$JAVAROOT"]) 683 AM_CONDITIONAL(HAVE_JAVADOC, [test ! -z "$JAVADOC" -a ! -z "$JAVAROOT"]) 546 684 AM_CONDITIONAL(HAVE_HDF4, [test ! -z "$H4ROOT"]) 547 685 AM_CONDITIONAL(HAVE_HDF5, [test ! -z "$H5ROOT"]) … … 558 696 AM_CONDITIONAL(HAVE_DOT, [test ! -z "$DOT"]) 559 697 698 AM_CONDITIONAL(HAVE_WGET, [test ! -z "$WGET"]) 699 AM_CONDITIONAL(HAVE_XMLLINT, [test ! -z "$XMLLINT"]) 700 560 701 AC_CONFIG_TESTDIR(test) 561 702 AC_CONFIG_FILES(test/Makefile test/atlocal) … … 571 712 applications/Makefile 572 713 applications/NXdir/Makefile 714 applications/nxingest/Makefile 573 715 applications/NXsummary/Makefile 574 716 applications/NXtranslate/Makefile … … 593 735 doc/tech_ref/Makefile 594 736 bindings/Makefile 737 bindings/cpp/Makefile 595 738 bindings/f77/Makefile 596 739 bindings/f90/Makefile 597 740 bindings/java/Makefile 598 741 bindings/swig/Makefile 742 bindings/idl/Makefile 743 bindings/python/Makefile 599 744 contrib/Makefile 600 745 contrib/applications/Makefile 746 contrib/applications/CBFLib/Makefile 601 747 contrib/bindings/Makefile 748 contrib/bindings/python/Makefile 602 749 scripts/Makefile 603 750 scripts/nexus.pc:scripts/nexus_pc.in … … 606 753 AC_OUTPUT 607 754 755 if test ! -z "$DOXYGEN" -a ! -z "$PDFLATEX" -a ! -z "$DOT"; then 756 DOXYGENDOCS="yes" 757 else 758 if test x"$with_doxygen" != x"no" ; then 759 DOXYGENDOCS="no - missing " 760 if test -z "$DOXYGEN"; then DOXYGENDOCS="$DOXYGENDOCS doxygen"; fi 761 if test -z "$PDFLATEX"; then DOXYGENDOCS="$DOXYGENDOCS pdflatex"; fi 762 if test -z "$DOT"; then DOXYGENDOCS="$DOXYGENDOCS graphviz"; fi 763 else 764 DOXYGENDOCS="no --with-doxygen not specified" 765 fi 766 fi 767 768 if test ! -z "$DOCBOOK2TXT" -a ! -z "$DOCBOOK2PDF"; then 769 DOCBOOKDOCS="yes" 770 else 771 DOCBOOKDOCS="no - missing " 772 if test -z "$DOCBOOK2TXT"; then DOCBOOKDOCS="$DOCBOOKDOCS docbook2txt"; fi 773 if test -z "$DOCBOOK2PDF"; then DOCBOOKDOCS="$DOCBOOKDOCS docbook2pdf"; fi 774 fi 775 608 776 HDF4SUPPORT=`if test -n "$H4ROOT" ; then echo yes ; else echo no ; echo " found version $H4VERSION"; fi` 609 777 HDF5SUPPORT=`if test -n "$H5ROOT" ; then echo yes ; else echo no ; echo " found version $H5VERSION"; fi` 610 778 XMLSUPPORT=`if test -n "$MXMLROOT" ; then echo yes ; else echo no ; fi` 779 CPPBINDING=`if test -n "$CXX" ; then echo yes ; else echo no ; fi` 611 780 F77BINDING=`if test -n "$F77" ; then echo yes ; else echo no ; fi` 612 781 F90BINDING=`if test -n "$FC" ; then echo yes ; else echo no ; fi` 613 JAVABINDING=`if test -n "$JAVAC" ; then echo yes ; else echo no ; fi` 782 JAVABINDING=`if test -n "$JAVAROOT" ; then echo yes ; else echo no ; fi` 783 IDLBINDING=`if test -n "$IDLROOT" ; then echo yes ; else echo no ; fi` 784 PYTHONBINDING=`if test -n "$PYTHONROOT" ; then echo yes; else echo no ; fi` 614 785 if test -n "$SWIG" ; then 615 786 SWIGBINDING="yes (" 616 787 test -n "$TCLROOT" && SWIGBINDING="$SWIGBINDING tcl" 617 788 test -n "$GUILEROOT" && SWIGBINDING="$SWIGBINDING guile" 618 test -n "$PYTHONROOT" && SWIGBINDING="$SWIGBINDING python"619 789 SWIGBINDING="$SWIGBINDING ) SWIG=${SWIG}" 620 790 else … … 622 792 fi 623 793 624 if test -z "$ javaroot"; then625 javaroot="not specified"794 if test -z "$JAVAROOT"; then 795 JAVAROOT="not specified" 626 796 fi 627 797 AC_MSG_RESULT([ … … 629 799 Configuration (NeXus): 630 800 801 Install prefix: ${prefix} 631 802 Source code location: ${srcdir} 632 803 Version: ${VERSION} … … 635 806 build: 636 807 NeXus with: 637 HDF4 support: ${HDF4SUPPORT} 638 HDF5 support: ${HDF5SUPPORT} 808 HDF4 support: ${HDF4SUPPORT} ($H4VERSION) 809 HDF5 support: ${HDF5SUPPORT} ($H5VERSION) 639 810 XML support: ${XMLSUPPORT} 640 811 641 812 bindings: 813 C++ : ${CPPBINDING} (--with-cxx=${CXX}) 642 814 F77 : ${F77BINDING} (--with-f77=${F77}) 643 815 F90/F95 : ${F90BINDING} (--with-f90=${FC}) 644 JAVA: ${JAVABINDING} (--with-java-home=${ javaroot}, JAVA=${JAVA}, JAVAC=${JAVAC}, JAVAH=${JAVAH})816 JAVA: ${JAVABINDING} (--with-java-home=${JAVAROOT}, JAVA=${JAVA}, JAVAC=${JAVAC}, JAVAH=${JAVAH}) 645 817 SWIG: ${SWIGBINDING} 818 IDL: ${IDLBINDING} (--with-idlroot=${IDLROOT}, --with-idldlm=${IDLDLM}) 819 PYTHON: ${PYTHONBINDING} (PYTHONROOT=${PYTHONROOT}) 820 821 documentation: 822 Doxygen: ${DOXYGENDOCS} 823 Docbook: ${DOCBOOKDOCS} 646 824 647 825 Please check whether the configuration I detected matches what you would -
tags/4.2.0/README.developers
r1896 r1896 61 61 ftp://ftp.gnu.org/gnu/libtool 62 62 63 Most likely it will be autoconf that will need updating - NeXus 64 now requires autoconf 2.61 or above 65 63 66 NeXus Developer Mailing Lists 64 67 ----------------------------- -
tags/4.2.0/doc/Makefile.am
r1896 r1896 6 6 7 7 # documenttion subdirectories 8 if HAVE_DOXYGEN 9 if HAVE_PDFLATEX 10 if HAVE_DOT 11 DOXYSUB=doxygen 12 endif 13 endif 14 endif 15 SUBDIRS=api nxdict tech_ref $(DOXYSUB) 8 SUBDIRS=api nxdict tech_ref doxygen 16 9 17 10 nxdocdir = $(NXDOCDIR) -
tags/4.2.0/doc/doxygen/Doxyfile.in
r1896 r1896 407 407 # by doxygen. Possible values are YES and NO. If left blank NO is used. 408 408 409 QUIET = NO409 QUIET = YES 410 410 411 411 # The WARNINGS tag can be used to turn on/off the warning messages that are … … 460 460 # with spaces. 461 461 462 INPUT = @top_srcdir@/src @top_srcdir@/include 462 INPUT = @top_srcdir@/src @top_srcdir@/include @top_srcdir@/bindings/cpp 463 463 464 464 # If the value of the INPUT tag contains directories, you can use the … … 1007 1007 1008 1008 PREDEFINED = \ 1009 HDF4 \ 1010 HDF5 \ 1011 NXXML 1009 HDF4=1 \ 1010 HDF5=1 \ 1011 NXXML=1 \ 1012 NXDLL_EXPORT= 1012 1013 1013 1014 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -
tags/4.2.0/doc/doxygen/Makefile.am
r1896 r1896 6 6 7 7 # documenttion subdirectories 8 nxdocdir = $(NXDOCDIR) 8 nxdoxydir = $(NXDOCDIR)/doxygen 9 CLEANFILES = doxy.remove_me_to_remake 10 11 all : doxy.remove_me_to_remake 12 13 doxy.remove_me_to_remake : 14 if HAVE_DOXYGEN 15 if HAVE_PDFLATEX 16 if HAVE_DOT 17 rm -fr latex html 18 $(DOXYGEN) Doxyfile 19 ( cd latex; make pdf ) 20 rm -f refman.pdf 21 ln -s latex/refman.pdf . 22 endif 23 endif 24 endif 25 touch doxy.remove_me_to_remake 9 26 10 27 if HAVE_DOXYGEN 11 28 if HAVE_PDFLATEX 12 29 if HAVE_DOT 13 DOXY_STUFF = refman.pdf # html 30 dist-hook : 31 test -f $(srcdir)/refman.pdf && cp $(srcdir)/refman.pdf $(distdir) 32 if test -d $(srcdir)/html; then \ 33 cp -r $(srcdir)/html $(distdir); \ 34 find $(distdir)/html -depth -type d -name '.svn' -exec rm -fr {} \; ;\ 35 fi 14 36 15 refman.pdf : 16 $(DOXYGEN) Doxyfile 17 ( cd latex; make pdf ) 18 cp latex/refman.pdf $@ 37 install-data-local : 38 $(mkinstalldirs) $(DESTDIR)$(nxdoxydir) 39 test -f $(srcdir)/refman.pdf && cp $(srcdir)/refman.pdf $(DESTDIR)$(nxdoxydir) 40 if test -d $(srcdir)/html; then \ 41 cp -r $(srcdir)/html $(DESTDIR)$(nxdoxydir); \ 42 find $(DESTDIR)$(nxdoxydir) -type f -exec chmod 0644 {} \; ;\ 43 find $(DESTDIR)$(nxdoxydir) -type d -exec chmod 0755 {} \; ;\ 44 fi 19 45 endif 20 46 endif 21 47 endif 22 48 23 nxdoc_DATA = $(DOXY_STUFF) 49 clean-local : 50 rm -fr html latex refman.pdf 24 51 25 EXTRA_DIST = $(DOXY_STUFF) 52 uninstall-local : 53 rm -fr $(DESTDIR)$(nxdoxydir) 54 -
tags/4.2.0/doc/tech_ref/Makefile.am
r1896 r1896 6 6 IMAGES=tofnpd.jpg tofnpd.gif 7 7 DOC_SRC=NeXus_definitions.docbook terminology.docbook methods.docbook base_classes.docbook tofnpd.docbook tofnref.docbook monoref.docbook tofdgs.docbook monotas.docbook 8 DOC_OUTPUT=NeXus_definitions.pdf NeXus_definitions.txt 8 9 9 10 nxtechrefdocdir = $(NXDOCDIR)/tech_ref … … 12 13 13 14 if HAVE_DOCBOOK 14 DOC_OUTPUT=NeXus_definitions.pdf NeXus_definitions.txt15 15 NeXus_definitions.pdf: $(DOC_SRC) $(IMAGES) 16 16 $(DOCBOOK2PDF) NeXus_definitions.docbook … … 18 18 NeXus_definitions.txt: $(DOC_SRC) 19 19 $(DOCBOOK2TXT) NeXus_definitions.docbook 20 else 21 NeXus_definitions.pdf: 22 touch NeXus_definitions.pdf 23 24 NeXus_definitions.txt: 25 touch NeXus_definitions.txt 20 26 endif -
tags/4.2.0/autogen.sh
r1896 r1896 27 27 echo "Using $libtoolversion" 28 28 case $autoconfversion in 29 *2.5[2-79])30 ;;31 29 *2.6*) 32 30 ;; … … 35 33 *) 36 34 echo "This autoconf version is not supported by NeXus." 37 echo "NeXus only supports autoconf 2. 5[2-79]."35 echo "NeXus only supports autoconf 2.61 and above" 38 36 echo "You may download it from ftp://ftp.gnu.org/gnu/autoconf" 39 37 exit … … 44 42 *1.[4-9]*) 45 43 ;; 44 *1.1[0-9]*) 45 ;; 46 46 *) 47 47 echo "This automake version is not supported by NeXus." 48 echo "NeXus only supports automake 1. [5-8].*."48 echo "NeXus only supports automake 1.4 and above" 49 49 echo "You may download it from ftp://ftp.gnu.org/gnu/automake" 50 50 exit … … 53 53 54 54 case $libtoolversion in 55 *1.[45]*) 55 *1.[456]*) 56 ;; 57 *[2-9].*) 56 58 ;; 57 59 *) 58 60 echo "This libtool version is not supported by NeXus." 59 echo "NeXus only supports libtool 1. [45].*."61 echo "NeXus only supports libtool 1.4 and above" 60 62 echo "You may download it from ftp://ftp.gnu.org/gnu/libtool" 61 63 exit -
tags/4.2.0/NEWS
r1896 r1896 1 Version 4.2.0 2 ============= 3 4 For the latest information see 5 6 http://www.nexusformat.org/Nexus_42_Release_Notes 7 8 ==System Requirements== 9 '''MXML XML Parsing Library''' 10 11 Version 2.2.2 or higher of mxml is required. Earlier versions have a bug and the XML API will not work. This package can be downloded in [http://www.easysw.com/~mike/mxml/software.php both source and binary rpm form] and is also available as part of [http://fedoraproject.org/wiki/Extras/UsingExtras Fedora Extras]. IMPORTANT NOTE: Debian also provides the mxml package, but it based on 2.0 and will not work properly. 12 13 '''Python Interface''' 14 You will need both the numpy and ctypes modules to be available. These are provided in both the Fedora and EPEL repositories. 15 16 ==Building Notes== 17 ===NAG F90/F95 Compiler=== 18 The NAG compiler needs the '''-mismatch''' flag to be specified or else it will not compile NXmodule.f90 This is achieve by running configure with the '''FCFLAGS''' environment variable set to contain the flag e.g. 19 <pre> 20 env FCFLAGS="-mismatch" ./configure --with-f90=f95 21 </pre> 22 ===HDF4 on Intel Macs=== 23 There is a problem with the include file, hdfi.h (normally in /usr/local/include). See http://coastwatch.noaa.gov/helparc/software/msg00069.html for details of the modifications necessary to fix it. 24 25 ==New Features== 26 ===C++ Interface=== 27 See the [http://download.nexusformat.org/doxygen/html/classNeXus_1_1File.html doxygen documentation] and 28 [http://svn.nexusformat.org/code/branches/4.2/test/napi_test_cpp.cxx NeXus API test program] 29 30 ===C++ Stream Like interface=== 31 The idea is to provide an IOSteam like interface and allow you to type 32 <pre> 33 // create an entry and a data item 34 File nf(fname, NXACC_CREATE); 35 nf << Group("entry1", "NXentry") << Data("dat1", w, "int_attr", 3); 36 nf.close(); 37 38 File nf1(fname, NXACC_RDWR); 39 // add a double_attr to an existing setup 40 nf1 >> Group("entry1", "NXentry") >> Data("dat1") << Attr("double_attr", 6.0); 41 nf1.close(); 42 43 // read back data items 44 File nf2(fname, NXACC_READ); 45 nf2 >> Group("entry1", "NXentry") >> Data("dat1", w1, "int_attr", i, "double_attr", d); 46 // alternative way to read d1 47 nf2 >> Data("dat1") >> Attr("double_attr", d1); 48 </pre> 49 See also the [http://svn.nexusformat.org/code/branches/4.2/test/napi_test_cpp.cxx NeXus API test program] 50 51 ===IDL Interface=== 52 There is a new interface to RSI's Interactive Data Language, IDL for NeXus. This 53 interface has to be considered beta. Nevertheless it is working most of the time. 54 Known issues include: 55 * Compressed reading and writing do not work for HDF-4 files, probably because of a library version conflict on libz. 56 * There is an issue using NXgetslab on 64 bit operating systems; expect a fix for this pretty soon. 57 58 ===Python Interface=== 59 There is now, thanks to David Kienzle, a supported interface for the python scripting language. Arrays are stored in numpy arrays and thus allow for efficient data manipulations. 60 61 ==Changed Features== 62 63 ==Known Issues== 64 See the comments on the IDL interface. 65 66 ==Miscellaneous bug fixes== 67 The following items are bugs reported in previous releases and resolved in 68 the 4.2 release. 69 70 ==Upcoming Features== 71 1 72 Version 4.1.0 2 73 ============= -
tags/4.2.0/test/testsuite.at
r1896 r1896 31 31 [[NXinquirefile found: NXtest.hdf 32 32 Number of global attributes: 4 33 NeXus_version = 4. 1.033 NeXus_version = 4.2.0 34 34 file_name = NXtest.hdf 35 35 Number of group attributes: 2 36 36 hugo = namenlos 37 37 cucumber = passion 38 Group: entry(NXentry) contains 8 items 39 ch_data(4) = NeXus data 38 Group: entry(NXentry) contains 9 items 39 ch_data(4) = NeXus ><}&{'\&" Data 40 c1_data(4) = abcdefghijklmnopqrst 40 41 i1_data(20) = 1 2 3 4 41 42 i2_data(22) = 1000 2000 3000 4000 … … 54 55 17.000000 18.000000 19.000000 20.000000 55 56 Number of attributes : 4 56 ch_attribute : NeXus 57 ch_attribute : NeXus ><}&{'\&" Data 57 58 i4_attribute : 42 58 59 r4_attribute : 3.141593 … … 76 77 [[NXinquirefile found: NXtest.h5 77 78 Number of global attributes: 4 78 NeXus_version = 4. 1.079 NeXus_version = 4.2.0 79 80 file_name = NXtest.h5 80 81 Number of group attributes: 2 81 82 hugo = namenlos 82 83 cucumber = passion 83 Group: entry(NXentry) contains 9 items 84 ch_data(4) = NeXus data 84 Group: entry(NXentry) contains 10 items 85 c1_data(4) = abcdefghijklmnopqrst 86 ch_data(4) = NeXus ><}&{'\&" Data 85 87 Subgroup: data(NXdata) 86 88 grosse_zahl(26) = 12 555555555555 23 777777777777 … … 101 103 17.000000 18.000000 19.000000 20.000000 102 104 Number of attributes : 4 103 ch_attribute : NeXus 105 ch_attribute : NeXus ><}&{'\&" Data 104 106 i4_attribute : 42 105 107 r4_attribute : 3.141593 … … 122 124 [[NXinquirefile found: NXtest.hdf 123 125 Number of global attributes: 4 124 NeXus_version = 4. 1.0126 NeXus_version = 4.2.0 125 127 file_name = NXtest.hdf 126 128 Number of group attributes: 2 127 129 hugo = namenlos 128 130 cucumber = passion 129 Group: entry(NXentry) contains 8 items 130 ch_data(4) = NeXus data 131 Group: entry(NXentry) contains 9 items 132 ch_data(4) = NeXus ><}&{'\&" Data 133 c1_data(4) = abcdefghijklmnopqrst 131 134 i1_data(20) = 1 2 3 4 132 135 i2_data(22) = 1000 2000 3000 4000 … … 145 148 17.000000 18.000000 19.000000 20.000000 146 149 Number of attributes : 4 147 ch_attribute : NeXus 150 ch_attribute : NeXus ><}&{'\&" Data 148 151 i4_attribute : 42 149 152 r4_attribute : 3.141593 … … 167 170 [[NXinquirefile found: NXtest.h5 168 171 Number of global attributes: 4 169 NeXus_version = 4. 1.0172 NeXus_version = 4.2.0 170 173 file_name = NXtest.h5 171 174 Number of group attributes: 2 172 175 hugo = namenlos 173 176 cucumber = passion 174 Group: entry(NXentry) contains 9 items 175 ch_data(4) = NeXus data 177 Group: entry(NXentry) contains 10 items 178 c1_data(4) = abcdefghijklmnopqrst 179 ch_data(4) = NeXus ><}&{'\&" Data 176 180 Subgroup: data(NXdata) 177 181 grosse_zahl(26) = 12 555555555555 23 777777777777 … … 192 196 17.000000 18.000000 19.000000 20.000000 193 197 Number of attributes : 4 194 ch_attribute : NeXus 198 ch_attribute : NeXus ><}&{'\&" Data 195 199 i4_attribute : 42 196 200 r4_attribute : 3.141593 … … 212 216 AT_CHECK([ $HAVE_XML && $SETUP_TEST && napi_test-xml | sed -e 's/\r$//' ], [], 213 217 [[NXinquirefile found: NXtest.xml 214 Number of global attributes: 3215 NeXus_version = 4. 1.0218 Number of global attributes: 7 219 NeXus_version = 4.2.0 216 220 file_name = NXtest.xml 221 xmlns = http://definition.nexusformat.org/schema/3.0 222 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance 223 xsi:schemaLocation = http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 217 224 Number of group attributes: 2 218 225 hugo = namenlos 219 226 cucumber = passion 220 Group: entry(NXentry) contains 9 items 221 ch_data(4) = NeXus data 227 Group: entry(NXentry) contains 10 items 228 ch_data(4) = NeXus ><}&{'\&" Data 229 c1_data(4) = abcdefghijklmnopqrst 222 230 i1_data(20) = 1 2 3 4 223 231 i2_data(22) = 1000 2000 3000 4000 … … 236 244 17.000000 18.000000 19.000000 20.000000 237 245 Number of attributes : 4 238 ch_attribute : NeXus 246 ch_attribute : NeXus ><}&{'\&" Data 239 247 i4_attribute : 42 240 248 r4_attribute : 3.141593 … … 258 266 AT_CHECK([ $HAVE_XML && $SETUP_TEST && napi_test-xml-static | sed -e 's/\r$//' ], [], 259 267 [[NXinquirefile found: NXtest.xml 260 Number of global attributes: 3261 NeXus_version = 4. 1.0268 Number of global attributes: 7 269 NeXus_version = 4.2.0 262 270 file_name = NXtest.xml 271 xmlns = http://definition.nexusformat.org/schema/3.0 272 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance 273 xsi:schemaLocation = http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 263 274 Number of group attributes: 2 264 275 hugo = namenlos 265 276 cucumber = passion 266 Group: entry(NXentry) contains 9 items 267 ch_data(4) = NeXus data 277 Group: entry(NXentry) contains 10 items 278 ch_data(4) = NeXus ><}&{'\&" Data 279 c1_data(4) = abcdefghijklmnopqrst 268 280 i1_data(20) = 1 2 3 4 269 281 i2_data(22) = 1000 2000 3000 4000 … … 282 294 17.000000 18.000000 19.000000 20.000000 283 295 Number of attributes : 4 284 ch_attribute : NeXus 296 ch_attribute : NeXus ><}&{'\&" Data 285 297 i4_attribute : 42 286 298 r4_attribute : 3.141593 … … 301 313 AT_CLEANUP 302 314 303 AT_BANNER([Check the FORTRAN 77 binding.]) 315 AT_SETUP([Check the XML table binding (static library)]) 316 AT_CHECK([ $HAVE_XML && $SETUP_TEST && napi_test-xml-table-static | sed -e 's/\r$//' ], [], 317 [[NXinquirefile found: NXtest-table.xml 318 Number of global attributes: 7 319 NeXus_version = 4.2.0 320 file_name = NXtest-table.xml 321 xmlns = http://definition.nexusformat.org/schema/3.0 322 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance 323 xsi:schemaLocation = http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 324 Number of group attributes: 2 325 hugo = namenlos 326 cucumber = passion 327 Group: entry(NXentry) contains 10 items 328 ch_data(4) = NeXus ><}&{'\&" Data 329 c1_data(4) = abcdefghijklmnopqrst 330 i1_data(20) = 1 2 3 4 331 i2_data(22) = 1000 2000 3000 4000 332 i4_data(24) = 1000000 2000000 3000000 4000000 333 grosse_zahl(26) = 12 555555555555 23 777777777777 334 r4_data(5) 335 1.000000 2.000000 3.000000 4.000000 336 5.000000 6.000000 7.000000 8.000000 337 9.000000 10.000000 11.000000 12.000000 338 13.000000 14.000000 15.000000 16.000000 339 17.000000 18.000000 19.000000 20.000000 340 r8_data(6) 341 1.000000 2.000000 3.000000 4.000000 342 5.000000 6.000000 7.000000 8.000000 343 9.000000 10.000000 11.000000 12.000000 344 13.000000 14.000000 15.000000 16.000000 345 17.000000 18.000000 19.000000 20.000000 346 Number of attributes : 4 347 ch_attribute : NeXus ><}&{'\&" Data 348 i4_attribute : 42 349 r4_attribute : 3.141593 350 target : /entry/r8_data 351 Subgroup: data(NXdata) 352 Subgroup: sample(NXsample) 353 Link check OK 354 NXopenpath checks OK 355 First file time: 2005-05-27 05:44:13 356 NXinquirefile found: data/dmc01.xml 357 Second file sample: Ga0.94Mn0.04Sb_8mm 358 NXinquirefile found: data/dmc02.xml 359 Second file time: 2005-05-27 05:48:56 360 entry1 external URL = nxfile://data/dmc01.xml#/entry1 361 External File Linking tested OK 362 ]]) 363 AT_CLEANUP 364 365 AT_BANNER([Check the FORTRAN binding.]) 304 366 305 367 AT_SETUP([Check the F77 binding using HDF4.]) 306 368 AT_CHECK([ $HAVE_F77 && $HAVE_HDF4 && $SETUP_TEST && napif_test-hdf4 | sed -e 's/\r$//' ], [], 307 369 [[ Number of global attributes: 4 308 NeXus_version = 4. 1.0370 NeXus_version = 4.2.0 309 371 file_name = NXtest.nxs 310 372 Group: entry(NXentry) contains 8 items … … 342 404 AT_CHECK([ $HAVE_F77 && $HAVE_HDF5 && $SETUP_TEST && napif_test-hdf5 | sed -e 's/\r$//' ], [], 343 405 [[ Number of global attributes: 4 344 NeXus_version = 4. 1.0406 NeXus_version = 4.2.0 345 407 file_name = NXtest.nxs 346 408 Group: entry(NXentry) contains 8 items … … 379 441 [[Writing character data 380 442 Number of global attributes: 4 381 NeXus_version = 4. 1.0443 NeXus_version = 4.2.0 382 444 file_name = NXtest.nxs 383 445 Group: entry(NXentry) contains 8 items … … 412 474 AT_CLEANUP 413 475 476 AT_BANNER([Check the C++ binding.]) 477 AT_SETUP([Check the C++ binding with HDF4.]) 478 AT_CHECK([ $HAVE_HDF4 && $SETUP_TEST && napi_test_cpp-hdf4 | sed -e 's/\r$//' ], [], 479 [[NXinquirefile found: napi_test_cpp.hdf 480 Number of global attributes: 4 481 NeXus_version = 4.2.0 482 file_name = napi_test_cpp.hdf 483 Number of group attributes: 2 484 hugo = namenlos 485 cucumber = passion 486 Group contains 9 items 487 c1_data[5,4] = 2d character array 488 ch_data[10] = NeXus_data 489 data:NXdata 490 i1_data[4] = [,,,] 491 i2_data[4] = [1000,2000,3000,4000] 492 i4_data[4] = [1000000,2000000,3000000,4000000] 493 r4_data[5,4] = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] 494 r8_data[5,4] = [20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39] 495 sample:NXsample 496 Link check OK 497 NXopenpath checks OK 498 First file time: 2005-05-27 05:44:13 499 NXinquirefile found: data/dmc01.hdf 500 Second file sample: Ga0.94Mn0.04Sb_8mm 501 NXinquirefile found: data/dmc02.hdf 502 Second file time: 2005-05-27 05:48:56 503 entry1 external URL = nxfile://data/dmc01.hdf#entry1 504 ]]) 505 AT_CLEANUP 506 AT_SETUP([Check the C++ binding with HDF5.]) 507 AT_CHECK([ $HAVE_HDF5 && $SETUP_TEST && napi_test_cpp-hdf5 | sed -e 's/\r$//' ], [], 508 [[NXinquirefile found: napi_test_cpp.h5 509 Number of global attributes: 4 510 NeXus_version = 4.2.0 511 file_name = napi_test_cpp.h5 512 Number of group attributes: 2 513 hugo = namenlos 514 cucumber = passion 515 Group contains 10 items 516 c1_data[5,4] = 2d character array 517 ch_data[10] = NeXus_data 518 data:NXdata 519 grosszahl[4] = [12,555555555555,23,777777777777] 520 i1_data[4] = [,,,] 521 i2_data[4] = [1000,2000,3000,4000] 522 i4_data[4] = [1000000,2000000,3000000,4000000] 523 r4_data[5,4] = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] 524 r8_data[5,4] = [20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39] 525 sample:NXsample 526 Link check OK 527 NXopenpath checks OK 528 First file time: 2005-05-27 05:44:13 529 NXinquirefile found: data/dmc01.h5 530 Second file sample: Ga0.94Mn0.04Sb_8mm 531 NXinquirefile found: data/dmc02.h5 532 Second file time: 2005-05-27 05:48:56 533 entry1 external URL = nxfile://data/dmc01.h5#entry1 534 ]]) 535 AT_CLEANUP 536 AT_SETUP([Check the C++ binding with xml.]) 537 AT_CHECK([ $HAVE_XML && $SETUP_TEST && napi_test_cpp-xml | sed -e 's/\r$//' ], [], 538 [[NXinquirefile found: napi_test_cpp.xml 539 Number of global attributes: 7 540 NeXus_version = 4.2.0 541 file_name = napi_test_cpp.xml 542 xmlns = http://definition.nexusformat.org/schema/3.0 543 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance 544 xsi:schemaLocation = http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 545 Number of group attributes: 2 546 hugo = namenlos 547 cucumber = passion 548 Group contains 10 items 549 c1_data[5,4] = 2d character array 550 ch_data[10] = NeXus_data 551 data:NXdata 552 grosszahl[4] = [12,555555555555,23,777777777777] 553 i1_data[4] = [,,,] 554 i2_data[4] = [1000,2000,3000,4000] 555 i4_data[4] = [1000000,2000000,3000000,4000000] 556 r4_data[5,4] = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] 557 r8_data[5,4] = [20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39] 558 sample:NXsample 559 Link check OK 560 NXopenpath checks OK 561 First file time: 2005-05-27 05:44:13 562 NXinquirefile found: data/dmc01.xml 563 Second file sample: Ga0.94Mn0.04Sb_8mm 564 NXinquirefile found: data/dmc02.xml 565 Second file time: 2005-05-27 05:48:56 566 entry1 external URL = nxfile://data/dmc01.xml#entry1 567 ]]) 568 AT_CLEANUP 569 570 AT_BANNER([[Testing the Python bindings.]]) 571 AT_SETUP([Checking HDF4 test file]) 572 AT_CHECK([skip_test && $HAVE_HDF4 && $HAVE_PYTHON && $PYTHON $abs_srcdir/../bindings/python/nxstest.py -q hdf4 | sed -e 's/\r$//' ],[], 573 [[]]) 574 AT_CLEANUP 575 AT_SETUP([Checking HDF5 test file]) 576 AT_CHECK([$HAVE_HDF5 && $HAVE_PYTHON && $PYTHON $abs_srcdir/../bindings/python/nxstest.py -q hdf5 | sed -e 's/\r$//' ],[], 577 [[]]) 578 AT_CLEANUP 579 AT_SETUP([Checking XML test file]) 580 AT_CHECK([$HAVE_XML && $HAVE_PYTHON && $PYTHON $abs_srcdir/../bindings/python/nxstest.py -q xml | sed -e 's/\r$//' ],[], 581 [[]]) 582 AT_CLEANUP 583 584 AT_BANNER([[Testing the IDL bindings.]]) 585 AT_SETUP([Checking HDF4 test file]) 586 AT_CHECK([skip_test && $HAVE_HDF4 && $HAVE_IDL && $SETUP_TEST && $SHELL $abs_srcdir/../bindings/idl/testidlnapi "'hdf4'" | sed -e 's/\r$//' ],[], 587 [['hdf4' 588 NeXus IDL Api Write test 589 Using HDF4 590 % Loaded DLM: NEXUSIDL-API. 591 nxopen status: 1 592 nxsetnumberformat status: 1 593 nxmakegroup status: 1 594 nxopengroup status: 1 595 nxputattr status: 1 596 nxputattr status: 1 597 nxmakedata status: 1 598 opendata status: 1 599 nxputdata status: 1 600 nxclosedata status: 1 601 nxmakedata status: 1 602 opendata status: 1 603 nxputdata status: 1 604 nxclosedata status: 1 605 nxmakedata status: 1 606 opendata status: 1 607 nxputdata status: 1 608 nxclosedata status: 1 609 nxmakedata status: 1 610 opendata status: 1 611 nxputdata status: 0 612 nxclosedata status: 1 613 nxmakedata status: 1 614 opendata status: 1 615 nxputslab status: 1 616 nxputattr status : 1 617 nxputattr status : 1 618 nxputattr status : 1 619 nxgetdataid status: 1 620 nxclosedata status: 1 621 nxmakegroup status: 1 622 nxopengroup status: 1 623 nxmakelink status: 1 624 nxmakecompdata status: 1 625 opendata status: 1 626 nxputdata status: 0 627 nxclosedata status: 1 628 nxflush status: 1 629 nxmakedata status: 1 630 opendata status: 1 631 nxputslab 1 status: 1 632 nxflush status: 1 633 opendata status: 1 634 nxputslab 2 status: 1 635 nxflush status: 1 636 opendata status: 1 637 nxputslab 3 status: 1 638 nxflush status: 1 639 opendata status: 1 640 nxputslab 4 status: 1 641 nxflush status: 1 642 opendata status: 1 643 nxputslab 5 status: 1 644 nxflush status: 1 645 opendata status: 1 646 nxputslab 6 status: 1 647 nxflush status: 1 648 opendata status: 1 649 nxputslab 7 status: 1 650 nxflush status: 1 651 nxclosegroup status: 1 652 nxmakegroup status: 1 653 nxopengroup status: 1 654 nxmakedata status: 1 655 opendata status: 1 656 nxputdata status: 1 657 nxclosedata status: 1 658 nxgetgroupid status: 1 659 groupid handle: 2 660 nxclosegroup status: 1 661 nxclosegroup status: 1 662 nxmakegroup status: 1 663 nxopengroup status: 1 664 nxmakelink status: 1 665 groupid handle 2 666 nxmakenamedlink status : 1 667 dataid handle 1 668 nxmakenamedlink status : 1 669 nxclosegroup status: 1 670 nxclose status: 1 671 672 #################### Test external linking ###################### 673 674 nxopen status: 1 675 nxmakegroup status: 1 676 nxlinkexternal: 1 677 nxmakegroup status: 1 678 nxlinkexternal: 1 679 nxclose status: 1 680 nxopen status: 1 681 nxopenpath status 1 682 683 nxget data status: 1 684 First file time : 685 2005-05-27 05:44:13 686 687 nxinquirefile status: 1 688 current file: data/dmc01.hdf 689 nxopenpath status 1 690 nxget data status: 1 691 Second file sample : 692 Ga0.94Mn0.04Sb_8mm 693 694 nxinquirefile status: 1 695 current file: data/dmc01.hdf 696 nxopenpath status 1 697 nxget data status: 1 698 Second file time : 699 2005-05-27 05:44:13 700 701 nxisexternalgroup status 1 702 entry1 external URL = 703 nxclose status: 1 704 % Compiled module: READ_TEST. 705 Opening file: NXtest.hdf 706 nxopen status: 1 707 nxinquirefile status: 1 708 nxinquirefile found: NXtest.hdf 709 nxgetattrinfo status: 1 710 Number of global attributes: 4 711 712 NXgetnextattr status: 1 713 714 attribute name: NeXus_version 715 attribute value: 4.2.0 716 717 NXgetnextattr status: 1 718 719 attribute name: HDF_version 720 attribute value: NCSA HDF Version 4.2 Release 2, October 4, 2007 721 722 NXgetnextattr status: 1 723 724 attribute name: file_name 725 attribute value: NXtest.hdf 726 727 NXgetnextattr status: 1 728 729 730 NXgetnextattr status: -1 731 732 nxopengroup status: 1 733 nxgetattrinfo status: 1 734 Number of group attributes: 2 735 NXgetnextattr status: 1 736 nxgetattr status 1 737 attribute name: hugo 738 attrubute lenght: 8 739 attribute type: 4 740 attribute value: namenlos 741 742 NXgetnextattr status: 1 743 nxgetattr status 1 744 attribute name: cucumber 745 attrubute lenght: 7 746 attribute type: 4 747 attribute value: passion 748 749 NXgetnextattr status: -1 750 nxgetgroupinfo status 1 751 current group name: entry 752 current group class: NXentry 753 number of items in group: 7 754 755 nxgetnextentry status: 1 756 nxgetnextentry name: ch_data 757 nxgetnextentry class: SDS 758 nxgetnextentry data_type 4 759 760 opening data: ch_data 761 nxopendata status: 1 762 763 nxgetinfo Status: 1 764 Rank: 1 765 Dim [ 0]: 10 766 Data Type: 4 767 768 nxget data status: 1 769 data : 770 NeXus Data 771 772 nxgetattrinfo status: 1 773 Number of group attributes: 0 774 nxgetnextattr status: -1 775 nxclosedata status: 1 776 nxgetnextentry status: 1 777 nxgetnextentry name: i1_data 778 nxgetnextentry class: SDS 779 nxgetnextentry data_type 21 780 781 opening data: i1_data 782 nxopendata status: 1 783 784 nxgetinfo Status: 1 785 Rank: 2 786 Dim [ 0]: 4 787 Dim [ 1]: 4 788 Data Type: 21 789 790 nxgetslab status: 1 791 data : 792 0 4 8 12 793 794 nxgetslab status: 1 795 data : 796 1 5 9 13 797 798 nxgetslab status: 1 799 data : 800 2 6 10 14 801 802 nxgetslab status: 1 803 data : 804 4 7 11 15 805 806 nxgetattrinfo status: 1 807 Number of group attributes: 0 808 nxgetnextattr status: -1 809 nxclosedata status: 1 810 nxgetnextentry status: 1 811 nxgetnextentry name: i4_data 812 nxgetnextentry class: SDS 813 nxgetnextentry data_type 24 814 815 opening data: i4_data 816 nxopendata status: 1 817 818 nxgetinfo Status: 1 819 Rank: 2 820 Dim [ 0]: 4 821 Dim [ 1]: 4 822 Data Type: 24 823 824 nxgetslab status: 1 825 data : 826 0 4 8 12 827 828 nxgetslab status: 1 829 data : 830 1 5 9 13 831 832 nxgetslab status: 1 833 data : 834 2 6 10 14 835 836 nxgetslab status: 1 837 data : 838 3 7 11 15 839 840 nxgetattrinfo status: 1 841 Number of group attributes: 0 842 nxgetnextattr status: -1 843 nxclosedata status: 1 844 nxgetnextentry status: 1 845 nxgetnextentry name: r4_data 846 nxgetnextentry class: SDS 847 nxgetnextentry data_type 5 848 849 opening data: r4_data 850 nxopendata status: 1 851 852 nxgetinfo Status: 1 853 Rank: 2 854 Dim [ 0]: 4 855 Dim [ 1]: 4 856 Data Type: 5 857 858 nxgetslab status: 1 859 data : 860 9.96921e+36 9.96921e+36 9.96921e+36 9.96921e+36 861 862 nxgetslab status: 1 863 data : 864 9.96921e+36 9.96921e+36 9.96921e+36 9.96921e+36 865 866 nxgetslab status: 1 867 data : 868 9.96921e+36 9.96921e+36 9.96921e+36 9.96921e+36 869 870 nxgetslab status: 1 871 data : 872 9.96921e+36 9.96921e+36 9.96921e+36 9.96921e+36 873 874 nxgetattrinfo status: 1 875 Number of group attributes: 0 876 nxgetnextattr status: -1 877 nxclosedata status: 1 878 nxgetnextentry status: 1 879 nxgetnextentry name: r8_data 880 nxgetnextentry class: SDS 881 nxgetnextentry data_type 6 882 883 opening data: r8_data 884 nxopendata status: 1 885 886 nxgetinfo Status: 1 887 Rank: 2 888 Dim [ 0]: 4 889 Dim [ 1]: 4 890 Data Type: 6 891 892 nxgetslab status: 1 893 data : 894 9.9692100e+36 9.9692100e+36 9.9692100e+36 9.9692100e+36 895 896 nxgetslab status: 1 897 data : 898 9.9692100e+36 9.9692100e+36 9.9692100e+36 9.9692100e+36 899 900 nxgetslab status: 1 901 data : 902 0.011111200 0.021222220 0.23333333 0.34444444 903 904 nxgetslab status: 1 905 data : 906 9.9692100e+36 9.9692100e+36 9.9692100e+36 9.9692100e+36 907 908 nxgetattrinfo status: 1 909 Number of group attributes: 4 910 Number of global attributes: 4 911 nxgetnextattr status: 1 912 nxgetattr status 1 913 attribute name: ch_attribute 914 attribute value: NeXus 915 916 nxgetnextattr status: 1 917 nxgetattr status 1 918 attribute name: i4_attribute 919 attribute value: 42 920 921 nxgetnextattr status: 1 922 nxgetattr status 1 923 attribute name: r4_attribute 924 attribute value: 3.14159 925 926 nxgetnextattr status: 1 927 nxgetattr status 1 928 attribute name: target 929 attribute value: /entry/r8_data 930 931 nxgetnextattr status: -1 932 nxclosedata status: 1 933 nxgetnextentry status: 1 934 nxgetnextentry name: data 935 nxgetnextentry class: NXdata 936 nxgetnextentry data_type 1965 937 938 nxgetnextentry status: 1 939 nxgetnextentry name: sample 940 nxgetnextentry class: NXsample 941 nxgetnextentry data_type 1965 942 943 nxgetnextentry status: -1 944 nxclosegroup status: 1 945 946 ####################### Checking Links ########################### 947 948 nxopengroup status: 1 949 950 nxopengroup status: 1 951 952 nxgetgroupid status: 1 953 groupid handle: 1 954 955 nxclosegroup status: 1 956 957 nxopengroup status: 1 958 959 nxopendata status: 1 960 961 nxgetdataid status: 1 962 nxclosedata status: 1 963 nxclosegroup status: 1 964 965 nxopendata status: 1 966 967 nxgetdataid status: 1 968 nxclosedata status: 1 969 debug 970 nxsamid status: 1 971 Data id: Link check succesfull 972 nxclosegroup status: 1 973 974 nxopengroup status: 1 975 976 nxopengroup status: 1 977 978 nxgetgroupid status: 1 979 980 Group Id: Link check succesfull 981 nxclosegroup status: 1 982 983 nxopengroup status: 1 984 985 nxgetgroupid status: 1 986 987 Group Id Named: Link check succesfull 988 989 nxclosegroup status: 1 990 991 nxopendata status: 1 992 993 nxgetdataid status: 1 994 Data Id Named: Link check succesfull 995 nxclosedata status: 1 996 Openpath succesfull (/entry/data/comp_data) 997 Openpath on a relative path (../r8_data) succesfull 998 nxclose status: 1 999 finished napi test 1000 ]]) 1001 AT_CLEANUP 1002 AT_SETUP([Checking HDF5 test file]) 1003 AT_CHECK([$HAVE_HDF5 && $HAVE_IDL && $SETUP_TEST && $SHELL $abs_srcdir/../bindings/idl/testidlnapi "'hdf5'" | sed -e 's/\r$//' ],[], 1004 [['hdf5' 1005 NeXus IDL Api Write test 1006 Using HDF5 1007 % Loaded DLM: NEXUSIDL-API. 1008 nxopen status: 1 1009 nxsetnumberformat status: 1 1010 nxmakegroup status: 1 1011 nxopengroup status: 1 1012 nxputattr status: 1 1013 nxputattr status: 1 1014 nxmakedata status: 1 1015 opendata status: 1 1016 nxputdata status: 1 1017 nxclosedata status: 1 1018 nxmakedata status: 1 1019 opendata status: 1 1020 nxputdata status: 1 1021 nxclosedata status: 1 1022 nxmakedata status: 1 1023 opendata status: 1 1024 nxputdata status: 1 1025 nxclosedata status: 1 1026 nxmakedata status: 1 1027 opendata status: 1 1028 nxputdata status: 1 1029 nxclosedata status: 1 1030 nxmakedata status: 1 1031 opendata status: 1 1032 nxputslab status: 1 1033 nxputattr status : 1 1034 nxputattr status : 1 1035 nxputattr status : 1 1036 nxgetdataid status: 1 1037 nxclosedata status: 1 1038 nxmakegroup status: 1 1039 nxopengroup status: 1 1040 nxmakelink status: 1 1041 nxmakecompdata status: 1 1042 opendata status: 1 1043 nxputdata status: 1 1044 nxclosedata status: 1 1045 nxflush status: 1 1046 nxmakedata status: 1 1047 opendata status: 1 1048 nxputslab 1 status: 1 1049 nxflush status: 1 1050 opendata status: 1 1051 nxputslab 2 status: 1 1052 nxflush status: 1 1053 opendata status: 1 1054 nxputslab 3 status: 1 1055 nxflush status: 1 1056 opendata status: 1 1057 nxputslab 4 status: 1 1058 nxflush status: 1 1059 opendata status: 1 1060 nxputslab 5 status: 1 1061 nxflush status: 1 1062 opendata status: 1 1063 nxputslab 6 status: 1 1064 nxflush status: 1 1065 opendata status: 1 1066 nxputslab 7 status: 1 1067 nxflush status: 1 1068 nxclosegroup status: 1 1069 nxmakegroup status: 1 1070 nxopengroup status: 1 1071 nxmakedata status: 1 1072 opendata status: 1 1073 nxputdata status: 1 1074 nxclosedata status: 1 1075 nxgetgroupid status: 1 1076 groupid handle: 2 1077 nxclosegroup status: 1 1078 nxclosegroup status: 1 1079 nxmakegroup status: 1 1080 nxopengroup status: 1 1081 nxmakelink status: 1 1082 groupid handle 2 1083 nxmakenamedlink status : 1 1084 dataid handle 1 1085 nxmakenamedlink status : 1 1086 nxclosegroup status: 1 1087 nxclose status: 1 1088 1089 #################### Test external linking ###################### 1090 1091 nxopen status: 1 1092 nxmakegroup status: 1 1093 nxlinkexternal: 1 1094 nxmakegroup status: 1 1095 nxlinkexternal: 1 1096 nxclose status: 1 1097 nxopen status: 1 1098 nxopenpath status 1 1099 1100 nxget data status: 1 1101 First file time : 1102 2005-05-27 05:44:13 1103 1104 nxinquirefile status: 1 1105 current file: data/dmc01.h5 1106 nxopenpath status 1 1107 nxget data status: 1 1108 Second file sample : 1109 Ga0.94Mn0.04Sb_8mm 1110 1111 nxinquirefile status: 1 1112 current file: data/dmc01.h5 1113 nxopenpath status 1 1114 nxget data status: 1 1115 Second file time : 1116 2005-05-27 05:44:13 1117 1118 nxisexternalgroup status 1 1119 entry1 external URL = 1120 nxclose status: 1 1121 % Compiled module: READ_TEST. 1122 Opening file: NXtest.h5 1123 nxopen status: 1 1124 nxinquirefile status: 1 1125 nxinquirefile found: NXtest.h5 1126 nxgetattrinfo status: 1 1127 Number of global attributes: 4 1128 1129 NXgetnextattr status: 1 1130 1131 attribute name: NeXus_version 1132 attribute value: 4.2.0 1133 1134 NXgetnextattr status: 1 1135 1136 attribute name: file_name 1137 attribute value: NXtest.h5 1138 1139 NXgetnextattr status: 1 1140 1141 attribute name: HDF5_Version 1142 attribute value: 1.6.8 1143 1144 NXgetnextattr status: 1 1145 1146 1147 NXgetnextattr status: -1 1148 1149 nxopengroup status: 1 1150 nxgetattrinfo status: 1 1151 Number of group attributes: 2 1152 NXgetnextattr status: 1 1153 nxgetattr status 1 1154 attribute name: hugo 1155 attrubute lenght: 8 1156 attribute type: 4 1157 attribute value: namenlos 1158 1159 NXgetnextattr status: 1 1160 nxgetattr status 1 1161 attribute name: cucumber 1162 attrubute lenght: 7 1163 attribute type: 4 1164 attribute value: passion 1165 1166 NXgetnextattr status: -1 1167 nxgetgroupinfo status 1 1168 current group name: entry 1169 current group class: NXentry 1170 number of items in group: 7 1171 1172 nxgetnextentry status: 1 1173 nxgetnextentry name: ch_data 1174 nxgetnextentry class: SDS 1175 nxgetnextentry data_type 4 1176 1177 opening data: ch_data 1178 nxopendata status: 1 1179 1180 nxgetinfo Status: 1 1181 Rank: 1 1182 Dim [ 0]: 10 1183 Data Type: 4 1184 1185 nxget data status: 1 1186 data : 1187 NeXus Data 1188 1189 nxgetattrinfo status: 1 1190 Number of group attributes: 0 1191 nxgetnextattr status: -1 1192 nxclosedata status: 1 1193 nxgetnextentry status: 1 1194 nxgetnextentry name: data 1195 nxgetnextentry class: NXdata 1196 nxgetnextentry data_type 0 1197 1198 nxgetnextentry status: 1 1199 nxgetnextentry name: i1_data 1200 nxgetnextentry class: SDS 1201 nxgetnextentry data_type 21 1202 1203 opening data: i1_data 1204 nxopendata status: 1 1205 1206 nxgetinfo Status: 1 1207 Rank: 2 1208 Dim [ 0]: 4 1209 Dim [ 1]: 4 1210 Data Type: 21 1211 1212 nxgetslab status: 1 1213 data : 1214 0 4 8 12 1215 1216 nxgetslab status: 1 1217 data : 1218 1 5 9 13 1219 1220 nxgetslab status: 1 1221 data : 1222 2 6 10 14 1223 1224 nxgetslab status: 1 1225 data : 1226 4 7 11 15 1227 1228 nxgetattrinfo status: 1 1229 Number of group attributes: 0 1230 nxgetnextattr status: -1 1231 nxclosedata status: 1 1232 nxgetnextentry status: 1 1233 nxgetnextentry name: i4_data 1234 nxgetnextentry class: SDS 1235 nxgetnextentry data_type 24 1236 1237 opening data: i4_data 1238 nxopendata status: 1 1239 1240 nxgetinfo Status: 1 1241 Rank: 2 1242 Dim [ 0]: 4 1243 Dim [ 1]: 4 1244 Data Type: 24 1245 1246 nxgetslab status: 1 1247 data : 1248 0 4 8 12 1249 1250 nxgetslab status: 1 1251 data : 1252 1 5 9 13 1253 1254 nxgetslab status: 1 1255 data : 1256 2 6 10 14 1257 1258 nxgetslab status: 1 1259 data : 1260 3 7 11 15 1261 1262 nxgetattrinfo status: 1 1263 Number of group attributes: 0 1264 nxgetnextattr status: -1 1265 nxclosedata status: 1 1266 nxgetnextentry status: 1 1267 nxgetnextentry name: r4_data 1268 nxgetnextentry class: SDS 1269 nxgetnextentry data_type 5 1270 1271 opening data: r4_data 1272 nxopendata status: 1 1273 1274 nxgetinfo Status: 1 1275 Rank: 2 1276 Dim [ 0]: 4 1277 Dim [ 1]: 4 1278 Data Type: 5 1279 1280 nxgetslab status: 1 1281 data : 1282 0.0111112 0.344333 0.666669 -12.2000 1283 1284 nxgetslab status: 1 1285 data : 1286 0.0212222 0.555556 1.00000 -13.4444 1287 1288 nxgetslab status: 1 1289 data : 1290 0.233333 0.666667 10.1000 -14.2222 1291 1292 nxgetslab status: 1 1293 data : 1294 0.344444 0.777773 11.2222 -15.4444 1295 1296 nxgetattrinfo status: 1 1297 Number of group attributes: 0 1298 nxgetnextattr status: -1 1299 nxclosedata status: 1 1300 nxgetnextentry status: 1 1301 nxgetnextentry name: r8_data 1302 nxgetnextentry class: SDS 1303 nxgetnextentry data_type 6 1304 1305 opening data: r8_data 1306 nxopendata status: 1 1307 1308 nxgetinfo Status: 1 1309 Rank: 2 1310 Dim [ 0]: 4 1311 Dim [ 1]: 4 1312 Data Type: 6 1313 1314 nxgetslab status: 1 1315 data : 1316 0.0000000 0.0000000 0.0000000 0.0000000 1317 1318 nxgetslab status: 1 1319 data : 1320 0.0000000 0.0000000 0.0000000 0.0000000 1321 1322 nxgetslab status: 1 1323 data : 1324 0.011111200 0.021222220 0.23333333 0.34444444 1325 1326 nxgetslab status: 1 1327 data : 1328 0.0000000 0.0000000 0.0000000 0.0000000 1329 1330 nxgetattrinfo status: 1 1331 Number of group attributes: 4 1332 Number of global attributes: 4 1333 nxgetnextattr status: 1 1334 nxgetattr status 1 1335 attribute name: ch_attribute 1336 attribute value: NeXus 1337 1338 nxgetnextattr status: 1 1339 nxgetattr status 1 1340 attribute name: i4_attribute 1341 attribute value: 42 1342 1343 nxgetnextattr status: 1 1344 nxgetattr status 1 1345 attribute name: r4_attribute 1346 attribute value: 3.14159 1347 1348 nxgetnextattr status: 1 1349 nxgetattr status 1 1350 attribute name: target 1351 attribute value: /entry/r8_data 1352 1353 nxgetnextattr status: -1 1354 nxclosedata status: 1 1355 nxgetnextentry status: 1 1356 nxgetnextentry name: sample 1357 nxgetnextentry class: NXsample 1358 nxgetnextentry data_type 0 1359 1360 nxgetnextentry status: -1 1361 nxclosegroup status: 1 1362 1363 ####################### Checking Links ########################### 1364 1365 nxopengroup status: 1 1366 1367 nxopengroup status: 1 1368 1369 nxgetgroupid status: 1 1370 groupid handle: 1 1371 1372 nxclosegroup status: 1 1373 1374 nxopengroup status: 1 1375 1376 nxopendata status: 1 1377 1378 nxgetdataid status: 1 1379 nxclosedata status: 1 1380 nxclosegroup status: 1 1381 1382 nxopendata status: 1 1383 1384 nxgetdataid status: 1 1385 nxclosedata status: 1 1386 debug 1387 nxsamid status: 1 1388 Data id: Link check succesfull 1389 nxclosegroup status: 1 1390 1391 nxopengroup status: 1 1392 1393 nxopengroup status: 1 1394 1395 nxgetgroupid status: 1 1396 1397 Group Id: Link check succesfull 1398 nxclosegroup status: 1 1399 1400 nxopengroup status: 1 1401 1402 nxgetgroupid status: 1 1403 1404 Group Id Named: Link check succesfull 1405 1406 nxclosegroup status: 1 1407 1408 nxopendata status: 1 1409 1410 nxgetdataid status: 1 1411 Data Id Named: Link check succesfull 1412 nxclosedata status: 1 1413 Openpath succesfull (/entry/data/comp_data) 1414 Openpath on a relative path (../r8_data) succesfull 1415 nxclose status: 1 1416 finished napi test 1417 ]]) 1418 AT_CLEANUP 1419 AT_SETUP([Checking XML test file]) 1420 AT_CHECK([$HAVE_XML && $HAVE_IDL && $SETUP_TEST && $SHELL $abs_srcdir/../bindings/idl/testidlnapi "'xml'" | sed -e 's/\r$//' ],[], 1421 [['xml' 1422 NeXus IDL Api Write test 1423 Using XML 1424 % Loaded DLM: NEXUSIDL-API. 1425 nxopen status: 1 1426 nxsetnumberformat status: 1 1427 nxmakegroup status: 1 1428 nxopengroup status: 1 1429 nxputattr status: 1 1430 nxputattr status: 1 1431 nxmakedata status: 1 1432 opendata status: 1 1433 nxputdata status: 1 1434 nxclosedata status: 1 1435 nxmakedata status: 1 1436 opendata status: 1 1437 nxputdata status: 1 1438 nxclosedata status: 1 1439 nxmakedata status: 1 1440 opendata status: 1 1441 nxputdata status: 1 1442 nxclosedata status: 1 1443 nxmakedata status: 1 1444 opendata status: 1 1445 nxputdata status: 1 1446 nxclosedata status: 1 1447 nxmakedata status: 1 1448 opendata status: 1 1449 nxputslab status: 1 1450 nxputattr status : 1 1451 nxputattr status : 1 1452 nxputattr status : 1 1453 nxgetdataid status: 1 1454 nxclosedata status: 1 1455 nxmakegroup status: 1 1456 nxopengroup status: 1 1457 nxmakelink status: 1 1458 nxmakecompdata status: 1 1459 opendata status: 1 1460 nxputdata status: 1 1461 nxclosedata status: 1 1462 nxflush status: 1 1463 nxmakedata status: 1 1464 opendata status: 1 1465 nxputslab 1 status: 1 1466 nxflush status: 1 1467 opendata status: 1 1468 nxputslab 2 status: 1 1469 nxflush status: 1 1470 opendata status: 1 1471 nxputslab 3 status: 1 1472 nxflush status: 1 1473 opendata status: 1 1474 nxputslab 4 status: 1 1475 nxflush status: 1 1476 opendata status: 1 1477 nxputslab 5 status: 1 1478 nxflush status: 1 1479 opendata status: 1 1480 nxputslab 6 status: 1 1481 nxflush status: 1 1482 opendata status: 1 1483 nxputslab 7 status: 1 1484 nxflush status: 1 1485 nxclosegroup status: 1 1486 nxmakegroup status: 1 1487 nxopengroup status: 1 1488 nxmakedata status: 1 1489 opendata status: 1 1490 nxputdata status: 1 1491 nxclosedata status: 1 1492 nxgetgroupid status: 1 1493 groupid handle: 2 1494 nxclosegroup status: 1 1495 nxclosegroup status: 1 1496 nxmakegroup status: 1 1497 nxopengroup status: 1 1498 nxmakelink status: 1 1499 groupid handle 2 1500 nxmakenamedlink status : 1 1501 dataid handle 1 1502 nxmakenamedlink status : 1 1503 nxclosegroup status: 1 1504 nxclose status: 1 1505 1506 #################### Test external linking ###################### 1507 1508 nxopen status: 1 1509 nxmakegroup status: 1 1510 nxlinkexternal: 1 1511 nxmakegroup status: 1 1512 nxlinkexternal: 1 1513 nxclose status: 1 1514 nxopen status: 1 1515 nxopenpath status 1 1516 1517 nxget data status: 1 1518 First file time : 1519 2005-05-27 05:44:13 1520 1521 nxinquirefile status: 1 1522 current file: data/dmc01.xml 1523 nxopenpath status 1 1524 nxget data status: 1 1525 Second file sample : 1526 Ga0.94Mn0.04Sb_8mm 1527 1528 nxinquirefile status: 1 1529 current file: data/dmc01.xml 1530 nxopenpath status 1 1531 nxget data status: 1 1532 Second file time : 1533 2005-05-27 05:44:13 1534 1535 nxisexternalgroup status 1 1536 entry1 external URL = 1537 nxclose status: 1 1538 % Compiled module: READ_TEST. 1539 Opening file: NXtest.xml 1540 nxopen status: 1 1541 nxinquirefile status: 1 1542 nxinquirefile found: NXtest.xml 1543 nxgetattrinfo status: 1 1544 Number of global attributes: 7 1545 1546 NXgetnextattr status: 1 1547 1548 attribute name: NeXus_version 1549 attribute value: 4.2.0 1550 1551 NXgetnextattr status: 1 1552 1553 attribute name: XML_version 1554 attribute value: mxml 1555 1556 NXgetnextattr status: 1 1557 1558 attribute name: file_name 1559 attribute value: NXtest.xml 1560 1561 NXgetnextattr status: 1 1562 1563 attribute name: xmlns 1564 attribute value: http://definition.nexusformat.org/schema/3.0 1565 1566 NXgetnextattr status: 1 1567 1568 attribute name: xmlns:xsi 1569 attribute value: http://www.w3.org/2001/XMLSchema-instance 1570 1571 NXgetnextattr status: 1 1572 1573 attribute name: xsi:schemaLocation 1574 attribute value: http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 1575 1576 NXgetnextattr status: 1 1577 1578 1579 NXgetnextattr status: -1 1580 1581 nxopengroup status: 1 1582 nxgetattrinfo status: 1 1583 Number of group attributes: 2 1584 NXgetnextattr status: 1 1585 nxgetattr status 1 1586 attribute name: hugo 1587 attrubute lenght: 8 1588 attribute type: 4 1589 attribute value: namenlos 1590 1591 NXgetnextattr status: 1 1592 nxgetattr status 1 1593 attribute name: cucumber 1594 attrubute lenght: 7 1595 attribute type: 4 1596 attribute value: passion 1597 1598 NXgetnextattr status: -1 1599 nxgetgroupinfo status 1 1600 current group name: entry 1601 current group class: NXentry 1602 number of items in group: 7 1603 1604 nxgetnextentry status: 1 1605 nxgetnextentry name: ch_data 1606 nxgetnextentry class: SDS 1607 nxgetnextentry data_type 4 1608 1609 opening data: ch_data 1610 nxopendata status: 1 1611 1612 nxgetinfo Status: 1 1613 Rank: 1 1614 Dim [ 0]: 10 1615 Data Type: 4 1616 1617 nxget data status: 1 1618 data : 1619 NeXus Data 1620 1621 nxgetattrinfo status: 1 1622 Number of group attributes: 0 1623 nxgetnextattr status: -1 1624 nxclosedata status: 1 1625 nxgetnextentry status: 1 1626 nxgetnextentry name: i1_data 1627 nxgetnextentry class: SDS 1628 nxgetnextentry data_type 21 1629 1630 opening data: i1_data 1631 nxopendata status: 1 1632 1633 nxgetinfo Status: 1 1634 Rank: 2 1635 Dim [ 0]: 4 1636 Dim [ 1]: 4 1637 Data Type: 21 1638 1639 nxgetslab status: 1 1640 data : 1641 0 4 8 12 1642 1643 nxgetslab status: 1 1644 data : 1645 1 5 9 13 1646 1647 nxgetslab status: 1 1648 data : 1649 2 6 10 14 1650 1651 nxgetslab status: 1 1652 data : 1653 4 7 11 15 1654 1655 nxgetattrinfo status: 1 1656 Number of group attributes: 0 1657 nxgetnextattr status: -1 1658 nxclosedata status: 1 1659 nxgetnextentry status: 1 1660 nxgetnextentry name: i4_data 1661 nxgetnextentry class: SDS 1662 nxgetnextentry data_type 24 1663 1664 opening data: i4_data 1665 nxopendata status: 1 1666 1667 nxgetinfo Status: 1 1668 Rank: 2 1669 Dim [ 0]: 4 1670 Dim [ 1]: 4 1671 Data Type: 24 1672 1673 nxgetslab status: 1 1674 data : 1675 0 4 8 12 1676 1677 nxgetslab status: 1 1678 data : 1679 1 5 9 13 1680 1681 nxgetslab status: 1 1682 data : 1683 2 6 10 14 1684 1685 nxgetslab status: 1 1686 data : 1687 3 7 11 15 1688 1689 nxgetattrinfo status: 1 1690 Number of group attributes: 0 1691 nxgetnextattr status: -1 1692 nxclosedata status: 1 1693 nxgetnextentry status: 1 1694 nxgetnextentry name: r4_data 1695 nxgetnextentry class: SDS 1696 nxgetnextentry data_type 5 1697 1698 opening data: r4_data 1699 nxopendata status: 1 1700 1701 nxgetinfo Status: 1 1702 Rank: 2 1703 Dim [ 0]: 4 1704 Dim [ 1]: 4 1705 Data Type: 5 1706 1707 nxgetslab status: 1 1708 data : 1709 0.0110000 0.344000 0.667000 -12.2000 1710 1711 nxgetslab status: 1 1712 data : 1713 0.0210000 0.556000 1.00000 -13.4440 1714 1715 nxgetslab status: 1 1716 data : 1717 0.233000 0.667000 10.1000 -14.2220 1718 1719 nxgetslab status: 1 1720 data : 1721 0.344000 0.778000 11.2220 -15.4440 1722 1723 nxgetattrinfo status: 1 1724 Number of group attributes: 0 1725 nxgetnextattr status: -1 1726 nxclosedata status: 1 1727 nxgetnextentry status: 1 1728 nxgetnextentry name: r8_data 1729 nxgetnextentry class: SDS 1730 nxgetnextentry data_type 6 1731 1732 opening data: r8_data 1733 nxopendata status: 1 1734 1735 nxgetinfo Status: 1 1736 Rank: 2 1737 Dim [ 0]: 4 1738 Dim [ 1]: 4 1739 Data Type: 6 1740 1741 nxgetslab status: 1 1742 data : 1743 0.0000000 0.0000000 0.0000000 0.0000000 1744 1745 nxgetslab status: 1 1746 data : 1747 0.0000000 0.0000000 0.0000000 0.0000000 1748 1749 nxgetslab status: 1 1750 data : 1751 0.011110000 0.021220000 0.23333000 0.34444000 1752 1753 nxgetslab status: 1 1754 data : 1755 0.0000000 0.0000000 0.0000000 0.0000000 1756 1757 nxgetattrinfo status: 1 1758 Number of group attributes: 4 1759 Number of global attributes: 4 1760 nxgetnextattr status: 1 1761 nxgetattr status 1 1762 attribute name: ch_attribute 1763 attribute value: NeXus 1764 1765 nxgetnextattr status: 1 1766 nxgetattr status 1 1767 attribute name: i4_attribute 1768 attribute value: 42 1769 1770 nxgetnextattr status: 1 1771 nxgetattr status 1 1772 attribute name: r4_attribute 1773 attribute value: 3.14159 1774 1775 nxgetnextattr status: 1 1776 nxgetattr status 1 1777 attribute name: target 1778 attribute value: /entry/r8_data 1779 1780 nxgetnextattr status: -1 1781 nxclosedata status: 1 1782 nxgetnextentry status: 1 1783 nxgetnextentry name: data 1784 nxgetnextentry class: NXdata 1785 nxgetnextentry data_type 0 1786 1787 nxgetnextentry status: 1 1788 nxgetnextentry name: sample 1789 nxgetnextentry class: NXsample 1790 nxgetnextentry data_type 0 1791 1792 nxgetnextentry status: -1 1793 nxclosegroup status: 1 1794 1795 ####################### Checking Links ########################### 1796 1797 nxopengroup status: 1 1798 1799 nxopengroup status: 1 1800 1801 nxgetgroupid status: 1 1802 groupid handle: 1 1803 1804 nxclosegroup status: 1 1805 1806 nxopengroup status: 1 1807 1808 nxopendata status: 1 1809 1810 nxgetdataid status: 1 1811 nxclosedata status: 1 1812 nxclosegroup status: 1 1813 1814 nxopendata status: 1 1815 1816 nxgetdataid status: 1 1817 nxclosedata status: 1 1818 debug 1819 nxsamid status: 1 1820 Data id: Link check succesfull 1821 nxclosegroup status: 1 1822 1823 nxopengroup status: 1 1824 1825 nxopengroup status: 1 1826 1827 nxgetgroupid status: 1 1828 1829 Group Id: Link check succesfull 1830 nxclosegroup status: 1 1831 1832 nxopengroup status: 1 1833 1834 nxgetgroupid status: 1 1835 1836 Group Id Named: Link check succesfull 1837 1838 nxclosegroup status: 1 1839 1840 nxopendata status: 1 1841 1842 nxgetdataid status: 1 1843 Data Id Named: Link check succesfull 1844 nxclosedata status: 1 1845 Openpath succesfull (/entry/data/comp_data) 1846 Openpath on a relative path (../r8_data) succesfull 1847 nxclose status: 1 1848 finished napi test 1849 ]]) 1850 AT_CLEANUP 1851 414 1852 AT_BANNER([[Testing the NeXus File Converter.]]) 415 1853 AT_SETUP([Checking HDF4 -> HDF4 ]) … … 488 1926 AT_SETUP([Checking HDF4 test file]) 489 1927 AT_CHECK([$HAVE_HDF4 && nxbrowse NXtest.hdf < ${abs_srcdir}/nxbrowse.txt | grep -v 'HDF_version = ' | grep -v 'file_time = ' | sed -e 's/\r$//' | sed -e 's/[ ]*$//' ],[], 490 [[NXBrowse 4. 1.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski491 NeXus_version = 4. 1.01928 [[NXBrowse 4.2.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski 1929 NeXus_version = 4.2.0 492 1930 file_name = NXtest.hdf 493 1931 NX> NX Group : entry (NXentry) … … 500 1938 AT_SETUP([Checking HDF5 test file]) 501 1939 AT_CHECK([$HAVE_HDF5 && nxbrowse NXtest.h5 < ${abs_srcdir}/nxbrowse.txt | grep -v 'HDF5_Version = ' | grep -v 'file_time = ' | sed -e 's/\r$//' | sed -e 's/[ ]*$//' ],[], 502 [[NXBrowse 4. 1.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski503 NeXus_version = 4. 1.01940 [[NXBrowse 4.2.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski 1941 NeXus_version = 4.2.0 504 1942 file_name = NXtest.h5 505 1943 NX> NX Group : entry (NXentry) … … 512 1950 AT_SETUP([Checking XML test file]) 513 1951 AT_CHECK([$HAVE_XML && nxbrowse NXtest.xml < ${abs_srcdir}/nxbrowse.txt | grep -v 'file_time = ' | grep -v 'XML_version = ' | sed -e 's/\r$//' | sed -e 's/[ ]*$//' ],[], 514 [[NXBrowse 4. 1.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski515 NeXus_version = 4. 1.01952 [[NXBrowse 4.2.0 Copyright (C) 2000 R. Osborn, M. Koennecke, P. Klosowski 1953 NeXus_version = 4.2.0 516 1954 file_name = NXtest.xml 1955 xmlns = http://definition.nexusformat.org/schema/3.0 1956 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance 1957 xsi:schemaLocation = http://definition.nexusformat.org/schema/3.0 http://definition.nexusformat.org/schema/3.0/BASE.xsd 517 1958 NX> NX Group : entry (NXentry) 518 1959 entry attribute: hugo = namenlos … … 542 1983 ]]) 543 1984 AT_CLEANUP 1985 1986 1987 AT_BANNER([[Testing validating files with the nxvalidate tool.]]) 1988 AT_SETUP([Checking HDF4 test file via web (wget)]) 1989 AT_CHECK([$HAVE_HDF4 && $HAVE_WGET && $SETUP_TEST && napi_test-hdf4 -q && nxvalidate -q -w NXtest.hdf | sed -e 's/\r$//' ],[], 1990 [[]]) 1991 AT_CLEANUP 1992 AT_SETUP([Checking HDF5 test file via web (wget)]) 1993 AT_CHECK([$HAVE_HDF4 && $HAVE_WGET && $SETUP_TEST && napi_test-hdf5 -q && nxvalidate -q -w NXtest.h5 | sed -e 's/\r$//' ],[], 1994 [[]]) 1995 AT_CLEANUP 1996 AT_SETUP([Checking XML test file via web (wget)]) 1997 AT_CHECK([$HAVE_HDF4 && $HAVE_WGET && $SETUP_TEST && napi_test-xml -q && nxvalidate -q -w NXtest.xml | sed -e 's/\r$//' ],[], 1998 [[]]) 1999 AT_CLEANUP -
tags/4.2.0/test/leak_test2.cxx
r1896 r1896 1 1 #include <sstream> 2 #include <cstdlib> 2 3 #include <napi.h> 3 4 #include <unistd.h> -
tags/4.2.0/test/napi_test.c
r1896 r1896 37 37 int main (int argc, char *argv[]) 38 38 { 39 int i, j, NXrank, NXdims[32], NXtype, NXlen, entry_status, attr_status;39 int i, j, k, n, NXrank, NXdims[32], NXtype, NXlen, entry_status, attr_status; 40 40 float r; 41 41 void *data_buffer; … … 53 53 char name[64], char_class[64], char_buffer[128]; 54 54 char group_name[64], class_name[64]; 55 char c1_array[5][4] = {{'a', 'b', 'c' ,'d'}, {'e', 'f', 'g' ,'h'}, 56 {'i', 'j', 'k', 'l'}, {'m', 'n', 'o', 'p'}, {'q', 'r', 's' , 't'}}; 57 int unlimited_cdims[2] = {NX_UNLIMITED, 4}; 55 58 NXhandle fileid; 56 59 NXlink glink, dlink, blink; … … 62 65 char filename[256]; 63 66 int64_t grossezahl[4]; 67 const char* ch_test_data = "NeXus ><}&{'\\&\" Data"; 64 68 65 69 grossezahl[0] = 12; … … 76 80 nx_creation_code = NXACC_CREATE5; 77 81 strcpy(nxFile,"NXtest.h5"); 82 }else if(strstr(argv[0],"napi_test-xml-table") != NULL){ 83 nx_creation_code = NXACC_CREATEXML | NXACC_TABLE; 84 strcpy(nxFile,"NXtest-table.xml"); 78 85 }else if(strstr(argv[0],"napi_test-xml") != NULL){ 79 86 nx_creation_code = NXACC_CREATEXML; … … 91 98 if(NXputattr(fileid,"hugo","namenlos",strlen("namenlos"), NX_CHAR) != NX_OK) return 1; 92 99 if(NXputattr(fileid,"cucumber","passion",strlen("passion"), NX_CHAR) != NX_OK) return 1; 93 NXlen = 10;100 NXlen = strlen(ch_test_data); 94 101 if (NXmakedata (fileid, "ch_data", NX_CHAR, 1, &NXlen) != NX_OK) return 1; 95 102 if (NXopendata (fileid, "ch_data") != NX_OK) return 1; 96 if (NXputdata (fileid, "NeXus data") != NX_OK) return 1; 103 if (NXputdata (fileid, ch_test_data) != NX_OK) return 1; 104 if (NXclosedata (fileid) != NX_OK) return 1; 105 if (NXmakedata (fileid, "c1_data", NX_CHAR, 2, array_dims) != NX_OK) return 1; 106 if (NXopendata (fileid, "c1_data") != NX_OK) return 1; 107 if (NXputdata (fileid, c1_array) != NX_OK) return 1; 97 108 if (NXclosedata (fileid) != NX_OK) return 1; 98 109 if (NXmakedata (fileid, "i1_data", NX_INT8, 1, &array_dims[1]) != NX_OK) return 1; … … 118 129 slab_start[0] = 0; slab_start[1] = 0; slab_size[0] = 4; slab_size[1] = 4; 119 130 if (NXputslab (fileid, r8_array, slab_start, slab_size) != NX_OK) return 1; 120 if (NXputattr (fileid, "ch_attribute", "NeXus", strlen ("NeXus"), NX_CHAR) != NX_OK) return 1;131 if (NXputattr (fileid, "ch_attribute", ch_test_data, strlen (ch_test_data), NX_CHAR) != NX_OK) return 1; 121 132 i = 42; 122 133 if (NXputattr (fileid, "i4_attribute", &i, 1, NX_INT32) != NX_OK) return 1; … … 171 182 if (NXclosedata (fileid) != NX_OK) return 1; 172 183 if (NXgetgroupID (fileid, &glink) != NX_OK) return 1; 184 if (nx_creation_code & NXACC_CREATEXML == 0) { 185 if (NXmakedata (fileid, "cdata_unlimited", NX_CHAR, 2, unlimited_cdims) != NX_OK) return 1; 186 if (NXopendata (fileid, "cdata_unlimited") != NX_OK) return 1; 187 slab_size[0] = 1; 188 slab_size[1] = 4; 189 slab_start[1] = 0; 190 for (i = 0; i < 5; i++) 191 { 192 slab_start[0] = i; 193 if (NXputslab (fileid, &(c1_array[i][0]), slab_start, slab_size) != NX_OK) return 1; 194 } 195 if (NXclosedata (fileid) != NX_OK) return 1; 196 } 173 197 if (NXclosegroup (fileid) != NX_OK) return 1; 174 198 if (NXclosegroup (fileid) != NX_OK) return 1; … … 249 273 printf (" %s(%d)", name, NXtype); 250 274 if (NXmalloc ((void **) &data_buffer, NXrank, NXdims, NXtype) != NX_OK) return 1; 275 n = 1; 276 for(k=0; k<NXrank; k++) 277 { 278 n *= NXdims[k]; 279 } 251 280 if (NXtype == NX_CHAR) { 252 281 if (NXgetdata (fileid, data_buffer) != NX_OK) return 1; 253 print_data (" = ", data_buffer, NXtype, 10);282 print_data (" = ", data_buffer, NXtype, n); 254 283 } else if (NXtype != NX_FLOAT32 && NXtype != NX_FLOAT64) { 255 284 if (NXgetdata (fileid, data_buffer) != NX_OK) return 1; 256 print_data (" = ", data_buffer, NXtype, 4);285 print_data (" = ", data_buffer, NXtype, n); 257 286 } else { 258 287 slab_start[0] = 0; -
tags/4.2.0/test/Makefile.am
r1896 r1896 34 34 LIBNEXUS77=$(top_builddir)/bindings/f77/libNeXus77.la 35 35 LIBNEXUS90=$(top_builddir)/bindings/f90/libNeXus90.la 36 37 AM_CPPFLAGS=-I. -I$(top_srcdir)/include 36 LIBNEXUSCPP=$(top_builddir)/bindings/cpp/libNeXusCPP.la 37 38 AM_CPPFLAGS=-I. -I$(top_srcdir)/include -I$(top_srcdir)/bindings/cpp 38 39 AM_FFLAGS=-I$(top_srcdir)/bindings/f77 39 CLEANFILES=NXtest.nx4 NXtest.nx5 NXtest.nxs NXtest.xml \ 40 AM_FCFLAGS=-I$(top_builddir)/bindings/f90 41 CLEANFILES=NXtest.nx4 NXtest.nx5 NXtest.nxs NXtest.xml NXtest-table.xml \ 40 42 leak_test.nxs leak_test1.nxs leak_test2_*.nxs \ 41 nxtranslate nxsummary nxconvert nxdir nxbrowse 43 nxtranslate nxsummary nxconvert nxvalidate nxdir nxbrowse \ 44 NXtest.h4 NXtest.h5 42 45 43 46 44 47 ## testdir=$(prefix)/nexus/test
