mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
* Deprecated SCM_RWSTRINGP and SCM_VALIDATE_RWSTRING.
* Prepared SCM_STRING_U?CHARS to replace SCM_ROU?CHARS.
This commit is contained in:
parent
c2c2760293
commit
f0942910af
8 changed files with 40 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2000-11-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* acconfig.h: Removed bogus #ifndef. Thanks to Lars J. Aas.
|
||||||
|
|
||||||
2000-10-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
2000-10-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
|
||||||
|
|
||||||
* GUILE-VERSION (LIBGUILE_MAJOR_VERSION): Incremented major
|
* GUILE-VERSION (LIBGUILE_MAJOR_VERSION): Incremented major
|
||||||
|
|
4
NEWS
4
NEWS
|
@ -263,7 +263,7 @@ SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
|
||||||
SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
|
SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
|
||||||
SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
|
SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
|
||||||
SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
|
SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
|
||||||
SCM_ROSTRINGP
|
SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING
|
||||||
|
|
||||||
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
|
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
|
||||||
Use scm_memory_error instead of SCM_NALLOC.
|
Use scm_memory_error instead of SCM_NALLOC.
|
||||||
|
@ -275,6 +275,8 @@ Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
|
||||||
Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
|
Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
|
||||||
Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
|
Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
|
||||||
Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
|
Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
|
||||||
|
Use SCM_STRINGP instead of SCM_RWSTRINGP.
|
||||||
|
Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
|
||||||
|
|
||||||
** Removed function: scm_struct_init
|
** Removed function: scm_struct_init
|
||||||
|
|
||||||
|
|
2
RELEASE
2
RELEASE
|
@ -49,7 +49,7 @@ In release 1.6:
|
||||||
SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS, SCM_VALIDATE_ROSTRING,
|
SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS, SCM_VALIDATE_ROSTRING,
|
||||||
SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
|
SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
|
||||||
SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
|
SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
|
||||||
SCM_COERCE_SUBSTR, SCM_ROSTRINGP
|
SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING
|
||||||
- remove scm_vector_set_length_x
|
- remove scm_vector_set_length_x
|
||||||
- remove function scm_call_catching_errors
|
- remove function scm_call_catching_errors
|
||||||
(replaced by catch functions from throw.[ch])
|
(replaced by catch functions from throw.[ch])
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
* If you do not wish that, delete this exception notice. */
|
* If you do not wish that, delete this exception notice. */
|
||||||
|
|
||||||
|
|
||||||
#ifndef PORTSH
|
|
||||||
#define PORTSH
|
|
||||||
|
|
||||||
/* Define these two if you want support for debugging of Scheme
|
/* Define these two if you want support for debugging of Scheme
|
||||||
programs. */
|
programs. */
|
||||||
#undef DEBUG_EXTENSIONS
|
#undef DEBUG_EXTENSIONS
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
2000-11-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* ports.c: Include eval.h.
|
||||||
|
|
||||||
|
* strings.c (scm_string_set_x), strings.h (SCM_RWSTRINGP),
|
||||||
|
validate.h (SCM_VALIDATE_RWSTRING): Deprecate SCM_RWSTRINGP and
|
||||||
|
SCM_VALIDATE_RWSTRING.
|
||||||
|
|
||||||
|
* strings.h (SCM_STRING_UCHARS, SCM_STRING_CHARS): Handle strings
|
||||||
|
and substrings uniformly. However, substring handling is
|
||||||
|
deprecated.
|
||||||
|
|
||||||
|
(SCM_RWSTRINGP): Deprecated.
|
||||||
|
|
||||||
2000-11-18 Gary Houston <ghouston@arglist.com>
|
2000-11-18 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
* Makefile.am (.c.x): don't prefix ".:" to $PATH when running
|
* Makefile.am (.c.x): don't prefix ".:" to $PATH when running
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "libguile/_scm.h"
|
#include "libguile/_scm.h"
|
||||||
|
#include "libguile/eval.h"
|
||||||
#include "libguile/objects.h"
|
#include "libguile/objects.h"
|
||||||
#include "libguile/smob.h"
|
#include "libguile/smob.h"
|
||||||
#include "libguile/chars.h"
|
#include "libguile/chars.h"
|
||||||
|
|
|
@ -261,13 +261,18 @@ SCM_DEFINE (scm_string_ref, "string-ref", 2, 0, 0,
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
|
|
||||||
SCM_DEFINE (scm_string_set_x, "string-set!", 3, 0, 0,
|
SCM_DEFINE (scm_string_set_x, "string-set!", 3, 0, 0,
|
||||||
(SCM str, SCM k, SCM chr),
|
(SCM str, SCM k, SCM chr),
|
||||||
"Stores CHR in element K of STRING and returns an unspecified value.\n"
|
"Stores CHR in element K of STRING and returns an unspecified value.\n"
|
||||||
"K must be a valid index of STR.")
|
"K must be a valid index of STR.")
|
||||||
#define FUNC_NAME s_scm_string_set_x
|
#define FUNC_NAME s_scm_string_set_x
|
||||||
{
|
{
|
||||||
SCM_VALIDATE_RWSTRING (1,str);
|
#if (SCM_DEBUG_DEPRECATED == 0)
|
||||||
|
SCM_VALIDATE_RWSTRING (1, str);
|
||||||
|
#else
|
||||||
|
SCM_VALIDATE_STRING (1, str);
|
||||||
|
#endif
|
||||||
SCM_VALIDATE_INUM_RANGE (2,k,0,SCM_STRING_LENGTH(str));
|
SCM_VALIDATE_INUM_RANGE (2,k,0,SCM_STRING_LENGTH(str));
|
||||||
SCM_VALIDATE_CHAR (3,chr);
|
SCM_VALIDATE_CHAR (3,chr);
|
||||||
SCM_STRING_UCHARS (str)[SCM_INUM (k)] = SCM_CHAR (chr);
|
SCM_STRING_UCHARS (str)[SCM_INUM (k)] = SCM_CHAR (chr);
|
||||||
|
|
|
@ -52,13 +52,12 @@
|
||||||
|
|
||||||
|
|
||||||
#define SCM_STRINGP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_string))
|
#define SCM_STRINGP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_string))
|
||||||
|
#if (SCM_DEBUG_DEPRECATED == 1)
|
||||||
#define SCM_STRING_UCHARS(x) ((unsigned char *) (SCM_CELL_WORD_1 (x)))
|
#define SCM_STRING_UCHARS(x) ((unsigned char *) (SCM_CELL_WORD_1 (x)))
|
||||||
#define SCM_STRING_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
|
#define SCM_STRING_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
|
||||||
|
#endif
|
||||||
#define SCM_STRING_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
|
#define SCM_STRING_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
|
||||||
|
|
||||||
/* Is X a writable string (i.e., not a substring)? */
|
|
||||||
#define SCM_RWSTRINGP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string))
|
|
||||||
|
|
||||||
#define SCM_STRING_COERCE_0TERMINATION_X(x) \
|
#define SCM_STRING_COERCE_0TERMINATION_X(x) \
|
||||||
{ if (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_substring)) \
|
{ if (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_substring)) \
|
||||||
x = scm_makfromstr (SCM_ROCHARS (x), SCM_STRING_LENGTH (x), 0); }
|
x = scm_makfromstr (SCM_ROCHARS (x), SCM_STRING_LENGTH (x), 0); }
|
||||||
|
@ -89,7 +88,16 @@ extern void scm_init_strings (void);
|
||||||
|
|
||||||
#define SCM_SLOPPY_STRINGP(x) (SCM_STRINGP(x))
|
#define SCM_SLOPPY_STRINGP(x) (SCM_STRINGP(x))
|
||||||
#define SCM_NSTRINGP(x) (!SCM_STRINGP(x))
|
#define SCM_NSTRINGP(x) (!SCM_STRINGP(x))
|
||||||
|
#define SCM_RWSTRINGP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string))
|
||||||
#define SCM_NRWSTRINGP(x) (! SCM_RWSTRINGP (x))
|
#define SCM_NRWSTRINGP(x) (! SCM_RWSTRINGP (x))
|
||||||
|
#define SCM_STRING_UCHARS(x) \
|
||||||
|
((SCM_TYP7 (x) == scm_tc7_substring) \
|
||||||
|
? (unsigned char *) SCM_CELL_WORD_1 (SCM_CDDR (x)) + SCM_INUM (SCM_CADR (x)) \
|
||||||
|
: (unsigned char *) SCM_CELL_WORD_1 (x))
|
||||||
|
#define SCM_STRING_CHARS(x) \
|
||||||
|
((SCM_TYP7 (x) == scm_tc7_substring) \
|
||||||
|
? (char *) SCM_CELL_WORD_1 (SCM_CDDR (x)) + SCM_INUM (SCM_CADR (x)) \
|
||||||
|
: (char *) SCM_CELL_WORD_1 (x))
|
||||||
extern SCM scm_make_shared_substring (SCM str, SCM frm, SCM to);
|
extern SCM scm_make_shared_substring (SCM str, SCM frm, SCM to);
|
||||||
|
|
||||||
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
#endif /* SCM_DEBUG_DEPRECATED == 0 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue