diff options
| author | Dan McDonald <danmcd@joyent.com> | 2021-09-14 15:02:42 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2021-09-14 15:02:42 -0400 |
| commit | caaf2987c0b8bb928665a6ccd3c09c7e82193680 (patch) | |
| tree | 5265735a92c0eb0f9fde8c61d56d90c10aa4c75e /usr/src/lib/libcurses | |
| parent | fa0cabfa65b2cc9b196e9b9bb396ebb2ac90b283 (diff) | |
| parent | d9c3e05c2d8261e3f133b5e96a300b4fa6c0f1b7 (diff) | |
| download | illumos-joyent-caaf2987c0b8bb928665a6ccd3c09c7e82193680.tar.gz | |
[illumos-gate merge]
commit d9c3e05c2d8261e3f133b5e96a300b4fa6c0f1b7
13975 support for higher baud rates
commit 60414d478553487f99278a4302d1116e73d5f6dc
12791 rpcgen: if main is not provided, _svcstate_lock should be extern
Diffstat (limited to 'usr/src/lib/libcurses')
| -rw-r--r-- | usr/src/lib/libcurses/screen/delay.c | 45 | ||||
| -rw-r--r-- | usr/src/lib/libcurses/screen/newscreen.c | 12 |
2 files changed, 41 insertions, 16 deletions
diff --git a/usr/src/lib/libcurses/screen/delay.c b/usr/src/lib/libcurses/screen/delay.c index fe570b9148..8e1de3e4cf 100644 --- a/usr/src/lib/libcurses/screen/delay.c +++ b/usr/src/lib/libcurses/screen/delay.c @@ -47,17 +47,40 @@ * character for each speed as returned by gtty. Thus since 300 * baud returns a 7, there are 33.3 milliseconds per char at 300 baud. */ -static short tmspc10[] = - { - /* 0 50 75 110 134.5 150 200 300 baud */ - 0, 2000, 1333, 909, 743, 666, 500, 333, - /* 600 1200 1800 2400 4800 9600 19200 38400 baud */ - 166, 83, 55, 41, 20, 10, 5, 2, - /* 57600, 76800, 115200, 153600, 230400, 307200 baud */ - 2, 1, 1, 1, 1, 1, - /* 460800, 921600 baud */ - 1, 1 - }; +static short tmspc10[] = { + 0, /* 0 baud */ + 2000, /* 50 baud */ + 1333, /* 75 baud */ + 909, /* 110 baud */ + 743, /* 134 baud */ + 666, /* 150 baud */ + 500, /* 200 baud */ + 333, /* 300 baud */ + 166, /* 600 baud */ + 83, /* 1200 baud */ + 55, /* 1800 baud */ + 41, /* 2400 baud */ + 20, /* 4800 baud */ + 10, /* 9600 baud */ + 5, /* 19200 baud */ + 2, /* 38400 baud */ + 2, /* 57600 baud */ + 1, /* 76800 baud */ + 1, /* 115200 baud */ + 1, /* 153600 baud */ + 1, /* 230400 baud */ + 1, /* 307200 baud */ + 1, /* 460800 baud */ + 1, /* 921600 baud */ + 1, /* 1000000 baud */ + 1, /* 1152000 baud */ + 1, /* 1500000 baud */ + 1, /* 2000000 baud */ + 1, /* 2500000 baud */ + 1, /* 3000000 baud */ + 1, /* 3500000 baud */ + 1, /* 4000000 baud */ +}; /* * Insert a delay into the output stream for "delay/10" milliseconds. diff --git a/usr/src/lib/libcurses/screen/newscreen.c b/usr/src/lib/libcurses/screen/newscreen.c index ea5ec923c0..129395a4b5 100644 --- a/usr/src/lib/libcurses/screen/newscreen.c +++ b/usr/src/lib/libcurses/screen/newscreen.c @@ -50,11 +50,13 @@ extern char _endwin; #endif /* _VR2_COMPAT_CODE */ /* 1200 is put at the 0th location since 0 is probably a mistake. */ -static long baud_convert[] = { - 1200, 50, 75, 110, 135, 150, 200, 300, 600, 1200, - 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, - 115200, 153600, 230400, 307200, 460800, 921600 - }; +static long baud_convert[] = { + 1200, 50, 75, 110, 134, 150, 200, 300, 600, 1200, + 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, + 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, + 3000000, 3500000, 4000000 +}; static char isfilter = 0; static int _chk_trm(void); |
