1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

255 Commits

Author SHA1 Message Date
Christophe CURIS
806784e194 Fixed wrong count to release temporary memory
As found by Rodolfo, it looks like there could be memory leak in the
function 'RSmoothScaleImage' because it reserveda given number of
memory blocs but used another count to free them after use.

This patch uses the same count for release as it seems this variable
is not modified in between. Took the opportunity as Rodolfo proposed
to convert a global variable to a local variable - this global
definition seems incorrect.
2012-11-15 12:38:25 +00:00
Tobias Stoeckmann
f25464c792 Avoid GNUism in Makefiles for *BSD support
Variable abs_srcdir will always point to proper source location.
With this patch, there is no need to call gmake on OpenBSD anymore.
2012-04-30 14:46:54 -03:00
Christophe CURIS
3ed409cbd0 wrlib: Improvement in the alpha channel support.
There are some problems in the alpha channel support, as is
reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=72917

This patch add a new RCombineAlpha function, based on Gimp. This
function is called when needed in the raster.c functions.

This patch is based on the Brad Jorsch <anomie@users.sourceforge.net>
patch for the 0.62.1-0.1 version.

[crmafra: v1 was sent by Rodolfo kix Garcia <kix@kix.es>]
2012-01-18 12:04:57 +00:00
Ambrus Szabo
8fd4821155 Fix makefiles bug.
FreeBSD make vs gmake
in FreeBSD: $(dir $<@) => ''
in gmake: $(dir $<@) => './'
2011-03-27 10:47:40 +02:00
Tamas TEVESZ
43c7abe79f Adapt for libpng changes 2011-03-24 16:19:37 +01:00
Szabó Ambrus
7feb59251e Fix compilation in FreeBSD
In FreeBSD make doesn`t work, only gmake.
2011-03-15 00:27:01 +01:00
Andreas Metzler
1060f49366 pkgconfig - minimize direct linking
Use Libs.private to avoid unnecesary direct linking.

Signed-off-by: Andreas Metzler <ametzler@downhill.at.eu.org>
2010-10-18 10:25:49 +02:00
Andreas Metzler
614eb4c9e8 Simplify/fix pkgconfig installation
Patch "Fix path substitutions" moved generation of pkgconfig files from
./configure to Makefiles. However the generation is not triggered since
the pkgconfig files are not listed as dependency. Fix by conversion to a
straightforward automake rule.

Acked-by: Brad Jorsch <anomie@users.sourceforge.net>
Signed-off-by: Andreas Metzler <ametzler@downhill.at.eu.org>
2010-10-18 10:24:45 +02:00
Brad Jorsch
5eebb8bc3c Fix some warnings
Non-obvious fixes:

WINGs/wfilepanel.c: Cast to void to avoid an unused calculated value
warning.

WINGs/wtabview.c: Test tab<0 to avoid a warning from the next condition
about signed overflow in an inlined invocation of the function.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:23 +02:00
Brad Jorsch
060ba6a9cd Fix path substitutions
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".

The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Brad Jorsch
f6080ffd56 Fix "make dist"
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Andreas Metzler
24d7457ec6 Document ABI and API changes
List ABI and API changes in the respective NEWS files.
2010-10-07 12:04:30 +02:00
Brad Jorsch
f38aa69e40 Clean up library linking
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.

Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:29 +02:00
Carlos R. Mafra
cf2301a048 Remove assembly/optimized code
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
758f4c80d1 Ungeneralize wrlib DEBUG
Plus debug messages belong on stderr.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
b4b07c2cac Kill BENCH
Nice idea, x86 assembly is so 1980s.

tests/testgrad.c could probably have been saved, but seriously, who's
going to miss it?

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Brad Jorsch
5afe745c01 Automake dependency tracking
I just spent an hour trying to find out why the latest wmaker-crm was
ignoring a number of the preferences in my configuration file. It turns
out the problem was that commit f41db5 added a value into the middle of
the enum in src/keybind.h, and the setting of
AUTOMAKE_OPTIONS = no-dependencies in all the Makefile.ams meant that
make wasn't smart enough to rebuild the files depending on it.

Would anyone mind if we just remove no-dependencies from
AUTOMAKE_OPTIONS? People can still run ./configure with
--disable-dependency-tracking to disable it at configure time.
2010-09-15 20:37:48 +02:00
Alexey I. Froloff
392ab2607d Highlite current window's appicon
This patch highlites appicon of a currently focused window.

Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:56:40 +02:00
Andreas Metzler
7e5b8e412f Add version script versioning for libwraster
Enable symbol-versioning for libwraster and stop exporting public
symbols.
2010-08-29 18:38:21 +02:00
Andreas Metzler
d872b73881 Set library version in configure.ac
Keep libtool's -version-info arguments for the three libraries
(libwraster, libWINGs and libWUtil) centralized in configure.ac
instead of in the specific Makefile.am.
2010-08-29 18:38:21 +02:00
Carlos R. Mafra
5c8eb580b3 configure: Remove --disable-verbose-compile hack
Instead of using the --disable-verbose-compile hack, let's
use the standard option --enable-silent-rules (or 'make V=0' directly)
available with autoconf 1.11 and higher.

This is enabled in autoconf by using 'silent-rules' in AM_INIT_AUTOMAKE.
The verbosity of compilation is reduced in a similar manner as using
the --disable-verbose-compile option, so we can remove all that ugly
hackery.
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
b17077ede0 Avoid more gcc warnings
WUtil.h:212: warning: function declaration isn’t a prototype
WUtil.h:259: warning: function declaration isn’t a prototype
WUtil.h:300: warning: function declaration isn’t a prototype
WINGsP.h:593: warning: function declaration isn’t a prototype
WINGsP.h:599: warning: function declaration isn’t a prototype
WINGs.h:616: warning: function declaration isn’t a prototype

raster.c:295: warning: no previous prototype for ‘calculateCombineArea’
2010-08-29 14:55:14 +02:00
Tamas TEVESZ
e75b1b6d70 wrlib: Use snprintf() instead of sprintf() 2010-05-11 09:18:12 +02:00
Carlos R. Mafra
518b3b4480 Fix 'make install' from silent compilation 2010-04-12 09:58:37 +02:00
Brad Jorsch
554f9dea25 Remove apparently-unused files
WPrefs.app/Font.c - unused since 2004
wrlib/configure.in - not used and not really edited since 1998, so it's
    probably very out of date
2010-04-12 09:58:37 +02:00
Brad Jorsch
bbe55ba242 Fix "make dist"
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
2010-04-12 09:58:37 +02:00
Tamas TEVESZ
6b5cfc887a Fix out-of-tree builds
- The throwing out of autogen.sh in favor of autoreconf comes from
  http://www.gnu.org/software/automake/manual/autoconf/autoreconf-Invocation.html#autoreconf-Invocation
- 'think that instead of the exit, some better way should be put in
  to control whether or not to automatically run configure. Or maybe
  just don't even run it.
2010-04-09 15:16:31 +02:00
Tamas TEVESZ
241e66ff0a Tidy
- Kill unused vars in wrlib
- Add missing initializers to defaults.c:staticOptionList
- Re-format it slightly
- Kill some dead code
- Kill stupid "if (const op var)"
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
444de5e6b6 Make asm code readable 2010-04-01 11:24:25 +02:00
Tamas TEVESZ
7b9b7de172 Fix png 1.4+ builds
- png_check_sig was removed from png 1.4, use replacement fun, which is
  already present in 1.2.0 (cca. 2001)
2010-03-29 21:18:37 +02:00
Tamas TEVESZ
71aa4f2884 Switch file ops to stdio
- Does away with the O_BINARY abomination
- as a byproduct, plugs an fd leak in wcolorpanel.c:fetchFile()
- sprinkle some fsync()s to files that have been written to (this
  needs to be done everywhere)

+ fix brown paper bag thinko in configure.ac
2010-03-27 10:31:13 +01:00
Tamas TEVESZ
28cbda550a Remove dead code from wrlib 2010-03-26 21:08:17 +01:00
Martin Frydl
1f3adb0ea5 Patch for WINGs buffer overflow
I've found a buffer overflow problem in RSmoothScaleImage. There are
some scaling calculations involving floats which are finally converted
to integers. Since such conversion does not round the number, just
truncates the decimal part, sometimes the number is smaller than it
should be. As a result, smaller buffer is allocated for picture
scaling and thus buffer overflow occurs.

Strange thing is that this bug has not appeared earlier so it probably
has something to do with newer gcc or glibc (I switch from
"prehistoric" Fedora Core 5 to Fedora 12).

<What about the symptoms?>

There were several ones, probably depending on application version and
compilation flags. First, it just stopped responding. Looking at the
process with strace I saw it locked in some FUTEX wait (unfortunately
I don't have the logs). Second, it just crashed. And last I got
complaint from glibc about double free or corrupted heap before
malloc. I've found the bug through wmweather+ dockapp, versions 2.9
and 2.11 (http://sourceforge.net/projects/wmweatherplus/), I've never
encountered it in WindowMaker itself.
2010-02-26 13:15:18 +01:00
Nicolas Bonifas
ad853b386e Removed unused version of RScaleImage() in wrlib/scale.c
... as the "broken_code" preprocessor symbol appears nowhere else.
2010-02-26 13:08:42 +01:00
Carlos R. Mafra
b3e817305d Do not compile extra stuff under wrlib/tests etc
Let's avoid compiling these "tests" and extra stuff every time,
saving us some time.
2010-01-06 11:34:24 +01:00
Tamas TEVESZ
0a47a19b3e Remove bundled wrlib stuff
This patch removes bits and pieces of xmu that for some reason
have been bundled with wmaker. I can very well imagine that at the time
they were bundled, xmu was not, was not available everywhere, or
whatever.

I couldn't come across a system that doesn't have these things in its
system-supplied x libs, though i've been carrying this since january,
and my memory is quite flakey at times.

certainly nothing xorg is at danger, nor xfree86 dating back to at
least 3.3. i believe this stuff should be everywhere that calls itself
to be on par with x11r6.3 at the very least.

it would be incredibly useful if people having access to commercial
unixes could check this on things released in the past, say, 15 years.
i believe back then i had solaris 8+and sco openserver 5+ covered.
2009-09-13 21:40:47 +02:00
Carlos R. Mafra
18c7a20136 Delete stale .cvsignore files 2009-09-13 12:59:25 +02:00
Andreas Tscharner
5b93254d0f Fix compilation failure
This fixes a compilation failure with gcc-4.3.4, where it complains

nxpm.c: In function RGetImageFromXPMData:
nxpm.c:99: error: expected expression before ] token
...
2009-09-09 22:18:34 +02:00
Carlos R. Mafra
88ab8b74b4 wmrlib: Avoid code duplication
We can put common repeated code into a helper function, and
increase readability a bit.
2009-09-03 23:56:33 +02:00
Alexey I. Froloff
2ccc8e4a79 Remove alloca(3)
And use malloc() instead.

See "Dropped useless use of alloca(3)" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 21:10:48 +02:00
Tamas TEVESZ
9af6316d1d k&r->ansi some stuff
ansify and "fix" function pointer declarations
2009-08-29 21:49:22 +02:00
Tamas TEVESZ
f893728d2d Fix format strings 2009-08-23 21:10:02 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
Tamas TEVESZ
b487d56452 Sync comment with reality
Or rather, remove possibility for comment to diverge from reality
2009-08-09 01:51:25 +02:00
Carlos R. Mafra
72689513a3 Makefile: Beautify compilation messages
This patch adds the --disable-verbose-compile switch to the
configure script.

When this option is used it reduces the verbosity of compilation
messages to the essential. However compiler warnings are not affected
and thus gain visibility by not standing in the middle of a storm
of other messages.

In summary, the compilation messages are reduced to a stream of

CC array.o
CC bagtree.o
CC configuration.o
CC connection.o
CC data.o
[...]

instead of a mind-boggling flux of

gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src
-I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c array.c
gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs
-I../wrlib -I../src -I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c bagtree.c
[...]
2008-11-05 18:03:07 +01:00
dan
054f954390 Applied some patches from Balaton Zoltan <balaton@eik.bme.hu>
- small fix for compilation in a different directory than the source
- fixed some warnings on 64bit platforms
2006-01-22 15:53:44 +00:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
dan
91f5abc955 - fixed gcc-4 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
- fixed amd64 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
2005-08-22 19:07:57 +00:00
dan
e3df52ca51 - Fixed compilation include path issue in wrlib/tests
- Removed unnecessary included headers (we don't use Xt)
2005-03-02 10:59:40 +00:00
dan
b62e379299 fix for broken 'make install' introduced by previous commit 2005-01-06 15:55:46 +00:00