Back to index

salome-kernel  6.5.0
Functions
HDFattrWrite.c File Reference
#include "hdfi.h"

Go to the source code of this file.

Functions

hdf_err HDFattrWrite (hdf_idt id, void *val)

Function Documentation

hdf_err HDFattrWrite ( hdf_idt  id,
void *  val 
)

Definition at line 41 of file HDFattrWrite.c.

{
  hdf_idt type_id;
  int ret = 0;
#if defined (PCLINUX) || defined (PCLINUX64)
  int isI32BE = 0;
#endif

  if ((type_id = H5Aget_type(id)) < 0)
    return -1;

#if defined (PCLINUX) || defined (PCLINUX64)
  if((H5Tget_class(type_id) == H5T_INTEGER) && (H5Tget_size(type_id) == 4)) {
    isI32BE = 1; /* See HDFattrCreate */
    if (H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,1,(void *)val,NULL,(hid_t)0) < 0)
      return -1;
  }
#endif

  ret = H5Awrite(id,type_id, val);


#if defined (PCLINUX) || defined (PCLINUX64)
  if (isI32BE && (H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,1,(void *)val,NULL,(hid_t)0) < 0))
    return -1;
#endif

  H5Tclose(type_id);

  return ret;
}

Here is the caller graph for this function: