Rewriting configure config to new notation + making source compilable w/o warnings.

This commit is contained in:
Martin Dvorak 2015-02-24 21:47:25 +01:00
parent ba5a9c822f
commit 10fca39f4a
2 changed files with 12 additions and 11 deletions

View file

@ -1,4 +1,4 @@
# -*- Autoconf -*- #
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
# #
@ -18,16 +18,17 @@ AC_PROG_CC
# Mac-specific ncurses check # Mac-specific ncurses check
AC_CANONICAL_HOST AC_CANONICAL_HOST
case $host_os in AS_CASE([$host_os],
darwin*) [darwin*],
[
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])]) AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
AC_CHECK_HEADER(curses.h) AC_CHECK_HEADER(curses.h)
;; ],
*) [
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])]) AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
AC_CHECK_HEADER(ncursesw/curses.h) AC_CHECK_HEADER(ncursesw/curses.h)
;; ]
esac )
# Checks for libraries. # Checks for libraries.
AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])]) AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])])

View file

@ -760,7 +760,7 @@ int remove_from_history_model(char *delete, Hstr *hstr)
return favorites_remove(hstr->favorites, delete); return favorites_remove(hstr->favorites, delete);
} else { } else {
// raw & ranked history is pruned first as its items point to system history lines // 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); history_mgmt_remove_from_ranked(delete, hstr->history);
if(rawOccurences) { if(rawOccurences) {
systemOccurences=history_mgmt_remove_from_system_history(delete); systemOccurences=history_mgmt_remove_from_system_history(delete);