[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Conver newline correctly for Win platform
|
2002-10-24 Alain Magloire
* src/.../core/output/MIConst.java (isoC): Change to return
a string instead '\n' is platform dependent and has to be
translate to "\r\n" for SWT widgets to work correctly on windows.
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.18
diff -u -r1.18 ChangeLog
--- ChangeLog 24 Oct 2002 02:43:27 -0000 1.18
+++ ChangeLog 24 Oct 2002 13:43:13 -0000
@@ -1,3 +1,9 @@
+2002-10-24 Alain Magloire
+
+ * src/.../core/output/MIConst.java (isoC): Change to return
+ a string instead '\n' is platform dependent and has to be
+ translate to "\r\n" for SWT widgets to work correctly on windows.
+
2002-10-23 Alain Magloire
gdb/mi for program control command will fire a change state event:
Index: src/org/eclipse/cdt/debug/mi/core/output/MIConst.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIConst.java,v
retrieving revision 1.6
diff -u -r1.6 MIConst.java
--- src/org/eclipse/cdt/debug/mi/core/output/MIConst.java 8 Aug 2002 04:07:00 -0000 1.6
+++ src/org/eclipse/cdt/debug/mi/core/output/MIConst.java 24 Oct 2002 13:43:13 -0000
@@ -65,28 +65,29 @@
* 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;
}
}