Since we rely on a global object ctor to add a display output to the
list, it is not referenced from anywhere else, so does not get linked in
when building tests since most objects are pulled from a static library.
Another option would be to use --whole-archive to link to it.
we want to be able to access either all outputs, or the currently
selected one (if any, else return the top one, which ought to be the GUI
one if we have one).
Hopefully this will lead the way to adding support for things like
Wayland and Haiku graphics, cf. #56.
We define a display_output_base class that display backends
can derive from to implement display-specific calls.
This change corrects dependencies on generated defconfig.h and/or
convertconf.h header files because they must be generated before
compilation of conky.cc and main.cc if BUILD_BUILTIN_CONFIG and/or
BUILD_OLD_CONFIG are set.
Fixes: https://github.com/brndnmtthws/conky/issues/1118
Retrieve graph only when s->graph is already allocated, which also mens
that the s->graph_width is bigger than 0, and thus avoid out-of-bounds
write in graph_append function.
Prior to 594d0c85ba ("Fix bug of "Graph reset when using conditional
color"") s->graph was not (re)allocated when s->graph_width and
s->graph_allocated were equal to zero, therefore, s->graph stayed equal
to nullptr. This effectively meant that graph_append function returned
immediately after call and did nothing.
This behavior changed with introduction of std::map<int, double *> graphs,
because its retrieve_graph support function allocates s->graph even for
s->graph_width equal to 0. Then, subsequent call of graph_append can
continue and the first element of the graph is set later in this
function in line:
graph->graph[0] = f; /* add new data */
causing out-of-bounds write, as there is not enough space in array of
zero length. This write messes up internal data of memory allocator (at
least in musl libc case) and the application later segfaults in attempt
to free this memory in store_graph function.
Fixes: 594d0c85ba ("Fix bug of "Graph reset when using conditional color"")
It's not quite clear to me what the intent was here, but I don't believe
this change was correct. We shouldn't block on callbacks within the main
loop.
This fixes #901.
While made in earnest, I think this change was incorrect and actually
caused a regression.
Thanks to ChrisCheney for communicating this in a way that my small ape
brain could understand.
This resolves issue #1090.
The conky window is crawling when some other is moving around it.
To reproduce this bug run conky with the following config:
double_buffer yes
TEXT
TEST
And slowly move other window near conky window.
The bug was introduced in e2bd14e7b7.
Reported and patch by: George V. Kouryachy (Fr. Br. George) <george@altlinux.org>
Currently, the ${curl} directive only uses the first 127 characters in
the given URL, discarding the rest. Change the parsing in
curl_parse_arg to dynamically allocate the URL string instead,
allowing ${curl} to use URLs of any length.
On Linux, use the newer field presented by the kernel for calculating
the amount of memory in use. This was introduced in commit
34e431b0ae398fc54ea69ff85ec700722c9da773 to the Linux kernel.
Signed-off-by: Joseph Benden <joe@benden.us>
This seems to be causing some issues with clobbering memory values, and
since there is callback functionality already working, this seems
unnecessary.
* Make all calculations local to function
I moved from making the assignments and calculations of certain memory
values to doing the calculations on local variables and assigning them
at the end of the function for update_meminfo().
This is to keep the info.memX variables from having 'intermediary'
values that may give wrong values to other functions if the structure is
read from while the function is currently executing.
As a matter of keeping the variables consistent across function calls, I
removed the zeroing out of certain info struct variables so that if they
are read from, they'll still report a sane value. Since the only change
to the value a direct assignment at the end of the function, they
shouldn't need zeroing out in the first place.
There's not a single instance of using info.bufmem in any other source
file aside from linux.cc. If there was any plan to use this check (and
info.bufmem) with any other source file, the check should be made in
that specific source file instead.
This fixes #650 'Bad arguments: " unk" and '59"' where `link_qual_max`
would occasionally get updated with an invalid value. Now the update
will ignore bad values and only use valid numbers.
Graphs would appear to change their previous data when any of the
displayed special types (e.g. $color, $hr, $offset) was added or removed
from the display (e.g. from a conditional statement). This is because
Graphs were just looking at memory locations for previous graph data,
but those locations could change if any special types were added or
removed. Now the previous graph data will get stored explicitly.
The specific behavior was retained as far as the exact timings of
the ++/--. Maybe it can get cleaned up more, but at least the
if statement logic is more clear now.
Nested exec expressions like ${execp echo '${execp echo hi}'} are not
evaluated correctly because parsing expressions like these generates and
registers new callbacks but we never wait for these callbacks to
complete before returning the result of the evaluation.
Fix this by re-evaluating expressions after running all pending
callbacks.
- use sccache for build caching
- add coverage reports as build artifacts
- add lcov-summary for coverage summary
- clean up/refactor CI yaml
This resolves the FreeBSD part of #754.
[PROBLEM]
Some hwmon device number may change due to module load sequence.
E.g:
One boot would cause the following layout:
hwmon0->acpitz
hwmon1->pch_skylake
hwmon2->thinkpad
hwmon3->coretemp
hwmon4->iwlwifi
While another boot could lead to:
hwmon0->acpitz
hwmon1->pch_skylake
hwmon2->coretemp
hwmon3->thinkpad
hwmon4->iwlwifi
[ENHANCEMENT]
This patch will enhance the hwmon command to accept hwmon device name as
first parameter instead of number.
Now "hwmon 3 temp 1" can be converted to "hwmon coretemp temp 1", which
is more readable and user won't ever need to bother the hwmon sequence
number change.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Otherwise I get this error while building:
/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1503:50: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
END OBJ(apm_adapter, 0) obj->callbacks.print = &print_apm_adapter;
^~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1504:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
END OBJ(apm_battery_life, 0) obj->callbacks.print = &print_apm_battery_life;
^~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/sysutils/conky/work/conky-1.11.1/src/core.cc:1505:55: error: assigning to 'void (*)(struct text_object *, char *, unsigned int)' from incompatible type 'void (*)(struct text_object *, char *, int)': type mismatch at 3rd parameter ('unsigned int' vs 'int')
END OBJ(apm_battery_time, 0) obj->callbacks.print = &print_apm_battery_time;
^~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
*** [src/CMakeFiles/conky.dir/core.cc.o] Error code 1
* First commit!
* Import to git
* Droping down CMake requirement
* Corrected installation of libraries
* Adding travis build
* Updated cmake macros
* Fixed find package
* Updated travis hook
* Updated travis hook
* Patch to support Lua 5.3.
* Fix Lua header include directives in tolua++.h
Use angle bracket rather than double quotes when including Lua headers in the tolua++ header. This fixes a problem on systems that default to a Lua version newer than 5.1 and install the tolua++ header to the same directory as newer Lua headers.
As there are (usually) no Lua headers in the same directory when building tolua++ itself, the preprocessor will look to the include directories passed to the compiler, one of which would be the Lua 5.1 include directory, and tolua++ will build with those (correct) headers. Then the tolua++ header is usually installed in the default include directory, alongside the newer Lua headers, which you wouldn't expect to cause any trouble.
But it does cause trouble when trying to build other programs that include the tolua++ header, because now the preprocessor does find Lua headers in the same directory as the tolua++ header, which are the newer (incorrect) headers. Now the program will either fail to compile, because it doesn't support the newer headers, or fail to link with the tolua++ shared object because they were compiled against different Lua headers.
Using angle brackets instead of double quotes in the include directives will fix the problem, because then the preprocessor will look to the include directories passed to the compiler first.
See http://www.cegui.org.uk/forum/viewtopic.php?f=10&t=7195
* Remove email notifications.
* Update travis build.
* Build shared and static libs.
* Patch toluapp to support Lua 5.3.
With this change, support for Lua 5.1 is dropped.
This resolve #116.
* Add some comments to clarify the toluapp handling.
* Add minor sonar fix.
* Get rid of silly `if (not ...` exp.
* Apply code fixes from sonar.
* Build fix.
* Apply more fixes from sonar.
* Apply more fixes from sonar.
* Apply more fixes from sonar.
A previous change in 5b541b4 (to replace unsafe string functions with
safer equivalents) made a change which broke loading of shared libs.
The cause is a miscalculation of string length before executing a
strncpy(). The calculating did not account for the null character.
This resolves #705.
* Fix XShape handling.
* Fix crash when XDamage is disabled.
* Make sure the nvidia COOLER target is available before trying to pull
attribute values.
* Check the nvidia extension is actually available.
* Check that the display is valid.
* Fix race condition in gw_info handling.
* Fix a couple potential nullptr derefs.
* Fix font handling without x.
* Fix regression in output to ncurses with X disabled.
* Apply some formatting/code smell fixes.
* Add config option to disable blending
This is intended to work around issues with some images blending incorrectly with ARGB visuals.
* Fix order of config documentation.
* Update configuration variable name to simply "draw_blended".
* Fix for SonarCloud malloc warning.
* Update free to delete as part of malloc change.
* Fix goto in ncurses mode when compiled without BUILD_X11
* Fix some issues raised by SonarCloud
* Define delete_block_and_zero() function and use it to replace some malloc calls
* Add fontN config and text variables
fontN, N in {0..9} allows setting a fontN variable to some font settings
which can later be recalled in text, like colorN.
* Add documentation for fontN
* Add syntax-highlighting config for fontN
* Work for #17 : Now we have ssid
* Since we are using Objective-C++ NSStrings, we need to link to Foundation.framework, too!
* If interface is UP use the interface SSID; otherwise "off/any" following the Linux implementation.
Add more
* More
* cleanup