include missing mboxscan.h;
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Wed, 14 Feb 2007 19:45:18 +0000 (19:45 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Wed, 14 Feb 2007 19:45:18 +0000 (19:45 +0000)
fix signedness warnings

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@832 7f574dfc-610e-0410-a909-a81674777703

ChangeLog
README
doc/conky.1
src/conky.c
src/conky.h

index 3b8bd5a..c258759 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/README b/README
index c2944db..9dd03da 100644 (file)
--- a/README
+++ b/README
@@ -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
 
 
index fca079e..ef38157 100644 (file)
@@ -235,6 +235,10 @@ 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> 
@@ -765,6 +769,10 @@ Machine, i686 for example
 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
 
index c0fa003..df1f408 100644 (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);
index 32669de..40c982a 100644 (file)
@@ -44,6 +44,7 @@
 #include <xmmsclient/xmmsclient.h>
 #endif
 
+#include "mboxscan.h"
 #include "timed_thread.h"
 
 #define TOP_CPU 1