Commit Graph

125 Commits (79ed9b96e83e8740e05a5d2a75d06e95467cb514)

Author SHA1 Message Date
Buginator f0d0bd7ebe Fixes a dangling pointer issue with a global.
In certain circumstances, if you try to abort out of a MP game (maybe SP as well), it would crash after deleting the widget, since it was still referencing the pointer in the global.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6732 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 01:40:19 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Per Inge Mathisen 704117f85c Fix various doxygen errors and warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Giel van Schijndel 34b73dcdb5 Invert logically wrong assertion (i.e. assert a pointer to be non-null rather than null)
This fixes bug #12047 (assert failure as soon as you open one of the design/manufacture/construct/research windows)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5583 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 14:28:36 +00:00
Giel van Schijndel 5554dbe695 * Move duplicated code to fetch a tabbed widget form by ID to a function of its own: widgGetTabbedFormById
* In widgSetTabs depend on functions widgGetNumTabMajor and widgGetNumTabMinor respectively instead of duplicating their code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5573 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 15:17:29 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Dennis Schridde 050ec39c11 Use the (also new in this commit) relative variants of the directories almost everywhere.
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde fd2bfb0e0f Prepare for another fix for parts of bug #11883: Issues with the improved raw Makefiles
- Rename Makefile.raw to lowercase


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde 73b35ab8d6 Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
Their use is currently flawed, since it will not work in directories with spaces in them... (


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde 9bd8b24921 Boost raw Makefiles
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
   When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Giel van Schijndel 13aeeafc97 Less ASSERT(false, ... crap, use ASSERT(!"description", ... instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5301 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 18:22:49 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen 13fa22fcbf Revert r4932 and try a different fix instead, checking the number of tabs
actually allocated, and resetting the currently highlighted tab if it is
out of bounds.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 20:32:31 +00:00
Giel van Schijndel 61c8bbc4b9 * Don't "Guarantee nul-termination" after snprintf as snprintf does that itself already (per the C99 spec)
* Use strlcpy for copying strings instead of snprintf "%s"
 * Don't cast the return value from vsnprintf to (void)
 * When we use va_start make sure to use va_end as well...
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:21:41 +00:00
Per Inge Mathisen cefef3651c Add doxygen markup to projectile code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4759 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 17:23:11 +00:00
Per Inge Mathisen 5533cf265a Add more doxygen markup, especially for widget code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 17:06:25 +00:00
Per Inge Mathisen e853c606f8 A little bit of indentation cleanup so that the code can be read.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:12:56 +00:00
Per Inge Mathisen 650447d833 Fix crash when trying to delete text coming from a clipboard paste.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:11:48 +00:00
Per Inge Mathisen 81c88dbf38 Purely cosmetic cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4731 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:02:46 +00:00
Giel van Schijndel 4a17aeeec7 * Delete unused and empty function StartTacticalScroll()
* Mark the parameters for several functions as WZ_DECL_UNUSED (for those functions that require the parameter as part of their interface)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 17:17:50 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Per Inge Mathisen b58826bce4 Fix assert in widget code by simply increasing maximum major tabs that can be shown.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4397 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 18:41:53 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Giel van Schijndel ed37f5a2d0 Add some header guards to scrap.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4288 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 00:59:05 +00:00
Giel van Schijndel 918be1e737 Get rid of the widget heap initialisation stuff
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4287 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 00:32:00 +00:00
Roman C a1008c093d Reduce amount of junk in the MSVC compilation output by about 70%.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Giel van Schijndel 150f0ed209 #include fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4266 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:08:49 +00:00
Giel van Schijndel b19b0bcda6 widgbase.h depends on textdraw.h so #include it...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4263 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:33:59 +00:00
Giel van Schijndel ae4faeac64 * Remove an unnecessary #include directive from `clparse.c`
* widgbase.h depends on piedef.h so #include it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:30:41 +00:00
Giel van Schijndel d4adf8fe42 Use enum `iV_fonts` instead of `int` to represent fonts in the widget code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4261 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:12:23 +00:00
Giel van Schijndel 8138e1b0d8 Turn some file-level comments in lib/widgets into Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4209 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 21:36:39 +00:00
Giel van Schijndel 8421b9fee4 Turn some file-level comments in lib/widgets into Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4206 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 15:40:23 +00:00
Giel van Schijndel de2b3ba61d Move psRetWidget into the W_SCREEN structure (instead of it being a global variable)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4205 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 15:40:09 +00:00
Giel van Schijndel 9895df559d Make widgCreateScreen return the screen it created or NULL on failure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4200 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:42 +00:00
Giel van Schijndel 3ed3acd891 Clean up formCreate and widgAddForm:
* Make formCreate and widgAddForm take their psInit parameters as const
 * Make formCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4199 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:36 +00:00
Giel van Schijndel 86ca2b5f06 Clean up editBoxCreate and widgAddEditBox:
* Make editBoxCreate and widgAddEditBox take their psInit parameters as const
 * Make editBoxCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4198 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:30 +00:00
Giel van Schijndel 6ea7968f46 Clean up labelCreate and widgAddLabel:
* Make labelCreate and widgAddLabel take their psInit parameters as const
 * Make labelCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4197 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:20 +00:00
Giel van Schijndel 7e6e7d8b1f Clean up buttonCreate and widgAddButton:
* Make buttonCreate and widgAddButton take their psInit parameters as const
 * Make buttonCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:15 +00:00
Giel van Schijndel a4987cfefb Clean up barGraphCreate and widgAddBarGraph:
* Make barGraphCreate and widgAddBarGraph take their psInit parameters as const
 * Make barGraphCreate return the bar it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4195 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:05 +00:00
Giel van Schijndel cd8365fb01 Cleanup of widgRunScreen
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4194 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:21:53 +00:00
Giel van Schijndel 20448076bf Revert part of r4184:
* Don't use abort() as it'll be triggered in non-debug builds as well, so stick with the ASSERT(FALSE, ...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4192 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 13:23:35 +00:00
Giel van Schijndel d5e31eb751 Make sliderCreate return a pointer to its created slider and NULL on failure
Const correctness:
 * make sliderCreate and widgAddSlider take its psInit pointers as const


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4185 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 11:47:23 +00:00
Giel van Schijndel dd02289a5e Clean up sliderCreate and widgAddSlider
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4184 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 11:47:19 +00:00
Dennis Schridde 2537bfc61c Cleanup #includes a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Dennis Schridde cb2f0a30df Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Giel van Schijndel 33216b2e9d Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00