diff options
author | antirez <antirez> | 2005-03-17 07:22:03 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-03-17 07:22:03 +0000 |
commit | ec5a41ceb2faf4cd712cd3aea25d79002e7caf39 (patch) | |
tree | f033d64dba4bb7d76e2a6495804361d38841df1d /jim.h | |
parent | b8dd7d32a1d21cfa45377a36a127216c91d2e8e9 (diff) | |
download | jimtcl-ec5a41ceb2faf4cd712cd3aea25d79002e7caf39.zip jimtcl-ec5a41ceb2faf4cd712cd3aea25d79002e7caf39.tar.gz jimtcl-ec5a41ceb2faf4cd712cd3aea25d79002e7caf39.tar.bz2 |
The interactive prompt can now used to type/paste multi line scripts.
Every line is appended to the previous until the script does not appear
to be complete (tested by Jim_IsScriptComplete()).
Diffstat (limited to 'jim.h')
-rw-r--r-- | jim.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* Jim - A small embeddable Tcl interpreter * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * - * $Id: jim.h,v 1.57 2005/03/16 16:28:34 antirez Exp $ + * $Id: jim.h,v 1.58 2005/03/17 07:22:04 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -497,7 +497,6 @@ typedef struct Jim_Reference { * versions of Jim (as long as the API is still compatible.) */ /* Macros are common for core and extensions */ -#define Jim_Free free #define Jim_FreeHashTableIterator(iter) Jim_Free(iter) #ifndef __JIM_CORE__ @@ -515,6 +514,7 @@ typedef struct Jim_Reference { /* Memory allocation */ JIM_STATIC void * JIM_API(Jim_Alloc) (int size); +JIM_STATIC void JIM_API(Jim_Free) (void *ptr); JIM_STATIC char * JIM_API(Jim_StrDup) (const char *s); /* evaluation */ @@ -708,7 +708,8 @@ JIM_STATIC void JIM_API(Jim_WrongNumArgs) (Jim_Interp *interp, int argc, Jim_Obj *const *argv, const char *msg); JIM_STATIC int JIM_API(Jim_GetEnum) (Jim_Interp *interp, Jim_Obj *objPtr, const char **tablePtr, int *indexPtr, const char *name, int flags); -JIM_STATIC int JIM_API(Jim_ScriptIsComplete) (const char *s, int len); +JIM_STATIC int JIM_API(Jim_ScriptIsComplete) (const char *s, int len, + char *stateCharPtr); /* package utilities */ typedef void (Jim_InterpDeleteProc)(Jim_Interp *interp, void *data); @@ -742,8 +743,8 @@ static void Jim_InitExtension(Jim_Interp *interp, const char *version) { Jim_GetApi = interp->getApiFuncPtr; - // Jim_Alloc = Jim_GetApi(interp, "Jim_Alloc"); JIM_GET_API(Alloc); + JIM_GET_API(Free); JIM_GET_API(Eval); JIM_GET_API(EvalGlobal); JIM_GET_API(EvalFile); |