This patch makes Conky print a sample config when being called with the
'-C' flag.
A short test showed an increase of ~10kbytes of the conky binary's size.
From strdup(3):
| If s is longer than n, only n characters are copied, and a
| terminating null byte ('\0') is added.
So allocate at most n+1 bytes and make sure the last one is zero, as
strncpy() doesn't add it itself.
So in fact to allow a maximum space for string dup of 23, strndup() has
to be called like this:
| dup = strndup(src, 23 - 1);
FIXME: Find the critical points in code this change touches and make
sure the invocation there is correct.
Two things that pissed me off about the old one:
* only limited support for nesting templates
* totally broken output when using conditionals inside a template
The later one was the hard one to fix. ;)
It requires to already have the full text substituted before the text
objects are being created from it. Generating only the contained objects
broke, because the conditionals got wrong offsets to jump to.
After that was fixed, full nesting support is realised by simply
repeating the replacement until no more template objects are found.
This is causing trouble, as after each build switching branches is
impossible until the local modifications of README are being committed.
Since the whole file will be created when compiling conky, we can safely
ignore it (like with doc/conky.1).
Withdrawn windows are those you get from applications supporting the
'-w' flag, like e.g. gkrellm or all those sweet WindowMaker dockapps
(wmcpu and Co.). In Fluxbox, these windows are drawn into the slit. Most
other window managers put them into their "taskbar", AFAIK.
This patch makes Conky act exactly the same if the following settings
are selected:
| own_window yes
| own_window_type dock
This introduces a new configuration variable called "temperature_unit",
specifying the unit of all temperature sensors. To achieve this, each
object outputting a temperature has to call temp_print() like so:
| temp_print(p, p_max_size, <temp val as double>, <unit of val>);
to specify the input temperature unit, either one of the constants
TEMP_CELSIUS or TEMP_FAHRENHEIT.
The new command line option '-D' ('--debug') increases debugging level by one.
For debugging output a user could be interested in, use the macros DEBUG() and
DEBUG2(). Functionality is equal to the ERR() macro. DEBUG2() prints stuff only
if debugging level is greater one, which means that '--debug' has been
specified more than once. This patch also includes usage of the macros for the
new template object (as debugging syntax errors in templates is one thing a
user potentially needs to do).
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1273 7f574dfc-610e-0410-a909-a81674777703