Skip to content

Commit

Permalink
console, noncanonical: adjust print messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroAntunes178 committed Dec 4, 2023
1 parent c138ecf commit 6d92418
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
17 changes: 5 additions & 12 deletions submodules/LIB/scripts/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,27 +301,20 @@ def main():
else:
tb_write(ACK)
elif byte == EOT:
print(PROGNAME, end="")
print(": exiting...")
print(f"{PROGNAME}: exiting...")
clean_exit()
elif byte == FTX:
print(PROGNAME, end="")
print(": got file receive request")
print(f"{PROGNAME}: got file receive request")
cnsl_recvfile()
elif byte == FRX:
print(PROGNAME, end="")
print(": got file send request")
print(f"{PROGNAME}: got file send request")
cnsl_sendfile()
elif byte == DC1:
print(PROGNAME, end="")
print(": received request to disable iob-soc exclusive message identifiers")
print(f"{PROGNAME}: disabling IOB-SOC exclusive identifiers")
endFileTransfer()
print(PROGNAME, end="")
print(": activating terminal non-canonical mode.")
script_arguments = ["python", "../../scripts/noncanonical.py"]
subprocess.run(script_arguments)
print(PROGNAME, end="")
print(": start reading user input")
print(f"{PROGNAME}: start reading user input")
input_thread.start()
else:
print(str(byte, "iso-8859-1"), end="", flush=True)
Expand Down
4 changes: 3 additions & 1 deletion submodules/LIB/scripts/noncanonical.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import sys
import termios

PROGNAME: str = "IOb-Non-Canonical"

stdin = sys.stdin
fd = stdin.fileno()

Expand All @@ -12,4 +14,4 @@
new[3] &= ~termios.ICANON

termios.tcsetattr(fd, termios.TCSAFLUSH, new)
print()
print(f"{PROGNAME}: activating terminal non-canonical mode")

0 comments on commit 6d92418

Please sign in to comment.