mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 06:10:30 +00:00
Add gcov option.
This commit is contained in:
parent
92f518cdf8
commit
5b017b017b
2 changed files with 11 additions and 2 deletions
|
@ -24,6 +24,15 @@ AC_USE_SYSTEM_EXTENSIONS
|
|||
AC_CHECK_HEADERS([i3/ipc.h],
|
||||
[i3_header=yes; break;])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Enable source code coverage reporting for GCC
|
||||
dnl ---------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(gcov,
|
||||
[ --enable-gcov Enable source code coverage testing using gcov],
|
||||
[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"])
|
||||
|
||||
##
|
||||
# Check dependencies
|
||||
##
|
||||
|
|
|
@ -113,7 +113,7 @@ static void delete_ssh ( const char *cmd )
|
|||
history_remove ( path, cmd );
|
||||
g_free ( path );
|
||||
}
|
||||
static int sort_func ( const void *a, const void *b )
|
||||
static int ssh_sort_func ( const void *a, const void *b )
|
||||
{
|
||||
const char *astr = *( const char * const * ) a;
|
||||
const char *bstr = *( const char * const * ) b;
|
||||
|
@ -190,7 +190,7 @@ static char ** get_ssh ( unsigned int *length )
|
|||
|
||||
// TODO: check this is still fast enough. (takes 1ms on laptop.)
|
||||
if ( ( *length ) > num_favorites ) {
|
||||
qsort ( &retv[num_favorites], ( *length ) - num_favorites, sizeof ( char* ), sort_func );
|
||||
qsort ( &retv[num_favorites], ( *length ) - num_favorites, sizeof ( char* ), ssh_sort_func );
|
||||
}
|
||||
g_free ( path );
|
||||
#ifdef TIMING
|
||||
|
|
Loading…
Reference in a new issue