guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core NEWS RELEASE libguile/ChangeLo...


From: Dirk Herrmann
Subject: guile/guile-core NEWS RELEASE libguile/ChangeLo...
Date: Wed, 22 Nov 2000 03:20:04 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Dirk Herrmann <address@hidden>  00/11/22 03:20:03

Modified files:
        guile-core     : NEWS RELEASE 
        guile-core/libguile: ChangeLog dynl.c filesys.c gh_data.c hash.c 
                             load.c numbers.c ports.c posix.c print.c 
                             random.c socket.c strings.c strings.h 
                             strop.c strorder.c strports.c struct.c 
                             symbols.c symbols.h 

Log message:
        * Deprecated macros SCM_ROCHARS and SCM_ROUCHARS.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/NEWS.diff?r1=1.214&r2=1.215
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/RELEASE.diff?r1=1.75&r2=1.76
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1169&r2=1.1170
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/dynl.c.diff?r1=1.52&r2=1.53
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/filesys.c.diff?r1=1.86&r2=1.87
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/gh_data.c.diff?r1=1.43&r2=1.44
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/hash.c.diff?r1=1.35&r2=1.36
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/load.c.diff?r1=1.47&r2=1.48
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/numbers.c.diff?r1=1.107&r2=1.108
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ports.c.diff?r1=1.123&r2=1.124
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/posix.c.diff?r1=1.77&r2=1.78
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/print.c.diff?r1=1.104&r2=1.105
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/random.c.diff?r1=1.34&r2=1.35
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/socket.c.diff?r1=1.57&r2=1.58
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strings.c.diff?r1=1.44&r2=1.45
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strings.h.diff?r1=1.23&r2=1.24
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strop.c.diff?r1=1.46&r2=1.47
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strorder.c.diff?r1=1.19&r2=1.20
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strports.c.diff?r1=1.65&r2=1.66
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/struct.c.diff?r1=1.64&r2=1.65
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.c.diff?r1=1.64&r2=1.65
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.h.diff?r1=1.40&r2=1.41

Patches:
Index: guile/guile-core/NEWS
diff -u guile/guile-core/NEWS:1.214 guile/guile-core/NEWS:1.215
--- guile/guile-core/NEWS:1.214 Tue Nov 21 09:32:38 2000
+++ guile/guile-core/NEWS       Wed Nov 22 03:20:02 2000
@@ -263,7 +263,8 @@
 SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
 SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
 SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
-SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING
+SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
+SCM_ROUCHARS
 
 Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
 Use scm_memory_error instead of SCM_NALLOC.
@@ -277,6 +278,8 @@
 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.
+Use SCM_STRING_CHARS instead of SCM_ROCHARS.
+Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
 
 ** Removed function:  scm_struct_init
 
Index: guile/guile-core/RELEASE
diff -u guile/guile-core/RELEASE:1.75 guile/guile-core/RELEASE:1.76
--- guile/guile-core/RELEASE:1.75       Tue Nov 21 09:32:38 2000
+++ guile/guile-core/RELEASE    Wed Nov 22 03:20:02 2000
@@ -49,7 +49,8 @@
   SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS, SCM_VALIDATE_ROSTRING,
   SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
   SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
-  SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING
+  SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING,
+  SCM_ROCHARS, SCM_ROUCHARS
 - remove scm_vector_set_length_x
 - remove function scm_call_catching_errors
   (replaced by catch functions from throw.[ch])
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1169 
guile/guile-core/libguile/ChangeLog:1.1170
--- guile/guile-core/libguile/ChangeLog:1.1169  Tue Nov 21 09:32:38 2000
+++ guile/guile-core/libguile/ChangeLog Wed Nov 22 03:20:02 2000
@@ -1,3 +1,25 @@
+2000-11-22  Dirk Herrmann  <address@hidden>
+
+       * dynl.c (scm_make_argv_from_stringlist), filesys.c (scm_dirname,
+       scm_basename), gh_data.c (gh_scm2newstr, gh_get_substr), hash.c
+       (scm_hasher), load.c (scm_parse_path, scm_search_path,
+       scm_primitive_load_path), numbers.c (scm_string_to_number),
+       ports.c (scm_unread_string), posix.c (scm_convert_exec_args,
+       environ_list_to_c, scm_putenv), print.c (scm_iprin1,
+       scm_simple_format), random.c (scm_seed_to_random_state), socket.c
+       (scm_fill_sockaddr, scm_send, scm_sendto), strings.c
+       (scm_string_ref, scm_substring, scm_string_append), strings.h
+       (SCM_STRING_COERCE_0TERMINATION_X), strop.c (scm_i_index,
+       scm_string_to_list, scm_string_copy), strorder.c
+       (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p,
+       scm_string_ci_less_p), strports.c (scm_mkstrport), struct.c
+       (scm_make_struct_layout), symbols.c (scm_string_to_symbol,
+       scm_string_to_obarray_symbol, scm_gensym, scm_gentemp):  Replace
+       calls to SCM_ROU?CHARS with the corresponding call to
+       SCM_STRING_U?CHARS.
+
+       * symbols.h (SCM_ROCHARS, SCM_ROUCHARS):  Deprecated.
+
 2000-11-21  Dirk Herrmann  <address@hidden>
 
        * ports.c:  Include eval.h.
Index: guile/guile-core/libguile/dynl.c
diff -u guile/guile-core/libguile/dynl.c:1.52 
guile/guile-core/libguile/dynl.c:1.53
--- guile/guile-core/libguile/dynl.c:1.52       Fri Nov 17 08:25:03 2000
+++ guile/guile-core/libguile/dynl.c    Wed Nov 22 03:20:02 2000
@@ -105,7 +105,7 @@
 
     SCM_ASSERT (SCM_STRINGP (arg), args, argn, subr);
     len = SCM_STRING_LENGTH (arg);
-    src = SCM_ROCHARS (arg);
+    src = SCM_STRING_CHARS (arg);
     dst = (char *) scm_must_malloc (len + 1, subr);
     memcpy (dst, src, len);
     dst[len] = 0;
Index: guile/guile-core/libguile/filesys.c
diff -u guile/guile-core/libguile/filesys.c:1.86 
guile/guile-core/libguile/filesys.c:1.87
--- guile/guile-core/libguile/filesys.c:1.86    Fri Nov 17 08:25:03 2000
+++ guile/guile-core/libguile/filesys.c Wed Nov 22 03:20:02 2000
@@ -1349,7 +1349,7 @@
 
   SCM_VALIDATE_STRING (1,filename);
 
-  s = SCM_ROCHARS (filename);
+  s = SCM_STRING_CHARS (filename);
   len = SCM_STRING_LENGTH (filename);
 
   i = len - 1;
@@ -1377,7 +1377,7 @@
   int i, j, len, end;
 
   SCM_VALIDATE_STRING (1,filename);
-  f = SCM_ROCHARS (filename);
+  f = SCM_STRING_CHARS (filename);
   len = SCM_STRING_LENGTH (filename);
 
   if (SCM_UNBNDP (suffix))
@@ -1385,7 +1385,7 @@
   else
     {
       SCM_VALIDATE_STRING (2, suffix);
-      s = SCM_ROCHARS (suffix);
+      s = SCM_STRING_CHARS (suffix);
       j = SCM_STRING_LENGTH (suffix) - 1;
     }
   i = len - 1;
Index: guile/guile-core/libguile/gh_data.c
diff -u guile/guile-core/libguile/gh_data.c:1.43 
guile/guile-core/libguile/gh_data.c:1.44
--- guile/guile-core/libguile/gh_data.c:1.43    Thu Nov  2 02:36:31 2000
+++ guile/guile-core/libguile/gh_data.c Wed Nov 22 03:20:03 2000
@@ -542,7 +542,7 @@
   ret_str = (char *) scm_must_malloc ((len + 1) * sizeof (char),
                                      "gh_scm2newstr");
   /* so we copy tmp_str to ret_str, which is what we will allocate */
-  memcpy (ret_str, SCM_ROCHARS (str), len);    /* test ROCHARS here -twp */
+  memcpy (ret_str, SCM_STRING_CHARS (str), len);
   /* from now on we don't mind if str gets GC collected. */
   scm_remember (&str);
   /* now make sure we null-terminate it */
@@ -573,7 +573,7 @@
 
   src_len = SCM_STRING_LENGTH (src);
   effective_length = (len < src_len) ? len : src_len;
-  memcpy (dst + start, SCM_ROCHARS (src), effective_length * sizeof (char));
+  memcpy (dst + start, SCM_STRING_CHARS (src), effective_length * sizeof 
(char));
   /* FIXME: must signal an error if len > src_len */
   scm_remember (&src);
 }
Index: guile/guile-core/libguile/hash.c
diff -u guile/guile-core/libguile/hash.c:1.35 
guile/guile-core/libguile/hash.c:1.36
--- guile/guile-core/libguile/hash.c:1.35       Fri Nov 17 08:25:03 2000
+++ guile/guile-core/libguile/hash.c    Wed Nov 22 03:20:03 2000
@@ -119,9 +119,8 @@
        obj = scm_number_to_string(obj, SCM_MAKINUM(10));
       }
     case scm_tc7_string:
-      return scm_string_hash (SCM_STRING_UCHARS (obj), SCM_STRING_LENGTH 
(obj)) % n;
     case scm_tc7_substring:
-      return scm_string_hash (SCM_ROUCHARS (obj), SCM_STRING_LENGTH (obj)) % n;
+      return scm_string_hash (SCM_STRING_UCHARS (obj), SCM_STRING_LENGTH 
(obj)) % n;
     case scm_tc7_symbol:
       return SCM_SYMBOL_HASH (obj) % n;
     case scm_tc7_wvect:
Index: guile/guile-core/libguile/load.c
diff -u guile/guile-core/libguile/load.c:1.47 
guile/guile-core/libguile/load.c:1.48
--- guile/guile-core/libguile/load.c:1.47       Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/load.c    Wed Nov 22 03:20:03 2000
@@ -232,7 +232,7 @@
     tail = SCM_EOL;
   return (SCM_FALSEP (path)
          ? tail
-         : scm_internal_parse_path (SCM_ROCHARS (path), tail));
+         : scm_internal_parse_path (SCM_STRING_CHARS (path), tail));
 }
 #undef FUNC_NAME
 
@@ -282,7 +282,7 @@
   else
     SCM_VALIDATE_LIST (3,extensions);
 
-  filename_chars = SCM_ROCHARS (filename);
+  filename_chars = SCM_STRING_CHARS (filename);
   filename_len = SCM_STRING_LENGTH (filename);
 
   /* If FILENAME is absolute, return it unchanged.  */
@@ -365,7 +365,7 @@
 
        /* Concatenate the path name and the filename. */
        len = SCM_STRING_LENGTH (dir);
-       memcpy (buf, SCM_ROCHARS (dir), len);
+       memcpy (buf, SCM_STRING_CHARS (dir), len);
        if (len >= 1 && buf[len - 1] != '/')
          buf[len++] = '/';
        memcpy (buf + len, filename_chars, filename_len);
@@ -380,7 +380,7 @@
            struct stat mode;
 
            /* Concatenate the extension. */
-           memcpy (buf + len, SCM_ROCHARS (ext), ext_len);
+           memcpy (buf + len, SCM_STRING_CHARS (ext), ext_len);
            buf[len + ext_len] = '\0';
            
            /* If the file exists at all, we should return it.  If the
@@ -448,7 +448,7 @@
   if (SCM_FALSEP (full_filename))
     {
       int absolute = (SCM_STRING_LENGTH (filename) >= 1
-                     && SCM_ROCHARS (filename)[0] == '/');
+                     && SCM_STRING_CHARS (filename)[0] == '/');
       SCM_MISC_ERROR ((absolute
                       ? "Unable to load file ~S"
                       : "Unable to find file ~S in load path"),
Index: guile/guile-core/libguile/numbers.c
diff -u guile/guile-core/libguile/numbers.c:1.107 
guile/guile-core/libguile/numbers.c:1.108
--- guile/guile-core/libguile/numbers.c:1.107   Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/numbers.c Wed Nov 22 03:20:03 2000
@@ -2808,7 +2808,7 @@
   int base;
   SCM_VALIDATE_STRING (1, string);
   SCM_VALIDATE_INUM_MIN_DEF_COPY (2,radix,2,10,base);
-  answer = scm_istring2number (SCM_ROCHARS (string),
+  answer = scm_istring2number (SCM_STRING_CHARS (string),
                               SCM_STRING_LENGTH (string),
                                base);
   return scm_return_first (answer, string);
Index: guile/guile-core/libguile/ports.c
diff -u guile/guile-core/libguile/ports.c:1.123 
guile/guile-core/libguile/ports.c:1.124
--- guile/guile-core/libguile/ports.c:1.123     Tue Nov 21 09:32:38 2000
+++ guile/guile-core/libguile/ports.c   Wed Nov 22 03:20:03 2000
@@ -1120,7 +1120,7 @@
   else
     SCM_VALIDATE_OPINPORT (2,port);
 
-  scm_ungets (SCM_ROCHARS (str), SCM_STRING_LENGTH (str), port);
+  scm_ungets (SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str), port);
   
   return str;
 }
Index: guile/guile-core/libguile/posix.c
diff -u guile/guile-core/libguile/posix.c:1.77 
guile/guile-core/libguile/posix.c:1.78
--- guile/guile-core/libguile/posix.c:1.77      Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/posix.c   Wed Nov 22 03:20:03 2000
@@ -818,7 +818,7 @@
 
       SCM_ASSERT (SCM_STRINGP (arg), args, argn, subr);
       len = SCM_STRING_LENGTH (arg);
-      src = SCM_ROCHARS (arg);
+      src = SCM_STRING_CHARS (arg);
       dst = (char *) scm_must_malloc (len + 1, subr);
       memcpy (dst, src, len);
       dst[len] = 0;
@@ -893,7 +893,7 @@
 
       SCM_ASSERT (SCM_STRINGP (str), envlist, arg, proc);
       len = SCM_STRING_LENGTH (str);
-      src = SCM_ROCHARS (str);
+      src = SCM_STRING_CHARS (str);
       result[i] = malloc (len + 1);
       if (result[i] == NULL)
        scm_memory_error (proc);
@@ -1130,7 +1130,7 @@
   ptr = malloc (SCM_STRING_LENGTH (str) + 1);
   if (ptr == NULL)
     SCM_MEMORY_ERROR;
-  strncpy (ptr, SCM_ROCHARS (str), SCM_STRING_LENGTH (str));
+  strncpy (ptr, SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str));
   ptr[SCM_STRING_LENGTH (str)] = 0;
   rv = putenv (ptr);
   if (rv < 0)
Index: guile/guile-core/libguile/print.c
diff -u guile/guile-core/libguile/print.c:1.104 
guile/guile-core/libguile/print.c:1.105
--- guile/guile-core/libguile/print.c:1.104     Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/print.c   Wed Nov 22 03:20:03 2000
@@ -447,7 +447,7 @@
            else if (SCM_STRINGP (name))
              {
                scm_putc (' ', port);
-               scm_lfwrite (SCM_ROCHARS (name), SCM_STRING_LENGTH (name), 
port);
+               scm_lfwrite (SCM_STRING_CHARS (name), SCM_STRING_LENGTH (name), 
port);
              }
            if (!SCM_UNBNDP (code))
              {
@@ -483,20 +483,19 @@
 
              scm_putc ('"', port);
              for (i = 0; i < SCM_STRING_LENGTH (exp); ++i)
-               switch (SCM_ROCHARS (exp)[i])
+               switch (SCM_STRING_CHARS (exp)[i])
                  {
                  case '"':
                  case '\\':
                    scm_putc ('\\', port);
                  default:
-                   scm_putc (SCM_ROCHARS (exp)[i], port);
+                   scm_putc (SCM_STRING_CHARS (exp)[i], port);
                  }
              scm_putc ('"', port);
              break;
            }
          else
-           scm_lfwrite (SCM_ROCHARS (exp), (scm_sizet) SCM_STRING_LENGTH (exp),
-                        port);
+           scm_lfwrite (SCM_STRING_CHARS (exp), SCM_STRING_LENGTH (exp), port);
          break;
        case scm_tc7_symbol:
            {
@@ -1000,7 +999,7 @@
   SCM_VALIDATE_STRING (2, message);
   SCM_VALIDATE_REST_ARGUMENT (args);
 
-  start = SCM_ROCHARS (message);
+  start = SCM_STRING_CHARS (message);
   end = start + SCM_STRING_LENGTH (message);
   for (p = start; p != end; ++p)
     if (*p == '~')
Index: guile/guile-core/libguile/random.c
diff -u guile/guile-core/libguile/random.c:1.34 
guile/guile-core/libguile/random.c:1.35
--- guile/guile-core/libguile/random.c:1.34     Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/random.c  Wed Nov 22 03:20:03 2000
@@ -405,7 +405,7 @@
   if (SCM_NUMBERP (seed))
     seed = scm_number_to_string (seed, SCM_UNDEFINED);
   SCM_VALIDATE_STRING (1,seed);
-  return make_rstate (scm_c_make_rstate (SCM_ROCHARS (seed),
+  return make_rstate (scm_c_make_rstate (SCM_STRING_CHARS (seed),
                                         SCM_STRING_LENGTH (seed)));
 }
 #undef FUNC_NAME
Index: guile/guile-core/libguile/socket.c
diff -u guile/guile-core/libguile/socket.c:1.57 
guile/guile-core/libguile/socket.c:1.58
--- guile/guile-core/libguile/socket.c:1.57     Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/socket.c  Wed Nov 22 03:20:03 2000
@@ -431,7 +431,7 @@
        memset (soka, 0, sizeof (struct sockaddr_un));
        soka->sun_family = AF_UNIX;
        SCM_ASSERT (SCM_STRINGP (address), address, which_arg, proc);
-       memcpy (soka->sun_path, SCM_ROCHARS (address),
+       memcpy (soka->sun_path, SCM_STRING_CHARS (address),
                1 + SCM_STRING_LENGTH (address));
        *size = sizeof (struct sockaddr_un);
        return (struct sockaddr *) soka;
@@ -738,7 +738,7 @@
   SCM_VALIDATE_INUM_DEF_COPY (3,flags,0,flg);
   fd = SCM_FPORT_FDES (sock);
 
-  SCM_SYSCALL (rv = send (fd, SCM_ROCHARS (message), SCM_STRING_LENGTH 
(message), flg));
+  SCM_SYSCALL (rv = send (fd, SCM_STRING_CHARS (message), SCM_STRING_LENGTH 
(message), flg));
   if (rv == -1)
     SCM_SYSERROR;
   return SCM_MAKINUM (rv);
@@ -856,7 +856,7 @@
       SCM_VALIDATE_CONS (5,args_and_flags);
       flg = SCM_NUM2ULONG (5,SCM_CAR (args_and_flags));
     }
-  SCM_SYSCALL (rv = sendto (fd, SCM_ROCHARS (message), SCM_STRING_LENGTH 
(message),
+  SCM_SYSCALL (rv = sendto (fd, SCM_STRING_CHARS (message), SCM_STRING_LENGTH 
(message),
                            flg, soka, size));
   save_err = errno;
   scm_must_free ((char *) soka);
Index: guile/guile-core/libguile/strings.c
diff -u guile/guile-core/libguile/strings.c:1.44 
guile/guile-core/libguile/strings.c:1.45
--- guile/guile-core/libguile/strings.c:1.44    Tue Nov 21 09:32:38 2000
+++ guile/guile-core/libguile/strings.c Wed Nov 22 03:20:03 2000
@@ -257,7 +257,7 @@
   SCM_VALIDATE_STRING (1, str);
   SCM_VALIDATE_INUM_COPY (2, k, idx);
   SCM_ASSERT_RANGE (2, k, idx >= 0 && idx < SCM_STRING_LENGTH (str));
-  return SCM_MAKE_CHAR (SCM_ROUCHARS (str)[idx]);
+  return SCM_MAKE_CHAR (SCM_STRING_UCHARS (str)[idx]);
 }
 #undef FUNC_NAME
 
@@ -302,7 +302,7 @@
   to = SCM_INUM (end);
   SCM_ASSERT_RANGE (3, end, from <= to && to <= SCM_STRING_LENGTH (str));
 
-  return scm_makfromstr (&SCM_ROCHARS (str)[from], (scm_sizet) (to - from), 0);
+  return scm_makfromstr (&SCM_STRING_CHARS (str)[from], (scm_sizet) (to - 
from), 0);
 }
 #undef FUNC_NAME
 
@@ -328,7 +328,7 @@
   data = SCM_STRING_UCHARS (res);
   for (l = args;SCM_NIMP (l);l = SCM_CDR (l)) {
     s = SCM_CAR (l);
-    for (i = 0;i<SCM_STRING_LENGTH (s);i++) *data++ = SCM_ROUCHARS (s)[i];
+    for (i = 0;i<SCM_STRING_LENGTH (s);i++) *data++ = SCM_STRING_UCHARS (s)[i];
   }
   return res;
 }
Index: guile/guile-core/libguile/strings.h
diff -u guile/guile-core/libguile/strings.h:1.23 
guile/guile-core/libguile/strings.h:1.24
--- guile/guile-core/libguile/strings.h:1.23    Tue Nov 21 09:32:38 2000
+++ guile/guile-core/libguile/strings.h Wed Nov 22 03:20:03 2000
@@ -60,7 +60,7 @@
 
 #define SCM_STRING_COERCE_0TERMINATION_X(x) \
   { 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_STRING_CHARS (x), SCM_STRING_LENGTH (x), 0); }
 
 
 
Index: guile/guile-core/libguile/strop.c
diff -u guile/guile-core/libguile/strop.c:1.46 
guile/guile-core/libguile/strop.c:1.47
--- guile/guile-core/libguile/strop.c:1.46      Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/strop.c   Wed Nov 22 03:20:03 2000
@@ -82,7 +82,7 @@
 
   if (direction > 0)
     {
-      p = (unsigned char *)SCM_ROCHARS (*str) + lower;
+      p = SCM_STRING_UCHARS (*str) + lower;
       ch = SCM_CHAR (chr);
 
       for (x = SCM_INUM (sub_start); x < upper; ++x, ++p)
@@ -91,7 +91,7 @@
     }
   else
     {
-      p = upper - 1 + (unsigned char *)SCM_ROCHARS (*str);
+      p = upper - 1 + SCM_STRING_UCHARS (*str);
       ch = SCM_CHAR (chr);
       for (x = upper - 1; x >= lower; --x, --p)
        if (*p == ch)
@@ -327,7 +327,7 @@
   SCM res = SCM_EOL;
   unsigned char *src;
   SCM_VALIDATE_STRING (1,str);
-  src = SCM_ROUCHARS (str);
+  src = SCM_STRING_UCHARS (str);
   for (i = SCM_STRING_LENGTH (str)-1;i >= 0;i--) res = scm_cons (SCM_MAKE_CHAR 
(src[i]), res);
   return res;
 }
@@ -341,7 +341,7 @@
 #define FUNC_NAME s_scm_string_copy
 {
   SCM_VALIDATE_STRING (1, str);
-  return scm_makfromstr (SCM_ROCHARS (str), SCM_STRING_LENGTH (str), 0);
+  return scm_makfromstr (SCM_STRING_CHARS (str), SCM_STRING_LENGTH (str), 0);
 }
 #undef FUNC_NAME
 
Index: guile/guile-core/libguile/strorder.c
diff -u guile/guile-core/libguile/strorder.c:1.19 
guile/guile-core/libguile/strorder.c:1.20
--- guile/guile-core/libguile/strorder.c:1.19   Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/strorder.c        Wed Nov 22 03:20:03 2000
@@ -71,8 +71,8 @@
   length = SCM_STRING_LENGTH (s2);
   if (SCM_STRING_LENGTH (s1) == length)
     {
-      unsigned char *c1 = SCM_ROUCHARS (s1) + length - 1;
-      unsigned char *c2 = SCM_ROUCHARS (s2) + length - 1;
+      unsigned char *c1 = SCM_STRING_UCHARS (s1) + length - 1;
+      unsigned char *c2 = SCM_STRING_UCHARS (s2) + length - 1;
       scm_sizet i;
 
       /* comparing from back to front typically finds mismatches faster */
@@ -105,8 +105,8 @@
   length = SCM_STRING_LENGTH (s2);
   if (SCM_STRING_LENGTH (s1) == length)
     {
-      unsigned char *c1 = SCM_ROUCHARS (s1) + length - 1;
-      unsigned char *c2 = SCM_ROUCHARS (s2) + length - 1;
+      unsigned char *c1 = SCM_STRING_UCHARS (s1) + length - 1;
+      unsigned char *c2 = SCM_STRING_UCHARS (s2) + length - 1;
       scm_sizet i;
 
       /* comparing from back to front typically finds mismatches faster */
@@ -139,8 +139,8 @@
   length1 = SCM_STRING_LENGTH (s1);
   length2 = SCM_STRING_LENGTH (s2);
   lengthm = min (length1, length2);
-  c1 = SCM_ROUCHARS (s1);
-  c2 = SCM_ROUCHARS (s2);
+  c1 = SCM_STRING_UCHARS (s1);
+  c2 = SCM_STRING_UCHARS (s2);
 
   for (i = 0; i != lengthm; ++i, ++c1, ++c2) {
     int c = *c1 - *c2;
@@ -202,8 +202,8 @@
   length1 = SCM_STRING_LENGTH (s1);
   length2 = SCM_STRING_LENGTH (s2);
   lengthm = min (length1, length2);
-  c1 = SCM_ROUCHARS (s1);
-  c2 = SCM_ROUCHARS (s2);
+  c1 = SCM_STRING_UCHARS (s1);
+  c2 = SCM_STRING_UCHARS (s2);
 
   for (i = 0; i != lengthm; ++i, ++c1, ++c2) {
     int c = scm_upcase (*c1) - scm_upcase (*c2);
Index: guile/guile-core/libguile/strports.c
diff -u guile/guile-core/libguile/strports.c:1.65 
guile/guile-core/libguile/strports.c:1.66
--- guile/guile-core/libguile/strports.c:1.65   Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/strports.c        Wed Nov 22 03:20:03 2000
@@ -282,7 +282,7 @@
   SCM_SET_CELL_TYPE (z, scm_tc16_strport | modes);
   SCM_SETPTAB_ENTRY (z, pt);
   SCM_SETSTREAM (z, SCM_UNPACK (str));
-  pt->write_buf = pt->read_buf = SCM_ROUCHARS (str);
+  pt->write_buf = pt->read_buf = SCM_STRING_UCHARS (str);
   pt->read_pos = pt->write_pos = pt->read_buf + SCM_INUM (pos);
   pt->write_buf_size = pt->read_buf_size = str_len;
   pt->write_end = pt->read_end = pt->read_buf + pt->read_buf_size;
Index: guile/guile-core/libguile/struct.c
diff -u guile/guile-core/libguile/struct.c:1.64 
guile/guile-core/libguile/struct.c:1.65
--- guile/guile-core/libguile/struct.c:1.64     Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/struct.c  Wed Nov 22 03:20:03 2000
@@ -88,7 +88,7 @@
     int x;
 
     len = SCM_STRING_LENGTH (fields);
-    field_desc = SCM_ROCHARS (fields);
+    field_desc = SCM_STRING_CHARS (fields);
     SCM_ASSERT (!(len & 1), fields, "odd length field specification", 
FUNC_NAME);
 
     for (x = 0; x < len; x += 2)
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.64 
guile/guile-core/libguile/symbols.c:1.65
--- guile/guile-core/libguile/symbols.c:1.64    Fri Nov 17 08:25:04 2000
+++ guile/guile-core/libguile/symbols.c Wed Nov 22 03:20:03 2000
@@ -498,7 +498,7 @@
   SCM answer;
 
   SCM_VALIDATE_STRING (1,s);
-  vcell = scm_intern (SCM_ROCHARS (s), SCM_STRING_LENGTH (s));
+  vcell = scm_intern (SCM_STRING_CHARS (s), SCM_STRING_LENGTH (s));
   answer = SCM_CAR (vcell);
   return answer;
 }
@@ -534,7 +534,7 @@
   else if (SCM_EQ_P (o, SCM_BOOL_T))
     o = SCM_BOOL_F;
     
-  vcell = scm_intern_obarray_soft (SCM_ROCHARS(s),
+  vcell = scm_intern_obarray_soft (SCM_STRING_CHARS(s),
                                   SCM_STRING_LENGTH (s),
                                   o,
                                   softness);
@@ -837,7 +837,7 @@
       len = SCM_STRING_LENGTH (prefix);
       if (len > MAX_PREFIX_LENGTH)
        name = SCM_MUST_MALLOC (MAX_PREFIX_LENGTH + SCM_INTBUFLEN);
-      strncpy (name, SCM_ROCHARS (prefix), len);
+      strncpy (name, SCM_STRING_CHARS (prefix), len);
     }
   {
     int n_digits = scm_iint2str (gensym_counter++, 10, &name[len]);
@@ -875,7 +875,7 @@
       len = SCM_STRING_LENGTH (prefix);
       if (len > MAX_PREFIX_LENGTH)
        name = SCM_MUST_MALLOC (MAX_PREFIX_LENGTH + SCM_INTBUFLEN);
-      strncpy (name, SCM_ROCHARS (prefix), len);
+      strncpy (name, SCM_STRING_CHARS (prefix), len);
     }
 
   if (SCM_UNBNDP (obarray))
Index: guile/guile-core/libguile/symbols.h
diff -u guile/guile-core/libguile/symbols.h:1.40 
guile/guile-core/libguile/symbols.h:1.41
--- guile/guile-core/libguile/symbols.h:1.40    Thu Nov  2 02:36:31 2000
+++ guile/guile-core/libguile/symbols.h Wed Nov 22 03:20:03 2000
@@ -75,17 +75,6 @@
 #define SCM_SYMBOL_HASH(X)         (SCM_CELL_WORD_2 (X))
 #define SCM_SET_SYMBOL_HASH(X, v)   (SCM_SET_CELL_WORD_2 ((X), (v)))
 
-#define SCM_ROCHARS(x) ((SCM_TYP7 (x) == scm_tc7_substring) \
-                       ? (SCM_INUM (SCM_CADR (x)) + SCM_STRING_CHARS (SCM_CDDR 
(x))) \
-                       : ((SCM_TYP7 (x) == scm_tc7_string) \
-                          ? SCM_STRING_CHARS (x) \
-                          : SCM_SYMBOL_CHARS (x)))
-#define SCM_ROUCHARS(x) ((SCM_TYP7 (x) == scm_tc7_substring) \
-                        ? (SCM_INUM (SCM_CADR (x)) + SCM_STRING_UCHARS 
(SCM_CDDR (x))) \
-                        : ((SCM_TYP7 (x) == scm_tc7_string) \
-                           ? SCM_STRING_UCHARS (x) \
-                           : SCM_SYMBOL_UCHARS (x)))
-
 
 
 extern unsigned long scm_string_hash (const unsigned char *str, scm_sizet len);
@@ -134,6 +123,16 @@
 #define SCM_ROSTRINGP(x) (SCM_NIMP(x) && ((SCM_TYP7S(x)==scm_tc7_string) \
                          || (SCM_TYP7(x) == scm_tc7_symbol)))
 #define SCM_ROLENGTH(x) SCM_LENGTH (x)
+#define SCM_ROCHARS(x) ((SCM_TYP7 (x) == scm_tc7_substring) \
+                       ? (SCM_INUM (SCM_CADR (x)) + SCM_STRING_CHARS (SCM_CDDR 
(x))) \
+                       : ((SCM_TYP7 (x) == scm_tc7_string) \
+                          ? SCM_STRING_CHARS (x) \
+                          : SCM_SYMBOL_CHARS (x)))
+#define SCM_ROUCHARS(x) ((SCM_TYP7 (x) == scm_tc7_substring) \
+                        ? (SCM_INUM (SCM_CADR (x)) + SCM_STRING_UCHARS 
(SCM_CDDR (x))) \
+                        : ((SCM_TYP7 (x) == scm_tc7_string) \
+                           ? SCM_STRING_UCHARS (x) \
+                           : SCM_SYMBOL_UCHARS (x)))
 #define SCM_SUBSTRP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_substring))
 #define SCM_COERCE_SUBSTR(x) SCM_STRING_COERCE_0TERMINATION_X (x)
 #define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]