Removing blacklist old dead code + fixing build for next version and blacklist.

This commit is contained in:
Martin Dvorak 2015-05-27 23:13:27 +02:00
parent 879c68541f
commit 9b6156a29d
4 changed files with 9 additions and 20 deletions

View file

@ -1,7 +1,7 @@
# Maintainer: Christian Wieden <wiedenchr at gmail dot com
# Contributer: Ricardo Band <me at xengi dot de>
pkgname=hh
pkgver=1.17
pkgver=1.18
pkgrel=1
pkgdesc="A command line utility that brings improved BASH command completion from the history. It aims to make completion easier and more efficient than Ctrl-r."
arch=('any')

View file

@ -4,7 +4,7 @@
AC_PREREQ([2.69])
AC_INIT(hh, 1.17, martin.dvorak@mindforger.com)
AC_INIT(hh, 1.18, martin.dvorak@mindforger.com)
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
# Checks for src dir existence.

View file

@ -5,12 +5,13 @@ AM_LDFLAGS =
# bin_ installs to bin; hh_ is the binary name
bin_PROGRAMS = hh
hh_SOURCES = \
hashset.c include/hashset.h \
hh_SOURCES = \
hashset.c include/hashset.h \
hstr_curses.c include/hstr_curses.h \
hstr_history.c include/hstr_history.h \
hstr_utils.c include/hstr_utils.h \
hstr_favorites.c include/hstr_favorites.h \
hstr_regexp.c include/hstr_regexp.h \
radixsort.c include/radixsort.h \
hstr_utils.c include/hstr_utils.h \
hstr_favorites.c include/hstr_favorites.h \
hstr_blacklist.c include/hstr_blacklist.h \
hstr_regexp.c include/hstr_regexp.h \
radixsort.c include/radixsort.h \
hstr.c

View file

@ -24,12 +24,6 @@ typedef struct {
static HistoryItems *prioritizedHistory;
static bool dirty;
// TODO to be externalized to a file .hh_blacklist; hh --blacklist to print default blacklist
//static const char *commandBlacklist[] = {
// "ls", "pwd", "cd", "cd ..", "hh", "mc",
// "ls ", "pwd ", "cd ", "cd .. ", "hh ", "mc "
//};
#ifdef DEBUG_RADIX
#define DEBUG_RADIXSORT() radixsort_stat(&rs, false); exit(0)
#else
@ -104,12 +98,6 @@ HistoryItems *get_prioritized_history(int optionBigKeys, HashSet *blacklist)
hashset_init(&rankmap);
int i;
// HashSet blacklist;
// hashset_init(&blacklist);
// int length=sizeof(commandBlacklist)/sizeof(commandBlacklist[0]);
// for(i=0; i<length; i++) {
// hashset_add(&blacklist, commandBlacklist[i]);
// }
RadixSorter rs;
unsigned radixMaxKeyEstimate=historyState->size*1000;
radixsort_init(&rs, (radixMaxKeyEstimate<100000?100000:radixMaxKeyEstimate));