Daniel Lange
179aeb0108
Add includes for config.h as per the discussion in PR #1337
...
Many thanks to @Explorer09 Kang-Che Sung (宋岡哲).
Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
2 years ago
Daniel Lange
94ad111391
Update license headers to explicitly say GPLv2+
5 years ago
mayurdahibhate
3f86a011e6
platform-dependent files included relative to main source directory
5 years ago
Christian Göttsche
ce9e7fd14f
Panel_new: reorder arguments
...
Reorder owner and type so they match the order of Panel_init
5 years ago
Christian Göttsche
46a2e8ac63
IOPriorityPanel: drop unnecessary buffer size decrement
...
xSnprintf guarantees null-termination within the passed size.
5 years ago
Benny Baumann
0d64ca9262
Wrap inline structure definitions
5 years ago
Benny Baumann
45869513bf
Embracing branches
5 years ago
Benny Baumann
61e14d4bb2
Spacing around operators
5 years ago
Benny Baumann
0f5262917f
Make all required includes explicit
...
Information as seen by IWYU 0.12 + clang 9 on Linux
5 years ago
Benny Baumann
872e542f4e
Rename StringUtils.[ch] to XUtils.[ch]
5 years ago
Benny Baumann
c6f04a9c5d
Move xAsprintf, xSnprintf and xStrdup to StringUtils.h
5 years ago
Christian Göttsche
ad3acfc847
Handle Panel_getSelected() returning NULL
...
Found by compiling with LTO:
ColumnsPanel.c: In function ‘ColumnsPanel_eventHandler’:
ColumnsPanel.c:46:59: error: potential null pointer dereference [-Werror=null-dereference]
46 | ((ListItem*)Panel_getSelected(super))->moving = this->moving;
| ^
AvailableColumnsPanel.c: In function ‘AvailableColumnsPanel_eventHandler’:
AvailableColumnsPanel.c:31:8: error: potential null pointer dereference [-Werror=null-dereference]
31 | int key = ((ListItem*) Panel_getSelected(super))->key;
| ^
AvailableMetersPanel.c: In function ‘AvailableMetersPanel_eventHandler’:
AvailableMetersPanel.c:40:24: error: potential null pointer dereference [-Werror=null-dereference]
40 | int param = selected->key & 0xff;
| ^
linux/IOPriorityPanel.c: In function ‘IOPriorityPanel_getIOPriority’:
linux/IOPriorityPanel.c:37:11: error: potential null pointer dereference [-Werror=null-dereference]
37 | return (IOPriority) ( ((ListItem*) Panel_getSelected(this))->key );
| ^
6 years ago
Daniel Lange
079c2abf8e
Update License consistently to GPLv2 as per COPYING file
6 years ago
Zev Weiss
a1a027b9bd
Axe automated header generation.
...
Reasoning:
- implementation was unsound -- broke down when I added a fairly
basic macro definition expanding to a struct initializer in a *.c
file.
- made it way too easy (e.g. via otherwise totally innocuous git
commands) to end up with timestamps such that it always ran
MakeHeader.py but never used its output, leading to overbuild noise
when running what should be a null 'make'.
- but mostly: it's just an awkward way of dealing with C code.
6 years ago
Christian Göttsche
b92f62f912
Remove trailing whitespaces
6 years ago
Hisham Muhammad
09e241fb12
Security review: check results of snprintf.
...
Calls marked with xSnprintf shouldn't fail.
Abort program cleanly if any of them does.
9 years ago
Richard
d5faf64374
Mark some things as const
...
Several string pointer arrays pointed to const strings
but were not const themselves.
A few various structures and arrays were also marked const.
9 years ago
Hisham Muhammad
7cb8cb05fb
Simplify constructors.
11 years ago
Hisham Muhammad
d0c72c3fb2
Move FunctionBar inside Panel
11 years ago
Hisham Muhammad
26422af608
Files moved and added for supporting separate platforms.
11 years ago
Hisham Muhammad
00b324bfc1
Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers.
13 years ago
Hisham Muhammad
47e881f460
Add IO priority support ('i' key)
14 years ago