1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-12 19:06:36 +00:00

include missing mboxscan.h;

fix signedness warnings


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@832 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2007-02-14 19:45:18 +00:00
parent 45acd5c3b9
commit 70add5d09d
5 changed files with 29 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# $Id$
2007-02-14
* Include missing mboxscan.h in conky.h.
* Fixed signedness warnings in conky.c.
2007-02-11
* Added buffer_text_size option to change the size of the buffer for
things like $exec, $tail, et cetera

15
README
View File

@ -249,6 +249,10 @@ CONFIGURATION SETTINGS
config file (default is 16384 bytes)
text_buffer_size bytes
Size of the standard text buffer (default is 1280 bytes).
maximum_width pixels
Maximum width of window
@ -529,8 +533,8 @@ VARIABLES
cpu (cpuN)
CPU usage in percents. For SMP machines, the CPU number can be
provided as an argument. ${cpu 0} is the total usage, and ${cpu
X} (X >= 1) are individual CPUs.
provided as an argument. ${cpu cpu0} is the total usage, and
${cpu cpuX} (X >= 1) are individual CPUs.
cpubar (cpu number) (height),(width)
@ -856,6 +860,13 @@ VARIABLES
also new_mails.
mboxscan (-n number of messages to print) (-fw from width) (-sw subject
width) mbox
Print a summary of recent messages in an mbox format mailbox.
mbox parameter is the filename of the mailbox (can be encapsu-
lated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"}
mem Amount of memory in use

View File

@ -234,6 +234,10 @@ Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is
Maximum size of user text buffer, i.e. layout below TEXT line in config file
(default is 16384 bytes)
.TP
\fB\*(T<\fBtext_buffer_size\fR\*(T>\fR \*(T<\fBbytes\fR\*(T>
Size of the standard text buffer (default is 1280 bytes).
.TP
\fB\*(T<\fBmaximum_width\fR\*(T>\fR \*(T<\fBpixels\fR\*(T>
Maximum width of window
@ -501,7 +505,7 @@ Change drawing color to color
.TP
\fB\*(T<\fBcpu\fR\*(T>\fR \*(T<\fB(cpuN)\fR\*(T>
CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu 0} is the total usage, and ${cpu X} (X >= 1) are individual CPUs.
CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu cpu0} is the total usage, and ${cpu cpuX} (X >= 1) are individual CPUs.
.TP
\fB\*(T<\fBcpubar\fR\*(T>\fR \*(T<\fB(cpu number) (height),(width)\fR\*(T>
@ -764,6 +768,10 @@ Machine, i686 for example
\fB\*(T<\fBmails\fR\*(T>\fR
Mail count in mail spool. You can use program like fetchmail to get mails from some server using your favourite protocol. See also new_mails.
.TP
\fB\*(T<\fBmboxscan\fR\*(T>\fR \*(T<\fB(\-n number of messages to print) (\-fw from width) (\-sw subject width) mbox\fR\*(T>
Print a summary of recent messages in an mbox format mailbox. mbox parameter is the filename of the mailbox (can be encapsulated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"}
.TP
\fB\*(T<\fBmem\fR\*(T>\fR
Amount of memory in use

View File

@ -4698,7 +4698,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
}
/* Make sure bsize is at least 1 byte smaller than
* the buffer max size. */
if(bsize > text_buffer_size*20 - 1) {
if(bsize > (long)((text_buffer_size*20) - 1)) {
fseek(fp, bsize - text_buffer_size*20 - 1, SEEK_CUR);
bsize = text_buffer_size*20 - 1;
}
@ -4751,7 +4751,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
obj->data.tail.readlines = iter;
/* Make sure nl is at least 1 byte smaller than
* the buffer max size. */
if(nl > text_buffer_size*20 - 1) {
if(nl > (long)((text_buffer_size*20) - 1)) {
nl = text_buffer_size*20 - 1;
}
nl = fread(obj->data.tail.buffer, 1, nl, fp);

View File

@ -44,6 +44,7 @@
#include <xmmsclient/xmmsclient.h>
#endif
#include "mboxscan.h"
#include "timed_thread.h"
#define TOP_CPU 1