From d89edeac62aed00576e6e961222e882310455d5b Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Sat, 5 Apr 2008 07:27:24 +0000 Subject: [PATCH] [ 1933141 ] Don't add duplicate history lines (U.Bonnes) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1155 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 1 + jtag/src/jtag.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 82c7fcb0..4e4f24fe 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,6 +1,7 @@ 2008-04-09 Kolja Waschk * src/tap/cable/usbblaster.c: [ 1934843 ] Fix for USBBLASTER (U.Bonnes) + * src/jtag.c: [ 1933141 ] Don't add duplicate history lines (U.Bonnes) 2008-04-03 Kolja Waschk diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index 182901d8..656799cd 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -193,8 +193,8 @@ jtag_readline_loop( chain_t *chain, const char *prompt ) } #ifdef HAVE_READLINE_HISTORY - /* Check if we actually got something */ - if (strlen( line )) + /* Check if we actually got something , Don't add duplicate lines*/ + if (strlen( line ) &&( !history_length ||strcmp(line,history_get(history_length)->line))) add_history( line ); #endif }