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 ***
Rob Browning [Mon, 17 Nov 2003 19:15:30 +0000 (19:15 +0000)]
new file.
Rob Browning [Mon, 17 Nov 2003 19:14:44 +0000 (19:14 +0000)]
rewrite ALLOCA related code as multiple lines so
it doesn't break with current autoconf substitutions.
Rob Browning [Mon, 17 Nov 2003 18:59:08 +0000 (18:59 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 17 Nov 2003 16:57:27 +0000 (16:57 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 17 Nov 2003 16:56:48 +0000 (16:56 +0000)]
(scm_string_hash): New hashing algorithm that takes the complete
string into account.
Marius Vollmer [Mon, 17 Nov 2003 16:55:03 +0000 (16:55 +0000)]
Expect a "Bad variable" error for (set! #f 1).
Marius Vollmer [Mon, 17 Nov 2003 16:52:05 +0000 (16:52 +0000)]
(scm_m_generalized_set_x): Macroexpand the target when it
is a list. This allows (@ ...) to work with set!.
(scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
SCM_ASSYNT.
Marius Vollmer [Mon, 17 Nov 2003 00:38:25 +0000 (00:38 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 17 Nov 2003 00:36:00 +0000 (00:36 +0000)]
* scheme-modules.texi: Document '@' and '@@'.
* scripts.texi: Mention that "-e (@ ...)" also works.
Marius Vollmer [Mon, 17 Nov 2003 00:28:03 +0000 (00:28 +0000)]
(@, @@): New macros.
Marius Vollmer [Mon, 17 Nov 2003 00:26:14 +0000 (00:26 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 17 Nov 2003 00:24:48 +0000 (00:24 +0000)]
(scm_m_generalized_set_x): Macroexpand the target when it is a list.
This allows (@ ...) to work with set!.
Marius Vollmer [Mon, 17 Nov 2003 00:22:18 +0000 (00:22 +0000)]
(scm_compile_shell_switches): Use scm_c_read_string for the "-e"
option instead of scm_str2symbol. This allows things like (@ ...) to
be specified for the entry point.
Marius Vollmer [Sun, 16 Nov 2003 21:01:57 +0000 (21:01 +0000)]
(scm_lreadr): detect EOF after backslash, and interpret \xNN
hexadecimal sequences. From Paul Jarc, thanks!
Marius Vollmer [Sun, 16 Nov 2003 20:55:04 +0000 (20:55 +0000)]
*** empty log message ***
Dirk Herrmann [Sun, 16 Nov 2003 13:54:26 +0000 (13:54 +0000)]
* boot-9.scm: Started comment about module system workings.
Dirk Herrmann [Sun, 16 Nov 2003 13:32:02 +0000 (13:32 +0000)]
* eval.c (scm_m_letstar): Create memoized code in place to
minimize consing.
Dirk Herrmann [Sun, 16 Nov 2003 10:47:45 +0000 (10:47 +0000)]
* eval.c (s_splicing): Commented and reformulated.
(lookup_global_symbol, lookup_symbol): New static functions.
(s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
(try_macro_lookup, literal_p): Use lookup_symbol instead of
creating a temporary pair for scm_lookupcar.
(scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
created deprecated wrapper function scm_unmemocar.
(SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
undefineds, sym_three_question_marks): Moved around without
modifications.
* eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
Dirk Herrmann [Sat, 15 Nov 2003 12:43:00 +0000 (12:43 +0000)]
* eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
m_expand_body, scm_m_expand_body): Grouped together with m_body.
No further modifications.
Dirk Herrmann [Sat, 15 Nov 2003 12:27:54 +0000 (12:27 +0000)]
* libguile/eval.c (s_mixed_body_forms): New static identifier.
(canonicalize_define, scm_m_define): The check for a bad
expression is performed in canonicalize_define now.
(try_macro_lookup, expand_user_macros, is_system_macro_p): New
static helper functions for m_expand_body.
(m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
expand user defined macros. Fixed handling of the definition/
expression boundary. Fixed handling of definitions grouped with
'begin. Use canonicalize_define to expand definitions.
* test-suite/tests/syntax.test: Tests that check for the correct
handling of internal defines with begin work now.
Dirk Herrmann [Sat, 15 Nov 2003 11:51:17 +0000 (11:51 +0000)]
* tests/syntax.test: Fixed test that checks for the correct
handling of macros in the context of internal defines.
Kevin Ryde [Fri, 14 Nov 2003 21:36:18 +0000 (21:36 +0000)]
*** empty log message ***
Kevin Ryde [Fri, 14 Nov 2003 21:34:21 +0000 (21:34 +0000)]
Use (test-suite lib), for the benefit of standalone execution.
Kevin Ryde [Fri, 14 Nov 2003 21:27:36 +0000 (21:27 +0000)]
*** empty log message ***
Kevin Ryde [Fri, 14 Nov 2003 21:27:11 +0000 (21:27 +0000)]
(Cross building Guile): Describe GUILE_FOR_BUILD rather than
--with-guile-for-build.
Kevin Ryde [Fri, 14 Nov 2003 20:53:57 +0000 (20:53 +0000)]
*** empty log message ***
Kevin Ryde [Fri, 14 Nov 2003 20:53:22 +0000 (20:53 +0000)]
(Random): Add *random-state* variable, put note at
the top of the node about it being the default, rather than just in
the description of random.
Kevin Ryde [Fri, 14 Nov 2003 20:51:22 +0000 (20:51 +0000)]
(--with-guile-for-build): Remove this option, it's not normal style for --with.
(GUILE_FOR_BUILD): Use AC_ARG_VAR.
Marius Vollmer [Thu, 13 Nov 2003 20:46:48 +0000 (20:46 +0000)]
(Manual Layout): Wrap POSIX, API, and SLIB in @acronym. Change from
paragraph format (somewhat clumsy-looking on paper, at least) to
@table format, with headers @strong. Made example modules complete
sentences. From Stephen Compall, thanks!
Marius Vollmer [Thu, 13 Nov 2003 19:41:12 +0000 (19:41 +0000)]
*** empty log message ***
Marius Vollmer [Thu, 13 Nov 2003 19:40:29 +0000 (19:40 +0000)]
(SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK, SCM_GLOBAL_SMOB_MARK,
SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE, SCM_SMOB_PRINT,
SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP, SCM_GLOBAL_SMOB_EQUALP,
SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY): New macros from Paul Jarc.
Thanks!
Marius Vollmer [Thu, 13 Nov 2003 18:23:06 +0000 (18:23 +0000)]
*** empty log message ***
Marius Vollmer [Thu, 13 Nov 2003 18:19:02 +0000 (18:19 +0000)]
(scm_get_stack_base): Provide a definition that return NULL when the
machine type is unknown. Previously, gc_os_dep.c would refuse to
compile.
Neil Jerram [Tue, 11 Nov 2003 23:47:56 +0000 (23:47 +0000)]
Addition to .cvsignore.
Neil Jerram [Tue, 11 Nov 2003 23:40:38 +0000 (23:40 +0000)]
Lots of ongoing development.
Neil Jerram [Tue, 11 Nov 2003 23:34:01 +0000 (23:34 +0000)]
Changes to build and install files in emacs subdir.
Neil Jerram [Tue, 11 Nov 2003 23:30:06 +0000 (23:30 +0000)]
Moved all gds files here; plus ongoing work on them.
Neil Jerram [Tue, 11 Nov 2003 23:27:22 +0000 (23:27 +0000)]
ui- to gds- change; debug-on-error fix.
Neil Jerram [Tue, 11 Nov 2003 23:21:39 +0000 (23:21 +0000)]
Removed ui-client.scm and ui-server.scm (not in emacs/gds-*.scm).
Neil Jerram [Tue, 11 Nov 2003 23:17:06 +0000 (23:17 +0000)]
Pass trap type to debug-stack flags.
Neil Jerram [Tue, 11 Nov 2003 23:12:48 +0000 (23:12 +0000)]
Big comment added.
Neil Jerram [Tue, 11 Nov 2003 23:09:23 +0000 (23:09 +0000)]
Avoid duplicate binding warnings from (lang elisp) modules.
Dirk Herrmann [Sun, 9 Nov 2003 19:07:41 +0000 (19:07 +0000)]
* tests/optargs.test: Wrap tests in module (test-suite
test-<file-name without .test>). Rewrite test to be R5RS
conforming.
* tests/syntax.test: Added test to check correct handling of
internal defines.
Dirk Herrmann [Sun, 9 Nov 2003 08:47:19 +0000 (08:47 +0000)]
* eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
scm_m_body to m_body.
Dirk Herrmann [Sun, 9 Nov 2003 08:10:58 +0000 (08:10 +0000)]
* eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
public use of scm_m_expand_body in eval.h. In eval.c, renamed
scm_m_expand_body to m_expand_body and made it static. Added
deprecated wrapper scm_m_expand_body.
(scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
of scm_m_expand_body.
Kevin Ryde [Sat, 8 Nov 2003 22:19:24 +0000 (22:19 +0000)]
*** empty log message ***
Kevin Ryde [Sat, 8 Nov 2003 22:18:33 +0000 (22:18 +0000)]
Add a copyright year.
Kevin Ryde [Sat, 8 Nov 2003 22:18:01 +0000 (22:18 +0000)]
(scm_dynamic_unlink): Need scm_list_1 on error message
argument. Reported by Mike Gran.