When a '#' is found in TEXT, section remove_comments() is called. However, that function doesn't
limit itself to removing that particular comment. Instead, it greedily removes all "comments" from
the string, including those in ${color $abcdef} constructs. This, obviously, makes a mess of
things.
Solution: I added a new function, remove_comment(), that only removes the current comment.
Note: Atm, the function doesn't delete the newline, since that was the current behavior, and is
the natural one for the config section. However, for the TEXT it seems better to delete the \n
too, to avoid blank lines.
Note2: this also fixes the bug in strfold(), which incorectly copied the string, truncating it by
one byte.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
We need this on FreeBSD as some of the constants used in ucred.h and
mount.h are defined there.
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Brenden Matthews <brenden@rty.ca>
This should fix bug #2802529. I've also revamped the X-Mozilla-Status
header handling which was kind of fishy till now.
Disclaimer: I have no mbox folders around to test it.
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Closing the X display on reload caused some weirdness. We can just
leave it open between reloads. For whatever reason we had a macro
inside quotes for the default net device.
Changed llua_getinteger() to llua_getnumber() returning a double, so
that you can use floating point values in graphs etc. Lua graph will
scale like other graphs (except execgraph) by default now, and you can
manually set a scale with the scale argument.
In general, initialising last_update_time to next_update_time upon
startup doesn't make sense, as some update functions check for the
distance between the two being higher than a given epsilon to prevent
updating too often. This means that they won't trigger when
update_stuff() is being run for the first time.
When you started "$updates|${addr eth0}" displayed "0|No Address",
after the first update you got something normal like "1|192.168.0.1"
This patch should fix this.
part of the template-handling code was in #ifdef X11, which caused conky to dump core when
compiled without x11.
as a bonus, I changed tests !=' ' to !isspace in two places as it was causing strange effects
Signed-off-by: Brenden Matthews <brenden@rty.ca>
Conky would dump core when encountering templates with no parameters (both $templateX and
${templateX}) and when the line contained improperly nested {}.
Signed-off-by: Brenden Matthews <brenden@rty.ca>