Giel van Schijndel
906f766b8a
* When using a va_list multiple times make sure to va_copy it first
...
* Make sure to call va_end on all instances of va_list when we're done with it
Similar to r5930 (which fixed ticket:50)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5931 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 20:10:47 +00:00
Giel van Schijndel
37c6b31651
* When using a va_list multiple times make sure to va_copy it first
...
* Because va_copy is C99 provide a fallback for it on non-C99 systems (which assumes that va_list is just a pointer to the stack)
This fixes ticket:50, thanks to Buginator for finding the cause (though this solution is different from his suggestion)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5930 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 19:38:22 +00:00
Freddie Witherden
548c43e6e3
Add support for resize and reposition events to betawidget.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5929 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 17:05:56 +00:00
Freddie Witherden
d7d9e3286c
Fix bug #12268 which caused abandoned factory modules to result in destruction of the entire factory.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5928 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 16:30:46 +00:00
Freddie Witherden
9deaad010d
Simplify event creation by adding a helper function to generate the base structure.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5927 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 15:03:21 +00:00
Freddie Witherden
4c70b5eb7a
Fix a bug similar in ilk to that fixed in r5925, except for vertical as opposed to horizontal window alignment.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5926 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 21:36:28 +00:00
Freddie Witherden
ad1a6db74e
Fix a bug in the window alignment code, thanks to Elio for reporting it.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5925 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:05:29 +00:00
Freddie Witherden
79df709d5b
Improve the Doxygen documentation for widget.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5924 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:02:39 +00:00
Per Inge Mathisen
eedb9a9c98
Cosmetic fix: Make EffectGetNumFrames static.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5923 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 16:22:24 +00:00
Freddie Witherden
7453cee5bb
Add textEntry class (warning: unfinished) to betawidget.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5920 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 17:53:34 +00:00
Freddie Witherden
a31fbb4561
Minor indentation fix to clipboardWin32.c.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5919 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:31:42 +00:00
Freddie Witherden
2a8cee26b5
Re-write the Windows clipboard support; Unicode is now supported; add support for setting clipboard text.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5918 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:27:00 +00:00
Freddie Witherden
bef604763f
Add an nbytes parameter to UTF8toUTF16 and UTF16toUTF8 which allow for fetching the number of bytes allocated.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5917 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 14:37:01 +00:00
Freddie Witherden
a8709983e0
Commit the final patch of patch #45 ; this cleans up utf.[ch].
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5916 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 11:21:12 +00:00
Giel van Schijndel
99fe22e0a4
Don't accept out-of-range Unicode codepoints in function unicode_utf8_char_length either
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5915 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:16:00 +00:00
Giel van Schijndel
aabf08d6fa
Change the UTF-8 encoder and decoder to only accept valid Unicode codepoints, not just every representable 32 bit unsigned integer
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:10:03 +00:00
Tim Baumgartner
8fe5abb6c1
-Reverted trunk Xcode project file to pre-r5912 as changes to 2.1 branch were ac
...
cidentally committed to trunk
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5913 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 22:33:52 +00:00
Tim Baumgartner
c661f58660
-Removed references to non-existant files in the 2.1 branch Xcode project file
...
-Ported macosx/external/bison.sh from trunk to 2.1 branch for use with the updated Xcode project file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5912 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 22:20:27 +00:00
Giel van Schijndel
0e88a86b8e
Add two new functions: utf(8|16)_char_at_offset, which return a pointer to the index-th character in the given stream
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5911 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:39:17 +00:00
Giel van Schijndel
f0f68e7386
Rename utf8.[ch] to utf.[ch] because it deals with different UTFs (Unicode Transformation Format) but not just specifically with UTF-8
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5910 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:06:40 +00:00
Freddie Witherden
de59586edf
Fix compilation of betawidget on OS X; ensure we correctly restore the layout if a child could not be added.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5905 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 10:17:09 +00:00
Freddie Witherden
8114b1e71f
Fix a bug in the window alignment code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5904 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 18:14:58 +00:00
Freddie Witherden
2f1cb8dcdc
Add widgetSDLInit and widgetSDLQuit to initialise and uninitialise the widget system under SDL.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5903 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 17:15:43 +00:00
Giel van Schijndel
d3eaf3bbd1
Add several new functions for converting between UTF-8 and UTF-16 to utf8.[ch]
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5902 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:16 +00:00
Giel van Schijndel
a0cdfd44ab
Rename utf8_(encode|decode) to utf8_(encode|decode)_utf32 because they convert between UTF-8 and UTF-32
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5901 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:09 +00:00
Giel van Schijndel
dfa9c2bc01
Rename function unicode_strlen to utf32_strlen because it really determines the length of a UTF-32 encoded string
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5900 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:49:11 +00:00
Giel van Schijndel
2cb4c71883
* Split out the code that encodes a single Unicode character as UTF-8 into a separate function: encode_utf8_char
...
* This will allow encoding of Unicode strings to UTF-8 regardless of its current encoding
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5899 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:15 +00:00
Giel van Schijndel
ac08ca70b0
* Seperate out the part that determines a single Unicode character's (codepoint actually) length when encoded as UTF-8 into a separate function: unicode_utf8_char_length
...
* This will allow determining of the length of a string when encoded as UTF-8 regardless of its current encoding
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5898 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:06 +00:00
Giel van Schijndel
5222037799
Move the duplicated UTF-8 decoding code out of functions utf8_character_count and utf8_decode and into new function decode_utf8_char, which only decodes a single UTF-8 character sequence
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5897 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:24:27 +00:00
Giel van Schijndel
b10871a0ab
Add utf8.c to the win32 makefile system (which I forgot in r5895)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:38:26 +00:00
Giel van Schijndel
d45e64bf55
Reintroduce utf8.{c,h} for encoding and decoding UTF-8 strings
...
This is meant to be used with betawidget
This is a revert of r2477 (which removed the UTF-8 module)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5895 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:34:46 +00:00
Freddie Witherden
0d58106de3
Make tool-tip events irrelevant for child widgets.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5894 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 10:36:52 +00:00
Freddie Witherden
cef3ce8060
Improve the Doxygen documentation for clipboard.h; make the return value of widgetSetClipboardText on OS X mean something.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5893 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 10:02:28 +00:00
Freddie Witherden
d5b0c12182
Slight refactoring of X11 clipboard code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5892 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 22:38:26 +00:00
Freddie Witherden
e952b616c2
Remove a printline from the X11 clipboard code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5891 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 18:59:29 +00:00
Freddie Witherden
0f46539a45
Add clipboard support for X11.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5890 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 18:42:54 +00:00
Buginator
c8beeaff83
Updating menu layout to a more logical order.
...
Closes bug #11801 & ticket #41
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5888 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 17:06:13 +00:00
Tim Baumgartner
56c578e28f
-During the OS X build process, if a local build of Bison is built, it is now installed properly within the Bison source directory so that Bison's supporting files should always be found
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5887 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 04:42:18 +00:00
Tim Baumgartner
32b43be24f
-Changed OS X downloaded version of QuesoGLC from tags/v0_7_1/quesoglc/ (r762) to branches/release-0.7/quesoglc/ (r835) to utilize QuesoGLC bug fixes (specifically the inline function linking error fix)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5886 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 02:38:57 +00:00
Tim Baumgartner
5cbce8754a
Changes to the OS X build system
...
-Xcode project now only downloads and build Bison if the system version is not a compatible version of Bison (and if the Bison binary in macosx/external/bison/ does not exist)
-Added a Bison wrapper that calls the version of Bison in macosx/external/bison/ if it exists, otherwise the system Bison executable is used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5885 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 02:10:29 +00:00
Giel van Schijndel
37c6aa9fd6
Make sure to clean up the sound streams as well in function sound_ShutdownLibrary()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5884 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 20:12:47 +00:00
Per Inge Mathisen
ceb4e23eda
patch #1096 : Improve speed of fireOnLocation, and use it to fix AI bug
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5883 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 19:55:09 +00:00
Giel van Schijndel
99605c5982
Don't use a forward declaration to declare pointers to BASE_OBJECT as that somehow goes wrong (I'm guessing related to WZ_DECL_MAY_ALIAS), instead #include basedef.h in baseobject.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5882 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 19:26:06 +00:00
Freddie Witherden
a06bb014df
Add partially-finished SDL wrapper code to betawidfet.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5881 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 15:34:21 +00:00
Ari Johnson
d5b341334d
More changes from #ifdef __APPLE__ to #if defined(WZ_OS_MAC)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5880 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 15:24:21 +00:00
Giel van Schijndel
5bc5e1a873
Replace #ifdef __APPLE__ (from r5878) with #if defined(WZ_OS_MAC)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5879 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 14:21:39 +00:00
Tim Baumgartner
c6ddf919c1
This commit fixes OS X build errors.
...
-Fixed Xcode project Release configuration framework and library search paths to point to their respective Release directories (rather than to the Debug directories)
-Added baseobject.h and baseobject.c to the Xcode project file
-Added preprocessor conditional to multiint.c so that the proper GLC header is included on OS X systems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5878 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 07:25:48 +00:00
Ari Johnson
680cbae43c
Committed patch from mailing list message <4894F4FB.3050205@gmail.com>
...
due to Tim Baumgartner.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5877 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-26 15:27:40 +00:00
Freddie Witherden
94bbbf4250
Re-organise betawidget as proposed on the mailing list; add paste support for Win32 (needs testing).
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5876 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-26 11:01:17 +00:00
Freddie Witherden
2ea48df684
Fix some more typos in widget.h and correct the indentation.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5875 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 20:37:41 +00:00