mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05: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],
|
AC_CHECK_HEADERS([i3/ipc.h],
|
||||||
[i3_header=yes; break;])
|
[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
|
# Check dependencies
|
||||||
##
|
##
|
||||||
|
|
|
@ -113,7 +113,7 @@ static void delete_ssh ( const char *cmd )
|
||||||
history_remove ( path, cmd );
|
history_remove ( path, cmd );
|
||||||
g_free ( path );
|
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 *astr = *( const char * const * ) a;
|
||||||
const char *bstr = *( const char * const * ) b;
|
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.)
|
// TODO: check this is still fast enough. (takes 1ms on laptop.)
|
||||||
if ( ( *length ) > num_favorites ) {
|
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 );
|
g_free ( path );
|
||||||
#ifdef TIMING
|
#ifdef TIMING
|
||||||
|
|
Loading…
Add table
Reference in a new issue