/[guile]/guile/guile-core/libguile/print.c
ViewVC logotype

Diff of /guile/guile-core/libguile/print.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.156 by mvo, Tue Nov 18 19:59:50 2003 UTC revision 1.157 by mvo, Sun Nov 30 00:57:14 2003 UTC
# Line 541  scm_iprin1 (SCM exp, SCM port, scm_print Line 541  scm_iprin1 (SCM exp, SCM port, scm_print
541    
542                scm_putc ('"', port);                scm_putc ('"', port);
543                for (i = 0; i < SCM_STRING_LENGTH (exp); ++i)                for (i = 0; i < SCM_STRING_LENGTH (exp); ++i)
544                  switch (SCM_STRING_CHARS (exp)[i])                  {
545                    {                    unsigned char ch = SCM_STRING_CHARS (exp)[i];
546                    case '"':                    if ((ch < 32 && ch != '\n') || (127 <= ch && ch < 148))
547                    case '\\':                      {
548                      scm_putc ('\\', port);                        static char const hex[]="0123456789abcdef";
549                    default:                        scm_putc ('\\', port);
550                      scm_putc (SCM_STRING_CHARS (exp)[i], port);                        scm_putc ('x', port);
551                    }                        scm_putc (hex [ch / 16], port);
552                          scm_putc (hex [ch % 16], port);
553                        }
554                      else
555                        {
556                          if (ch == '"' || ch == '\\')
557                            scm_putc ('\\', port);
558                          scm_putc (ch, port);
559                        }
560                    }
561                scm_putc ('"', port);                scm_putc ('"', port);
               break;  
562              }              }
563            else            else
564              scm_lfwrite (SCM_STRING_CHARS (exp), SCM_STRING_LENGTH (exp), port);              scm_lfwrite (SCM_STRING_CHARS (exp), SCM_STRING_LENGTH (exp),
565                             port);
566            break;            break;
567          case scm_tc7_symbol:          case scm_tc7_symbol:
568            if (SCM_SYMBOL_INTERNED_P (exp))            if (SCM_SYMBOL_INTERNED_P (exp))

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26