From 525e952753cc218a2be15438689d8ed2f5d97b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 10 Oct 2020 21:31:31 +0200 Subject: Bump liberty and termo --- CMakeLists.txt | 10 +++++----- liberty | 2 +- nncmpp.c | 16 ++++++---------- termo | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76ca00d..b6cd6d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,13 +47,13 @@ else (USE_SYSTEM_TERMO) set (Termo_LIBRARIES termo-static) endif (USE_SYSTEM_TERMO) -include_directories (${UNISTRING_INCLUDE_DIRS} - ${NCURSESW_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS}) +include_directories (${Unistring_INCLUDE_DIRS} + ${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS}) link_directories (${curl_LIBRARY_DIRS}) # Configuration include (CheckFunctionExists) -set (CMAKE_REQUIRED_LIBRARIES ${NCURSESW_LIBRARIES}) +set (CMAKE_REQUIRED_LIBRARIES ${Ncursesw_LIBRARIES}) CHECK_FUNCTION_EXISTS ("resizeterm" HAVE_RESIZETERM) # Generate a configuration file @@ -63,8 +63,8 @@ include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) # Build the main executable and link it add_executable (${PROJECT_NAME} ${PROJECT_NAME}.c) -target_link_libraries (${PROJECT_NAME} ${UNISTRING_LIBRARIES} - ${NCURSESW_LIBRARIES} termo-static ${curl_LIBRARIES}) +target_link_libraries (${PROJECT_NAME} ${Unistring_LIBRARIES} + ${Ncursesw_LIBRARIES} termo-static ${curl_LIBRARIES}) add_threads (${PROJECT_NAME}) # Installation diff --git a/liberty b/liberty index 1a76b20..e029aae 160000 --- a/liberty +++ b/liberty @@ -1 +1 @@ -Subproject commit 1a76b2032e6d18d9f95d9d0bb98edc26023c8618 +Subproject commit e029aae1d3d1884ca868c3694bdec0456b3e8267 diff --git a/nncmpp.c b/nncmpp.c index 0c95fef..cf616a8 100644 --- a/nncmpp.c +++ b/nncmpp.c @@ -174,7 +174,7 @@ print_curl_debug (CURL *easy, curl_infotype type, char *data, size_t len, for (size_t i = 0; i < len; i++) { uint8_t c = data[i]; - copy[i] = c >= 32 || c == '\n' ? c : '.'; + copy[i] = !iscntrl_ascii (c) || c == '\n' ? c : '.'; } copy[len] = '\0'; @@ -2520,8 +2520,7 @@ library_tab_change_level (const char *new_path) str_reset (path); str_append (path, new_path); - free (g_library_tab.super.header); - g_library_tab.super.header = NULL; + cstr_set (&g_library_tab.super.header, NULL); g_library_tab.super.item_mark = -1; if (path->len) @@ -2719,8 +2718,7 @@ library_tab_on_action (enum action action) free (fake_subdir); } - free (tab->header); - tab->header = xstrdup_printf ("Global search"); + cstr_set (&tab->header, xstrdup_printf ("Global search")); g_library_tab.searching = true; // Since we've already changed the header, empty the list, @@ -2876,7 +2874,7 @@ streams_tab_extract_links (struct str *data, const char *content_type, for (size_t i = 0; i < data->len; i++) { uint8_t c = data->str[i]; - if ((c < 32) & (c != '\t') & (c != '\r') & (c != '\n')) + if (iscntrl_ascii (c) & (c != '\t') & (c != '\r') & (c != '\n')) return false; } @@ -3860,8 +3858,7 @@ app_on_message_timer (void *user_data) { (void) user_data; - free (g.message); - g.message = NULL; + cstr_set (&g.message, NULL); app_invalidate (); } @@ -3889,8 +3886,7 @@ app_log_handler (void *user_data, const char *quote, const char *fmt, user_data == NULL ? 0 : g.attrs[(intptr_t) user_data].attrs); else { - free (g.message); - g.message = xstrdup (message.str); + cstr_set (&g.message, xstrdup (message.str)); app_invalidate (); poller_timer_set (&g.message_timer, 5000); } diff --git a/termo b/termo index 30e0eee..8c4e867 160000 --- a/termo +++ b/termo @@ -1 +1 @@ -Subproject commit 30e0eee1a82df265642cff6d57452ff660f0f2c9 +Subproject commit 8c4e867760eb20e3cdf997a301c8f8672c01e380 -- cgit v1.2.3