Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Feb 3, 2022
1 parent 54d6f17 commit f6f15cd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
39 changes: 19 additions & 20 deletions src/net/freertr/user/userScreen.java
Expand Up @@ -186,14 +186,10 @@ public userScreen(pipeSide p) {
* get one key
*
* @param pipe pipeline to use
* @return key readed
* @return key readed, -1 on error
*/
public static int getKey(pipeSide pipe) {
byte[] buf = new byte[1];
if (pipe.blockingGet(buf, 0, buf.length) != buf.length) {
return -1;
}
int i = buf[0] & 0xff;
int i = readChr(pipe);
switch (i) {
case 127: // delete
return 0x8003;
Expand Down Expand Up @@ -238,10 +234,7 @@ public static int getKey(pipeSide pipe) {
default: // any key
return i;
}
if (pipe.blockingGet(buf, 0, buf.length) != buf.length) {
return -1;
}
i = buf[0] & 0xff;
i = readChr(pipe);
switch (i) {
case 8: // backspace
return 0x8403;
Expand Down Expand Up @@ -287,13 +280,10 @@ public static int getKey(pipeSide pipe) {
default: // any key
return i | 0x0400;
}
String s = new String(buf);
String s = "" + (char) i;
for (;;) {
if (pipe.blockingGet(buf, 0, buf.length) != buf.length) {
return -1;
}
i = buf[0] & 0xff;
boolean need2stop = false;
i = readChr(pipe);
boolean need2stop = i < 0;
switch (i) {
case 0x30:
case 0x31:
Expand All @@ -317,10 +307,7 @@ public static int getKey(pipeSide pipe) {
if (need2stop) {
break;
}
s += new String(buf);
}
if (debugger.userScreenEvnt) {
logger.debug("got " + s + (char) i + " from client");
s += "" + (char) i;
}
int ctr = s.indexOf(";");
if (ctr < 0) {
Expand Down Expand Up @@ -520,6 +507,18 @@ private void sendChr(int ch) {
remX++;
}

private static int readChr(pipeSide pipe) {
byte[] buf = new byte[1];
if (pipe.blockingGet(buf, 0, buf.length) != buf.length) {
return -1;
}
int i = buf[0] & 0xff;
if (debugger.userScreenEvnt) {
logger.debug("got " + i + " from client");
}
return i;
}

/**
* refresh terminal
*/
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v22.2.3-cur, done by cs@nop.
-;-;-;2022-02-03 10:07:20, took 00:06:52, with 100 workers, on 2654 cases, 0 failed, 0 traces, 1 retries
-;-;-;2022-02-03 10:16:34, took 00:07:12, with 100 workers, on 2654 cases, 0 failed, 0 traces, 2 retries
-;-;-;./rtr.bin
http://sources.nop.hu/cfg/basic.tst;basic.tst;success;dummy test
http://sources.nop.hu/cfg/conn-amt01.tst;conn-amt01.tst;success;amt over ipv4
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Expand Up @@ -11,7 +11,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v22.2.3-cur, done by cs@nop.<br/>
tested: 2022-02-03 10:07:20, took 00:06:52, with 100 workers, on 2654 cases, 0 failed, 0 traces, 1 retries<br/>
tested: 2022-02-03 10:16:34, took 00:07:12, with 100 workers, on 2654 cases, 0 failed, 0 traces, 2 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit f6f15cd

Please sign in to comment.