From b8023947be54e7dbe32a70b83e550897594a1953 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Thu, 24 Oct 2002 13:44:05 +0000 Subject: [PATCH] change isoC to return a string. --- .../cdt/debug/mi/core/output/MIConst.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIConst.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIConst.java index 370c80fb211..bd167348c9c 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIConst.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIConst.java @@ -65,28 +65,29 @@ public class MIConst extends MIValue { * Assuming that the precedent character was the * escape sequence '\' */ - private static char isoC(char c) { + private static String isoC(char c) { + String s = new Character(c).toString(); if (c == '"') { - c = '"'; + s = "\""; } else if (c == '\'') { - c = '\''; + s = "\'"; } else if (c == '?') { - c = '?'; + s = "?"; } else if (c == 'a') { - c = 7; + s = "\007"; } else if (c == 'b') { - c = '\b'; + s = "\b"; } else if (c == 'f') { - c = '\f'; + s = "\f"; } else if (c == 'n') { - c = '\n'; + s = System.getProperty("line.separator", "\n"); } else if (c == 'r') { - c = '\r'; + s = "\r"; } else if (c == 't') { - c = '\t'; + s = "\t"; } else if (c == 'v') { - c = 11; + s = "\013"; } - return c; + return s; } }