"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "examples/rlptytest.c" between
readline-7.0-rc1.tar.gz and readline-7.0-rc2.tar.gz

About: GNU Readline library - get a line from a user with editing. Release candidate.

rlptytest.c  (readline-7.0-rc1):rlptytest.c  (readline-7.0-rc2)
skipping to change at line 51 skipping to change at line 51
sigint (s) sigint (s)
int s; int s;
{ {
tty_reset (STDIN_FILENO); tty_reset (STDIN_FILENO);
close (masterfd); close (masterfd);
close (slavefd); close (slavefd);
printf ("\n"); printf ("\n");
exit (0); exit (0);
} }
void
sigwinch (s)
int s;
{
rl_resize_terminal ();
}
static int static int
user_input() user_input()
{ {
int size; int size;
const int MAX = 1024; const int MAX = 1024;
char *buf = (char *)malloc(MAX+1); char *buf = (char *)malloc(MAX+1);
size = read (STDIN_FILENO, buf, MAX); size = read (STDIN_FILENO, buf, MAX);
if (size == -1) if (size == -1)
return -1; return -1;
skipping to change at line 319 skipping to change at line 326
{ {
int val; int val;
val = openpty (&masterfd, &slavefd, NULL, NULL, NULL); val = openpty (&masterfd, &slavefd, NULL, NULL, NULL);
if (val == -1) if (val == -1)
return -1; return -1;
val = tty_off_xon_xoff (masterfd); val = tty_off_xon_xoff (masterfd);
if (val == -1) if (val == -1)
return -1; return -1;
signal (SIGWINCH, sigwinch);
signal (SIGINT, sigint); signal (SIGINT, sigint);
val = init_readline (slavefd, slavefd); val = init_readline (slavefd, slavefd);
if (val == -1) if (val == -1)
return -1; return -1;
val = tty_cbreak (STDIN_FILENO); val = tty_cbreak (STDIN_FILENO);
if (val == -1) if (val == -1)
return -1; return -1;
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS