Changeset 1282 for trunk/bindings


Ignore:
Timestamp:
14/10/09 14:12:05 (3 years ago)
Author:
Mark Koennecke
Message:
  • Fixes for refs #193
  • The problem with the one character attribute was in napi4.c, a char to short
  • For the inconsistent attrdi I added NXinitattrdir and NXinitgroupdir for good measure to the native bindings and have them called in attrdir() and groupdir();
Location:
trunk/bindings/java
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bindings/java/native/NexusFile.c

    r952 r1282  
    2121 
    2222   Updated for 64 bit types, Mark Koennecke, August 2007 
     23 
     24   Added NXinitattrdir and NXinitgroupdir, Mark Koennecke, October 2009 
    2325 
    2426   IMPLEMENTATION NOTES 
     
    12331235    } 
    12341236} 
     1237/*---------------------------------------------------------------------*/ 
     1238JNIEXPORT void JNICALL Java_org_nexusformat_NexusFile_initattrdir 
     1239(JNIEnv *env, jobject obj, jint handle) 
     1240{ 
     1241    NXhandle nxhandle; 
     1242    int iRet; 
     1243 
     1244    /* set error handler */ 
     1245    NXMSetError(env,JapiError); 
     1246 
     1247    /* exchange the Java handler to a NXhandle */ 
     1248    nxhandle =  (NXhandle)HHGetPointer(handle); 
     1249 
     1250    iRet = NXinitattrdir(nxhandle); 
     1251 
     1252} 
     1253/*---------------------------------------------------------------------*/ 
     1254JNIEXPORT void JNICALL Java_org_nexusformat_NexusFile_initgroupdir 
     1255(JNIEnv *env, jobject obj, jint handle) 
     1256{ 
     1257    NXhandle nxhandle; 
     1258    int iRet; 
     1259 
     1260    /* set error handler */ 
     1261    NXMSetError(env,JapiError); 
     1262 
     1263    /* exchange the Java handler to a NXhandle */ 
     1264    nxhandle =  (NXhandle)HHGetPointer(handle); 
     1265 
     1266    iRet = NXinitgroupdir(nxhandle); 
     1267} 
    12351268/*------------------------------------------------------------------------ 
    12361269                               debugstop 
  • trunk/bindings/java/org/nexusformat/NexusFile.java

    r1278 r1282  
    1616  * 
    1717  * copyright: see accompanying COPYRIGHT file 
     18  * 
     19  * added nxinitattrdir: Mark Koennecke, October 2009  
    1820  */ 
    1921package org.nexusformat; 
     
    553555    protected native int nextentry(int handle, String names[]); 
    554556    protected native int nextattr(int handle, String names[], int args[]); 
     557    protected native void initattrdir(int handle); 
     558    protected native void initgroupdir(int handle); 
    555559    /** 
    556560     * setnumberformat sets the number format for printing number when 
     
    599603        String names[] = new String[2]; 
    600604        int i; 
     605 
     606        initgroupdir(handle); 
    601607        while(nextentry(handle,names) != -1) 
    602608        { 
     
    621627        Hashtable h = new Hashtable(); 
    622628        if(handle < 0) throw new NexusException("NAPI-ERROR: File not open"); 
     629        initattrdir(handle); 
    623630        while(nextattr(handle,names,args) != -1) 
    624631        { 
Note: See TracChangeset for help on using the changeset viewer.