* Get rid of treapint.h which declares prototypes for functions that are only used in treap.c.

* Declare these functions with static linkage instead.
 * Update autotools buildsystem, Code::Blocks project and MSVC project, raw win32 Makefiles don't need an update

NOTE: This may require updating of buildsystems not mentioned above

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5544 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-14 15:19:08 +00:00
parent 514d96d72a
commit 730188c081
5 changed files with 4 additions and 62 deletions

View File

@ -15,7 +15,7 @@ noinst_LIBRARIES = libframework.a
noinst_HEADERS = configfile.h cursors.h debug.h frame.h frameint.h \
frameresource.h input.h lexer_input.h listmacs.h math-help.h \
printf_ext.h resly.h strlfuncs.h strnlen1.h strres.h strresly.h treap.h \
treapint.h trig.h types.h tagfile.h i18n.h file.h physfs_ext.h
trig.h types.h tagfile.h i18n.h file.h physfs_ext.h
libframework_a_SOURCES = SDL_framerate.c configfile.c cursors.c cursors16.c \
cursors32.c debug.c frame.c frameresource.c input.c lexer_input.c \

View File

@ -373,10 +373,6 @@
RelativePath=".\treap.h"
>
</File>
<File
RelativePath=".\treapint.h"
>
</File>
<File
RelativePath=".\trig.h"
>

View File

@ -33,7 +33,6 @@
#include "types.h"
#include "debug.h"
#include "treap.h"
#include "treapint.h"
/* Position of the last call */
static SDWORD cLine;
@ -141,7 +140,7 @@ static void treapRotLeft(TREAP_NODE **ppsRoot)
}
/* Recursive function to add an object to a tree */
void treapAddNode(TREAP_NODE **ppsRoot, TREAP_NODE *psNew, TREAP_CMP cmp)
static void treapAddNode(TREAP_NODE **ppsRoot, TREAP_NODE *psNew, TREAP_CMP cmp)
{
if (*ppsRoot == NULL)
{
@ -202,9 +201,8 @@ BOOL treapAdd(TREAP *psTreap, void *key, void *pObj)
return true;
}
/* Recursively find and remove a node from the tree */
TREAP_NODE *treapDelRec(TREAP_NODE **ppsRoot, void *key, TREAP_CMP cmp)
static TREAP_NODE *treapDelRec(TREAP_NODE **ppsRoot, void *key, TREAP_CMP cmp)
{
TREAP_NODE *psFound;
@ -385,8 +383,7 @@ void treapDestroy(TREAP *psTreap)
}
/* Recursively display the treap structure */
void treapDisplayRec(TREAP_NODE *psRoot, UDWORD indent);
void treapDisplayRec(TREAP_NODE *psRoot, UDWORD indent)
static void treapDisplayRec(TREAP_NODE *psRoot, UDWORD indent)
{
UDWORD i;

View File

@ -1,45 +0,0 @@
/*
This file is part of Warzone 2100.
Copyright (C) 1999-2004 Eidos Interactive
Copyright (C) 2005-2007 Warzone Resurrection Project
Warzone 2100 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Warzone 2100 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Warzone 2100; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*! \file treapint.h
* * \brief Internal function calls for the treap system to allow it
* to be used by the memory system.
*
*/
#ifndef _treapint_h
#define _treapint_h
/* Check the header files have been included from frame.h if they
* are used outside of the framework library.
*/
#if !defined(_frame_h) && !defined(FRAME_LIB_INCLUDE)
#error Framework header files MUST be included from Frame.h ONLY.
#endif
/* Recursive function to add an object to a tree */
extern void treapAddNode(TREAP_NODE **ppsRoot, TREAP_NODE *psNew, TREAP_CMP cmp);
/* Recursively find and remove a node from the tree */
extern TREAP_NODE *treapDelRec(TREAP_NODE **ppsRoot, void *key, TREAP_CMP cmp);
/* Recursively display the treap structure */
extern void treapDisplayRec(TREAP_NODE *psRoot, UDWORD indent);
#endif

View File

@ -510,12 +510,6 @@
<Option target="DBGWindows" />
<Option target="NDBGWindows" />
</Unit>
<Unit filename="lib/framework/treapint.h">
<Option target="DBGUnix" />
<Option target="NDBGUnix" />
<Option target="DBGWindows" />
<Option target="NDBGWindows" />
</Unit>
<Unit filename="lib/framework/trig.c">
<Option compilerVar="CC" />
<Option target="DBGUnix" />