summaryrefslogtreecommitdiff
path: root/srfi/srfi-13.c
diff options
context:
space:
mode:
authorMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-04-25 14:28:11 +0000
committerMartin Grabmüller <mgrabmue@cs.tu-berlin.de>2001-04-25 14:28:11 +0000
commit653c72912796acd1084f2fd05edd249327cf3ea8 (patch)
treece7de407d91d401ec9da8356a0e858c209d99d80 /srfi/srfi-13.c
parent0d3e064b0b798dbec9b155aa9aebfd255060cb28 (diff)
downloadguile-653c72912796acd1084f2fd05edd249327cf3ea8.tar.gz
* srfi-13.c (scm_string_replace): Take sizeof (char) into account
when using memmove(). * srfi-14.h: Added prototypes for all exported procedures.. * srfi-13.c: Include srfi-13.h * srfi-13.h: New file containing the prototypes. * Makefile.am: Removed guile-srfi.texi and info_TEXINFOS variable. (libguile_srfi_srfi_13_14_la_SOURCES): Added srfi-14.h, so it gets distributed. (libguile_srfi_srfi_13_14_la_SOURCES): Added srfi-13.h.
Diffstat (limited to 'srfi/srfi-13.c')
-rw-r--r--srfi/srfi-13.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c
index 584c8e889..8372a7ad7 100644
--- a/srfi/srfi-13.c
+++ b/srfi/srfi-13.c
@@ -49,6 +49,7 @@
#include <libguile.h>
+#include "srfi-13.h"
#include "srfi-14.h"
SCM_DEFINE (scm_string_any, "string-any", 2, 2, 0,
@@ -2775,11 +2776,11 @@ SCM_DEFINE (scm_string_replace, "string-replace", 2, 4, 0,
result = scm_allocate_string (cstart1 + (cend2 - cstart2) +
SCM_STRING_LENGTH (s1) - cend1);
p = SCM_STRING_CHARS (result);
- memmove (p, cstr1, cstart1);
- memmove (p + cstart1, cstr2 + cstart2, (cend2 - cstart2));
+ memmove (p, cstr1, cstart1 * sizeof (char));
+ memmove (p + cstart1, cstr2 + cstart2, (cend2 - cstart2) * sizeof (char));
memmove (p + cstart1 + (cend2 - cstart2),
cstr1 + cend1,
- SCM_STRING_LENGTH (s1) - cend1);
+ (SCM_STRING_LENGTH (s1) - cend1) * sizeof (char));
return result;
}
#undef FUNC_NAME
@@ -3021,7 +3022,7 @@ SCM_DEFINE (scm_string_delete, "string-delete", 2, 2, 0,
void
-scm_init_srfi_13 ()
+scm_init_srfi_13 (void)
{
#ifndef SCM_MAGIC_SNARFER
#include "srfi-13.x"
@@ -3030,7 +3031,7 @@ scm_init_srfi_13 ()
void
-scm_init_srfi_13_14 ()
+scm_init_srfi_13_14 (void)
{
static int initialized = 0;