summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-10Add meson builds to CIHEADmasterTim Wiederhake1-2/+13
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-07Add meson as alternative build systemTim Wiederhake4-0/+153
Add a note to the readme file to clarify that the default build system is still automake. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-07Provide defaults for externally defined symbolsTim Wiederhake5-12/+25
AM_CPPFLAGS defines several symbols that do not have to be there. By providing default values in twm.h, this list can be reduced in size while still allowing to override these values. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-07Remove version.c and version.hTim Wiederhake5-122/+2
These files define only a single variable that is used in only one place. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-07Simplify default twmrc generationTim Wiederhake3-14/+19
The logic to generate deftwmrc.c is currently split between Makefile.am and deftwmrc.sed. Consolidate into a single script. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-03-05improve portability for bison/byaccThomas E. Dickey1-0/+13
Provide declaration of yyparse(), and alternate declaration of yylex(). This works with bison and byacc, as well as different versions of flex. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2024-03-05improve declaration of yylex()Thomas E. Dickey2-1/+3
Replace the extern declaration of yylex() in gram.y with a definition/use in parse.h, improving portability. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2024-03-05amend yylineno changeThomas E. Dickey2-1/+3
A recent change removed the declaration of yylineno from lex.l, making the program depend on the version of flex. Restore the declaration with an ifdef. Also, remove unused declaration in parse.c Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2024-03-05include "gram.h" only from "parse.h"Thomas E. Dickey9-8/+3
all of the users of (generated) gram.h rely upon (custom) parse.h, and the order of those headers affects portability. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2024-01-21Add explicit cast after memory allocationTim Wiederhake9-38/+44
Still valid c, but now also valid c++. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Accomodate different field names when compiling with c++Tim Wiederhake2-0/+8
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename variable 'new' to 'entry' in splitEntryTim Wiederhake1-23/+23
'new' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename argument 'class' to 'xclass' in GetColorFromListTim Wiederhake2-6/+6
'class' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename argument 'class' to 'xclass' in LookInListTim Wiederhake2-6/+6
'class' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename field 'class' to 'xclass' in TwmWindowTim Wiederhake7-58/+60
'class' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename field 'class' to 'xclass' in TWMWinConfigEntryTim Wiederhake2-11/+11
'class' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Rename field 'delete' to 'remove' in TitlebarPixmapsTim Wiederhake3-5/+5
'delete' is a keyword in c++. Its usage confuses some tools that work with c and c++ source code. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-21Remove storage specifier 'register'Tim Wiederhake6-23/+23
'register' is an optimization hint to the compiler that is generally not necessary and needlessly prevents using a c++ compiler to compile twm. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkWidth, JunkHeight, JunkBW, JunkDepth, JunkMaskTim Wiederhake9-38/+51
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkX, JunkYTim Wiederhake8-26/+28
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove global variables JunkRoot, JunkChildTim Wiederhake9-40/+54
Replace with a local variable following the naming scheme from Identify() in src/menus.c. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in ExecuteFunctionTim Wiederhake1-17/+18
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in IconUpTim Wiederhake1-3/+6
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in do_string_keywordTim Wiederhake1-7/+9
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in CreateIconManagersTim Wiederhake1-9/+8
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in HandleButtonPressTim Wiederhake1-6/+12
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in SetHighlightPixmapTim Wiederhake1-3/+6
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Rework dummy variable usage in AddWindowTim Wiederhake1-8/+9
twm defines several "junk" variables to use with functions like XQueryPointer or XGetGeometry. In some instances, the returned values are actually used, which makes the code confusing and hard to reason about. Use dedicated variables in those cases. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make XtSignalId si staticTim Wiederhake1-1/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make FirstScreen a local variableTim Wiederhake2-4/+2
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make appContext a local variableTim Wiederhake6-8/+7
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make InitFile a local variableTim Wiederhake1-1/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Make MultiScreen a local variableTim Wiederhake2-2/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Split up InitMenusTim Wiederhake3-10/+15
Preparation for the removal of FirstScreen: Separate code that is executed for all screens from code that is executed for only the first screen. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-20Remove now unused NoPrintscreens variableTim Wiederhake1-3/+1
Support for xprint was removed in commit 0ce52bc9ed. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Replace GCC_NORETURN with _X_NORETURNTim Wiederhake2-6/+2
This silences all "function might be candidate for attribute 'noreturn'" warnings. Add to HandleEvent as well, as that function never returns. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Replace GCC_PRINTFLIKE with _X_ATTRIBUTE_PRINTFTim Wiederhake1-13/+5
This silences all "function '...' might be a candidate for 'gnu_printf' format attribute" warnings. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yylexTim Wiederhake2-3/+1
yylex is already declared in (the generated) lex.c. This silences a "redundant redeclaration of 'yylex'" warning. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yyparseTim Wiederhake1-2/+0
yyparse is already declared in (the generated) gram.h. This silences a "redundant redeclaration of 'yyparse'" warning. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove redundant declaration of yylinenoTim Wiederhake1-1/+0
yylineno is already declared in (the generated) gram.h. This silences a "redundant redeclaration of 'yylineno'" warning. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Make atom_names const correctTim Wiederhake1-2/+3
Silence some "initialization discards 'const' qualifier from pointer target type" warnings. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Silence old-style function definition warning in yywrapTim Wiederhake1-1/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Silence uninitialized variable warningTim Wiederhake1-1/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Enable compiler warningsTim Wiederhake1-1/+1
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove write to never-read variable in InstallWindowColormapsTim Wiederhake1-1/+1
The variable `n` is written to every iteration of the loop, but never read. It is overwritten (and read) in the next loop though. Remove the dead store. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove unused typedef SigProcTim Wiederhake1-2/+0
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove support for xprintTim Wiederhake1-62/+0
xprint is deprecated and was removed from xorg in 2008. Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove always-true ifndef TOMTim Wiederhake1-4/+0
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Remove disabled codeTim Wiederhake2-53/+0
Signed-off-by: Tim Wiederhake <twied@gmx.net>
2024-01-01Fix include guard namesTim Wiederhake14-40/+40
Names that begin with an underscore ('_') are reserved. Follow the usual practice of naming the include guard of file "foo.h" "FOO_H", as is already done in "icons.h". Signed-off-by: Tim Wiederhake <twied@gmx.net>