guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core/libguile ChangeLog backtrace.c...


From: Dirk Herrmann
Subject: guile/guile-core/libguile ChangeLog backtrace.c...
Date: Fri, 22 Sep 2000 10:17:57 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Dirk Herrmann <address@hidden>  00/09/22 10:17:55

Modified files:
        guile-core/libguile: ChangeLog backtrace.c environments.c 
                             gh_data.c keywords.c ports.c posix.c 
                             print.c regex-posix.c script.c simpos.c 
                             socket.c strings.c strop.c symbols.c unif.c 
                             validate.h 

Log message:
        * Replaced SCM_CHARS with SCM_STRING_CHARS or SCM_SYMBOL_CHARS.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1116&r2=1.1117
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/backtrace.c.diff?r1=1.54&r2=1.55
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/environments.c.diff?r1=1.4&r2=1.5
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/gh_data.c.diff?r1=1.39&r2=1.40
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/keywords.c.diff?r1=1.23&r2=1.24
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ports.c.diff?r1=1.114&r2=1.115
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/posix.c.diff?r1=1.70&r2=1.71
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/print.c.diff?r1=1.97&r2=1.98
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/regex-posix.c.diff?r1=1.40&r2=1.41
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/script.c.diff?r1=1.32&r2=1.33
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/simpos.c.diff?r1=1.34&r2=1.35
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/socket.c.diff?r1=1.53&r2=1.54
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strings.c.diff?r1=1.38&r2=1.39
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strop.c.diff?r1=1.40&r2=1.41
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.c.diff?r1=1.57&r2=1.58
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/unif.c.diff?r1=1.86&r2=1.87
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/validate.h.diff?r1=1.14&r2=1.15

Patches:
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1116 
guile/guile-core/libguile/ChangeLog:1.1117
--- guile/guile-core/libguile/ChangeLog:1.1116  Fri Sep 22 09:44:42 2000
+++ guile/guile-core/libguile/ChangeLog Fri Sep 22 10:17:54 2000
@@ -1,5 +1,21 @@
 2000-09-22  Dirk Herrmann  <address@hidden>
 
+       * backtrace.c (display_frame_expr), environments.c
+       (print_observer, print_leaf_environment, print_eval_environment,
+       print_import_environment, print_export_environment), gh_data.c
+       (gh_set_substr, gh_symbol2newstr), keywords.c
+       (scm_make_keyword_from_dash_symbol), ports.c (scm_drain_input),
+       posix.c (scm_mknod), print.c (scm_iprin1), regexp-posix.c
+       (scm_regexp_error_msg), script.c (scm_compile_shell_switches),
+       simpos.c (scm_getenv), socket.c (scm_recv, scm_recvfrom),
+       strings.c (scm_makfromstr), strop.c (scm_substring_move_x,
+       scm_substring_fill_x, scm_string_capitalize_x), symbols.c
+       (scm_symbol_to_string), unif.c (scm_make_uve, scm_array_p),
+       validate.h (SCM_VALIDATE_STRING_COPY):  Use SCM_STRING_CHARS or
+       SCM_SYMBOL_CHARS instead of SCM_CHARS.
+
+2000-09-22  Dirk Herrmann  <address@hidden>
+
        * strings.h (SCM_STRING_CHARS):  Added, should be used instead of
        SCM_CHARS whenever the argument is known to be a string.
 
Index: guile/guile-core/libguile/backtrace.c
diff -u guile/guile-core/libguile/backtrace.c:1.54 
guile/guile-core/libguile/backtrace.c:1.55
--- guile/guile-core/libguile/backtrace.c:1.54  Mon Jun 12 05:28:23 2000
+++ guile/guile-core/libguile/backtrace.c       Fri Sep 22 10:17:55 2000
@@ -333,16 +333,16 @@
   string = scm_strport_to_string (sport);
   /* Remove control characters */
   for (i = 0; i < n; ++i)
-    if (iscntrl (SCM_CHARS (string)[i]))
-      SCM_CHARS (string)[i] = ' ';
+    if (iscntrl (SCM_STRING_CHARS (string)[i]))
+      SCM_STRING_CHARS (string)[i] = ' ';
   /* Truncate */
   if (indentation + n > SCM_BACKTRACE_WIDTH)
     {
       n = SCM_BACKTRACE_WIDTH - indentation;
-      SCM_CHARS (string)[n - 1] = '$';
+      SCM_STRING_CHARS (string)[n - 1] = '$';
     }
       
-  scm_lfwrite (SCM_CHARS (string), n, port);
+  scm_lfwrite (SCM_STRING_CHARS (string), n, port);
 }
 
 static void
Index: guile/guile-core/libguile/environments.c
diff -u guile/guile-core/libguile/environments.c:1.4 
guile/guile-core/libguile/environments.c:1.5
--- guile/guile-core/libguile/environments.c:1.4        Thu Sep  7 02:19:22 2000
+++ guile/guile-core/libguile/environments.c    Fri Sep 22 10:17:55 2000
@@ -498,7 +498,7 @@
   SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
 
   scm_puts ("#<observer ", port);
-  scm_puts (SCM_CHARS (base16), port);
+  scm_puts (SCM_STRING_CHARS (base16), port);
   scm_puts (">", port);
 
   return 1;
@@ -994,7 +994,7 @@
   SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
 
   scm_puts ("#<leaf environment ", port);
-  scm_puts (SCM_CHARS (base16), port);
+  scm_puts (SCM_STRING_CHARS (base16), port);
   scm_puts (">", port);
 
   return 1;
@@ -1354,7 +1354,7 @@
   SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
 
   scm_puts ("#<eval environment ", port);
-  scm_puts (SCM_CHARS (base16), port);
+  scm_puts (SCM_STRING_CHARS (base16), port);
   scm_puts (">", port);
 
   return 1;
@@ -1765,7 +1765,7 @@
   SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
 
   scm_puts ("#<import environment ", port);
-  scm_puts (SCM_CHARS (base16), port);
+  scm_puts (SCM_STRING_CHARS (base16), port);
   scm_puts (">", port);
 
   return 1;
@@ -2062,7 +2062,7 @@
   SCM base16 = scm_number_to_string (address, SCM_MAKINUM (16));
 
   scm_puts ("#<export environment ", port);
-  scm_puts (SCM_CHARS (base16), port);
+  scm_puts (SCM_STRING_CHARS (base16), port);
   scm_puts (">", port);
 
   return 1;
Index: guile/guile-core/libguile/gh_data.c
diff -u guile/guile-core/libguile/gh_data.c:1.39 
guile/guile-core/libguile/gh_data.c:1.40
--- guile/guile-core/libguile/gh_data.c:1.39    Tue Sep  5 11:39:54 2000
+++ guile/guile-core/libguile/gh_data.c Fri Sep 22 10:17:55 2000
@@ -116,7 +116,7 @@
   SCM_ASSERT (SCM_STRINGP (dst), dst, SCM_ARG3,
              "gh_set_substr");
 
-  dst_ptr = SCM_CHARS (dst);
+  dst_ptr = SCM_STRING_CHARS (dst);
   dst_len = SCM_LENGTH (dst);
   SCM_ASSERT (len >= 0 && (unsigned) len <= dst_len,
              dst, SCM_ARG4, "gh_set_substr");
@@ -605,7 +605,7 @@
   ret_str = (char *) scm_must_malloc ((len + 1) * sizeof (char),
                                      "gh_symbol2newstr");
   /* so we copy tmp_str to ret_str, which is what we will allocate */
-  memcpy (ret_str, SCM_CHARS (sym), len);
+  memcpy (ret_str, SCM_SYMBOL_CHARS (sym), len);
   /* now make sure we null-terminate it */
   ret_str[len] = '\0';
 
Index: guile/guile-core/libguile/keywords.c
diff -u guile/guile-core/libguile/keywords.c:1.23 
guile/guile-core/libguile/keywords.c:1.24
--- guile/guile-core/libguile/keywords.c:1.23   Fri Aug 11 08:12:37 2000
+++ guile/guile-core/libguile/keywords.c        Fri Sep 22 10:17:55 2000
@@ -74,7 +74,7 @@
   SCM vcell;
 
   SCM_ASSERT (SCM_SYMBOLP (symbol)
-             && ('-' == SCM_CHARS(symbol)[0]),
+             && ('-' == SCM_SYMBOL_CHARS(symbol)[0]),
              symbol, SCM_ARG1, FUNC_NAME);
 
   SCM_DEFER_INTS;
Index: guile/guile-core/libguile/ports.c
diff -u guile/guile-core/libguile/ports.c:1.114 
guile/guile-core/libguile/ports.c:1.115
--- guile/guile-core/libguile/ports.c:1.114     Fri Aug 25 10:33:01 2000
+++ guile/guile-core/libguile/ports.c   Fri Sep 22 10:17:55 2000
@@ -290,7 +290,7 @@
     count += pt->saved_read_end - pt->saved_read_pos;
 
   result = scm_makstr (count, 0);
-  dst = SCM_CHARS (result);
+  dst = SCM_STRING_CHARS (result);
 
   while (pt->read_pos < pt->read_end)
     *dst++ = *(pt->read_pos++);
Index: guile/guile-core/libguile/posix.c
diff -u guile/guile-core/libguile/posix.c:1.70 
guile/guile-core/libguile/posix.c:1.71
--- guile/guile-core/libguile/posix.c:1.70      Sat Sep  2 16:20:40 2000
+++ guile/guile-core/libguile/posix.c   Fri Sep 22 10:17:55 2000
@@ -1213,7 +1213,7 @@
   SCM_VALIDATE_INUM (4,dev);
   SCM_COERCE_SUBSTR (path);
 
-  p = SCM_CHARS (type);
+  p = SCM_SYMBOL_CHARS (type);
   if (strcmp (p, "regular") == 0)
     ctype = S_IFREG;
   else if (strcmp (p, "directory") == 0)
Index: guile/guile-core/libguile/print.c
diff -u guile/guile-core/libguile/print.c:1.97 
guile/guile-core/libguile/print.c:1.98
--- guile/guile-core/libguile/print.c:1.97      Thu Sep 14 15:43:12 2000
+++ guile/guile-core/libguile/print.c   Fri Sep 22 10:17:55 2000
@@ -494,7 +494,7 @@
              int mw_pos = 0;
 
              len = SCM_LENGTH (exp);
-             str = SCM_CHARS (exp);
+             str = SCM_SYMBOL_CHARS (exp);
              scm_remember (&exp);
              pos = 0;
              weird = 0;
Index: guile/guile-core/libguile/regex-posix.c
diff -u guile/guile-core/libguile/regex-posix.c:1.40 
guile/guile-core/libguile/regex-posix.c:1.41
--- guile/guile-core/libguile/regex-posix.c:1.40        Tue Jun 13 04:14:35 2000
+++ guile/guile-core/libguile/regex-posix.c     Fri Sep 22 10:17:55 2000
@@ -124,14 +124,14 @@
 
   errmsg = scm_make_string (SCM_MAKINUM (80), SCM_UNDEFINED);
   SCM_DEFER_INTS;
-  l = regerror (regerrno, rx, SCM_CHARS (errmsg), 80);
+  l = regerror (regerrno, rx, SCM_STRING_CHARS (errmsg), 80);
   if (l > 80)
     {
       errmsg = scm_make_string (SCM_MAKINUM (l), SCM_UNDEFINED);
       regerror (regerrno, rx, SCM_CHARS (errmsg), l);
     }
   SCM_ALLOW_INTS;
-  return SCM_CHARS (errmsg);
+  return SCM_STRING_CHARS (errmsg);
 }
 
 SCM_DEFINE (scm_regexp_p, "regexp?", 1, 0, 0, 
Index: guile/guile-core/libguile/script.c
diff -u guile/guile-core/libguile/script.c:1.32 
guile/guile-core/libguile/script.c:1.33
--- guile/guile-core/libguile/script.c:1.32     Fri Aug 11 01:44:32 2000
+++ guile/guile-core/libguile/script.c  Fri Sep 22 10:17:55 2000
@@ -557,7 +557,7 @@
                  "certain other uses are permitted as well.  For details, see 
the file\n"
                  "`COPYING', which is included in the Guile distribution.\n"
                  "There is no warranty, to the extent permitted by law.\n",
-                 SCM_CHARS (scm_version ()));
+                 SCM_STRING_CHARS (scm_version ()));
          exit (0);
        }
 
Index: guile/guile-core/libguile/simpos.c
diff -u guile/guile-core/libguile/simpos.c:1.34 
guile/guile-core/libguile/simpos.c:1.35
--- guile/guile-core/libguile/simpos.c:1.34     Fri Aug 18 09:52:15 2000
+++ guile/guile-core/libguile/simpos.c  Fri Sep 22 10:17:55 2000
@@ -107,7 +107,7 @@
   char *val;
   SCM_VALIDATE_ROSTRING (1,nam);
   nam = scm_makfromstr (SCM_ROCHARS (nam), SCM_ROLENGTH (nam), 0);
-  val = getenv(SCM_CHARS(nam));
+  val = getenv (SCM_STRING_CHARS (nam));
   return (val) ? scm_makfromstr(val, (scm_sizet)strlen(val), 0) : SCM_BOOL_F;
 }
 #undef FUNC_NAME
Index: guile/guile-core/libguile/socket.c
diff -u guile/guile-core/libguile/socket.c:1.53 
guile/guile-core/libguile/socket.c:1.54
--- guile/guile-core/libguile/socket.c:1.53     Sat Sep  2 16:19:25 2000
+++ guile/guile-core/libguile/socket.c  Fri Sep 22 10:17:55 2000
@@ -709,7 +709,7 @@
   SCM_VALIDATE_INUM_DEF_COPY (3,flags,0,flg);
   fd = SCM_FPORT_FDES (sock);
 
-  SCM_SYSCALL (rv = recv (fd, SCM_CHARS (buf), SCM_LENGTH (buf), flg));
+  SCM_SYSCALL (rv = recv (fd, SCM_STRING_CHARS (buf), SCM_LENGTH (buf), flg));
   if (rv == -1)
     SCM_SYSERROR;
 
@@ -807,7 +807,7 @@
   fd = SCM_FPORT_FDES (sock);
 
   tmp_size = scm_addr_buffer_size;
-  SCM_SYSCALL (rv = recvfrom (fd, SCM_CHARS (buf) + offset,
+  SCM_SYSCALL (rv = recvfrom (fd, SCM_STRING_CHARS (buf) + offset,
                              cend - offset, flg,
                              (struct sockaddr *) scm_addr_buffer,
                              &tmp_size));
Index: guile/guile-core/libguile/strings.c
diff -u guile/guile-core/libguile/strings.c:1.38 
guile/guile-core/libguile/strings.c:1.39
--- guile/guile-core/libguile/strings.c:1.38    Tue Sep 12 05:30:36 2000
+++ guile/guile-core/libguile/strings.c Fri Sep 22 10:17:55 2000
@@ -186,7 +186,7 @@
 scm_makfromstr (const char *src, scm_sizet len, int dummy)
 {
   SCM s = scm_makstr (len, 0);
-  char *dst = SCM_CHARS (s);
+  char *dst = SCM_STRING_CHARS (s);
 
   while (len--)
     *dst++ = *src++;
Index: guile/guile-core/libguile/strop.c
diff -u guile/guile-core/libguile/strop.c:1.40 
guile/guile-core/libguile/strop.c:1.41
--- guile/guile-core/libguile/strop.c:1.40      Sat Sep  2 16:18:13 2000
+++ guile/guile-core/libguile/strop.c   Fri Sep 22 10:17:55 2000
@@ -260,8 +260,8 @@
   SCM_ASSERT_RANGE (3,end1,e <= SCM_LENGTH (str1) && e >= 0);
   SCM_ASSERT_RANGE (5,start2,len+s2 <= SCM_LENGTH (str2));
 
-  SCM_SYSCALL(memmove((void *)(&(SCM_CHARS(str2)[s2])),
-                     (void *)(&(SCM_CHARS(str1)[s1])),
+  SCM_SYSCALL(memmove((void *)(&(SCM_STRING_CHARS(str2)[s2])),
+                     (void *)(&(SCM_STRING_CHARS(str1)[s1])),
                      len));
   
   return scm_return_first(SCM_UNSPECIFIED, str1, str2);
@@ -290,7 +290,7 @@
   SCM_VALIDATE_CHAR_COPY (4,fill,c);
   SCM_ASSERT_RANGE (2,start,i <= SCM_LENGTH (str) && i >= 0);
   SCM_ASSERT_RANGE (3,end,e <= SCM_LENGTH (str) && e >= 0);
-  while (i<e) SCM_CHARS (str)[i++] = c;
+  while (i<e) SCM_STRING_CHARS (str)[i++] = c;
   return SCM_UNSPECIFIED;
 }
 #undef FUNC_NAME
@@ -454,7 +454,7 @@
   int i, len, in_word=0;
   SCM_VALIDATE_STRING (1,str);
   len = SCM_LENGTH(str);
-  sz = SCM_CHARS(str);
+  sz = SCM_STRING_CHARS (str);
   for(i=0; i<len;  i++) {
     if(SCM_NFALSEP(scm_char_alphabetic_p(SCM_MAKE_CHAR(sz[i])))) {
       if(!in_word) {
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.57 
guile/guile-core/libguile/symbols.c:1.58
--- guile/guile-core/libguile/symbols.c:1.57    Wed Sep 20 02:27:06 2000
+++ guile/guile-core/libguile/symbols.c Fri Sep 22 10:17:55 2000
@@ -460,7 +460,7 @@
 #define FUNC_NAME s_scm_symbol_to_string
 {
   SCM_VALIDATE_SYMBOL (1, s);
-  return scm_makfromstr (SCM_CHARS (s), SCM_LENGTH (s), 0);
+  return scm_makfromstr (SCM_SYMBOL_CHARS (s), SCM_LENGTH (s), 0);
 }
 #undef FUNC_NAME
 
Index: guile/guile-core/libguile/unif.c
diff -u guile/guile-core/libguile/unif.c:1.86 
guile/guile-core/libguile/unif.c:1.87
--- guile/guile-core/libguile/unif.c:1.86       Sat Sep  2 16:15:04 2000
+++ guile/guile-core/libguile/unif.c    Fri Sep 22 10:17:55 2000
@@ -183,7 +183,7 @@
     {
       char s;
 
-      s = SCM_CHARS (prot)[0];
+      s = SCM_SYMBOL_CHARS (prot)[0];
       if (s == 's')
        {
          i = sizeof (short) * k;
@@ -306,12 +306,12 @@
        case scm_tc7_svect:
          protp = SCM_SYMBOLP (prot)
            && (1 == SCM_LENGTH (prot))
-           && ('s' == SCM_CHARS (prot)[0]);
+           && ('s' == SCM_SYMBOL_CHARS (prot)[0]);
 #ifdef HAVE_LONG_LONGS
        case scm_tc7_llvect:
          protp = SCM_SYMBOLP (prot)
            && (1 == SCM_LENGTH (prot))
-           && ('s' == SCM_CHARS (prot)[0]);
+           && ('s' == SCM_SYMBOL_CHARS (prot)[0]);
 #endif
        case scm_tc7_fvect:
          protp = singp (prot);
Index: guile/guile-core/libguile/validate.h
diff -u guile/guile-core/libguile/validate.h:1.14 
guile/guile-core/libguile/validate.h:1.15
--- guile/guile-core/libguile/validate.h:1.14   Sun Sep  3 14:56:03 2000
+++ guile/guile-core/libguile/validate.h        Fri Sep 22 10:17:55 2000
@@ -1,4 +1,4 @@
-/* $Id: validate.h,v 1.14 2000/09/03 21:56:03 mdj Exp $ */
+/* $Id: validate.h,v 1.15 2000/09/22 17:17:55 dirk Exp $ */
 /*     Copyright (C) 1999, 2000 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -156,7 +156,7 @@
 #define SCM_VALIDATE_STRING_COPY(pos, str, cvar) \
   do { \
     SCM_ASSERT (SCM_STRINGP (str), str, pos, FUNC_NAME); \
-    cvar = SCM_CHARS(str); \
+    cvar = SCM_STRING_CHARS(str); \
   } while (0)
 
 #define SCM_VALIDATE_RWSTRING(pos, str) \


reply via email to

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