Skip to content

Why is it made to read one character from each line? #86

Description

@shranet

brainfuck/src/brainfuck.c

Lines 565 to 570 in 71c0e0c

char brainfuck_getchar() {
char ch, t;
ch = getchar();
while ((t = getchar()) != '\n' && t != EOF) { } /* Clear stdin */
return ch;
}

If we trust this repository, it's not like that in the original.
https://gist.github.com/rdebath/0ca09ec0fdcf3f82478f#file-bfi-c-L19

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions