Index: generic/nsfInt.h =================================================================== diff -u -r1d1ca561af5942718e613929b36e5d2419e4fe5a -r77ba24ec459d9168dbfad4ae0c6eb4b936e8ea6b --- generic/nsfInt.h (.../nsfInt.h) (revision 1d1ca561af5942718e613929b36e5d2419e4fe5a) +++ generic/nsfInt.h (.../nsfInt.h) (revision 77ba24ec459d9168dbfad4ae0c6eb4b936e8ea6b) @@ -1,4 +1,4 @@ -/* +/* * nsfInt.h -- * * Declarations of the internally used API Functions of the Next @@ -47,8 +47,8 @@ #define _nsf_int_h_ #if defined(HAVE_STDINT_H) -# define HAVE_INTPTR_T -# define HAVE_UINTPTR_T +# define HAVE_INTPTR_T +# define HAVE_UINTPTR_T #endif /* @@ -79,7 +79,7 @@ #if __GNUC_PREREQ(2, 95) /* Use gcc branch prediction hint to minimize cost of e.g. DTrace - * ENABLED checks. + * ENABLED checks. */ # define unlikely(x) (__builtin_expect((x), 0)) # define likely(x) (__builtin_expect((x), 1)) @@ -344,7 +344,7 @@ (e.g., "if(NsfConfigEnabled(...))") */ -#define NsfConfigEnabled__NOOP(...) +#define NsfConfigEnabled__NOOP(...) #define NsfConfigEnabled__open ( #define NsfConfigEnabled__close ) #define NsfConfigEnabled__caller(macro, args) macro args @@ -435,7 +435,7 @@ } NsfStringIncrStruct; -/* +/* * cmd flags */ @@ -633,15 +633,15 @@ typedef enum SystemMethodsIdx { NSF_c_alloc_idx, - NSF_c_create_idx, + NSF_c_create_idx, NSF_c_dealloc_idx, - NSF_c_configureparameter_idx, - NSF_c_recreate_idx, - NSF_o_cleanup_idx, + NSF_c_configureparameter_idx, + NSF_c_recreate_idx, + NSF_o_cleanup_idx, NSF_o_configure_idx, NSF_o_configureparameter_idx, - NSF_o_defaultmethod_idx, - NSF_o_destroy_idx, + NSF_o_defaultmethod_idx, + NSF_o_destroy_idx, NSF_o_init_idx, NSF_o_move_idx, NSF_o_unknown_idx, @@ -651,7 +651,7 @@ #if !defined(NSF_C) EXTERN CONST char *Nsf_SystemMethodOpts[]; -#else +#else CONST char *Nsf_SystemMethodOpts[] = { "-class.alloc", "-class.create", @@ -684,8 +684,8 @@ } NsfObjectSystem; -/* - * Next Scripting global names and strings +/* + * Next Scripting global names and strings * * We provide enums for efficient lookup for corresponding string * names and Tcl_Objs via global arrays. The "constant" Tcl_Objs are @@ -700,18 +700,18 @@ /* var names */ NSF_AUTONAMES, NSF_DEFAULTMETACLASS, NSF_DEFAULTSUPERCLASS, NSF_ARRAY_INITCMD, NSF_ARRAY_CMD, - NSF_ARRAY_ALIAS, NSF_ARRAY_PARAMETERSYNTAX, + NSF_ARRAY_ALIAS, NSF_ARRAY_PARAMETERSYNTAX, NSF_POSITION, NSF_POSITIONAL, NSF_CONFIGURABLE, NSF_PARAMETERSPEC, /* object/class names */ - NSF_METHOD_PARAMETER_SLOT_OBJ, + NSF_METHOD_PARAMETER_SLOT_OBJ, /* constants */ - NSF_ALIAS, NSF_ARGS, NSF_CMD, NSF_FILTER, NSF_FORWARD, + NSF_ALIAS, NSF_ARGS, NSF_CMD, NSF_FILTER, NSF_FORWARD, NSF_METHOD, NSF_OBJECT, NSF_SETTER, NSF_SETTERNAME, NSF_VALUECHECK, NSF_GUARD_OPTION, NSF___UNKNOWN__, NSF_ARRAY, NSF_GET, NSF_SET, NSF_OPTION_STRICT, NSF_OBJECT_UNKNOWN_HANDLER, NSF_ARGUMENT_UNKNOWN_HANDLER, NSF_PARSE_ARGS, /* Partly redefined Tcl commands; leave them together at the end */ - NSF_EXPR, NSF_FORMAT, NSF_INFO_BODY, NSF_INFO_FRAME, NSF_INTERP, + NSF_EXPR, NSF_FORMAT, NSF_INFO_BODY, NSF_INFO_FRAME, NSF_INTERP, NSF_STRING_IS, NSF_EVAL, NSF_RENAME } NsfGlobalNames; @@ -730,15 +730,15 @@ /* object/class names */ "::nx::methodParameterSlot", /* constants */ - "alias", "args", "cmd", "filter", "forward", + "alias", "args", "cmd", "filter", "forward", "method", "object", "setter", "settername", "valuecheck", "-guard", "__unknown__", "::array", "get", "set", "-strict", /* nsf tcl commands */ "::nsf::object::unknown", "::nsf::argument::unknown", "::nsf::parseargs", /* tcl commands */ - "expr", "format", "::tcl::info::body", "::tcl::info::frame", "interp", + "expr", "format", "::tcl::info::body", "::tcl::info::frame", "interp", "::tcl::string::is", "::eval", "rename" }; @@ -750,7 +750,7 @@ EXTERN Tcl_ObjType NsfMixinregObjType; EXTERN int NsfMixinregGet(Tcl_Interp *interp, Tcl_Obj *obj, NsfClass **clPtr, Tcl_Obj **guardObj) nonnull(1) nonnull(2) nonnull(3) nonnull(4); -EXTERN int NsfMixinregInvalidate(Tcl_Interp *interp, Tcl_Obj *obj) +EXTERN int NsfMixinregInvalidate(Tcl_Interp *interp, Tcl_Obj *obj) nonnull(1) nonnull(2); EXTERN Tcl_ObjType NsfFilterregObjType; @@ -769,7 +769,7 @@ typedef enum {SHADOW_LOAD=1, SHADOW_UNLOAD=0, SHADOW_REFETCH=2} NsfShadowOperations; -typedef enum {NSF_PARAMS_NAMES, NSF_PARAMS_LIST, +typedef enum {NSF_PARAMS_NAMES, NSF_PARAMS_LIST, NSF_PARAMS_PARAMETER, NSF_PARAMS_SYNTAX} NsfParamsPrintStyle; int NsfCallCommand(Tcl_Interp *interp, NsfGlobalNames name, @@ -901,7 +901,7 @@ #else # define NSF_PROFILE_TIME_DATA # define NSF_PROFILE_CALL(interp, object, methodName) -# define NSF_PROFILE_EXIT(interp, object, methodName) +# define NSF_PROFILE_EXIT(interp, object, methodName) #endif typedef struct NsfRuntimeState { @@ -911,7 +911,7 @@ struct NsfObjectSystem *objectSystems; /* * namespaces and cmds - */ + */ Tcl_Namespace *NsfNS; /* the ::nsf namespace */ Tcl_Namespace *NsfClassesNS; /* the ::nsf::classes namespace, where classes are created physically */ Tcl_ObjCmdProc *objInterpProc; /* cached result of TclGetObjInterpProc() */ @@ -932,7 +932,7 @@ int errorCount; /* keep track of number of errors to avoid potential error loops */ int unknown; /* keep track whether an unknown method is currently called */ unsigned int overloadedMethods; /* bitarray for tracking overloaded methods */ - /* + /* * Configure options. The following do*-flags could be moved into a * bitarray, but we have only one state per interp, so the win on * memory is very little. @@ -1123,8 +1123,8 @@ int objc, Tcl_Obj *CONST objv[]) nonnull(1) nonnull(2) nonnull(4); -EXTERN int NsfObjWrongArgs(Tcl_Interp *interp, CONST char *msg, - Tcl_Obj *cmdName, Tcl_Obj *methodName, +EXTERN int NsfObjWrongArgs(Tcl_Interp *interp, CONST char *msg, + Tcl_Obj *cmdName, Tcl_Obj *methodName, char *arglist) nonnull(1) nonnull(2); @@ -1136,8 +1136,8 @@ EXTERN void NsfDStringArgv(Tcl_DString *dsPtr, int objc, Tcl_Obj *CONST objv[]) nonnull(1) nonnull(3); -EXTERN Tcl_Obj *NsfMethodNamePath(Tcl_Interp *interp, - Tcl_CallFrame *framePtr, +EXTERN Tcl_Obj *NsfMethodNamePath(Tcl_Interp *interp, + Tcl_CallFrame *framePtr, const char *methodName) nonnull(1) nonnull(3) returns_nonnull; @@ -1167,11 +1167,11 @@ # define NsfClassParamPtrEpochIncr(msg) #endif -/* +/* * NsfFlag type */ EXTERN Tcl_ObjType NsfFlagObjType; -EXTERN int NsfFlagObjSet(Tcl_Interp *interp, Tcl_Obj *objPtr, +EXTERN int NsfFlagObjSet(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param CONST *baseParamPtr, int serial, Nsf_Param CONST *paramPtr, Tcl_Obj *payload, unsigned int flags); typedef struct { @@ -1185,12 +1185,12 @@ #define NSF_FLAG_DASHDAH 0x01 #define NSF_FLAG_CONTAINS_VALUE 0x02 -/* +/* * NsfMethodContext type */ EXTERN Tcl_ObjType NsfInstanceMethodObjType; EXTERN Tcl_ObjType NsfObjectMethodObjType; -EXTERN int NsfMethodObjSet(Tcl_Interp *interp, Tcl_Obj *objPtr, +EXTERN int NsfMethodObjSet(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_ObjType *objectType, void *context, int methodEpoch, Tcl_Command cmd, NsfClass *cl, unsigned int flags) @@ -1266,15 +1266,15 @@ char *strnstr(const char *buffer, const char *needle, size_t buffer_len); #endif -/* +/* In ANSI mode (ISO C89/90) compilers such as gcc and clang do not define the va_copy macro. However, they *do* in reasonably recent versions provide a prefixed (__*) one. The by-feature test below falls back to the prefixed version, if available, and provides a more general fallback to a simple assignment; this is primarily for MSVC; admittedly, this simplifcation is not generally portable to platform/compiler combos other then x86, but the best I can think of right - now. One might constrain the assignment-fallback to a platform and + now. One might constrain the assignment-fallback to a platform and leave va_copy undefined in uncaught platform cases (?). */ #ifndef va_copy