diff options
| -rw-r--r-- | CMakeLists.txt | 10 | ||||
| m--------- | liberty | 0 | ||||
| -rw-r--r-- | nncmpp.c | 16 | ||||
| m--------- | termo | 0 | 
4 files changed, 11 insertions, 15 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 -Subproject 1a76b2032e6d18d9f95d9d0bb98edc26023c861 +Subproject e029aae1d3d1884ca868c3694bdec0456b3e826 @@ -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 -Subproject 30e0eee1a82df265642cff6d57452ff660f0f2c +Subproject 8c4e867760eb20e3cdf997a301c8f8672c01e38 | 
