1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Couple fixes for the top_time stuff.

This commit is contained in:
Brenden Matthews 2009-02-08 10:13:54 -07:00
parent 9da5648d2a
commit 5b9d47c039
4 changed files with 21 additions and 12 deletions

View File

@ -1,3 +1,7 @@
2009-02-08
* Refactor top code, add top_time to sort by process cpu time (thanks
sohalt).
2008-12-20
* Add if_match object comparing strings, floats and ints

View File

@ -318,8 +318,11 @@ dnl
AC_ARG_ENABLE([nvidia],
AC_HELP_STRING([--enable-nvidia], [enable if you want nvidia support @<:@default=no@:>@]),
[want_nvidia="$enableval"], [want_nvidia=no])
AM_CONDITIONAL(BUILD_NVIDIA, test x$want_nvidia = xyes)
if test x$want_nvidia = xyes; then
if test "x$want_x11" != "xyes"; then
# do nada
want_nvidia=no
else
AC_CHECK_HEADERS([NVCtrl/NVCtrl.h], [], AC_MSG_ERROR([NVCtrl/NVCtrl.h header not found]))
dnl AC_CHECK_LIB([XNVCtrl], [XNVCTRLQueryVersion], [] ,[AC_MSG_ERROR([grrr])] )
dnl AC_CHECK_LIB([XNVCtrl], [XNVCTRLCheckTargetData], [], [AC_MSG_ERROR([grr])])
@ -327,7 +330,9 @@ dnl ## am I Stupid ??
dnl ## it won't find the lib for some reason!?
LIBS="$LIBS -lXNVCtrl"
AC_DEFINE(NVIDIA, 1, [Define if you want nvidia support])
fi
fi
AM_CONDITIONAL(BUILD_NVIDIA, test x$want_nvidia = xyes)
dnl
dnl IMLIB2

View File

@ -3671,15 +3671,15 @@ static void generate_text_internal(char *p, int p_max_size,
{
struct text_object *obj;
/* for the OBJ_top* handler */
struct process **needed = 0;
#ifdef HAVE_ICONV
char buff_in[p_max_size];
buff_in[0] = 0;
iconv_converting = 0;
#endif
/* for the OBJ_top* handler */
struct process **needed;
p[0] = 0;
for (obj = root.next; obj && p_max_size > 0; obj = obj->next) {
@ -5124,11 +5124,11 @@ static void generate_text_internal(char *p, int p_max_size,
* times, we have this special handler. */
break;
case OBJ_top:
needed = cur->cpu;
if (!needed) needed = cur->cpu;
case OBJ_top_mem:
needed = cur->memu;
if (!needed) needed = cur->memu;
case OBJ_top_time:
needed = cur->time;
if (!needed) needed = cur->time;
{
char *timeval;

View File

@ -524,7 +524,7 @@ static void sp_acopy(struct sorted_process *sp_head, struct process **ar, int ma
* ****************************************************************** */
void process_find_top(struct process **cpu, struct process **mem,
struct process **time)
struct process **ptime)
{
struct sorted_process *spc_head = NULL, *spc_tail = NULL, *spc_cur = NULL;
struct sorted_process *spm_head = NULL, *spm_tail = NULL, *spm_cur = NULL;
@ -567,5 +567,5 @@ void process_find_top(struct process **cpu, struct process **mem,
if (top_mem)
sp_acopy(spm_head, mem, MAX_SP);
if (top_time)
sp_acopy(spt_head, time, MAX_SP);
sp_acopy(spt_head, ptime, MAX_SP);
}