Skip to content

Commit

Permalink
Add sensible default attributes to the LineDisciplineTerminal
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 3, 2017
1 parent 4e801d8 commit 62f5389
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@
*/
public class LineDisciplineTerminal extends AbstractTerminal {

private static final String DEFAULT_TERMINAL_ATTRIBUTES =
"speed 9600 baud; 24 rows; 80 columns;\n" +
"lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl\n" +
"\t-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo\n" +
"\t-extproc\n" +
"iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8\n" +
"\t-ignbrk brkint -inpck -ignpar -parmrk\n" +
"oflags: opost onlcr -oxtabs -onocr -onlret\n" +
"cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow\n" +
"\t-dtrflow -mdmbuf\n" +
"cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;\n" +
"\teol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;\n" +
"\tmin = 1; quit = ^\\; reprint = ^R; start = ^Q; status = ^T;\n" +
"\tstop = ^S; susp = ^Z; time = 0; werase = ^W;\n";

private static final int PIPE_SIZE = 1024;

/*
Expand Down Expand Up @@ -96,7 +111,7 @@ public LineDisciplineTerminal(String name,
this.slaveOutput = new FilteringOutputStream();
this.slaveWriter = new PrintWriter(new OutputStreamWriter(slaveOutput, encoding));
this.masterOutput = masterOutput;
this.attributes = new Attributes();
this.attributes = ExecPty.doGetAttr(DEFAULT_TERMINAL_ATTRIBUTES);
this.size = new Size(160, 50);
parseInfoCmp();
}
Expand Down

0 comments on commit 62f5389

Please sign in to comment.