Commit graph

174 commits

Author SHA1 Message Date
Olly Betts
631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
William S Fulton
6939d91e4c Header file tidyup
Fix Visual C++ warning in scilab.cxx:
  warning C4996: 'strtok': This function or variable may be unsafe.
2022-05-07 11:56:06 +01:00
YungLee
31f7b437f4
[scilab] Fix to work on Windows
* Change the builder filename to match the loader filename

* Mark extern functions with SWIGEXPORT

* Fix bug: builder.sce not generated if with  '-scilab -builder'  option

Fixes #1853
2022-03-15 15:06:17 +13:00
Olly Betts
55377bdc08 Add DOH Exit() and SetExitHandler()
Exit() is a wrapper for exit() by default, but SetExitHandler() allows
specifying a function to call instead.

This means that failures within DOH (e.g. Malloc() failing due to lack
of memory) will now perform cleanup such as removing output files.

This commit also cleans up exit statuses so SWIG should now reliably
exit with status 0 if the run was successful and status 1 if there was
an error (or a warning and -Werror was in effect).

Previously in some situations SWIG would try to exit with the status set
to the number of errors encountered, but that's problematic - for
example if there were 256 errors this would result in exit status 0 on
most platforms.  Also some error statuses have special meanings e.g.
those defined by <sysexits.h>.

Also SWIG/Javascript tried to exit with status -1 in a few places (which
typically results in exit status 255).
2022-03-06 12:33:54 +13:00
Olly Betts
d22b7dfaea scilab.cxx: Fix source code misindentation 2022-02-24 10:45:24 +13:00
Clément DAVID
f93f8ad1d5 [Scilab] remove targetversion argument
This commit handles multi-version support at runtime, it
fixes:
 * 5.5.2 - with cutted long identifier name
 * 6.0.0 - with full string identifier
 * 6.1.0 - with 1 or 0 output argument

It also improves the codebase by:
 * Using `Char(X)` instead of `DohCheck(X)` and `Data(X)`
 * Using `Len(X)` instead of `strlen()`
 * Correctly detecting old Scilab versions
2022-02-21 10:01:59 +01:00
Clement David
aee380ce82 [scilab] Name init function name to avoid collision
Use SWIG_<module>_Init() function to init the module rather than
<module>_Init() as the latter can collide with a function being wrapped.

Fixes #745
Fixes #1739
2022-02-02 09:43:06 +13:00
Olly Betts
9ddc9dceb7 Remove support for $source and $target
These were officially deprecated in 2001, and attempts to use them have
resulted in a warning (including a pointer to what to update them to)
for most if not all of that time.

Fixes #1984
2021-04-30 10:20:14 +12:00
luz.paz
87695dacb1 Misc. documentation and source comment typo fixes
Found via `codespell -q 3 -L uint,od,objext,ba,cmo,bae,ans,struc,fo,clos,goin,upto,thru`
Revert changes in previous commit
2019-05-28 11:41:22 +12:00
Clément DAVID
9278593dc4 fix Scilab 6.0.0 linking issue 2017-05-30 14:42:44 +02:00
Simon Marchetto
c06c9b3853 [Scilab] New parameter targetversion to specify the Scilab target version (5, 6, ..) for code generation
With Scilab 6 target specified, identifier names truncation is disabled (no longer necessary)

Signed-off-by: Simon Marchetto <simon.marchetto@scilab-enterprises.com>
2017-04-12 13:54:42 +02:00
William S Fulton
08688d7d9d Add support for "ret" typemap where missing and improve documentation on it. 2016-09-29 08:07:26 +01:00
Simon Marchetto
d0a45be1eb scilab: fix issue #746 2016-07-29 16:56:30 +02:00
Simon Marchetto
95a5def328 scilab: fix issue #755 2016-07-29 11:52:26 +02:00
William S Fulton
7ec7cc63da memory leak improvements - delete at end of scope 2016-06-26 00:06:01 +01:00
Amarnath Valluri
9b371b48d1 scilab.cxx: Fix memory leaks
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
2016-06-16 15:59:21 +03:00
simon
822733bf52 scilab: fix builder for scilab 6.0 (empty matrix error) 2016-03-02 05:14:44 -05:00
Petre Eftime
0a07cd4c30 Prevent redefinition warnings when compiling with SWIG<module> defined
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
2015-12-22 14:33:21 +02:00
Simon Marchetto
b05f0057ca improve support of varargs 2015-06-23 16:24:35 +02:00
Olly Betts
38a75a22c9 "suppport" -> "support" 2015-03-27 12:54:47 +13:00
William S Fulton
1fae569960 Add missing SWIGSCILAB in wrappers and fix unions test for non-scilab languages 2015-01-26 21:03:45 +00:00
Simon Marchetto
0544765abd remove -nobuilder option 2015-01-26 12:29:40 +01:00
Simon Marchetto
4c66489fd7 remove useless direct_gateway function in wrapper 2015-01-26 12:11:13 +01:00
William S Fulton
6f48e57090 Scilab command line options put in alphabetical order and some html tweaks 2015-01-22 20:03:16 +00:00
William S Fulton
96c19872bd Scilab cosmetics 2015-01-19 07:52:47 +00:00
Simon Marchetto
b11f4d8e62 reduce slightly the gateway source 2015-01-14 15:43:46 +01:00
Simon Marchetto
18832e938c fix buildermode error with Scilab V6 2015-01-12 16:20:03 +01:00
Simon Marchetto
66f150b853 fix Scilab V6 support after merge of gateway & wrapper sources 2015-01-12 16:19:35 +01:00
Simon Marchetto
9c5003b022 do no generate builder by default 2015-01-08 14:06:04 +01:00
Simon Marchetto
78705a5175 gateway source is moved into wrapper source 2015-01-07 18:04:29 +01:00
William S Fulton
698248d2bf beautify scilab.cxx 2014-10-31 23:27:36 +00:00
William S Fulton
c150fc033d Scilab minor coding improvements 2014-10-31 22:00:48 +00:00
Simon Marchetto
52d2291b66 Merge branch 'patch-5' of https://github.com/ibell/swig into ibell-patch-5
Conflicts:
	Source/Modules/scilab.cxx
2014-10-27 12:15:36 +01:00
Simon Marchetto
1875f841e5 scilab: simplify builder script file 2014-10-22 12:19:01 +02:00
Simon Marchetto
fd1e387a0e scilab: rename build command line options 2014-10-21 17:00:51 +02:00
Simon Marchetto
6abf66324a scilab: add the SWIG banner to the generated gateway XML 2014-10-21 14:55:46 +02:00
Simon Marchetto
30faff1fce scilab: remove outputlibrary option + renaming module to gateway 2014-10-21 14:39:18 +02:00
Simon Marchetto
d3afd65698 scilab: fix compilation error in scilab 5.3.3 2014-10-20 17:03:17 +02:00
Simon Marchetto
6c84d9bd3c scilab: fix gateway entry point name 2014-10-20 14:53:29 +02:00
Simon Marchetto
f069cba2b4 scilab: swig generates loader script 2014-10-20 14:49:25 +02:00
Simon Marchetto
c440eae1f9 scilab: fix generated gateway source (missing include, entry point name) 2014-10-20 10:16:19 +02:00
Simon Marchetto
af88d49113 scilab: fix segmentation fault 2014-10-17 19:47:00 +02:00
Simon Marchetto
78b3e5bc46 scilab: generate gateway source with swig 2014-10-17 19:46:29 +02:00
Simon Marchetto
32c76be163 scilab: change swig options, new option -gatewayxml, remove -internalmodule 2014-10-17 17:33:27 +02:00
Simon Marchetto
db7cf46282 scilab: fix segfault 2014-09-29 14:52:51 +02:00
Simon Marchetto
8b998cb538 scilab: truncates too long (struct, class) member names 2014-09-26 17:23:27 +02:00
Simon Marchetto
3ca185197c scilab: truncates too long identifier names (in addition to display warnings) 2014-09-25 14:29:52 +02:00
Simon Marchetto
8e791562a4 scilab: rearrange some comments 2014-09-24 08:59:55 +02:00
Simon Marchetto
c88292ad89 scilab: in builder.sce use absolute path for source files 2014-09-15 11:50:54 +02:00
Ian Bell
3c16d8ed43 More clear description of buildverbositylevel 2014-09-15 02:00:07 +02:00