1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 13:39:10 +00:00
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@40 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-01 09:23:39 +00:00
parent fddc7d1c65
commit b5ada0b39f

18
conky.c
View File

@ -354,18 +354,14 @@ static const char *scan_graph(const char *args, int *w, int *h, unsigned int *fi
*last_colour = 0;
/* graph's argument is either height or height,width */
if (args) {
if (sscanf(args, "%x %x", first_colour, last_colour) < 2) {
if (sscanf(args, "%d,%d", h, w) < 2) {
if (sscanf(args, "%*s %x %x", first_colour, last_colour) < 2) {
if (sscanf(args, "%*s %d,%d", h, w) < 2) {
if (sscanf(args, "%d,%d %x %x", h, w, first_colour, last_colour) < 4) {
if (sscanf(args, "%*s %x %x", first_colour, last_colour) < 2) {
sscanf(args, "%*s %d,%d %x %x", h, w, first_colour, last_colour);
}
}
}
}
if (sscanf(args, "%*s %d,%d %x %x", h, w, first_colour, last_colour) < 4) {
if (sscanf(args, "%*s %x %x", first_colour, last_colour) < 2) {
sscanf(args, "%x %x", first_colour, last_colour);
*w = 0;
*h = 25;
}
*w = 0;
*h = 25;
}
}