[ 1901880 ] quit upon EOF

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1099 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent ad76ac32a0
commit cf5c40b075

@ -1,6 +1,7 @@
2008-02-24 Mike Frysinger <vapier>
* src/jtag.c: allow people to disable startup message (1901877)
* src/jtag.c: allow people to disable startup message (1901877),
quit upon EOF (1901880)
2008-02-25 Arnim Laeuger <arniml@users.sourceforge.net>

@ -238,9 +238,17 @@ jtag_readline_loop( const char *prompt )
/* Read a line from the terminal */
line = readline( prompt );
/* We got EOF, bail */
if (!line) {
line = strdup( "quit\n" );
puts( "quit" );
if (!line)
return;
}
#ifdef HAVE_READLINE_HISTORY
/* Check if we actually got something */
if (line && (strlen( line ) > 0))
if (strlen( line ))
add_history( line );
#endif
}

Loading…
Cancel
Save