* conky.h must come first, because it includes config.h
which again defines _GNU_SOURCE, which is necessary
for strdup() & Co.
* declaring cpu_separate in top.h makes no sense, as it
includes conky.h which declares cpu_separate itself
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1078 7f574dfc-610e-0410-a909-a81674777703
* yes, this is a feature and right now there is something
like a feature freeze.
* BUT I tested this with: /, /tmp, /dev/mapper, /dev, //,
/mnt/, /tmp/bla (the last one was non-existent, creating
it during runtime and even mounting tmpfs on it led to
expected results.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1074 7f574dfc-610e-0410-a909-a81674777703
* not sure but this looked completely wrong, as 'iconv'
is a function.
* if iconv_cd is NULL, iconv_count is 0 and therefore
realloc should do the same as malloc here.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1069 7f574dfc-610e-0410-a909-a81674777703
* also at least a single variadic argument must be
specified, so this (absolutely perfect) code doesn't
work
* this should fix it without changing the way the
macros are to be called
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1063 7f574dfc-610e-0410-a909-a81674777703
* instead of empty args "void" should always be specified.
Using this, the compiler can detect incorrect function calls,
like with update_stuff().
* No args seems to be interpreted as "unspecified args" by the
compiler, as with update_mail_count(). So no checking for
correctness of arguments when calling was done at all.
* This is not complete yet, as I still don't have any BSD for
testing.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1055 7f574dfc-610e-0410-a909-a81674777703
* I accidentially used wrong args when testing conky -> segfault
* reproduce using 'conky -c /this/doesnt/exist'
* code should be portable, but untested on freebsd
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1044 7f574dfc-610e-0410-a909-a81674777703
* gathers information from /etc/resolv.conf
* included (still commented) code to prevent reading too often,
as I'm not sure whether reading from a real FS (not /proc or /sys)
could generate higher load in some cases -> comments please!
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1035 7f574dfc-610e-0410-a909-a81674777703
* gw_iface prints the interface having a default gateway
* gw_ip prints the gatway's ip
* if_gw jumps if no default gateway exists
* when there are multiple gateways, gw_iface and gw_ip
only print "multiple" when they are different (allows
basic debugging of ones networking setup)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1031 7f574dfc-610e-0410-a909-a81674777703
* when printing only width bytes to buf, with
width being set to pad_percents which itself
is set by the user to zero, nothing is printed
* in the unlikely (but possible) case of width > size,
this could lead to a segfault
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1029 7f574dfc-610e-0410-a909-a81674777703
* rewrote some functions in src/smapi.c for more
simplicity and less malloc/free hell
* added object cleanup in free_text_objects(),
valgrind said it was missing
* fixed indenting in construct_text_object()
* fixed use of spaced_print() in generate_text_internal()
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1028 7f574dfc-610e-0410-a909-a81674777703