Commit Graph

321 Commits

Author SHA1 Message Date
Vítor Santos Costa 2dad416011 Merge branch 'master' of ../yap-6.2 2010-12-15 20:04:13 +00:00
Vítor Santos Costa 4546a22101 SWI seems to use t=0 for user_input/output. Not very clear why... 2010-12-15 20:03:22 +00:00
Vitor Santos Costa dffacb814b Merge branch 'master' of ../yap-6.2 2010-12-13 12:40:07 +00:00
Vitor Santos Costa 3c4da56af2 allow write to find out about SWI streams in SWI mode. 2010-12-13 12:38:37 +00:00
Vítor Santos Costa a634f3f7e7 fix scanning of UTF-32 files. 2010-10-28 18:05:42 +01:00
Paulo Moura 9a09a93a5b Corrected another bug in my patch for detecting UTF-32 BOMs. 2010-10-27 17:43:00 +01:00
Paulo Moura f3efdff878 Uncommented the code that generates an error when UTF-32 BOMs are detected. 2010-10-27 17:33:48 +01:00
Paulo Moura 168e084c62 Corrected a bug in my patch for detecting UTF-32 BOMs. 2010-10-27 17:19:26 +01:00
Vitor Santos Costa 9396252588 patches to provide initial support UTF32 encodings(from Paulo Moura) 2010-10-27 14:49:27 +01:00
Vitor Santos Costa ab8911708b fix YAP to use _longjmp when available. longjmp is just too expensive on OSX machines. 2010-10-26 22:03:36 +01:00
Vitor Santos Costa 96dd342cbc fix file_base_name (obs from Paulo Moura). 2010-09-24 19:47:05 +01:00
Vítor Santos Costa bebb236e32 improve SWI compatibility, especilaly for threaded stuff. 2010-08-04 11:37:12 +01:00
Vítor Santos Costa c081d01e78 implement access_file/2 in C 2010-08-03 21:04:16 +01:00
Vitor Santos Costa 212758d25e fix bad handliong of position overflow. 2010-08-02 13:03:48 +01:00
Vitor Santos Costa e02ca2f520 fix bad assumption in parse variables overflow handling (stacks can move around in use-malloc). 2010-08-02 11:56:14 +01:00
Vitor Santos Costa 07907f1839 fix breakage in ball access
fix unnecuessary --ASP (why?)
2010-07-27 23:21:15 +01:00
Vítor Santos Costa 4c9d74c2e7 in closestream: make sure we have a lock before we start looking inside! 2010-07-27 17:28:27 +01:00
Vítor Santos Costa 44f8f9bf5c get new stream descriptor should lock the resource until it is initialised. 2010-07-26 12:54:22 +01:00
Vítor Santos Costa b61d69ffe8 allow SWI Interface to send/receive wide characters. 2010-07-21 10:58:24 +01:00
Vitor Santos Costa 18ff860937 fix WIN32 warning 2010-07-20 11:28:45 +01:00
Vitor Santos Costa 35c3081c18 fix bad declaration 2010-07-19 22:42:19 +01:00
Vitor Santos Costa d6bd81ce81 SWI getc and putc may call prolog: protect them with slots.
allow format to codes/2 and terminate memory stream.
2010-07-19 14:40:52 +01:00
Vítor Santos Costa 3e13be32a0 fix \\ in strings to scan up to next non-blank 2010-06-23 11:46:16 +01:00
Vítor Santos Costa 247d59f0ef - slots should be considered as always live for gc.
- make sure slots do not die when they should be live, and vice-versa.
- improve a little on foreign_frame
2010-06-01 00:40:58 +01:00
Vítor Santos Costa d1599bca8d fix extra uses of mpz_ in external code. 2010-05-28 15:29:20 +01:00
Vítor Santos Costa ae2421951b fix comparison between terms when rationals come up. 2010-05-28 12:07:01 +01:00
Vítor Santos Costa be2a3a635e L constants are evil in 64 bits 2010-05-11 12:25:49 +01:00
Vítor Santos Costa faeef37a03 long -> Int 2010-05-10 10:21:56 +01:00
Vítor Santos Costa 11641c5f94 64 bit cleanups. 2010-05-06 15:00:44 +01:00
Vitor Santos Costa f3b6a044f6 improvements to language support. 2010-05-05 12:45:11 +01:00
Vitor Santos Costa ccca051c48 avoid using ftell: it can be very slow on NFS. 2010-04-14 23:47:01 +01:00
Vitor Santos Costa 5b1a2067f9 add support for with_output_to/2. 2010-04-14 10:57:00 +01:00
Vitor Santos Costa 471bf55c4c fix reading from pipes in WIN32. 2010-04-07 01:18:32 +01:00
Vítor Santos Costa II 4052f03726 initialise everything 2010-03-23 16:15:55 +00:00
U-Khasa\Vitor 1b65f5e220 WINDOWS can seek 2010-03-03 18:50:56 -06:00
Vitor Santos Costa 24f5b060d5 improve previous patch for syntax_error. 2010-03-02 23:18:04 +00:00
Vitor Santos Costa 9e5a25c61e make sure syntax_error receives a global variable (obs from Jose Santos). 2010-03-02 22:21:48 +00:00
Vitor Santos Costa c8479541bb fix bad overflow handling in peek_memory_stream (obs from Jos De Roo). 2010-02-28 09:30:58 +00:00
Vitor Santos Costa 59759cc88e make current_stream file name ISO friendly. 2010-02-26 11:43:05 +00:00
Vitor Santos Costa 69b6f47b73 make open remember original file. 2010-02-26 11:23:15 +00:00
Vitor Santos Costa 038b74493c more ATOM changes. 2010-02-26 10:59:43 +00:00
Vitor Santos Costa 21fb6091ea fix char_conversion 2010-02-26 09:12:06 +00:00
Vitor Santos Costa 29854466fa check_bom should undo char, even if end of file (obs from Nicola di Mauro). 2010-02-21 00:53:55 +00:00
U-Khasa\Vitor 7855ddf2ce exists_directory/1 2010-02-11 12:07:08 -06:00
U-Khasa\Vitor 33190e290d mingw complaint with recent versions of gcc 2010-02-10 03:03:03 -06:00
Vitor Santos Costa 6b8c2b096a make sure everything is close together. 2010-01-31 23:03:27 +00:00
Vitor Santos Costa df267a07b9 be able to parse "hello" 2010-01-26 12:19:48 +00:00
Vítor Manuel de Morais Santos Costa 31314c8059 fix warning about not checking output. 2010-01-14 15:43:18 +00:00
Vítor Manuel de Morais Santos Costa 4670e456a5 do not check for bom over binary files (obs from Nuno Fonseca). 2010-01-12 14:08:38 +00:00
Vitor Santos Costa 6ec92ac5c0 handle correctly file rewind in the presence of ungetc (obs from Jose Santos). 2009-12-19 19:57:20 -02:00
Vitor Santos Costa 1c52d17a4d get_bom should consider the case the file is empty. 2009-11-17 02:37:29 +00:00
Vítor Manuel de Morais Santos Costa 8ecac6c2f9 sebuf on stdin was called if any std stream was a tty. Bad. (obs from Ashwin Srinivasan). 2009-11-10 11:25:56 +00:00
Vitor Santos Costa 923094bd01 more updates to HEAPFIELDS. 2009-10-30 23:59:00 +00:00
Vitor Santos Costa 36a7e5c59e fix error handling in syntax_error (don't assume ARG2 has the output). 2009-10-26 22:56:18 +00:00
Vitor Santos Costa 4c8eb33e06 we had args already (no need for argv0)
improve error handling in YAP_ReadBuffer
2009-10-26 10:42:19 +00:00
Vitor Santos Costa 0179998d60 change Heap.h to YapHeap.h
rename $live to prolog/0 (for SWI compatibility).
2009-10-23 14:22:17 +01:00
Vitor Santos Costa c6e16a608a fix @ option in format/2 2009-10-21 00:07:31 +01:00
Costa Vitor a00c69b6f7 badly initialised memory stream (obs from J Santos). 2009-08-31 23:56:00 -05:00
U-Khasa\Vitor f68cc92bce make sure binary files are open as binary in WIN32 (obs from Meera Sridhar). 2009-08-02 16:04:21 -05:00
U-Khasa\Vitor 2c53d1f8ed fix error message in put 2009-08-02 15:54:27 -05:00
Vitor Santos Costa 9c74080512 fix memory overflow when doing very large writes on strings (obs from Jos Deroo). 2009-07-28 18:30:15 -05:00
Vitor Santos Costa c1024caa53 Unify emptylist of variables if one reads EOF. 2009-07-21 00:11:44 -05:00
Costa Vitor de5a09039f no_readline patches
avoid warnings in no_gmp world
avoid complaining by Solaris
2009-06-15 14:59:50 -05:00
Vitor Santos Costa 1005fa8abf PLIOError should not prevent weird errors, like
resource_errors (#36).
2009-06-12 13:46:44 -05:00
Vitor Santos Costa 303261b283 improve error messages. 2009-06-12 13:44:22 -05:00
Vitor Santos Costa a45da5f722 check for memory overflows in format (very long double, say) obs from Ingo Thon. 2009-05-29 10:26:48 -05:00
Vitor Santos Costa 09216a70b8 fix unprotected calls to plwrite. 2009-05-24 15:15:36 -05:00
Costa Vitor 7304fbda13 fix lack of streams message (Ulrich Neumerkel #60) 2009-05-22 19:55:18 -05:00
Costa Vitor ec595374a6 fix allocation of temporary stack so that unification can work even for
very deep terms.
fix occur_unification_bug X = a(f(Y)).
2009-05-22 18:35:24 -05:00
Vitor Santos Costa 51e669dcfb support for passing priority as argument to write. (Ulrich's #45).
fixes on making write handle infinite loops
2009-05-22 13:24:27 -05:00
Vitor Santos Costa 7953004610 fix unused variable warning. 2009-05-13 17:12:12 -05:00
Vitor Santos Costa 2016e118b3 Ulrich Neumerkel's patch so that variables are declared in front of a block. 2009-05-02 10:54:09 -05:00
Vitor Santos Costa d02e14415b another fix to FileFromStream 2009-04-25 10:59:05 -05:00
Vitor Santos Costa 291997ad77 fix FileDescriptorFromStream 2009-04-25 10:27:55 -05:00
Vitor Santos Costa 7ed3b456ac add Yap_FileDescriptorFromStream at request from NF. 2009-04-22 16:41:41 -05:00
Vitor Santos Costa 8a3978e3e1 rename BinaryTestPredFlag to BinaryPredFlag
get rid of small annoying arithmetic bugs
2009-02-09 21:56:40 +00:00
Vitor Santos Costa b1cf60cafb moe changes to support atomic generation of atoms
support automatic generation of code walker (to find P's predicate and clause)
2008-12-24 09:04:44 +00:00
Vítor Santos Costa a8ac9bfb43 generate known atoms and functors automatically 2008-12-23 01:53:52 +00:00
Vitor Santos Costa 7598b56c38 fix prompt in silent mode (obs from Tony Wilson) 2008-12-22 12:44:49 +00:00
Vítor Santos Costa 915ae47d18 fix ~R bug (thanks to Carsten Mueller) 2008-12-22 12:16:31 +00:00
Vítor Santos Costa 2b0c27deb6 Remove attempt to emulate SWI I/O
add YAP_getcwd and PL_cwd to interface
2008-12-13 16:07:55 +00:00
Vítor Santos Costa 58d4442883 fixes for gcc-4.3 (same as stable) 2008-11-26 09:56:18 +00:00
Vitor Santos Costa 0dcf34b7bc mainbranch fixes to:
- fix quoted characters output
- fix line position in read_term and friends
- make messages look a bit better
- CLP(BN) EM improvements.
2008-10-23 22:17:45 +01:00
Vítor Santos Costa 17ba194c1e Include new instruction execute_cpred to perform tail optimisation for
builtins. Required changes:
- be careful about creeping in deallocate: it may be followed by
something that is not a cut nor a proceed.
- include new instruction in absmi.c: it is a merge of execute and
call_cpred.
- change compiler to generate execute even for C builtins.
- be careful with dexecute: it may not be done if execute_op is a C
builtin.
- if we are in execute_cpred, the garbage collector cannot trust P:
instead it must look at CP to find out the size of the current
environment. The macro gc_P receives that information.
- We don't need to change CP if we do a meta-call from within
execute_cpred (and we in fact cannot). Check places where we do
meta-calls: exec, clause in cdmgr, and lu_recorded.
2008-08-28 04:43:00 +01:00
Vitor Santos Costa a6b9d096a6 make sure we always close intermediate memory streams on exit. 2008-08-25 15:19:00 +01:00
vsc 82efc8fb2c small fixes to compile in Windows again.
Trust _isatty


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2311 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-22 01:59:48 +00:00
vsc e1866e2917 improve C-interface and SWI comptaibility a bit.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2292 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-07-24 16:02:04 +00:00
vsc 75c72d7b7d SWI and module fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2290 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-07-22 23:34:50 +00:00
vsc d8e5f2c895 fixes by Bart and Tom: mostly libraries but nasty one in indexing
compilation.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2286 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-07-11 17:02:10 +00:00
vsc e90f744e5e fix stack growth in globals
fix compilation messages


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2277 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-06-16 21:22:15 +00:00
vsc ac6ddd5005 fix syntax error messages
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2275 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-06-12 10:55:52 +00:00
vsc 5d49f14545 fix rbtrees built from ordered lists
fix jt
be more flexible about unbound parents


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2260 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-06-05 16:24:08 +00:00
vsc ade7b34d49 thread fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2251 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-05-28 17:18:35 +00:00
vsc 214644aed4 fix null pointer reference
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2247 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-05-23 21:06:44 +00:00
vsc 316811d2cd user:goal_expand should be called before import
add extra apply_macros and apply stuff; fix unexisting definitions.
add forall/2 and ignore/1 to system stuff.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2237 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-05-15 13:41:48 +00:00
vsc 282ba60852 fix some overflows in integer handling and ~r option.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2203 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-04-03 22:27:29 +00:00
vsc a8fe6a668e more saved state fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2185 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-04-01 15:31:43 +00:00
vsc d0cd8182d9 fix path issues when opening files
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2137 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-03-12 15:37:34 +00:00
vsc 0e3d91a0ff fix chr bootstrap.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2111 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-02-23 01:32:31 +00:00
vsc 17d16e0b14 Big update to support more SICStus/SWI like message handling
fix YAPSHAREDIR
fix yap.tex (Bernd)


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2107 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-02-22 15:08:37 +00:00