mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-11 18:38:45 +00:00
add new config item - max_user_text - to allow for large config files
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@741 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
fe17130d67
commit
5c61f80c41
12
ChangeLog
12
ChangeLog
@ -1,17 +1,23 @@
|
||||
# $Id$
|
||||
|
||||
2006-11-07 pkovacs
|
||||
2006-11-08
|
||||
* Added new config item 'max_user_text' with default 16384,
|
||||
twice as large as previous hard-coded default of 8192 bytes.
|
||||
Increase as needed to accomodate large config files with a
|
||||
great deal of text. This closes SF bug #1574523.
|
||||
|
||||
2006-11-07
|
||||
* Changes to configure.ac for pkg-config on x11/xext/xdamage,
|
||||
with fallback to conventional checks.
|
||||
* Fixed segmentation fault on SUGUSR1 bug.
|
||||
* Commented out Imlib2 from configure.ac since it's only partially
|
||||
implemented.
|
||||
|
||||
2006-11-04 pkovacs
|
||||
2006-11-04
|
||||
* Removed broken mldonkey and seti support.
|
||||
* Added Hellf[i]re's nano syntax coloring script to svn.
|
||||
|
||||
2006-11-03 pkovacs
|
||||
2006-11-03
|
||||
* Removed support for Xmms, BMP and Infopipe from conky.
|
||||
The Xmms and Bmp players are projects are dead and distros such
|
||||
as Gentoo are slating them for removal.
|
||||
|
11
src/conky.c
11
src/conky.c
@ -311,6 +311,9 @@ static int background_colour = 0;
|
||||
static int fixed_size = 0, fixed_pos = 0;
|
||||
#endif
|
||||
|
||||
/* maximum size of config TEXT buffer, i.e. below TEXT line. */
|
||||
static unsigned int max_user_text = MAX_USER_TEXT_DEFAULT;
|
||||
|
||||
static int minimum_width, minimum_height;
|
||||
static int maximum_width;
|
||||
|
||||
@ -6579,6 +6582,12 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
|
||||
CONF("uppercase") {
|
||||
stuff_in_upper_case = string_to_bool(value);
|
||||
}
|
||||
CONF("max_user_text") {
|
||||
if (value)
|
||||
max_user_text = atoi(value);
|
||||
else
|
||||
CONF_ERR;
|
||||
}
|
||||
CONF("text") {
|
||||
if (text != original_text)
|
||||
free(text);
|
||||
@ -6598,7 +6607,7 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
|
||||
+ 1);
|
||||
strcat(text, buf);
|
||||
|
||||
if (strlen(text) > 1024 * 8)
|
||||
if (strlen(text) > max_user_text)
|
||||
break;
|
||||
}
|
||||
fclose(fp);
|
||||
|
@ -48,6 +48,9 @@
|
||||
#define TEXT_BUFFER_SIZE 1280
|
||||
#define P_MAX_SIZE ((TEXT_BUFFER_SIZE * 4) - 2)
|
||||
|
||||
/* maximum size of config TEXT buffer, i.e. below TEXT line. */
|
||||
#define MAX_USER_TEXT_DEFAULT 16384
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
#define ERR(s, varargs...) \
|
||||
|
@ -31,6 +31,7 @@ syn keyword ConkyrcSetting
|
||||
\ gap_x
|
||||
\ gap_y
|
||||
\ mail_spool
|
||||
\ max_user_text
|
||||
\ maximum_width
|
||||
\ minimum_size
|
||||
\ min_port_monitor_connections
|
||||
|
Loading…
Reference in New Issue
Block a user