When animations are disabled, we still create the function but we make it
empty to keep the rest of the code simple. This patch does:
- mark the function inline, to increase the probability that the compiler
will not generate the function at all;
- mark arguments as unused to avoid some compilation warnings.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Allocating memory with 'malloc' has a cost and participate to memory
fragmentation, so for a temporary buffer that has a fixed size let's
prefer allocating it on the stack.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The check on length of string before comparing is not necessary
because this will be checked as part of strcmp; the check won't
save time and may actually cost.
As the number of element in the array is not going to change during
the loop, took the call to 'WMGetArrayItemCount' outside the loop
to be faster (and ease compiler's optimisation work).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The idea is to:
- have a consistent looking file by using autoconf macros
- provide better feedback on improper option usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Some compiler support C11 standard by default, some need an explicit
option, and some don't support at all; this new macro only tries to enable
support if possible, the actual feature support being done by other checks
on case-by-case
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The previous code made a dumb change to CFLAGS which would cause user
supplied CFLAGS to be ignored, and possible compiler compatibility issues.
The new code does the same changes in a smoother way, so we do not totally
drop user specified or script detected compiler options.
When debug is enabled, we also include a reminder for the final CFLAGS
value.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' returns the number of elements for which a local
array have been defined, which makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
The macro includes a static assertion to stop compilation if it is being
used on a pointer, for which we cannot know the size of the array, to
avoid generating dummy result. This can work only with C11 which
standardised the static assertions.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch makes all files appear together when listing files and
it is more clear about their function.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The two functions require an argument which is used when the libXpm is
used, which means having the same argument list for the builtin code to be
permutable.
This patch adds the appropriate stuff to avoid a false report from the
compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Now that the builtin XPM loading is separated from the saving code, the
use of the conditionals provided by autotools provides a better result
as it avoids unnecessary compilation.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Big files are harder to work with, so split load and save, which
happen to already be independent anyway.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Even if there is nothing to do for PPM at current time (all builtin
code), for consistency it is better placed with the other image
format checks.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
It includes a typo fixed by Amadeusz S-B³awiñski.-A
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- uses an automake conditional to avoid compiling the file is support is
not enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The function is a callback, which means having a fixed argument list.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
The function did not use the argument 'mPtr', so removed it.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
As reported by Nicolas (nhs), compilation of wrlib is broken when
switching to gif_lib v5.
The API of gif_lib has known little change to provide thread-safe usage,
so we now detect this in configure and and use the functions as appropriate
in gif.c
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
The use of the conditionals provided by autotools provides a better result
as they avoid unnecessary compilation.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
- makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
- introduces a tracking of unsupported things to be reported to user
It includes a fixes from a problem found by Amadeusz S-B³awiñski, because-A
the function 'wm_fn_imgfmt_try_link' modified the variable LDFLAGS
instead of LIBS.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The previous rule was to ignore the whole directory, while still having
some files tracked inside.
Now we only explicitly ignore the files that have been placed there by the
autotools, so we can have a better view of it in Git when adding stuff.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
A recent patch removed the newlines from the default English legal text, as the
legal panel automatically wraps text so the newlines were unnecessary. In this
patch, they are removed from all .po files which contain a translation of the
legal text.
This patch uses two variables to set the width and the height for the
Info Panel. It also includes a margin space.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch uses two variables to set the width and the height for the
Info Panel.
Now the panel has the same size than the window.
Finally, this patch moves the center definition to the beginning, and
removes the curly brackets.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The label containing the legal information in the legal panel was set to wrap.
However, there were redundant newlines in the text itself. In wider fonts, this
had the effect of the legal text not completely fitting in the legal panel.
This patch removes the unnecessary newlines.
In keeping with the spirit of free software, this patch removes several
Microsoft fonts (Trebuchet, Arial, and Verdana) from being the default fonts for
Window Maker and WINGs.
This patch has the added advantage of allowing users some control over the
appearance of WINGs widgets. Formerly, there was no way to control the font if
the Trebuchet MS font was installed. Now the WINGs font can be changed by
setting the sans-serif alias in fonts.conf.
These two files provides configuration panels that were never enabled
because they have not yet reached a usable state.
With this patch, we do not compile them anymore to avoid useless stuff in
the program.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The functions that create the different configuration panels were taking
the screen structure as argument, but it turns out that none of them
actually need it.
We just remove the argument to make code simpler and easier to maintain.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The screen argument was not used in 'InitDoubleTest', 'InitEditMenuItem'
and 'InitEditMenu', so remove it to make the code simpler and avoid
compiler warning.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The x coordinate is not needed by the function because menu are a vertical
stacking on items, which means only y coordinate matters.
This patch removes the x parameter to fix a compilation warning.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The event that triggered the function call is not used by the function,
so the parameter can be removed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>