Re: "Console" input to a GTK+ program
- From: furnace <furnace necroerotic org>
- To: gtk-app-devel-list gnome org
- Subject: Re: "Console" input to a GTK+ program
- Date: Wed, 5 Sep 2001 04:52:01 -0700
you might also want to use readline. heres an example,
#include <stdio.h>
#include <readline.h>
#include <history.h>
#include <curses.h>
/*
gcc -o readlineex readlineex.c -I/usr/include/readline -lreadline -lcurses
*/
int main()
{
char* prompt="here> ";
char* line;
while (1) {
line = readline(prompt);
printf("%s\n",line);
free(line);
}
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]