1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35: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

16
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 %d,%d %x %x", h, w, first_colour, last_colour) < 4) {
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);
}
}
}
}
sscanf(args, "%x %x", first_colour, last_colour);
*w = 0;
*h = 25;
}
*w = 0;
*h = 25;
}
}