bpt/guile.git
20 years ago(SCM_TESTS): Add q.test.
Kevin Ryde [Tue, 6 Jan 2004 21:45:48 +0000 (21:45 +0000)]
(SCM_TESTS): Add q.test.

20 years agoNew file.
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.

20 years ago(q-pop!): Should be "null?" not "not" for end-of-list.
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.

20 years ago*** empty log message ***
Marius Vollmer [Tue, 6 Jan 2004 18:17:30 +0000 (18:17 +0000)]
*** empty log message ***

20 years agoDocument scm_on_unwind_with_scm and scm_on_rewind_with_scm.
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.

20 years ago(close_port, delete_file, check_ports): New.
Marius Vollmer [Tue, 6 Jan 2004 18:13:51 +0000 (18:13 +0000)]
(close_port, delete_file, check_ports): New.

20 years agodynwind.h (SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's
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.

20 years ago(swap_ports, scm_with_current_foo_port): Do not allocate swap_data on
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'.

20 years ago(scm_make_initial_fluids, scm_copy_fluids, scm_swap_fluids,
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.

20 years ago(frame_print): Removed, use the default printer. (WINDER_F_MARK,
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.

20 years ago(SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's "explicitly" not
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.

20 years ago*** empty log message ***
Marius Vollmer [Tue, 6 Jan 2004 16:20:03 +0000 (16:20 +0000)]
*** empty log message ***

20 years ago(print-result, print-user-result): Handle exact fractions.
Marius Vollmer [Tue, 6 Jan 2004 16:19:21 +0000 (16:19 +0000)]
(print-result, print-user-result): Handle exact fractions.

20 years ago*** empty log message ***
Marius Vollmer [Sun, 4 Jan 2004 23:45:38 +0000 (23:45 +0000)]
*** empty log message ***

20 years agoDocument scm_with_[un]blocked_asyncs.
Marius Vollmer [Sun, 4 Jan 2004 23:45:11 +0000 (23:45 +0000)]
Document scm_with_[un]blocked_asyncs.

20 years agoDocument scm_with_current_<foo>_port.
Marius Vollmer [Sun, 4 Jan 2004 23:44:19 +0000 (23:44 +0000)]
Document scm_with_current_<foo>_port.

20 years agoMinor markup fixes.
Marius Vollmer [Sun, 4 Jan 2004 23:43:20 +0000 (23:43 +0000)]
Minor markup fixes.

20 years ago(scm_with_current_input_port, scm_with_current_output_port,
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.

20 years ago(scm_with_blocked_asyncs, scm_with_unblocked_asyncs): New.
Marius Vollmer [Sun, 4 Jan 2004 23:36:49 +0000 (23:36 +0000)]
(scm_with_blocked_asyncs, scm_with_unblocked_asyncs): New.

20 years ago*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 22:34:05 +0000 (22:34 +0000)]
*** empty log message ***

20 years ago(scm_current_time, scm_gettimeofday): Add a comment about
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.

20 years ago*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 22:04:37 +0000 (22:04 +0000)]
*** empty log message ***

20 years ago(Threads): Note Guile uses POSIX threads, for
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.

20 years agoAdded section about frames.
Marius Vollmer [Sat, 3 Jan 2004 21:57:11 +0000 (21:57 +0000)]
Added section about frames.

20 years ago*** empty log message ***
Marius Vollmer [Sat, 3 Jan 2004 21:56:35 +0000 (21:56 +0000)]
*** empty log message ***

20 years agoDocument the frames stuff and other random changes.
Marius Vollmer [Sat, 3 Jan 2004 21:56:18 +0000 (21:56 +0000)]
Document the frames stuff and other random changes.

20 years ago* standalone/test-unwind.c: New test, for the frames stuff.
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.

20 years agoadded test-unwind
Marius Vollmer [Sat, 3 Jan 2004 21:53:21 +0000 (21:53 +0000)]
added test-unwind

20 years ago(copy_stack): New, do only the stack copying
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.

20 years ago(scm_t_frame_flags, scm_t_wind_flags,
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.

20 years ago*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:41:31 +0000 (21:41 +0000)]
*** empty log message ***

20 years ago(scm_less_p): Don't convert frac to float for compares,
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.

20 years ago*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:27:51 +0000 (21:27 +0000)]
*** empty log message ***

20 years ago(-1+, <?, <=?, =?, >?, >=?): Define as aliases for 1-, <,
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.

20 years ago*** empty log message ***
Kevin Ryde [Sat, 3 Jan 2004 21:12:45 +0000 (21:12 +0000)]
*** empty log message ***

20 years ago(false-if-exception): Add tests.
Kevin Ryde [Sat, 3 Jan 2004 21:12:01 +0000 (21:12 +0000)]
(false-if-exception): Add tests.

20 years ago(false-if-exception): Unquote catch and lambda, so as not
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.

20 years ago(SRFI-1 Filtering and Partitioning): For partition
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.

20 years ago(SRFI-1 Searching, SRFI-1 Deleting, SRFI-1
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.

20 years ago*** empty log message ***
Marius Vollmer [Fri, 26 Dec 2003 19:09:03 +0000 (19:09 +0000)]
*** empty log message ***

20 years agoArrange for scm_t_intmax and scm_t_uintmax to be defined in
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

20 years agoFind a suitable type for the new scm_t_intmax and scm_t_uintmax.
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.

20 years ago*** empty log message ***
Kevin Ryde [Tue, 2 Dec 2003 21:38:04 +0000 (21:38 +0000)]
*** empty log message ***

20 years ago(scm_less_p): Remove spurious xisnan from frac+big case.
Kevin Ryde [Tue, 2 Dec 2003 21:36:39 +0000 (21:36 +0000)]
(scm_less_p): Remove spurious xisnan from frac+big case.

20 years ago(real-part): Expect fraction return, not converted to flonum.
Kevin Ryde [Tue, 2 Dec 2003 21:32:43 +0000 (21:32 +0000)]
(real-part): Expect fraction return, not converted to flonum.

20 years ago(scm_real_part): Return fraction unchanged rather than converting 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.

20 years agoExercise most-negative-fixnum over -ve of most-negative-fixnum.
Kevin Ryde [Tue, 2 Dec 2003 21:24:58 +0000 (21:24 +0000)]
Exercise most-negative-fixnum over -ve of most-negative-fixnum.

20 years ago(abs): Add a few more tests.
Kevin Ryde [Tue, 2 Dec 2003 21:23:31 +0000 (21:23 +0000)]
(abs): Add a few more tests.

20 years ago(scm_make_ratio): Check for numerator equal to
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.

20 years ago(count): New tests.
Kevin Ryde [Tue, 2 Dec 2003 21:17:33 +0000 (21:17 +0000)]
(count): New tests.

20 years ago*** empty log message ***
Kevin Ryde [Tue, 2 Dec 2003 21:14:03 +0000 (21:14 +0000)]
*** empty log message ***

20 years ago(map!): Define as an alias for map, previous definition was not tail-recursive.
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.

20 years ago(count): Rewrite in C, avoiding non-tail recursion.
Kevin Ryde [Tue, 2 Dec 2003 21:12:20 +0000 (21:12 +0000)]
(count): Rewrite in C, avoiding non-tail recursion.

20 years ago(snarfcppopts): Added -I$(top_srcdir).
Mikael Djurfeldt [Mon, 1 Dec 2003 18:49:38 +0000 (18:49 +0000)]
(snarfcppopts): Added -I$(top_srcdir).

20 years ago * modules.c (module_variable): Fixed (and thus simplified) the
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.

20 years ago*** empty log message ***
Marius Vollmer [Sun, 30 Nov 2003 01:00:16 +0000 (01:00 +0000)]
*** empty log message ***

20 years ago(scm_logand): It's "#b...", not "#\b...".
Marius Vollmer [Sun, 30 Nov 2003 00:59:40 +0000 (00:59 +0000)]
(scm_logand): It's "#b...", not "#\b...".

20 years agoIt's "#\\space", not "#\space".
Marius Vollmer [Sun, 30 Nov 2003 00:58:25 +0000 (00:58 +0000)]
It's "#\\space", not "#\space".

20 years ago(scm_iprin1): use \xNN hexadecimal sequences when writing control
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.

20 years ago(scm_lreadr): Signal an error for invalid escape sequences 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.

20 years agoInitial support for setting source breakpoints.
Neil Jerram [Thu, 27 Nov 2003 20:54:05 +0000 (20:54 +0000)]
Initial support for setting source breakpoints.

20 years ago*** empty log message ***
Kevin Ryde [Mon, 24 Nov 2003 22:25:53 +0000 (22:25 +0000)]
*** empty log message ***

20 years ago(Macros guile-snarf recognizes): Correction to GOOPS cross reference.
Kevin Ryde [Mon, 24 Nov 2003 22:17:13 +0000 (22:17 +0000)]
(Macros guile-snarf recognizes): Correction to GOOPS cross reference.

20 years agoRemove empty (duplicate) "Jump Start" entry.
Kevin Ryde [Mon, 24 Nov 2003 22:13:26 +0000 (22:13 +0000)]
Remove empty (duplicate) "Jump Start" entry.

20 years ago * Forgot to submit the Changelog last time.
Dirk Herrmann [Fri, 21 Nov 2003 23:28:15 +0000 (23:28 +0000)]
    * Forgot to submit the Changelog last time.

20 years ago * eval.c (s_bad_define): New static identifier.
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.

20 years ago(scm_drain_input): Bug fix: only access the port after checking that
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.

20 years ago*** empty log message ***
Kevin Ryde [Fri, 21 Nov 2003 00:45:07 +0000 (00:45 +0000)]
*** empty log message ***

20 years ago(scm_bit_extract): Use mpz functions, rearrange inum case
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.

20 years ago(scm_abs): Allocate a new real only for negatives, as done for bignums.
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.

20 years ago(scm_integer_expt): Don't mpz_init after scm_i_clonebig or
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.

20 years ago#e1.2 is now exactly 12/10. Expect exceptions when calling inexact?
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.

20 years ago(scm_system_star): new prototype.
Rob Browning [Wed, 19 Nov 2003 21:40:42 +0000 (21:40 +0000)]
(scm_system_star): new prototype.

20 years ago(scm_system_star): new function.
Rob Browning [Wed, 19 Nov 2003 21:40:32 +0000 (21:40 +0000)]
(scm_system_star): new function.

20 years ago(Processes): add documentation for system*.
Rob Browning [Wed, 19 Nov 2003 21:39:35 +0000 (21:39 +0000)]
(Processes): add documentation for system*.

20 years ago*** empty log message ***
Rob Browning [Wed, 19 Nov 2003 21:39:26 +0000 (21:39 +0000)]
*** empty log message ***

20 years ago(check_SCRIPTS): add test-system-cmds.
Rob Browning [Wed, 19 Nov 2003 21:39:16 +0000 (21:39 +0000)]
(check_SCRIPTS): add test-system-cmds.
(TESTS): add test-system-cmds.

20 years ago* standalone/test-system-cmds: new test.
Rob Browning [Wed, 19 Nov 2003 21:39:07 +0000 (21:39 +0000)]
* standalone/test-system-cmds: new test.

20 years ago*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 18:24:36 +0000 (18:24 +0000)]
*** empty log message ***

20 years agoInclude exact rationals.
Marius Vollmer [Wed, 19 Nov 2003 18:13:21 +0000 (18:13 +0000)]
Include exact rationals.

20 years ago(What is Guile?): Add @acronym for POSIX, R5RS, GUI,
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.

20 years agoChanged to reflect the fact that rationalize only returns an exact
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.

20 years ago*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 05:13:53 +0000 (05:13 +0000)]
*** empty log message ***

20 years ago* numbers.c (scm_make_ratio): Rewritten to have a simpler
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.

20 years ago* numbers.c (scm_make_ratio): Don't declare divisible_p after
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.

20 years ago*** empty log message ***
Marius Vollmer [Wed, 19 Nov 2003 03:51:21 +0000 (03:51 +0000)]
*** empty log message ***

20 years ago* numbers.c (scm_i_fraction_equalp): Do not treat the return value
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.

20 years ago* numbers.c (scm_exact_p, scm_inexact_p): Throw error for non-numbers.
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.

20 years ago(mem2decimal_from_point): use scm_divide instead of scm_divide2real
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.

20 years agoWork in progress.
Neil Jerram [Wed, 19 Nov 2003 01:27:31 +0000 (01:27 +0000)]
Work in progress.

20 years agoWork in progress.
Neil Jerram [Wed, 19 Nov 2003 01:22:06 +0000 (01:22 +0000)]
Work in progress.

20 years agoDefer lookup of lazy-handler-dispatch.
Neil Jerram [Wed, 19 Nov 2003 01:16:16 +0000 (01:16 +0000)]
Defer lookup of lazy-handler-dispatch.

20 years ago(Manual Conventions): Double-quote some statements formerly
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.

20 years ago*** empty log message ***
Marius Vollmer [Tue, 18 Nov 2003 20:01:57 +0000 (20:01 +0000)]
*** empty log message ***

20 years ago* print.c (scm_iprin1): Handle fractions.
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.

20 years ago* tests/numbers.test ("string->number"): Expect exact rationals
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.

20 years ago*** empty log message ***
Rob Browning [Tue, 18 Nov 2003 06:14:29 +0000 (06:14 +0000)]
*** empty log message ***

20 years ago* gen-scmconfig.c (main): remove public definition of
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.

20 years agomove long_long and ulong_long definitions to
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.

20 years ago*** empty log message ***
Rob Browning [Mon, 17 Nov 2003 19:19:26 +0000 (19:19 +0000)]
*** empty log message ***