Page 1 of 1

Difference in terminals in reading inputs from keyboard in C

Posted: Sun Nov 27, 2016 8:39 pm
by valenz
I am not sure this is a codelite-related question, but I think it is..
Why does this C code work in the native mac Terminal and does not work in the Codelite built-in terminal?

Code: Select all

#include <stdio.h>
int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
}
To make it work in the built-in codelite terminal I have to provide the two inputs separating them by a space (i.e. "4 2") instead of typing "Enter" between the two.
In the native Mac Terminal it works as expected. I am on macOS Sierra and I am using Codelite 9.2.7.

Re: Difference in terminals in reading inputs from keyboard

Posted: Sun Nov 27, 2016 10:44 pm
by eranif
It is related. Looks like a bug in the terminal.
Once this https://github.com/eranif/codelite/issues/1485 is fixed, your problem will also be solved

Re: Difference in terminals in reading inputs from keyboard

Posted: Mon Nov 28, 2016 2:30 am
by valenz
That's what I figured.
Thanks, we can close here.

Re: Difference in terminals in reading inputs from keyboard

Posted: Mon Nov 28, 2016 8:47 am
by eranif
this bug is now closed in git master