The 'pot' files are templates generated when we want to update the 'po'
files against latest source code;
the 'mo' files are compiled 'po' files to be installed
In this patch we will fix an issue during compilation on systems, which
have ImageMagick version 7, and slightly more recent version of
compiler. If we define USE_MAGICK with null value, compilation will fail
on preprocessor check on such defined variable.
It's USE_MAGICK, not USE_MAGIC. Also, we wrap the if/else statement
in an ifdef. This doesn't really affect anything since load_magick.c
won't be compiled if USE_MAGICK is undefined because of an if statement
in the Makefile. But in the off chance that it is somehow, then we will
try to load a nonexistent version 6 header file since USE_MAGICK will
be interprested as 0 and 0 < 7 is true.
Unescaped curly braces have been deprecated since Perl 5.26 and are
illegal in Perl 5.30. I copied the relevant lines from the latest kernel
source, so we'll inherit a couple other improvements as well.
The abs() function should take an int as argument, but there were
several instances in the code where it was taking an unsigned int or a
double. In these case, we took one of the following approaches:
* If the argument was a double, use fabs() instead.
* If the argument was unsigned and was certainly going to be positive
(i.e,. no subtraction), then drop abs() altogether.
* If the argument was unsigned as result of adding or subtracting signed
and unsigned ints, then we cast all the unsigned ints to signed ints.
We dropped ImageMagick 6 support in 0.95.9. However, ImageMagick 6 is
still widespread (e.g., ImageMagick 7 has not been packaged in Debian
yet), and upstream plans on maintaining it until at least 2028 [1].
In this patch, we detect the version of the MagickWand library installed
on the user's system and include the appropriate header file when
building wrlib.
Note: I've only tested this with ImageMagick 6, so I'd appreciate
confirmation that it works with ImageMagick 7.
[1] https://github.com/ImageMagick/ImageMagick6/blob/master/NEWS.txt
We use the AC_PATH_XTRA macro to find all the X library paths during
build, but we weren't actually using the variables it generated for
building wmlib. Instead, we just hardcoded the linker flag "-lX11",
which may or may not actually work.
As the literal string "wm_cv_xext_xmu" will never be equal to "xno",
we always ran the code that was supposed to run when the variable
$wm_cv_xext_xmu was not equal to "no". In particular, if libXmu
was not found, then we proceeded as if it had been found.
I noticed one instance of this while looking at the code the other day,
and after a quick grep, realized it happened a *lot*! One of the many
frustrating things about the English language is that we use apostrophes
to make pretty much everything possessive *except* the pronoun "it".
In that case, we use "its". "It's" is reserved for the contraction
meaning "it is" or "it has".
This changes the behavior of the --with-{inc,lib}s-from arguments
to replace the default paths instead of adding to them. This is
required when cross-compiling in a sysroot, since the default paths
will include files from the host system which can have an
incompatible architecture.
The original ergonomic.tiff file samples/pixel property was wrong which was generating the warning message from libtiff
"TIFFReadDirectory: Warning, Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.."
From the comments at the top of wmmenugen_parse_xdg.c:
Since there is no passing of file name arguments or anything of the
sort to applications from the menu, execname is determined as follows:
- If `TryExec' is present, use that;
- else use `Exec' with any switches stripped
However, Exec used to be preferred. Changed code to prefer TryExec.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Exec fields in desktop-files may include field-codes which act as
place-holders for command-line arguments. Previously the Exec arguments
were being passed through intact. However, since Window Maker has no
support for expanding the field-codes, we now remove them and preserve
the remaining arguments.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This patch removes the code not used. Because the if block
check that buffer[0] is NULL, then, we don't need check it
again inside.
Image is not used yet, so is NULL. We can return NULL.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch returns NULL, because the variable image is not used yet.
The patch also removes three lines:
- buffer[0] = NULL; /* Initialize pointer to avoid spurious free in cleanup code */
RErrorCode = RERR_BADIMAGEFILE;
jpeg_destroy_decompress(&cinfo);
fclose(file);
- if (buffer[0])
- free(buffer[0]);
buffer is a local variable. The malloc is not used yet. So:
- We set the value to NULL, then check if is null to call free(). So the free()
call is never used. We can remove the last too lines.
- We don't need set now to NULL, because the variable is empty (the
initializated (or not) value is not used, and is destroyed as local variable
when we returns, just one line later.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch removes the goto call. I copied the code after the bye: label and
I paste it in the goto-calls.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch adds some characters to the mbuf buffer, to allow the buffer size and some extra characters.
WPrefs.c: In function ‘loadConfigurations’:
../src/wconfig.h:400:17: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1018 [-Wformat-overflow=]
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch adds some comments to remove the falthrough warning.
Appearance.c: In function ‘renderTexture’:
../WINGs/WINGs/WUtil.h:230:32: warning: this statement may fall through [-Wimplicit-fallthrough=]
#define wwarning(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_WARNING, fmt, ## args)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Appearance.c:675:4: note: in expansion of macro ‘wwarning’
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
^~~~~~~~
Appearance.c:676:3: note: here
case 'D':
^~~~
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch removes the indentation problem. The patch includes a long comment about the change.
wmiv.c: In function ‘main’:
wmiv.c:843:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (e.xclient.data.l[0] == delWindow)
^~
wmiv.c:845:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
break;
^~~~~
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch removes the format-truncation warning. The problem is because buf and comm are arrays with the same size (PATH_MAX). In the snprintf, comm is copied to buf, more some extra characters. The patch reduces the size for the array comm in the extra characters. Without the patch, the comm array is truncated. With the patch, the same characters are copied, without the warning.
wmgenmenu.c: In function ‘find_and_write’:
wmgenmenu.c:436:41: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
snprintf(buf, sizeof(buf), "%s -e %s", terminal ? terminal : "xterm" , comm);
^
wmgenmenu.c:436:5: note: ‘snprintf’ output 5 or more bytes (assuming 4105) into a destination of size 4104
snprintf(buf, sizeof(buf), "%s -e %s", terminal ? terminal : "xterm" , comm);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>