#include <stdlib.h> /* In order to export the Jim_Free() macro */
#include <stdarg.h> /* In order to get type va_list */
-/* -----------------------------------------------------------------------------
-* Some /very/ old compiler maybe do not know how to
-* handle 'const'. They even do not know, how to ignore
-* it. For those compiler it may be better to compile with
-* define JIM_NO_CONST activated
-* ---------------------------------------------------------------------------*/
-
-#ifdef JIM_NO_CONST
-# define const
-#endif
-
-/* -----------------------------------------------------------------------------
- * System configuration
- * For most modern systems, you can leave the default.
- * For embedded systems some change may be required.
- * ---------------------------------------------------------------------------*/
-
-#define HAVE_LONG_LONG
-
/* -----------------------------------------------------------------------------
* Compiler specific fixes.
* ---------------------------------------------------------------------------*/
#endif /* _MSC_VER */
/* Long Long type and related issues */
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
# ifdef _MSC_VER /* MSC compiler */
# define jim_wide _int64
# ifndef LLONG_MAX
* LIBC specific fixes
* ---------------------------------------------------------------------------*/
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
# if defined(_MSC_VER) || defined(__MSVCRT__)
# define JIM_WIDE_MODIFIER "I64d"
# else
#define JIM_CONTINUE 4
#define JIM_EVAL 5
#define JIM_EXIT 6
+#define JIM_ERR_ADDSTACK 7
#define JIM_MAX_NESTING_DEPTH 10000 /* default max nesting depth */
/* Some function get an integer argument with flags to change
struct Jim_HashTable sharedStrings; /* Shared Strings hash table */
Jim_Obj *stackTrace; /* Stack trace object. */
Jim_Obj *unknown; /* Unknown command cache */
+ int unknown_called; /* The unknown command has been invoked */
int errorFlag; /* Set if an error occurred during execution. */
int evalRetcodeLevel; /* Level where the last return with code JIM_EVAL
happened. */
* cached can no longer considered valid. */
#define Jim_InterpIncrProcEpoch(i) (i)->procEpoch++
#define Jim_SetResultString(i,s,l) Jim_SetResult(i, Jim_NewStringObj(i,s,l))
+#define Jim_SetResultInt(i,intval) Jim_SetResult(i, Jim_NewIntObj(i,intval))
#define Jim_SetEmptyResult(i) Jim_SetResult(i, (i)->emptyObj)
#define Jim_GetResult(i) ((i)->result)
#define Jim_CmdPrivData(i) ((i)->cmdPrivData)
#define JIM_API( X ) X
#else
#ifndef __JIM_CORE__
-# if defined JIM_EXTENSION || defined JIM_EMBEDDED
+# if defined JIM_EMBEDDED
# define JIM_API(x) (*x)
# define JIM_STATIC
# else
*
* \param goi - get opt info
* \param puthere - where param is put
+ * \param len - return its length
*/
JIM_STATIC int JIM_API( Jim_GetOpt_String )( Jim_GetOptInfo *goi, char **puthere, int *len );
JIM_GET_API(Nvp_name2value);
JIM_GET_API(Nvp_name2value_nocase);
JIM_GET_API(Nvp_name2value_simple);
-
+
JIM_GET_API(Nvp_value2name);
JIM_GET_API(Nvp_value2name_simple);
#endif /* __JIM__H */
-
/*
* Local Variables: ***
* c-basic-offset: 4 ***