This wrapper functions should facilitate the handling of rsvg handles.
Especially unrefing with g_object_unref does not seem to work properly
using the lua bindings.
Add scratch files as a start: merge rsvg.h and rsvg-cairo.h.
Concatenate licenses of rsvg.h and rsvg-cairo.
Remove unnecessary defines, private structs, unused apis
(GIO/GdkPixbuf), etc.
Replace deprecated api functions with glib-object functions
Add headers for glib.h and librsvg/rsvg.h
Before, in the case of an unknown battery status (which often happens on my Sony VAIO laptop after waking from sleep), the buffer would be unterminated.
(Although, this memmove trick is a bit odd. It would probably be better to remove the memmove's and put a single buffer[1] = '\0'; at the end of the function).
Conky takes process names from /proc/<pid>/stat and it's limited to 16
chars in kernel. That obviously makes top_name_width option to work only
for decreasing name length. To obtain longer names we parse
/proc/<pid>/cmdline.
Not every process has cmdline, so we take both process names and choose
one we want to use. Like this:
- Get process name from /proc/<pid>/stat
- Get process cmdline from /proc/<pid>/cmdline
- Transform cmdline to a bit simpler form(i.e. "/usr/bin/python
/usr/bin/terminator" to "python /usr/bin/terminator"), keeping
the arguments(might be changed easily)
- Choose the one that is longer and use it
== common.cc ==
'result' can be uninitialized.
== conky.cc ==
strcpy()'s overlap: undefined behaviour. memmove()'s one is
defined.
== eve.cc ==
Some simplifications, and there are two leaks:
1. 'mySkill' could be leaked. So, let's make 'skill' point to it instead
of strdup()'ing the buffer.
2. 'output' could be leaked at l.390.
== freebsd.cc ==
Leak of 'freq_sysctl'.
== net_stat.cc ==
free() already null-checks, so we don't need to do it again.
== proc.cc ==
Leak.
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
Sometimes wlan related TEXT causes segment fault, and backtrace shows it's strtok in
iw_get_stats.
I read the code of wireless_tools, which says 'strtok not thread safe, not used in WE-12 and
later' for iw_get_stats. But it need to first check if has_range and then we_version_compiled.
In conky/src/linux.cc, iw_get_stats is called before iw_get_range_info, hence has_range is always
0 in iw_get_stats and strtok is used. I simply move iw_get_range_info before iw_get_stats and no
segfault up to now.
patch by ruikai
curl implements some of the timeouts using alarm(), where the alarm handler longjmp()s back into the
curl code. This is a bad idea in multi-threaded applications, since it is not guaranteed that
SIGALARM will be recieved by the correct thread. Therefore, we instruct curl to avoid using
signals.
Conflicts:
src/ccurl_thread.c
Adds mpd_albumartist support as an object since mpd_artist lists all participating artists of the
current song and not the main album artist.
patch by Sébastien Lavoie-Courchesne