src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2016, the original author or authors. |
2 * Copyright (c) 2002-2019, the original author or authors. |
3 * |
3 * |
4 * This software is distributable under the BSD license. See the terms of the |
4 * This software is distributable under the BSD license. See the terms of the |
5 * BSD license in the documentation provided with this software. |
5 * BSD license in the documentation provided with this software. |
6 * |
6 * |
7 * http://www.opensource.org/licenses/bsd-license.php |
7 * http://www.opensource.org/licenses/bsd-license.php |
138 String undef = System.getProperty("os.name").toLowerCase().startsWith("hp") ? "^-" : "undef"; |
138 String undef = System.getProperty("os.name").toLowerCase().startsWith("hp") ? "^-" : "undef"; |
139 for (ControlChar cchar : ControlChar.values()) { |
139 for (ControlChar cchar : ControlChar.values()) { |
140 if (attr.getControlChar(cchar) != current.getControlChar(cchar)) { |
140 if (attr.getControlChar(cchar) != current.getControlChar(cchar)) { |
141 String str = ""; |
141 String str = ""; |
142 int v = attr.getControlChar(cchar); |
142 int v = attr.getControlChar(cchar); |
|
143 if (v == -1) { // Skip if ControlChar is <UNDEF> |
|
144 continue; |
|
145 } |
143 commands.add(cchar.name().toLowerCase().substring(1)); |
146 commands.add(cchar.name().toLowerCase().substring(1)); |
144 if (cchar == ControlChar.VMIN || cchar == ControlChar.VTIME) { |
147 if (cchar == ControlChar.VMIN || cchar == ControlChar.VTIME) { |
145 commands.add(Integer.toBinaryString(v)); |
148 commands.add(Integer.toBinaryString(v)); |
146 } |
149 } |
147 else if (v == 0) { |
150 else if (v == 0) { |