Commit Graph

467 Commits

Author SHA1 Message Date
Kim Woelders b79b167d28 E-Exec.c: Cosmetics 2023-12-11 19:04:20 +01:00
Kim Woelders 1c619b8e56 Change formatting style
No tabs, more like K&R.
Also switch to indent 2.2.13.
2023-12-11 19:04:20 +01:00
Andrew Savchenko a700d6b982 Include <sys/select.h> for fd_set
When fd_set is used <sys/select.h> should be included.
On glibc it is done implicitly via other headers,
on musl it must be explicitly provided.

Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
2022-08-01 19:33:33 +02:00
Kim Woelders 5204d9f184 E-Slides: Use non-deprecated IPC commands 2022-03-10 07:46:05 +01:00
Kim Woelders ef5b344116 Change Epplet_send_ipc() to printf() style
And eliminate ECommsSend().
2022-03-10 07:46:01 +01:00
Kim Woelders 18f79e7ef4 Fix gcc12 warning
Also change malloc/memset to calloc and remove some unnecessary casts.
2022-01-18 18:54:31 +01:00
Kim Woelders 23cb0977a4 Trivial cleanups around *alloc functions
- Replace malloc+memset with calloc
- Remove unnecessary casts
- Some cosmetics
2022-01-18 18:51:43 +01:00
Kim Woelders acefe58f1b E-Net: Enable specifying device in config (no UI). 2021-09-03 06:08:40 +02:00
Kim Woelders 397463459b Fix bad memory access in draw_flame() 2021-09-02 19:58:04 +02:00
Kim Woelders 284a5039f9 E-Pinger: Fix potential buffer overrun 2021-09-02 19:58:04 +02:00
Kim Woelders 4f25ca8cd2 E-Wireless: Fix bad memory access
And a couple of cleanups.
2021-09-02 19:58:04 +02:00
Kim Woelders beae0b229a E-Mountbox: Fix potential segv when parsing /etc/fstab 2021-09-02 19:58:04 +02:00
Kim Woelders c6c19d3411 E-MemWatch: Drop ancient (<2.6) kernel support (fixing bad memory access) 2021-09-02 19:58:04 +02:00
Kim Woelders b76845e265 Introduce Epplet_Exit()
Avoiding some code duplication.
2021-09-02 07:16:31 +02:00
Kim Woelders b436df8d7a Centralize setting up atexit(Epplet_cleanup) 2021-09-02 07:16:31 +02:00
Kim Woelders d1ca9c1c1c Drop pointer test for free() 2021-09-02 07:16:30 +02:00
Kim Woelders 87a3dbceac Change E[v]snprintf -> [v]snprintf 2021-08-31 07:49:36 +02:00
Kim Woelders 9cb4561227 Indent tweaks, cleanups 2021-08-31 07:47:46 +02:00
Kim Woelders 9d0e6438db Drop unnecessary headers 2021-08-31 07:11:23 +02:00
Kim Woelders 83e1e71bee Introduce Epplet_adjust_priority()
Avoiding some code duplication.
2021-08-31 07:11:23 +02:00
Kim Woelders b0cbcb1f8a Add option to build with asan 2021-08-31 07:11:11 +02:00
Kim Woelders 901f4af699 Eliminate obsolete AC_HEADER_TIME 2021-03-26 16:33:08 +01:00
Kim Woelders effc4cc774 Use fabs(), not abs() on doubles 2020-12-09 18:05:49 +01:00
Kim Woelders 0d88c6d795 Enable visibility hiding by default
Makes next to no difference in sizes.
Let's just do it anyway.
2019-03-13 19:25:12 +01:00
Kim Woelders 722ca7bb81 Warning fixes for gcc 9 2019-02-10 05:51:07 +01:00
Kim Woelders c00cefd35e E-Power: Enable using POWER_SUPPLY_POWER_NOW and POWER_SUPPLY_ENERGY_... too 2018-11-03 07:25:28 +01:00
Kim Woelders 3b703b57a2 E-Power: Cleanups 2018-10-06 19:31:40 +02:00
Kim Woelders 49aafdaf62 Change Epplet_dialog_ok() to printf() style
.. avoiding some format-truncation warnings.
2018-08-13 13:22:08 +02:00
Kim Woelders fa26f27075 Fix incorrect buffer size 2018-08-12 17:35:56 +02:00
Kim Woelders 7895a582ce Warning fix for gcc 7. 2017-02-12 20:16:35 +01:00
Kim Woelders 3f57e098f1 Fix issue found by gcc 6.
../../../epplets/E-Exec.c: In function ‘run_contents’:
../../../epplets/E-Exec.c:61:44: error: iteration 49 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
        command_history[i] = command_history[i + 1];
                             ~~~~~~~~~~~~~~~^~~~~~~
../../../epplets/E-Exec.c:60:5: note: within this loop
     for (i = 0; i < MAX_HIST_LEN; i++)
     ^~~
2016-08-19 09:31:22 +02:00
Kim Woelders 2ea5042e00 Warning cleanups - epplets. 2016-08-19 09:31:22 +02:00
Kim Woelders bb351a0665 Autofoo update (warnings). 2016-08-19 09:31:09 +02:00
Kim Woelders 3ae4a353ae E-Power: Fix showing image when battery is > 100% full(?). 2013-07-25 20:19:36 +02:00
Kim Woelders 0c472462c8 E-Power: Mode tweaks.
- Try newest (most likely?) method first.
- Enable selecting specific mode (for debug).
2013-07-25 20:19:36 +02:00
Kim Woelders ed72a3550d E-Power: Simplifications. 2013-07-25 20:19:35 +02:00
Kim Woelders f126801893 E-Power: Some refactoring. 2013-07-14 20:18:01 +02:00
Kim Woelders be52365c1c E-Power: Timer tweaks.
Change all timeouts to 10 s.
2013-07-14 20:10:16 +02:00
Kim Woelders 2a2b07b2df E-Power: Cosmetics. 2013-07-14 16:40:16 +02:00
Kim Woelders 695a39808a Change MAX to MAXVAL to avoid name clashes. 2013-07-12 23:02:00 +02:00
Kim Woelders e00a53d390 Fix optional libgtop usage. 2013-07-12 23:00:17 +02:00
Kim Woelders 9800689a7c Eliminate use of malloc.h. 2013-03-24 23:27:28 +01:00
Kim Woelders 83c964a105 Change obsolete INCLUDES to AM_CPPFLAGS.
Also fix incorrect api include path (for epplet.h).

SVN revision: 82724
2013-01-13 13:09:56 +00:00
Kim Woelders 4dfe5f175e Fix linking on debian.
Patch by The Wanderer.

SVN revision: 77228
2012-09-30 09:41:40 +00:00
Kim Woelders ee7cfd147d Indent.
SVN revision: 77224
2012-09-30 09:41:07 +00:00
Kim Woelders a03689744e Add support for reading battery status from /sys/class/power_supply.
Patch by Melvin Meadlin.

SVN revision: 65612
2011-11-26 10:37:48 +00:00
Kim Woelders 5052a0dceb Cleanups.
SVN revision: 65611
2011-11-26 10:37:46 +00:00
Kim Woelders 29b192c412 Using -rpath should not be necessary.
..._DEPENDENCIES shouldn't be either.

SVN revision: 65610
2011-11-26 10:37:44 +00:00
Lucas De Marchi 205582b59e Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.




SVN revision: 51650
2010-08-26 01:34:13 +00:00
Lucas De Marchi fd4740a25d Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00