Chernov Dmitriy
2016-02-25 6092bdc4b163977bb5f31df50e6b2a6def28aac5
libscpi/inc/scpi/config.h
@@ -89,6 +89,14 @@
#define USE_USER_ERROR_LIST 0
#endif
#ifndef USE_DEVICE_DEPENDENT_ERROR_INFORMATION
#define USE_DEVICE_DEPENDENT_ERROR_INFORMATION 1
#endif
#ifndef USE_MEMORY_ALLOCATION_FREE
#define USE_MEMORY_ALLOCATION_FREE 1
#endif
#ifndef USE_COMMAND_TAGS
#define USE_COMMAND_TAGS 1
#endif
@@ -249,6 +257,20 @@
#define SCPIDEFINE_doubleToStr(v, s, l) snprintf((s), (l), "%.15lg", (v))
#endif
#if USE_DEVICE_DEPENDENT_ERROR_INFORMATION
   #if USE_MEMORY_ALLOCATION_FREE
      #include <string.h>
      #include <malloc.h>
      #define SCPIDEFINE_strdup(s)      strdup((s))
      #define SCPIDEFINE_free(s)         free((s))
   #else
      #define SCPIDEFINE_strdup(s)      NULL
      #define SCPIDEFINE_free(s)         NULL
   #endif
#else
   #define SCPIDEFINE_strdup(s)         NULL
   #define SCPIDEFINE_free(s)            NULL
#endif
#ifdef   __cplusplus
}