From 075be33059a5adb3c242faca9fc93d0e874c70e2 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 27 Aug 2006 15:49:37 +0000 Subject: [PATCH] Change representation of characters in PSB files to account for unicode. --- v7/src/microcode/bintopsb.c | 8 +++++--- v7/src/microcode/psbtobin.c | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/v7/src/microcode/bintopsb.c b/v7/src/microcode/bintopsb.c index 286ab02ef..b3c29684b 100644 --- a/v7/src/microcode/bintopsb.c +++ b/v7/src/microcode/bintopsb.c @@ -1,8 +1,10 @@ /* -*-C-*- -$Id: bintopsb.c,v 9.76 2003/02/14 18:28:15 cph Exp $ +$Id: bintopsb.c,v 9.77 2006/08/27 15:49:30 cph Exp $ -Copyright (c) 1987-2001 Massachusetts Institute of Technology +Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology +Copyright 1992,1993,1994,1997,1998,2000 Massachusetts Institute of Technology +Copyright 2001,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -1556,7 +1558,7 @@ DEFUN (print_binary_objects, (from, count), break; case TC_CHARACTER: - fprintf (portable_file, "%02x %03x\n", + fprintf (portable_file, "%02x %06x\n", TC_CHARACTER, ((*from) & MASK_MIT_ASCII)); from += 1; break; diff --git a/v7/src/microcode/psbtobin.c b/v7/src/microcode/psbtobin.c index 3e28a2dd7..735f8c8ee 100644 --- a/v7/src/microcode/psbtobin.c +++ b/v7/src/microcode/psbtobin.c @@ -1,8 +1,9 @@ /* -*-C-*- -$Id: psbtobin.c,v 9.61 2003/02/14 18:28:23 cph Exp $ +$Id: psbtobin.c,v 9.62 2006/08/27 15:49:37 cph Exp $ -Copyright (c) 1987-2001 Massachusetts Institute of Technology +Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology +Copyright 1992,1993,1994,2000,2001,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -598,11 +599,11 @@ DEFUN (Read_External, (N, Table, To), case TC_CHARACTER: { - long the_char_code; + unsigned long the_char_code; getc (portable_file); /* Space */ VMS_BUG (the_char_code = 0); - fscanf (portable_file, "%3lx", &the_char_code); + fscanf (portable_file, "%6lx", &the_char_code); *Table++ = (MAKE_OBJECT (TC_CHARACTER, the_char_code)); continue; } @@ -659,9 +660,8 @@ DEFUN (print_external_objects, (area_name, Table, N), } case TC_CHARACTER: fprintf (stderr, - "Table[%6d] = Character %c = 0x%02x\n", + "Table[%6d] = Character 0x%06x\n", (N - (Table_End - Table)), - (OBJECT_DATUM (*Table)), (OBJECT_DATUM (*Table))); break; -- 2.25.1