Skip to content
Snippets Groups Projects
Commit 8fa65369 authored by deuce's avatar deuce
Browse files

Use POSIX standard method for retrieving speed, not BSD-specific.

parent 0542be0d
No related branches found
No related tags found
No related merge requests found
...@@ -2223,9 +2223,12 @@ malloc_error: ...@@ -2223,9 +2223,12 @@ malloc_error:
gethostname(od_control.system_name,sizeof(od_control.system_name)); gethostname(od_control.system_name,sizeof(od_control.system_name));
od_control.system_name[sizeof(od_control.system_name)-1]=0; od_control.system_name[sizeof(od_control.system_name)-1]=0;
if (isatty(fileno(stdin))) { if (isatty(fileno(stdin))) {
tcgetattr(fileno(stdin),&term); tcgetattr(fileno(stdin),&term);
od_control.baud=term.c_ispeed; od_control.baud=cfgetispeed(&term);
od_control.baud=term.c_ospeed; if(!od_control.baud)
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
od_control.baud=300;
} }
uinfo=getpwuid(getuid()); uinfo=getpwuid(getuid());
ODStringCopy(od_control.user_handle, uinfo->pw_name,sizeof(od_control.user_handle)); ODStringCopy(od_control.user_handle, uinfo->pw_name,sizeof(od_control.user_handle));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment