Kevin Ryde [Tue, 6 Jan 2004 21:45:48 +0000 (21:45 +0000)]
(SCM_TESTS): Add q.test.
Kevin Ryde [Tue, 6 Jan 2004 21:43:55 +0000 (21:43 +0000)]
New file.
(q-pop!): Exercise this, in particular the "not/null?" bug reported by
Richard Todd.
Kevin Ryde [Tue, 6 Jan 2004 21:38:34 +0000 (21:38 +0000)]
(q-pop!): Should be "null?" not "not" for end-of-list.
Reported by Richard Todd.
Marius Vollmer [Tue, 6 Jan 2004 18:17:30 +0000 (18:17 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 6 Jan 2004 18:17:17 +0000 (18:17 +0000)]
Document scm_on_unwind_with_scm and scm_on_rewind_with_scm.
Marius Vollmer [Tue, 6 Jan 2004 18:13:51 +0000 (18:13 +0000)]
(close_port, delete_file, check_ports): New.
Marius Vollmer [Tue, 6 Jan 2004 18:11:55 +0000 (18:11 +0000)]
dynwind.h (SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's
"explicitly" not "explicitely", damn. Changed all uses.
Marius Vollmer [Tue, 6 Jan 2004 18:09:42 +0000 (18:09 +0000)]
(swap_ports, scm_with_current_foo_port): Do not allocate swap_data on
stack, use a 'malloc obj'.
Marius Vollmer [Tue, 6 Jan 2004 18:08:31 +0000 (18:08 +0000)]
(scm_make_initial_fluids, scm_copy_fluids, scm_swap_fluids,
scm_swap_fluids_reverse): Renamed to scm_i_... since they are
internal. Changed all uses.
Marius Vollmer [Tue, 6 Jan 2004 18:04:47 +0000 (18:04 +0000)]
(frame_print): Removed, use the default printer. (WINDER_F_MARK,
WINDER_MARK_P, winder_mark): New. (scm_on_unwind_with_scm,
scm_on_rewind_with_scm): New. Use above to protect SCM values.
Marius Vollmer [Tue, 6 Jan 2004 17:57:41 +0000 (17:57 +0000)]
(SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's "explicitly" not
"explicitely", damn. Changed all uses.
Marius Vollmer [Tue, 6 Jan 2004 16:20:03 +0000 (16:20 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 6 Jan 2004 16:19:21 +0000 (16:19 +0000)]
(print-result, print-user-result): Handle exact fractions.
Marius Vollmer [Sun, 4 Jan 2004 23:45:38 +0000 (23:45 +0000)]
*** empty log message ***
Marius Vollmer [Sun, 4 Jan 2004 23:45:11 +0000 (23:45 +0000)]
Document scm_with_[un]blocked_asyncs.
Marius Vollmer [Sun, 4 Jan 2004 23:44:19 +0000 (23:44 +0000)]
Document scm_with_current_<foo>_port.
Marius Vollmer [Sun, 4 Jan 2004 23:43:20 +0000 (23:43 +0000)]
Minor markup fixes.
Marius Vollmer [Sun, 4 Jan 2004 23:40:14 +0000 (23:40 +0000)]
(scm_with_current_input_port, scm_with_current_output_port,
scm_with_current_error_port): New.
Marius Vollmer [Sun, 4 Jan 2004 23:36:49 +0000 (23:36 +0000)]
(scm_with_blocked_asyncs, scm_with_unblocked_asyncs): New.
Kevin Ryde [Sat, 3 Jan 2004 22:34:05 +0000 (22:34 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 22:25:24 +0000 (22:25 +0000)]
(scm_current_time, scm_gettimeofday): Add a comment about
setzone/restorezone protection for DOS.
Kevin Ryde [Sat, 3 Jan 2004 22:04:37 +0000 (22:04 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:58:04 +0000 (21:58 +0000)]
(Threads): Note Guile uses POSIX threads, for
concurrency and preemption.
(C level thread interface): Note periodic libguile call required for C
code in threads, add commented out reminders for SCM_TICK and
guile-mode, for when those features are ready.
Marius Vollmer [Sat, 3 Jan 2004 21:57:11 +0000 (21:57 +0000)]
Added section about frames.
Marius Vollmer [Sat, 3 Jan 2004 21:56:35 +0000 (21:56 +0000)]
*** empty log message ***
Marius Vollmer [Sat, 3 Jan 2004 21:56:18 +0000 (21:56 +0000)]
Document the frames stuff and other random changes.
Marius Vollmer [Sat, 3 Jan 2004 21:54:23 +0000 (21:54 +0000)]
* standalone/test-unwind.c: New test, for the frames stuff.
* standalone/Makefile.am: Compile and run it.
Marius Vollmer [Sat, 3 Jan 2004 21:53:21 +0000 (21:53 +0000)]
added test-unwind
Marius Vollmer [Sat, 3 Jan 2004 21:52:34 +0000 (21:52 +0000)]
(copy_stack): New, do only the stack copying
part of copy_stack_and_call.
(copy_stack_and_call): Copy the stack after unwinding and before
rewinding.
(scm_dynthrow): Do not call scm_dowinds, this is now done by
copy_stack_and_call.
Marius Vollmer [Sat, 3 Jan 2004 21:49:16 +0000 (21:49 +0000)]
(scm_t_frame_flags, scm_t_wind_flags,
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
Kevin Ryde [Sat, 3 Jan 2004 21:41:31 +0000 (21:41 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:38:38 +0000 (21:38 +0000)]
(scm_less_p): Don't convert frac to float for compares,
can give wrong results due to rounding.
Kevin Ryde [Sat, 3 Jan 2004 21:27:51 +0000 (21:27 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:15:40 +0000 (21:15 +0000)]
(-1+, <?, <=?, =?, >?, >=?): Define as aliases for 1-, <,
<=, =, >, >= respectively, required by slib 'rev2-procedures but no
longer in the guile core.
Kevin Ryde [Sat, 3 Jan 2004 21:12:45 +0000 (21:12 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:12:01 +0000 (21:12 +0000)]
(false-if-exception): Add tests.
Kevin Ryde [Sat, 3 Jan 2004 21:10:27 +0000 (21:10 +0000)]
(false-if-exception): Unquote catch and lambda, so as not
to depend on expansion environment.
Kevin Ryde [Sat, 3 Jan 2004 21:08:13 +0000 (21:08 +0000)]
(SRFI-1 Filtering and Partitioning): For partition
and partition!, emphasise the multi-value return, note partition may
share a tail with the given list.
Kevin Ryde [Sat, 3 Jan 2004 21:03:02 +0000 (21:03 +0000)]
(SRFI-1 Searching, SRFI-1 Deleting, SRFI-1
Association Lists): Note how member, delete, delete! and assoc extend
the corresponding core functions.
Marius Vollmer [Fri, 26 Dec 2003 19:09:03 +0000 (19:09 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 26 Dec 2003 19:04:55 +0000 (19:04 +0000)]
Arrange for scm_t_intmax and scm_t_uintmax to be defined in
scmconfig.h
Marius Vollmer [Fri, 26 Dec 2003 19:00:47 +0000 (19:00 +0000)]
Find a suitable type for the new scm_t_intmax and scm_t_uintmax.
Kevin Ryde [Tue, 2 Dec 2003 21:38:04 +0000 (21:38 +0000)]
*** empty log message ***
Kevin Ryde [Tue, 2 Dec 2003 21:36:39 +0000 (21:36 +0000)]
(scm_less_p): Remove spurious xisnan from frac+big case.
Kevin Ryde [Tue, 2 Dec 2003 21:32:43 +0000 (21:32 +0000)]
(real-part): Expect fraction return, not converted to flonum.
Kevin Ryde [Tue, 2 Dec 2003 21:27:13 +0000 (21:27 +0000)]
(scm_real_part): Return fraction unchanged rather than converting to flonum.
Kevin Ryde [Tue, 2 Dec 2003 21:24:58 +0000 (21:24 +0000)]
Exercise most-negative-fixnum over -ve of most-negative-fixnum.
Kevin Ryde [Tue, 2 Dec 2003 21:23:31 +0000 (21:23 +0000)]
(abs): Add a few more tests.
Kevin Ryde [Tue, 2 Dec 2003 21:21:14 +0000 (21:21 +0000)]
(scm_make_ratio): Check for numerator equal to
SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
giving integer -1.
Kevin Ryde [Tue, 2 Dec 2003 21:17:33 +0000 (21:17 +0000)]
(count): New tests.
Kevin Ryde [Tue, 2 Dec 2003 21:14:03 +0000 (21:14 +0000)]
*** empty log message ***
Kevin Ryde [Tue, 2 Dec 2003 21:13:42 +0000 (21:13 +0000)]
(map!): Define as an alias for map, previous definition was not tail-recursive.
Kevin Ryde [Tue, 2 Dec 2003 21:12:20 +0000 (21:12 +0000)]
(count): Rewrite in C, avoiding non-tail recursion.
Mikael Djurfeldt [Mon, 1 Dec 2003 18:49:38 +0000 (18:49 +0000)]
(snarfcppopts): Added -I$(top_srcdir).
Dirk Herrmann [Sun, 30 Nov 2003 12:41:34 +0000 (12:41 +0000)]
* modules.c (module_variable): Fixed (and thus simplified) the
definition of SCM_BOUND_THING_P to reflect the fact that since
after the 1.4 series of guile, obarrays only hold variable
objects.
Marius Vollmer [Sun, 30 Nov 2003 01:00:16 +0000 (01:00 +0000)]
*** empty log message ***
Marius Vollmer [Sun, 30 Nov 2003 00:59:40 +0000 (00:59 +0000)]
(scm_logand): It's "#b...", not "#\b...".
Marius Vollmer [Sun, 30 Nov 2003 00:58:25 +0000 (00:58 +0000)]
It's "#\\space", not "#\space".
Marius Vollmer [Sun, 30 Nov 2003 00:57:14 +0000 (00:57 +0000)]
(scm_iprin1): use \xNN hexadecimal sequences when writing control
characters in strings.
Marius Vollmer [Sun, 30 Nov 2003 00:57:03 +0000 (00:57 +0000)]
(scm_lreadr): Signal an error for invalid escape sequences in strings.
Code cleanups too.
Neil Jerram [Thu, 27 Nov 2003 20:54:05 +0000 (20:54 +0000)]
Initial support for setting source breakpoints.
Kevin Ryde [Mon, 24 Nov 2003 22:25:53 +0000 (22:25 +0000)]
*** empty log message ***
Kevin Ryde [Mon, 24 Nov 2003 22:17:13 +0000 (22:17 +0000)]
(Macros guile-snarf recognizes): Correction to GOOPS cross reference.
Kevin Ryde [Mon, 24 Nov 2003 22:13:26 +0000 (22:13 +0000)]
Remove empty (duplicate) "Jump Start" entry.
Dirk Herrmann [Fri, 21 Nov 2003 23:28:15 +0000 (23:28 +0000)]
* Forgot to submit the Changelog last time.
Dirk Herrmann [Fri, 21 Nov 2003 23:21:34 +0000 (23:21 +0000)]
* eval.c (s_bad_define): New static identifier.
(m_body): Fixed comment.
(scm_m_define): Don't generate memoized code for definitions that
are not on the top level. As a consequence, no memoized code at
all is generated for definitions any more: Top level definitions
are executed immediately during memoization and internal
definitions are handled separately in m_expand_body.
(scm_unmemocopy, unmemocopy): Removed code for unmemoizing
definitions. Consequently, there is no unmemoizing code any more
that might modify the environment. Thus, the old scm_unmemocopy
is removed and the old unmemocopy is renamed to scm_unmemocopy.
(SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
over SCM_NIMP in places, where the argument is known to be part of
a proper list.
Marius Vollmer [Fri, 21 Nov 2003 17:08:31 +0000 (17:08 +0000)]
(scm_drain_input): Bug fix: only access the port after checking that
it indeed is one.
Kevin Ryde [Fri, 21 Nov 2003 00:45:07 +0000 (00:45 +0000)]
*** empty log message ***
Kevin Ryde [Fri, 21 Nov 2003 00:33:44 +0000 (00:33 +0000)]
(scm_bit_extract): Use mpz functions, rearrange inum case
to share some shifting.
Kevin Ryde [Fri, 21 Nov 2003 00:07:13 +0000 (00:07 +0000)]
(scm_abs): Allocate a new real only for negatives, as done for bignums.
Kevin Ryde [Fri, 21 Nov 2003 00:03:54 +0000 (00:03 +0000)]
(scm_integer_expt): Don't mpz_init after scm_i_clonebig or
scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
since gc does this.
Marius Vollmer [Thu, 20 Nov 2003 23:55:51 +0000 (23:55 +0000)]
#e1.2 is now exactly 12/10. Expect exceptions when calling inexact?
with a non-number.
Rob Browning [Wed, 19 Nov 2003 21:40:42 +0000 (21:40 +0000)]
(scm_system_star): new prototype.
Rob Browning [Wed, 19 Nov 2003 21:40:32 +0000 (21:40 +0000)]
(scm_system_star): new function.
Rob Browning [Wed, 19 Nov 2003 21:39:35 +0000 (21:39 +0000)]
(Processes): add documentation for system*.
Rob Browning [Wed, 19 Nov 2003 21:39:26 +0000 (21:39 +0000)]
*** empty log message ***
Rob Browning [Wed, 19 Nov 2003 21:39:16 +0000 (21:39 +0000)]
(check_SCRIPTS): add test-system-cmds.
(TESTS): add test-system-cmds.
Rob Browning [Wed, 19 Nov 2003 21:39:07 +0000 (21:39 +0000)]
* standalone/test-system-cmds: new test.
Marius Vollmer [Wed, 19 Nov 2003 18:24:36 +0000 (18:24 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 18:13:21 +0000 (18:13 +0000)]
Include exact rationals.
Marius Vollmer [Wed, 19 Nov 2003 18:12:11 +0000 (18:12 +0000)]
(What is Guile?): Add @acronym for POSIX, R5RS, GUI,
and HTTP. Conclude linking libguile.
Marius Vollmer [Wed, 19 Nov 2003 05:15:51 +0000 (05:15 +0000)]
Changed to reflect the fact that rationalize only returns an exact
result for exact arguments. Fixed bugs in tests that were not caught
previously since all fraction were treated as equal regardless of
value.
Marius Vollmer [Wed, 19 Nov 2003 05:13:53 +0000 (05:13 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 05:12:08 +0000 (05:12 +0000)]
* numbers.c (scm_make_ratio): Rewritten to have a simpler
structure. Previously, not all cases with a negative denominator
were covered.
Marius Vollmer [Wed, 19 Nov 2003 04:30:40 +0000 (04:30 +0000)]
* numbers.c (scm_make_ratio): Don't declare divisible_p after
statements.
Marius Vollmer [Wed, 19 Nov 2003 03:51:21 +0000 (03:51 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 03:50:26 +0000 (03:50 +0000)]
* numbers.c (scm_i_fraction_equalp): Do not treat the return value
of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
fractions were equal to each other regardless of value. Ooops.
* numbers.c (scm_rationalize): Return an inexact result when given
inexact arguments.
Marius Vollmer [Wed, 19 Nov 2003 02:38:37 +0000 (02:38 +0000)]
* numbers.c (scm_exact_p, scm_inexact_p): Throw error for non-numbers.
Marius Vollmer [Wed, 19 Nov 2003 02:19:03 +0000 (02:19 +0000)]
(mem2decimal_from_point): use scm_divide instead of scm_divide2real
when forming the fractional part. This allows "#e1.2" to yield 6/5.
Neil Jerram [Wed, 19 Nov 2003 01:27:31 +0000 (01:27 +0000)]
Work in progress.
Neil Jerram [Wed, 19 Nov 2003 01:22:06 +0000 (01:22 +0000)]
Work in progress.
Neil Jerram [Wed, 19 Nov 2003 01:16:16 +0000 (01:16 +0000)]
Defer lookup of lazy-handler-dispatch.
Marius Vollmer [Tue, 18 Nov 2003 23:18:19 +0000 (23:18 +0000)]
(Manual Conventions): Double-quote some statements formerly
single-quoted. Remove some redundant quotes around code. Clarify
meaning of `iff' further for those that didn't get it the first time
'round (like me). Make graphical indicators samples, not code. Put
results of evaluation on the same line as @result symbols. Use @print
example as example of total usage, and remind readers not to forget
the difference.
Marius Vollmer [Tue, 18 Nov 2003 20:01:57 +0000 (20:01 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 18 Nov 2003 19:59:53 +0000 (19:59 +0000)]
* print.c (scm_iprin1): Handle fractions.
* objects.h (scm_class_fraction): New.
* objects.c (scm_class_fraction): New.
(scm_class_of): Handle fractions.
* hash.c (scm_hasher): Handle fractions.
* numbers.c: New code for handling fraction all over the place.
(scm_odd_p, scm_even_p): Handle inexact integers.
(scm_rational_p): New function, same as scm_real_p.
(scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
New exact functions that replace the inexact 'dsubr'
implementations.
(scm_numerator, scm_denominator): New.
* numbers.h (SCM_NUMP): Recognize fractions.
(SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
SCM_FRACTION_REDUCED): New.
(scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
New prototypes.
(scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
scm_rational_p): New prototypes.
(scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
scm_i_print_fraction): New prototypes.
* goops.c (create_standard_classes): Create "<fraction>" class.
* gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
* gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
case in the switch, but do nothing for now.
* eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
to doubles when calling 'dsubr' functions.
* eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
Marius Vollmer [Tue, 18 Nov 2003 19:57:30 +0000 (19:57 +0000)]
* tests/numbers.test ("string->number"): Expect exact rationals
for things like "1/2" and "#e1.2".
("inexact->exact"): Expect overflow error for infs and nans.
* tests/fractions.test: New file from Bill Schottstaedt. Thanks!
* tests/bit-operations.test (fixnum-bit): Round the result so that
fixnum-bit really is an integer.
Rob Browning [Tue, 18 Nov 2003 06:14:29 +0000 (06:14 +0000)]
*** empty log message ***
Rob Browning [Tue, 18 Nov 2003 06:10:39 +0000 (06:10 +0000)]
* gen-scmconfig.c (main): remove public definition of
SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
direct typedef of long_long and ulong_long inside deprecated block
when appropriate.
Rob Browning [Tue, 18 Nov 2003 06:10:11 +0000 (06:10 +0000)]
move long_long and ulong_long definitions to
gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
Rob Browning [Mon, 17 Nov 2003 19:19:26 +0000 (19:19 +0000)]
*** empty log message ***