Exemple #1
0
/*----------------------------------------------------------------------*/
int   nx_putdata(void *handle, void *dataset){
  NXhandle hfil;
  int status;
  pNXDS data;

  hfil = (NXhandle)handle;
  data = (pNXDS)dataset;

  if(data == NULL){
    NXReportError("ERROR: NULL data pointer in nx_putdata");
    return 0;
  }

  status = NXputdata(hfil,data->u.ptr);
  if(status != NX_OK){
    return 0;
  }else{
    return 1;
  }
}
Exemple #2
0
 /* NXUsetcompress sets the default compression type and minimum size */
 NXstatus  NXUsetcompress(NXhandle file_id, int comp_type, int comp_size)
 {
	 int status;
     if (comp_type == NX_COMP_LZW || comp_type == NX_COMP_HUF || 
          comp_type == NX_COMP_RLE || comp_type == NX_COMP_NONE)
	 {
         NXcompress_type = comp_type;
         if (comp_size != 0)
		 {
			 NXcompress_size = comp_size;
		 }
         status = NX_OK;
	 }
	 else
	 {
		 NXReportError( "Invalid compression option");
         status = NX_ERROR;
	 }
	 return status;
 }
Exemple #3
0
/*========================== dataset handling =======================*/
int nx_makedata(void *ptr, char *name, int rank, int type, 
		    void *dimPtr){
  int status;
  NXhandle hfil;
  pNXDS dimData;

  hfil = (NXhandle)ptr;
  dimData = (pNXDS)dimPtr;
  if(dimData->type != NX_INT32){
    NXReportError("ERROR: dimension data not integer");
    return 0;
  }
  status = NXmakedata(hfil, name, type, rank, 
		      dimData->u.iPtr);
  if(status == NX_OK){
    return 1;
  } else {
    return 0;
  }
}