We use US English which uses behavior. So we replace all occurrences of
behaviour.
Most notable is File Open behavior in preferences. Besides that several
mentions in function documentation and a few in comments.
On Windows, the macros COPY, REMOVE and REMOVE_DIR are allocated
strings, unlike on other platforms, so the way we use these returned
values, they are never freed.
Instead make win32_command() keep a copy of the allocated string as
static to the function and free it there at each next call (the returned
value being type-casted to (const gchar *)). It will still leak the last
string, but anyway gimptool is short-lived.
Also it should silence static analyzers.
Commit 283ec1da0f previously pushed had some coding style bugs, which
unfortunately couldn't be fixed before pushing because the platform
doesn't allow it and the original contributor is not available lately.
Let's fix these.
The code was basically leaking memory everywhere, and apparently on
purpose (according to a top comment). Even on short-lived process, not
properly managing memory is not a good habit, especially if we plan to
maintain a program for the long run.
So here are some fixes. I'm sure I must have missed some places (code
was a mess), and hopefully I broke nothing. But that's good for now. At
least it is somewhat sane code now.
Since commit 58fa382001, gimptool would accept source files with
non-standard extensions when using known C or C++ compilers. This would
include source with no extensions at all.
When this happens, do not try to set a pointer to a non-existing dot
separator to '\0'. That obviously segfaults.
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-10-01 Sven Neumann <sven@gimp.org>
* tools/gimptool.c: create the target directory and intermediate
parent directories as needed. Restores the behavior of the
gimptool shell script.
svn path=/trunk/; revision=27101
2008-09-04 Tor Lillqvist <tml@novell.com>
* tools/gimptool.c: Make it compile without warnings also with gcc
-Wwrite-strings. Use cmd.exe instead of command.com to execute the
COPY and DEL commands on Windows.
svn path=/trunk/; revision=26865
2007-11-17 Tor Lillqvist <tml@novell.com>
* tools/gimptool.c: Ignore --msvc-syntax unless on Windows. Put
some Windows-only stuff inside ifdef.
svn path=/trunk/; revision=24179
2007-11-16 Tor Lillqvist <tml@novell.com>
Use the gimptool program on Unix, too, instead of the gimptool
script.
* configure.in
* Makefile.am: Drop gimptool script and gimptool-win32.c(.in)
* tools/gimptool.c
* tools/Makefile.am: Move gimptool-win32.c.in here and call it
just gimptool.c. Build and install on all platforms.
* tools/gimptool.c: Change accordingly.
* doc/gimptool.1.in: Document the --msvc-syntax option.
svn path=/trunk/; revision=24178