mirror of
https://github.com/dvorka/hstr.git
synced 2025-02-24 23:08:36 +08:00
Fixing compile time warnings and errors @ Ubuntu.
This commit is contained in:
parent
e29fa38190
commit
bd72ff87b2
4 changed files with 17 additions and 12 deletions
8
dist/ubuntu-env.sh
vendored
8
dist/ubuntu-env.sh
vendored
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
export HHVERSION="1.8.11"
|
||||
export HHVERSION="1.9.1"
|
||||
export HHFULLVERSION=${HHVERSION}-0ubuntu1
|
||||
export HH=hh_${HHVERSION}
|
||||
export HHRELEASE=hh_${HHFULLVERSION}
|
||||
|
@ -9,12 +9,12 @@ export NOW=`date +%Y-%m-%d--%H-%M-%S`
|
|||
export HHBUILD=hstr-${NOW}
|
||||
|
||||
## https://wiki.ubuntu.com/Releases
|
||||
#export UBUNTUVERSION=precise
|
||||
export UBUNTUVERSION=precise
|
||||
#export UBUNTUVERSION=quantal
|
||||
#export UBUNTUVERSION=saucy
|
||||
export UBUNTUVERSION=trusty
|
||||
#export UBUNTUVERSION=trusty
|
||||
|
||||
export HHBZRMSG="Fixed escape sequence rendering from the history."
|
||||
export HHBZRMSG="Favorites - favorite commands can be bookmarked and shown in a new view!"
|
||||
|
||||
# - user email must be the same as in gpg i.e. (Dvorka) must present
|
||||
# - hh_ must be with underscore (dh_make enforced)
|
||||
|
|
|
@ -5,10 +5,11 @@ AM_LDFLAGS =
|
|||
# bin_ installs to bin; hh_ is the binary name
|
||||
bin_PROGRAMS = hh
|
||||
|
||||
hh_SOURCES = \
|
||||
hh_SOURCES = \
|
||||
hashset.c include/hashset.h \
|
||||
hstr_curses.c include/hstr_curses.h \
|
||||
hstr_history.c include/hstr_history.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 \
|
||||
radixsort.c include/radixsort.h \
|
||||
hstr.c
|
||||
|
|
13
src/hstr.c
13
src/hstr.c
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "include/hashset.h"
|
||||
#include "include/hstr_curses.h"
|
||||
#include "include/hstr_favorites.h"
|
||||
#include "include/hstr_history.h"
|
||||
#include "include/hstr_utils.h"
|
||||
|
||||
|
@ -291,10 +292,6 @@ unsigned make_selection(char *prefix, HistoryItems *history, int maxSelectionCou
|
|||
unsigned count;
|
||||
|
||||
switch(historyView) {
|
||||
case HH_VIEW_RANKING:
|
||||
source=history->items;
|
||||
count=history->count;
|
||||
break;
|
||||
case HH_VIEW_HISTORY:
|
||||
source=history->raw;
|
||||
count=history->rawCount;
|
||||
|
@ -303,6 +300,11 @@ unsigned make_selection(char *prefix, HistoryItems *history, int maxSelectionCou
|
|||
source=history->favorites->items;
|
||||
count=history->favorites->count;
|
||||
break;
|
||||
case HH_VIEW_RANKING:
|
||||
default:
|
||||
source=history->items;
|
||||
count=history->count;
|
||||
break;
|
||||
}
|
||||
|
||||
for(i=0; i<count && selectionCount<maxSelectionCount; i++) {
|
||||
|
@ -547,7 +549,8 @@ void loop_to_select(HistoryItems *history)
|
|||
selectionCursorPosition=0;
|
||||
break;
|
||||
case K_CTRL_SLASH:
|
||||
historyView=(++historyView)%3;
|
||||
historyView++;
|
||||
historyView=historyView%3;
|
||||
result=print_selection(maxHistoryItems, pattern, history);
|
||||
print_history_label(history);
|
||||
selectionCursorPosition=0;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <readline/history.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "hstr_favorites.h"
|
||||
#include "hstr_utils.h"
|
||||
#include "hashset.h"
|
||||
|
|
Loading…
Reference in a new issue