Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issues with swap command and character input #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Nov 26, 2021

  1. Fixed the swap command.

    anthonykozar committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    4384244 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Only use termios if stdin is a tty. This fixes an exception that occu…

    …rs when piping or redirecting input to the interpreter.
    anthonykozar committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    61f0b7d View commit details
    Browse the repository at this point in the history
  2. Moved solution in last commit from getch.py to gaot_plus_plus.py.

    Reverted changes to getch.py. Only use getch() if stdin is a tty. This fixes an exception that occurs when piping or redirecting input to the interpreter. gaot_plus_plus.py seems like a better place to put this logic since the purpose of the getch module is to provide unbuffered input from a terminal.
    
    There is a small difference in the behavior of these two solutions when running a simple "cat" program with stdin redirected from a file. The former stops reading from the input file if an EOF byte (0x04) is encountered. The new solution stops reading if a null byte (0x00) is encountered. I don't think there is a solution for copying arbitrary binary files since Gaot++ doesn't provide a way to detect the true end of a file. (If stdin is a tty, then control-D still causes the cat program to exit).
    anthonykozar committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    dd641c7 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2021

  1. Configuration menu
    Copy the full SHA
    7d510e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22bef7e View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. Configuration menu
    Copy the full SHA
    ad20eb1 View commit details
    Browse the repository at this point in the history