Commit a992381f authored by Erick Gallesio's avatar Erick Gallesio

Corrected a bug in string printing for control characters > 0177

parent 8684d0ea
......@@ -2,7 +2,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 22-Dec-2006 00:13 (eg)
# Last file update: 8-Jan-2007 14:02 (eg)
SUBDIRS = Match.d SILex.d Lalr.d Snow.d @LURCDIR@
......@@ -41,6 +41,7 @@ scheme_SRCS = STklos.init \
full-syntax.stk \
full-conditions.stk \
getopt.stk \
gunzip.stk \
lex-rt.stk \
make-C-boot.stk \
match.stk \
......@@ -66,6 +67,7 @@ scheme_SRCS = STklos.init \
srfi-66.stk \
srfi-69.stk \
srfi-70.stk \
tar.stk \
trace.stk
scheme_OBJS = compfile.ostk \
......@@ -74,6 +76,7 @@ scheme_OBJS = compfile.ostk \
describe.ostk \
env.ostk \
getopt.ostk \
gunzip.ostk \
lex-rt.ostk \
match.ostk \
pp.ostk \
......@@ -98,6 +101,7 @@ scheme_OBJS = compfile.ostk \
srfi-66.ostk \
srfi-69.ostk \
srfi-70.ostk \
tar.ostk \
trace.ostk
DOCDB = DOCDB
......
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 22-Dec-2006 00:13 (eg)
# Last file update: 8-Jan-2007 14:02 (eg)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
......@@ -232,6 +232,7 @@ scheme_SRCS = STklos.init \
full-syntax.stk \
full-conditions.stk \
getopt.stk \
gunzip.stk \
lex-rt.stk \
make-C-boot.stk \
match.stk \
......@@ -257,6 +258,7 @@ scheme_SRCS = STklos.init \
srfi-66.stk \
srfi-69.stk \
srfi-70.stk \
tar.stk \
trace.stk
scheme_OBJS = compfile.ostk \
......@@ -265,6 +267,7 @@ scheme_OBJS = compfile.ostk \
describe.ostk \
env.ostk \
getopt.ostk \
gunzip.ostk \
lex-rt.ostk \
match.ostk \
pp.ostk \
......@@ -289,6 +292,7 @@ scheme_OBJS = compfile.ostk \
srfi-66.ostk \
srfi-69.ostk \
srfi-70.ostk \
tar.ostk \
trace.ostk
DOCDB = DOCDB
......
/*
* p r i n t . c -- writing stuff
*
* Copyright 1993-2006 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright 1993-2007 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: ??-Oct-1993 ??:??
* Last file update: 24-Dec-2006 11:39 (eg)
* Last file update: 10-Jan-2007 11:09 (eg)
*
*/
#include <ctype.h>
......@@ -118,12 +118,12 @@ static void printstring(SCM s, SCM port, int mode)
case '\v' : *buff++ = '\\'; *buff++ = 'v'; break;
case '"' :
case '\\' : *buff++ = '\\'; *buff++ = *p; break;
default : if ((unsigned char) *p < (unsigned char) ' ') {
/* Non printable character (This work only for ASCII!!) */
default : if ((((unsigned char) *p) & 0177) < (unsigned char) ' ') {
/* Non printable character (It works only for ISO 8859-x !!) */
*buff++ = '\\';
*buff++ = 'x';
*buff++ = printhexa(*p / 16);
*buff++ = printhexa(*p % 16);
*buff++ = printhexa((unsigned char) *p / 16);
*buff++ = printhexa((unsigned char) *p % 16);
}
else *buff++ = *p;
}
......
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 1-Mar-2000 19:51 (eg)
* Last file update: 5-Jan-2007 00:49 (eg)
* Last file update: 8-Jan-2007 23:21 (eg)
*/
// INLINER values
......@@ -355,36 +355,36 @@ static void verif_environment(vm_thread_t *vm)
{
SCM *lfp, *env;
STk_debug("<<<<<<VVVVVVVV<<<<");
//STk_debug("<<<<<<VVVVVVVV<<<<");
for (lfp = vm->fp; lfp; lfp = ACT_SAVE_FP(lfp)) {
SCM self = (SCM) (ACT_SAVE_PROC(lfp));
STk_debug("self = ~S", self);
//STk_debug("self = ~S", self);
if (!self || !ACT_SAVE_ENV(lfp)) break;
STk_debug("++++ %d", ACT_SAVE_ENV(lfp));
//STk_debug("++++ %d", ACT_SAVE_ENV(lfp));
for (env = ACT_SAVE_ENV(lfp); FRAMEP(env); env = FRAME_NEXT(env)){
STk_debug(" On a l'environment ~S (%d)", (SCM) env,
IS_IN_STACKP(env));
//STk_debug(" On a l'environment ~S (%d)", (SCM) env,
//IS_IN_STACKP(env));
}
STk_debug("---");
//STk_debug("---");
}
STk_debug(">>>VVV>>>>>>>");
//STk_debug(">>>VVV>>>>>>>");
}
static void patch_environment(vm_thread_t *vm)
{
SCM *lfp;
STk_debug("<<<<<<<<<<");
//STk_debug("<<<<<<<<<<");
for (lfp = vm->fp; lfp; lfp = ACT_SAVE_FP(lfp)) {
if (!ACT_SAVE_ENV(lfp)) break;
STk_debug("++++ %d", ACT_SAVE_ENV(lfp));
//STk_debug("++++ %d", ACT_SAVE_ENV(lfp));
ACT_SAVE_ENV(lfp) = clone_env(ACT_SAVE_ENV(lfp), vm);
STk_debug("---");
//STk_debug("---");
}
STk_debug(">>>>>>>>>>");
//STk_debug(">>>>>>>>>>");
verif_environment(vm);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment