Difference in terminals in reading inputs from keyboard in C

General questions regarding the usage of CodeLite
valenz
CodeLite Curious
Posts: 4
Joined: Sat Nov 05, 2016 7:46 pm
Genuine User: Yes
IDE Question: C++
Contact:

Difference in terminals in reading inputs from keyboard in C

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Difference in terminals in reading inputs from keyboard

Post 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
Make sure you have read the HOW TO POST thread
valenz
CodeLite Curious
Posts: 4
Joined: Sat Nov 05, 2016 7:46 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Difference in terminals in reading inputs from keyboard

Post by valenz »

That's what I figured.
Thanks, we can close here.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Difference in terminals in reading inputs from keyboard

Post by eranif »

this bug is now closed in git master
Make sure you have read the HOW TO POST thread
Post Reply