1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 06:50:21 +02:00
Commit graph

10203 commits

Author SHA1 Message Date
Marius Vollmer
c88453e881 Typos. 2004-08-10 15:58:57 +00:00
Marius Vollmer
44825fffb0 *** empty log message *** 2004-08-10 15:45:58 +00:00
Marius Vollmer
9bd10f4617 (test_locale_strings): New. 2004-08-10 15:45:49 +00:00
Marius Vollmer
f9751e8660 *** empty log message *** 2004-08-10 14:16:46 +00:00
Marius Vollmer
273167608a Updated example to use scm_to_locale_string
instead of roll-your-own scm_to_string.  Also showcase
scm_frame_free.
2004-08-10 14:16:34 +00:00
Marius Vollmer
91210d629f Docs for scm_is_string, scm_to_locale_string*, and
scm_from_locale_string*.
2004-08-10 14:15:33 +00:00
Marius Vollmer
a90968fabb Docs for scm_frame_free. 2004-08-10 14:14:46 +00:00
Marius Vollmer
7f9994d904 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
Replaced uses of SCM_STRING_CHARS with proper uses of
scm_to_locale_string.  Replaced SCM_STRINGP with scm_is_string.
Replaced scm_mem2string with scm_from_locale_string.

* simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
Removed, replaced all uses with scm_i_allocate_string_pointers.
2004-08-10 14:08:02 +00:00
Marius Vollmer
02573e4c7a *** empty log message *** 2004-08-10 14:07:35 +00:00
Marius Vollmer
ebea155a3c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of SCM_STRING_UCHARS.
Use SCM_I_STRINGP instead of SCM_STRINGP.
2004-08-10 14:06:59 +00:00
Marius Vollmer
7fd0a36919 (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS, and
SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
SCM_I_STRING_LENGTH, respectively.  Pass string object directly, not
as a pointer.  Use scm_remember_upto_here_1 to protect it.
2004-08-10 14:05:14 +00:00
Marius Vollmer
7f03f97036 * procs.c, posix.c, ports.c, net_db.c, fports.c, filesys.c,
eval.c, deprecation.c, dynl.c: Replaced uses of SCM_STRING_CHARS
with proper uses of scm_to_locale_string.  Replaced SCM_STRINGP
with scm_is_string.

* posix.c (allocate_string_pointers, environ_list_to_c): Removed,
replaced all uses with scm_i_allocate_string_pointers.
2004-08-10 13:54:16 +00:00
Marius Vollmer
29a837fd27 (scm_input_error): Use a SCM value for 'fn', not a C string. This
avoids a conversion round-trip.
2004-08-10 13:54:01 +00:00
Marius Vollmer
79c98b33fe Replaced SCM_STRINGP, SCM_STRING_CHARS, and
SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
SCM_I_STRING_LENGTH, respectively.
(gh_scm2newstr): Implement in terms of scm_to_locale_string.
2004-08-10 13:43:55 +00:00
Marius Vollmer
24d1f17168 (scm_error_scm): Throw directly instead of calling
scm_error, this avoids the back and forth conversion of SUBR and
MESSAGE and also plugs a memory leak.
(scm_error): Call scm_error_scm.
2004-08-10 13:37:11 +00:00
Marius Vollmer
18f9d34373 Instead calling scm_puts on the SCM_STRING_CHARS of a string, call
scm_display on the string itself.
2004-08-10 13:36:45 +00:00
Marius Vollmer
6d5649b7b8 (scm_frame_free): New. 2004-08-10 13:35:28 +00:00
Marius Vollmer
3b9ee0a4f8 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
(display_header): Print FNAME when it is true, not
merely when it is a string.
2004-08-10 13:31:22 +00:00
Marius Vollmer
7d04d68bf7 (scm_internal_parse_path): Removed.
(scm_parse_path): Use scm_string_split to do the work.
(scm_init_load_path): Use scm_parse_path instead of
scm_internal_parse_path.
(scm_search_path): Rewritten string handling part of the code in
terms of scm_to_locale_stringbuf and so that it is thread safe.
2004-08-10 13:30:12 +00:00
Marius Vollmer
c829a4274f * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
Moved from string.h to deprecated.h.

* deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.

* strings.h, strings.c (SCM_MAKE_STRING_TAG): Rename dto
SCM_I_MAKE_STRING_TAG, changed all uses.
(SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
respectively.  For a short time, the old names are still there as
aliases.  Not all uses have been changed yet, but the ones in
strings.c have.
(SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
SCM_T_BITS_MAX.
(scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
scm_take_locale_string, scm_take_locale_stringn,
scm_to_locale_string, scm_to_locale_stringn,
scm_to_locale_stringbuf): New.
(scm_c_string2str, scm_c_substring2str): Deprecated by moving to
deprecated.[hc]. Implemented in terms of the new functions above.
(scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
scm_makfrom0str): Reimplemented in terms of the new functions from
above.  They will be discouraged shortly.
(scm_substring): Do not use scm_mem2string.
(scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
to replace similar code from posix.c, simpos.c, and dynl.c.
(scm_string_append): Use memcpy instead of explicit loop.  Do not
use register keyword.  Use plain 'char' instead of 'unsigned
char'.
2004-08-10 13:20:59 +00:00
Marius Vollmer
8d3fd10b91 *** empty log message *** 2004-08-10 12:20:02 +00:00
Marius Vollmer
ee3e40b78e Replaced all uses of scm_round with scm_c_round. 2004-08-10 12:19:49 +00:00
Kevin Ryde
c065f32614 More of: New file. 2004-08-10 00:52:50 +00:00
Kevin Ryde
c6c544efd5 *** empty log message *** 2004-08-10 00:50:51 +00:00
Kevin Ryde
0230a49d98 * tests/slib.test: New file.
* Makefile.am (SCM_TESTS): Add it.
2004-08-10 00:50:05 +00:00
Kevin Ryde
a1045cfbfe New file. 2004-08-10 00:49:32 +00:00
Kevin Ryde
1e9a86d92c (*features*): Remove array and array-for-each, core
definitions are insufficient for latest slib.
(t, nil): New constants slib says are supposed to exist.
(call-with-open-ports, browse-url): New functions for latest slib.
Implementations taken from Template.scm (public domain).
(open-file): Extend core definition to accept symbols for the mode,
required by latest slib.
(delete-file): Replace core definition with version returning #t/#f as
per slib spec.
(slib:exit, slib:error, slib:warn, slib:eval, slib:eval-load,
slib:tab, slib:form-feed, slib:load-source, output-port-width,
output-port-height, difftime, offset-time): Export these, they're
meant to be public.
2004-08-10 00:44:08 +00:00
Kevin Ryde
98aaa52419 *** empty log message *** 2004-08-10 00:25:37 +00:00
Kevin Ryde
fa4e29e484 (AC_CHECK_HEADERS): Add crt_externs.h. 2004-08-10 00:25:03 +00:00
Kevin Ryde
29b1dec0ef (AC_CHECK_FUNCS): Add _NSGetEnviron. 2004-08-10 00:23:18 +00:00
Kevin Ryde
5cb0151510 (scm_putenv): Use unsetenv to remove entries (ie. no "="),
when available, for the benefit of FreeBSD and other systems where
putenv() doesn't do that itself.
2004-08-10 00:19:47 +00:00
Kevin Ryde
dc23abab09 (putenv, setenv): New tests. 2004-08-10 00:16:30 +00:00
Kevin Ryde
3ceaa9565a *** empty log message *** 2004-08-10 00:03:02 +00:00
Kevin Ryde
49bdaff1d3 (AC_CHECK_FUNCS): Add unsetenv. 2004-08-10 00:02:33 +00:00
Marius Vollmer
d46e10da9c *** empty log message *** 2004-08-09 23:40:12 +00:00
Marius Vollmer
ec59863f0d (guileversion): Use effective version. Thanks to
Francesco Salvestrini!
2004-08-09 23:40:00 +00:00
Marius Vollmer
797661252e (guileversion): Use effective version. Thanks to Francesco
Salvestrini!
2004-08-09 23:39:53 +00:00
Marius Vollmer
409eb4e54f *** empty log message *** 2004-08-09 23:33:27 +00:00
Marius Vollmer
3101f40f76 (scm_round, scm_truncate): Renamed to scm_c_round and scm_c_truncate;
deprecated versions installed in deprecated.h and deprecated.c.
Changed all uses.
2004-08-09 23:32:14 +00:00
Marius Vollmer
565b4a6f31 Removed caveat that pretty-print uses its own 'write' implementation. 2004-08-09 21:58:14 +00:00
Marius Vollmer
d2afa1fc9f *** empty log message *** 2004-08-09 21:56:19 +00:00
Marius Vollmer
2d51a8a165 (generic-write): In the local procedure `wr', use object->string to
print all data (except for the reader macros), rather than
implementing an own printer.  The user-visible difference is that
procedures and control characters like #\tab are now printed in the
same way as by `write'.
2004-08-09 21:56:00 +00:00
Marius Vollmer
935c72a554 Removed caveat of pretty-print using its own 'write' implementation. 2004-08-09 21:53:03 +00:00
Marius Vollmer
73b7fa1fd6 *** empty log message *** 2004-08-09 21:52:15 +00:00
Marius Vollmer
5c3723216c (generic-write): In the local procedure `wr', use object->string to
print all data (except for the reader macros), rather than
implementing an own printer.  The user-visible difference is that
procedures and control characters like #\tab are now printed in the
same way as by `write'.
2004-08-09 21:51:58 +00:00
Kevin Ryde
636d4be535 *** empty log message *** 2004-08-09 01:33:36 +00:00
Kevin Ryde
092bdcc46b In open-file, split a paragraph for clarity. 2004-08-09 01:33:03 +00:00
Kevin Ryde
c755b8615e (File Ports): In open-file, describe the "b" binary flag. 2004-08-09 01:32:22 +00:00
Kevin Ryde
abc358f9c5 (SLIB): Add notes on delete-file, provided? and open-file
overridden by ice-9 slib module.
2004-08-09 01:29:52 +00:00
Kevin Ryde
a015df9b8d * tests/slib.test: New file.
* Makefile.am (SCM_TESTS): Add it.
2004-08-09 01:28:23 +00:00