[Nexus-developers] Two changes to napi for v4

Peterson, Peter F. petersonpf at ornl.gov
Tue May 23 18:34:31 BST 2006


I propose two additional changes to the nexus api for version 4:

 1. Include stdint.h and define its types. Since configure.ac already
checks for it, it would not be hard to include. There would also need to
be a small change to pkg-config to pick it up as well. The code to be
added is:
<code>
// use STDINT if possible, otherwise define the types here
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
typedef signed char             int8_t;
typedef short int               int16_t;
typedef int                     int32_t;
typedef unsigned char           uint8_t;
typedef unsigned short int      uint16_t;
typedef unsigned int            uint32_t;
#endif
</code>
This is a safer way of dealing with sized types. 

 2. Provide a way to turn off printing error messages to the console. It
is preferred to do so at runtime, but I will understand if it is a
compile time decision. The error messages are all funneled through the
function "NXNXNXReportError" which is also aliased to "NXIReportError".
It could be turned on or off in a non-thread safe manner (using a static
variable) to localize the changes.

What do people think?

P^2




More information about the NeXus-developers mailing list