scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit ebdb4f888f8180ff7f937b9270cb003cb61bab7b
parent 383358717731b29f0cbafc1f31d87fb79c1e7918
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Apr 2014 15:46:56 +0200

Set unbuffered io

This program is going to be tested usinga pipe with other program,
and they will run interactivaly, so it is a good idea don't
flush anything.

Diffstat:
Mmain.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -1,6 +1,7 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> #include "cc.h" @@ -12,6 +13,8 @@ struct user_opt options; int main(int argc, char *argv[]) { + setvbuf(stdin, NULL, _IONBF, 0); + setvbuf(stdout, NULL, _IONBF, 0); init_keywords(); init_expr(); open_file(NULL);