Age | Commit message (Collapse) | Author | Files | Lines |
|
jim.h now includes JIM_ABI_VERSION that should be incremented whenever
the ABI changes. Then all loadable modules should call Jim_CheckAbiVersion()
to make sure they are loaded against the correct version.
Add Jim_PackageProvideCheck() that does both Jim_CheckAbiVersion()
and Jim_PackageProvide() to simplify the implementation of loadable extensions.
Also rename the "big" sqlite3 extension to just sqlite to avoid a naming conflict with
the smaller jim-sqlite3 extension.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid possible problems with when linking by renaming
local regex to jim_regcomp, jim_regexec, etc.
Fixes: #163
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
regsub -all matches \A against the start of each match, but
correctly handle a pattern like ^ which does not advance the
match
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The calculation of the end index was wrong.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Not byte indices
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Not a byte index
Reported-by: dbohdan <dbohdan@dbohdan.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To avoid an explosion of different internal rep structures,
simply use the existing ptrIntValue for jim-regexp
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Many Tcl regexp tests now work correctly with Jim regexp
Also update regsub/regexp wrong # args error message to match Tcl 8.6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Should just replace with the bare backslash, not backslash '\0'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sweep through and clean up all (most) of the comments in the code.
While there, adjust some variable and function names to be more consistent,
and make a few small code changes - again, mostly for consistency.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
During internal rep change to regex
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Otherwise built-in regex impl. conflicts with externl regex
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
With some ARE extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Provides a better error message on wrong args and allows
abbreviations.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use number of paren expressions with regexp -inline
Fix a problem with regexp -start and an anchored search
Fix regexp -inline -indices
Fix regexp matching with an empty pattern (e.g. ^)
Fix some cases where regsub -all did not return all results
Fix some regsub cases with an empty pattern
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Allows, e.g. -start end-4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to set REG_NOTBOL on subsequent calls to regexec()
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Per v0.51, don't refer to the FreeBSD licence
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
All C extensions must call Jim_PackageProvide()
make-c-ext ensures that Tcl extensions call Jim_PackageProvide()
if compiled in.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This reduces the size of the non-shared data segment
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Create and use config.h
Check for backtrace, fork, vfork, syslog, regcomp and others
Disable extensions which require missing functions/features
Check for one arg vs. two arg mkdir()
Distinguish between mingw and native windows
The aio extension has reduced functionality for ANSI C only
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Completely document new regexp and regsub features
Remove some old, commented-out debugging
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Makes creating error messages much simpler
Also convert a couple of long if/else to switch
Also some error message improvements
Also fix some memory leaks
|
|
Add lsearch -command, update case to use lsearch
Rename tcl6.tcl to tclcompat.tcl
Remove // style comments
Expand some tabs to spaces
Fix some compiler warnings
Remove some unused functions
Don't close fd=-1 in exec
|
|
From Tcl 8.4 (see TIP 76: http://www.tcl.tk/cgi-bin/tct/tip/76.html)
|
|
Remove unimplemented 'after restart|expire' from eventloop
Allow libjim to be build as a shared library
On some platforms, regex.h needs stdlib.h first
Use ualarm() only for times < 1 second
Fix warnings found by clang static analyser
*: printf/syslog %m isn't portable
*: some variables set but never read
*: some possible null pointer references (although mostly impossible)
*: also minor fixes to jim unit tests
Fix 'syslog -options <n>'
Must null terminate readlink() result
|
|
source fails with zero length file
unknown can't be called recursively
*: This can be useful when using unknown to dynamically load code,
which may in turn want to dynamically load code
*: Limit it to 50 recursions though
Allow string greater/less comparison
*: Comparing two strings for order did not work
Implement file join
*: It's not to hard and is handy when working with the current dir, ""
Don't omit [unknown] completely from stack trace
*: Since we lose valuable informtion, just omit the name
Fix return from case
Turn regexp patterns into real objects
*: Thus caching the compiled regexps
Allow error to rethrow an error
Replace bcopy() with more standard memcpy()
Fixes to parray, improve errorInfo
*: errorInfo takes an optional stack trace
Add tests for rethrowing errors via errorInfo
Fix ndelay
*: Was looking at wrong param
*: Also fix usage/help for aio.socket
Package should be able to call exit
*: Currently any return from a package is changed to JIM_ERR
Line counting is incorrect for backlash newline
|
|
*: make-c-ext is now make-c-ext.tcl
*: build doc/Tcl.html with asciidoc
*: Jim_SetIntResult -> Jim_SetResultInt
*: Jim_EvalFile() now reads the file contents in one go
|
|
Also, no need to install tcl extensions
Display any errors from loading static extensions
|
|
Also clean up some white space
|
|
Nvp, getopt, move interactive processing to jim-interactive.c
|
|
Note that this commit removes some files and undoes
some commits which will be reapplied later.
This is the easiest way to switch across.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To ease rebasing
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
Remove "FreeBSD license" statements, since it's not a correct term
I believe.
Small cleanup while being here.
|
|
This reverts commit 1e2fdd7d9e877fbe2c88a4c32f098ce1e575dc1d.
|
|
for relicensing all files within Jim project.
"FreeBSD license" isn't correct term, so basically remove it.
Try to make the whole place consistent.
|
|
* jim-regexp.c: Add regexp extension for regexp and regsub commands
|