mirror of
https://github.com/dvorka/hstr.git
synced 2024-12-28 18:50:54 +08:00
Rewriting configure config to new notation + making source compilable w/o warnings.
This commit is contained in:
parent
ba5a9c822f
commit
10fca39f4a
2 changed files with 12 additions and 11 deletions
21
configure.ac
21
configure.ac
|
@ -1,4 +1,4 @@
|
|||
# -*- Autoconf -*-
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
|
||||
|
@ -18,16 +18,17 @@ AC_PROG_CC
|
|||
|
||||
# Mac-specific ncurses check
|
||||
AC_CANONICAL_HOST
|
||||
case $host_os in
|
||||
darwin*)
|
||||
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
|
||||
AC_CHECK_HEADER(curses.h)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
|
||||
AS_CASE([$host_os],
|
||||
[darwin*],
|
||||
[
|
||||
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
|
||||
AC_CHECK_HEADER(curses.h)
|
||||
],
|
||||
[
|
||||
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
|
||||
AC_CHECK_HEADER(ncursesw/curses.h)
|
||||
;;
|
||||
esac
|
||||
]
|
||||
)
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])])
|
||||
|
|
|
@ -760,7 +760,7 @@ int remove_from_history_model(char *delete, Hstr *hstr)
|
|||
return favorites_remove(hstr->favorites, delete);
|
||||
} else {
|
||||
// raw & ranked history is pruned first as its items point to system history lines
|
||||
int systemOccurences, rawOccurences=history_mgmt_remove_from_raw(delete, hstr->history);
|
||||
int systemOccurences=0, rawOccurences=history_mgmt_remove_from_raw(delete, hstr->history);
|
||||
history_mgmt_remove_from_ranked(delete, hstr->history);
|
||||
if(rawOccurences) {
|
||||
systemOccurences=history_mgmt_remove_from_system_history(delete);
|
||||
|
|
Loading…
Reference in a new issue