From: <Mee...@us...> - 2011-07-24 19:58:35
|
Revision: 3663 http://sc2.svn.sourceforge.net/sc2/?rev=3663&view=rev Author: Meep-Eep Date: 2011-07-24 19:58:25 +0000 (Sun, 24 Jul 2011) Log Message: ----------- Preparing for linking with C++ code, from Scott A. Colcord. Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/src/endian_uqm.h trunk/sc2/src/libs/alarm.h trunk/sc2/src/libs/callback.h trunk/sc2/src/libs/cdplib.h trunk/sc2/src/libs/compiler.h trunk/sc2/src/libs/declib.h trunk/sc2/src/libs/file.h trunk/sc2/src/libs/gfxlib.h trunk/sc2/src/libs/heap.h trunk/sc2/src/libs/inplib.h trunk/sc2/src/libs/list.h trunk/sc2/src/libs/log.h trunk/sc2/src/libs/mathlib.h trunk/sc2/src/libs/md5.h trunk/sc2/src/libs/memlib.h trunk/sc2/src/libs/misc.h trunk/sc2/src/libs/net.h trunk/sc2/src/libs/platform.h trunk/sc2/src/libs/reslib.h trunk/sc2/src/libs/sndlib.h trunk/sc2/src/libs/strlib.h trunk/sc2/src/libs/tasklib.h trunk/sc2/src/libs/threadlib.h trunk/sc2/src/libs/timelib.h trunk/sc2/src/libs/uio.h trunk/sc2/src/libs/uioutils.h trunk/sc2/src/libs/unicode.h trunk/sc2/src/libs/vidlib.h trunk/sc2/src/options.h trunk/sc2/src/port.h trunk/sc2/src/types.h trunk/sc2/src/uqm/battle.h trunk/sc2/src/uqm/battlecontrols.h trunk/sc2/src/uqm/build.h trunk/sc2/src/uqm/clock.h trunk/sc2/src/uqm/cnctdlg.h trunk/sc2/src/uqm/coderes.h trunk/sc2/src/uqm/collide.h trunk/sc2/src/uqm/comm.h trunk/sc2/src/uqm/commanim.h trunk/sc2/src/uqm/commglue.h trunk/sc2/src/uqm/cons_res.h trunk/sc2/src/uqm/controls.h trunk/sc2/src/uqm/credits.h trunk/sc2/src/uqm/demo.h trunk/sc2/src/uqm/displist.h trunk/sc2/src/uqm/element.h trunk/sc2/src/uqm/encount.h trunk/sc2/src/uqm/flash.h trunk/sc2/src/uqm/fmv.h trunk/sc2/src/uqm/gameev.h trunk/sc2/src/uqm/gameopt.h trunk/sc2/src/uqm/gamestr.h trunk/sc2/src/uqm/gendef.h trunk/sc2/src/uqm/globdata.h trunk/sc2/src/uqm/grpinfo.h trunk/sc2/src/uqm/hyper.h trunk/sc2/src/uqm/init.h trunk/sc2/src/uqm/intel.h trunk/sc2/src/uqm/ipdisp.h trunk/sc2/src/uqm/load.h trunk/sc2/src/uqm/master.h trunk/sc2/src/uqm/menustat.h trunk/sc2/src/uqm/oscill.h trunk/sc2/src/uqm/pickship.h trunk/sc2/src/uqm/planets/elemdata.h trunk/sc2/src/uqm/planets/generate/gendefault.h trunk/sc2/src/uqm/planets/generate.h trunk/sc2/src/uqm/planets/lander.h trunk/sc2/src/uqm/planets/lifeform.h trunk/sc2/src/uqm/planets/plandata.h trunk/sc2/src/uqm/planets/planets.h trunk/sc2/src/uqm/planets/scan.h trunk/sc2/src/uqm/planets/sundata.h trunk/sc2/src/uqm/process.h trunk/sc2/src/uqm/races.h trunk/sc2/src/uqm/restart.h trunk/sc2/src/uqm/save.h trunk/sc2/src/uqm/settings.h trunk/sc2/src/uqm/setup.h trunk/sc2/src/uqm/setupmenu.h trunk/sc2/src/uqm/ship.h trunk/sc2/src/uqm/shipcont.h trunk/sc2/src/uqm/ships/androsyn/androsyn.h trunk/sc2/src/uqm/ships/arilou/arilou.h trunk/sc2/src/uqm/ships/blackurq/blackurq.h trunk/sc2/src/uqm/ships/chenjesu/chenjesu.h trunk/sc2/src/uqm/ships/chmmr/chmmr.h trunk/sc2/src/uqm/ships/druuge/druuge.h trunk/sc2/src/uqm/ships/human/human.h trunk/sc2/src/uqm/ships/ilwrath/ilwrath.h trunk/sc2/src/uqm/ships/lastbat/lastbat.h trunk/sc2/src/uqm/ships/melnorme/melnorme.h trunk/sc2/src/uqm/ships/mmrnmhrm/mmrnmhrm.h trunk/sc2/src/uqm/ships/mycon/mycon.h trunk/sc2/src/uqm/ships/orz/orz.h trunk/sc2/src/uqm/ships/pkunk/pkunk.h trunk/sc2/src/uqm/ships/probe/probe.h trunk/sc2/src/uqm/ships/shofixti/shofixti.h trunk/sc2/src/uqm/ships/sis_ship/sis_ship.h trunk/sc2/src/uqm/ships/slylandr/slylandr.h trunk/sc2/src/uqm/ships/spathi/spathi.h trunk/sc2/src/uqm/ships/supox/supox.h trunk/sc2/src/uqm/ships/syreen/syreen.h trunk/sc2/src/uqm/ships/thradd/thradd.h trunk/sc2/src/uqm/ships/umgah/umgah.h trunk/sc2/src/uqm/ships/urquan/urquan.h trunk/sc2/src/uqm/ships/utwig/utwig.h trunk/sc2/src/uqm/ships/vux/vux.h trunk/sc2/src/uqm/ships/yehat/yehat.h trunk/sc2/src/uqm/ships/zoqfot/zoqfot.h trunk/sc2/src/uqm/sis.h trunk/sc2/src/uqm/sounds.h trunk/sc2/src/uqm/starbase.h trunk/sc2/src/uqm/starcon.h trunk/sc2/src/uqm/state.h trunk/sc2/src/uqm/status.h trunk/sc2/src/uqm/supermelee/buildpick.h trunk/sc2/src/uqm/supermelee/loadmele.h trunk/sc2/src/uqm/supermelee/melee.h trunk/sc2/src/uqm/supermelee/meleesetup.h trunk/sc2/src/uqm/supermelee/meleeship.h trunk/sc2/src/uqm/supermelee/netplay/checkbuf.h trunk/sc2/src/uqm/supermelee/netplay/checksum.h trunk/sc2/src/uqm/supermelee/netplay/crc.h trunk/sc2/src/uqm/supermelee/netplay/netconnection.h trunk/sc2/src/uqm/supermelee/netplay/netinput.h trunk/sc2/src/uqm/supermelee/netplay/netmelee.h trunk/sc2/src/uqm/supermelee/netplay/netmisc.h trunk/sc2/src/uqm/supermelee/netplay/netoptions.h trunk/sc2/src/uqm/supermelee/netplay/netrcv.h trunk/sc2/src/uqm/supermelee/netplay/netsend.h trunk/sc2/src/uqm/supermelee/netplay/netstate.h trunk/sc2/src/uqm/supermelee/netplay/notify.h trunk/sc2/src/uqm/supermelee/netplay/notifyall.h trunk/sc2/src/uqm/supermelee/netplay/packet.h trunk/sc2/src/uqm/supermelee/netplay/packethandlers.h trunk/sc2/src/uqm/supermelee/netplay/packetq.h trunk/sc2/src/uqm/supermelee/netplay/packetsenders.h trunk/sc2/src/uqm/supermelee/netplay/proto/npconfirm.h trunk/sc2/src/uqm/supermelee/netplay/proto/ready.h trunk/sc2/src/uqm/supermelee/netplay/proto/reset.h trunk/sc2/src/uqm/supermelee/pickmele.h trunk/sc2/src/uqm/tactrans.h trunk/sc2/src/uqm/units.h trunk/sc2/src/uqm/util.h trunk/sc2/src/uqm/velocity.h trunk/sc2/src/uqm/weapon.h Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/ChangeLog 2011-07-24 19:58:25 UTC (rev 3663) @@ -1,4 +1,5 @@ Changes towards version 0.8: +- Preparing for linking with C++ code, from Scott A. Colcord - Fixed player's phrase leading to Tanaka's response about a solitary vigil (bug #859) - Alex - Added the Ur-Quan to the list of starfaring races on which Commander Modified: trunk/sc2/src/endian_uqm.h =================================================================== --- trunk/sc2/src/endian_uqm.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/endian_uqm.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -61,6 +61,11 @@ #define UQM_Swap32 __arch__swab32 #endif #endif /* linux */ + +#if defined(__cplusplus) +extern "C" { +#endif + /* Use inline functions for compilers that support them, and static functions for those that do not. Because these functions become static for compilers that do not support inline functions, this @@ -124,4 +129,8 @@ #define UQM_SwapBE64(X) (X) #endif +#if defined(__cplusplus) +} +#endif + #endif /* _ENDIAN_H */ Modified: trunk/sc2/src/libs/alarm.h =================================================================== --- trunk/sc2/src/libs/alarm.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/alarm.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -1,2 +1,9 @@ +#if defined(__cplusplus) +extern "C" { +#endif + #include "callback/alarm.h" +#if defined(__cplusplus) +} +#endif Modified: trunk/sc2/src/libs/callback.h =================================================================== --- trunk/sc2/src/libs/callback.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/callback.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -1,2 +1,10 @@ +#if defined(__cplusplus) +extern "C" { +#endif + #include "callback/callback.h" +#if defined(__cplusplus) +} +#endif + Modified: trunk/sc2/src/libs/cdplib.h =================================================================== --- trunk/sc2/src/libs/cdplib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/cdplib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,6 +19,14 @@ #ifndef _CDPLIB_H #define _CDPLIB_H +#if defined(__cplusplus) +extern "C" { +#endif + #include "cdp/cdp.h" +#if defined(__cplusplus) +} +#endif + #endif /* _CDPLIB_H */ Modified: trunk/sc2/src/libs/compiler.h =================================================================== --- trunk/sc2/src/libs/compiler.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/compiler.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "types.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef uint8 BYTE; typedef uint8 UBYTE; typedef sint8 SBYTE; @@ -85,5 +89,9 @@ # define _ALIGNED_ON(bytes) #endif +#if defined(__cplusplus) +} +#endif + #endif /* _COMPILER_H */ Modified: trunk/sc2/src/libs/declib.h =================================================================== --- trunk/sc2/src/libs/declib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/declib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,11 @@ #define _DECLIB_H #include "libs/compiler.h" + +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct _LZHCODE_DESC* DECODE_REF; enum @@ -45,4 +50,8 @@ extern COUNT cwrite (const void *pStr, COUNT size, COUNT count, DECODE_REF DecodeRef); +#if defined(__cplusplus) +} +#endif + #endif /* _DECLIB_H */ Modified: trunk/sc2/src/libs/file.h =================================================================== --- trunk/sc2/src/libs/file.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/file.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -25,6 +25,10 @@ // for bool #include "types.h" +#if defined(__cplusplus) +extern "C" { +#endif + #if 0 // from temp.h void initTempDir (void); @@ -83,5 +87,9 @@ } #endif /* HAVE_DRIVE_LETTERS */ +#if defined(__cplusplus) +} +#endif + #endif /* _FILE_H */ Modified: trunk/sc2/src/libs/gfxlib.h =================================================================== --- trunk/sc2/src/libs/gfxlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/gfxlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -32,6 +32,10 @@ #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct context_desc CONTEXT_DESC; typedef struct frame_desc FRAME_DESC; typedef struct font_desc FONT_DESC; @@ -227,8 +231,16 @@ COUNT CharCount; } TEXT; +#if defined(__cplusplus) +} +#endif + #include "libs/strlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef STRING_TABLE COLORMAP_REF; typedef STRING COLORMAP; // COLORMAPPTR is really a pointer to colortable entry structure @@ -237,6 +249,7 @@ #include "graphics/prim.h" + typedef BYTE BATCH_FLAGS; // This flag is currently unused but it might make sense to restore it #define BATCH_BUILD_PAGE (BATCH_FLAGS)(1 << 0) @@ -454,4 +467,8 @@ void SetSystemRect (const RECT *pRect); void ClearSystemRect (void); +#if defined(__cplusplus) +} +#endif + #endif /* _GFXLIB_H */ Modified: trunk/sc2/src/libs/heap.h =================================================================== --- trunk/sc2/src/libs/heap.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/heap.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -1,2 +1,9 @@ +#if defined(__cplusplus) +extern "C" { +#endif + #include "heap/heap.h" +#if defined(__cplusplus) +} +#endif Modified: trunk/sc2/src/libs/inplib.h =================================================================== --- trunk/sc2/src/libs/inplib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/inplib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,7 +24,11 @@ #include "libs/uio.h" #include "libs/unicode.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN AnyButtonPress (BOOLEAN DetectSpecial); extern void TFB_ResetControls (void); @@ -59,5 +63,9 @@ void BeginInputFrame (void); +#if defined(__cplusplus) +} +#endif + #endif /* _INPLIB_H */ Modified: trunk/sc2/src/libs/list.h =================================================================== --- trunk/sc2/src/libs/list.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/list.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -16,5 +16,14 @@ * */ +#if defined(__cplusplus) +extern "C" { +#endif + #include "list/list.h" +#if defined(__cplusplus) +} +#endif + + Modified: trunk/sc2/src/libs/log.h =================================================================== --- trunk/sc2/src/libs/log.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/log.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -14,4 +14,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#if defined(__cplusplus) +extern "C" { +#endif + #include "log/uqmlog.h" + +#if defined(__cplusplus) +} +#endif Modified: trunk/sc2/src/libs/mathlib.h =================================================================== --- trunk/sc2/src/libs/mathlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/mathlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,10 +20,19 @@ #define _MATHLIB_H #include "libs/compiler.h" + +#if defined(__cplusplus) +extern "C" { +#endif + #include "math/random.h" extern COUNT square_root (DWORD value); +#if defined(__cplusplus) +} +#endif + #endif /* _MATHLIB_H */ Modified: trunk/sc2/src/libs/md5.h =================================================================== --- trunk/sc2/src/libs/md5.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/md5.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,7 +19,15 @@ #ifndef _LIB_MD5_H #define _LIB_MD5_H +#if defined(__cplusplus) +extern "C" { +#endif + #include "md5/md5.h" +#if defined(__cplusplus) +} +#endif + #endif /* _LIB_MD5_H */ Modified: trunk/sc2/src/libs/memlib.h =================================================================== --- trunk/sc2/src/libs/memlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/memlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "types.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern bool mem_init (void); extern bool mem_uninit (void); @@ -29,5 +33,9 @@ extern void *HCalloc (int size); extern void *HRealloc (void *p, int size); +#if defined(__cplusplus) +} +#endif + #endif /* _MEMLIB_H */ Modified: trunk/sc2/src/libs/misc.h =================================================================== --- trunk/sc2/src/libs/misc.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/misc.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,7 +26,11 @@ #include <stdlib.h> #include "port.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern int TFB_DEBUG_HALT; static inline void explode (void) _NORETURN; @@ -54,5 +58,9 @@ return u.c; } +#if defined(__cplusplus) +} #endif +#endif + Modified: trunk/sc2/src/libs/net.h =================================================================== --- trunk/sc2/src/libs/net.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/net.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,11 +19,19 @@ #ifndef _NET_H #define _NET_H +#if defined(__cplusplus) +extern "C" { +#endif + #include "network/network.h" #include "network/netmanager/netmanager.h" #include "network/connect/connect.h" #include "network/connect/listen.h" #include "network/connect/resolve.h" +#if defined(__cplusplus) +} +#endif + #endif /* _NET_H */ Modified: trunk/sc2/src/libs/platform.h =================================================================== --- trunk/sc2/src/libs/platform.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/platform.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,6 +17,10 @@ #ifndef PLATFORM_H_ #define PLATFORM_H_ +#if defined(__cplusplus) +extern "C" { +#endif + #if defined(USE_PLATFORM_ACCEL) # if defined(__GNUC__) && (defined(i386) || defined(__x86_64__)) # define MMX_ASM @@ -46,4 +50,8 @@ extern PLATFORM_TYPE force_platform; +#if defined(__cplusplus) +} +#endif + #endif /* PLATFORM_H_ */ Modified: trunk/sc2/src/libs/reslib.h =================================================================== --- trunk/sc2/src/libs/reslib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/reslib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -25,6 +25,10 @@ #include "libs/memlib.h" #include "libs/uio.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct resource_index_desc RESOURCE_INDEX_DESC; typedef RESOURCE_INDEX_DESC *RESOURCE_INDEX; @@ -78,8 +82,16 @@ #define AllocResourceData HMalloc BOOLEAN FreeResourceData (void *); +#if defined(__cplusplus) +} +#endif + #include "libs/strlib.h" #include "libs/gfxlib.h" + +#if defined(__cplusplus) +extern "C" { +#endif // For Color typedef STRING_TABLE DIRENTRY_REF; @@ -120,4 +132,8 @@ BOOLEAN res_Remove (const char *key); +#if defined(__cplusplus) +} +#endif + #endif /* _RESLIB_H */ Modified: trunk/sc2/src/libs/sndlib.h =================================================================== --- trunk/sc2/src/libs/sndlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/sndlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -22,6 +22,10 @@ #include "port.h" #include "libs/strlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef STRING_TABLE SOUND_REF; typedef STRING SOUND; // SOUNDPTR is really a TFB_SoundSample** @@ -95,5 +99,9 @@ extern DWORD FadeMusic (BYTE end_vol, SIZE TimeInterval); +#if defined(__cplusplus) +} +#endif + #endif /* _SNDLIB_H */ Modified: trunk/sc2/src/libs/strlib.h =================================================================== --- trunk/sc2/src/libs/strlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/strlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -36,6 +36,10 @@ /* This has to go here because reslib requires the above typedefs. */ #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN InstallStringTableResType (void); extern STRING_TABLE LoadStringTableInstance (RESOURCE res); extern STRING_TABLE LoadStringTableFile (uio_DirHandle *dir, @@ -67,5 +71,9 @@ #define UNICHAR_BULLET 0x2022 #define STR_BULLET "\xE2\x80\xA2" +#if defined(__cplusplus) +} +#endif + #endif /* _STRLIB_H */ Modified: trunk/sc2/src/libs/tasklib.h =================================================================== --- trunk/sc2/src/libs/tasklib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/tasklib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,6 +26,10 @@ #include "libs/threadlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Bitmasks for setting task state. */ #define TASK_INUSE 1 #define TASK_EXIT 2 @@ -50,5 +54,9 @@ extern void FinishTask (Task task); extern void ConcludeTask (Task task); +#if defined(__cplusplus) +} #endif +#endif + Modified: trunk/sc2/src/libs/threadlib.h =================================================================== --- trunk/sc2/src/libs/threadlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/threadlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -45,6 +45,10 @@ #include <sys/types.h> #include "libs/timelib.h" +#if defined(__cplusplus) +extern "C" { +#endif + #if defined (PROFILE_THREADS) || defined (DEBUG_THREADS) #define THREAD_NAMES #endif @@ -173,5 +177,9 @@ void SignalCondVar (CondVar); void BroadcastCondVar (CondVar); +#if defined(__cplusplus) +} +#endif + #endif /* _THREADLIB_H */ Modified: trunk/sc2/src/libs/timelib.h =================================================================== --- trunk/sc2/src/libs/timelib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/timelib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* ONE_SECOND is the LCM of all the fractions of a second the game uses. * Battle is 24 FPS, Landers are 35 FPS, most UI-level things are 15 FPS, * The Interplanetary flight is 30 FPS, Comm ambient animation is 40 FPS, @@ -38,5 +42,9 @@ extern void UnInitTimeSystem (void); extern TimeCount GetTimeCounter (void); +#if defined(__cplusplus) +} +#endif + #endif /* _TIMLIB_H */ Modified: trunk/sc2/src/libs/uio.h =================================================================== --- trunk/sc2/src/libs/uio.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/uio.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,7 +21,15 @@ #ifndef _UIO_H #define _UIO_H +#if defined(__cplusplus) +extern "C" { +#endif + #include "uio/io.h" +#if defined(__cplusplus) +} +#endif + #endif /* _UIO_H */ Modified: trunk/sc2/src/libs/uioutils.h =================================================================== --- trunk/sc2/src/libs/uioutils.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/uioutils.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,7 +21,15 @@ #ifndef _UIOUTILS_H #define _UIOUTILS_H +#if defined(__cplusplus) +extern "C" { +#endif + #include "uio/utils.h" +#if defined(__cplusplus) +} +#endif + #endif /* _UIOUTILS_H */ Modified: trunk/sc2/src/libs/unicode.h =================================================================== --- trunk/sc2/src/libs/unicode.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/unicode.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include <sys/types.h> // For size_t +#if defined(__cplusplus) +extern "C" { +#endif + typedef uint32 UniChar; #ifdef UNICODE_INTERNAL @@ -60,5 +64,9 @@ #undef UNICODE_CHAR +#if defined(__cplusplus) +} +#endif + #endif /* UNICODE_H */ Modified: trunk/sc2/src/libs/vidlib.h =================================================================== --- trunk/sc2/src/libs/vidlib.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/libs/vidlib.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "libs/sndlib.h" #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef enum { NO_FMV = 0, @@ -57,4 +61,8 @@ extern void StopLegacyVideo (LEGACY_VIDEO_REF ref); extern BOOLEAN PlayingLegacyVideo (LEGACY_VIDEO_REF ref); +#if defined(__cplusplus) +} +#endif + #endif /* _VIDLIB_H */ Modified: trunk/sc2/src/options.h =================================================================== --- trunk/sc2/src/options.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/options.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,6 +26,10 @@ #include "libs/compiler.h" #include "libs/uio.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define OPT_3DO 0x01 #define OPT_PC 0x02 #define OPT_ALL 0xFF @@ -81,5 +85,9 @@ bool setGammaCorrection (float gamma); +#if defined(__cplusplus) +} #endif +#endif + Modified: trunk/sc2/src/port.h =================================================================== --- trunk/sc2/src/port.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/port.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -79,13 +79,25 @@ #ifndef HAVE_STRUPR +#if defined(__cplusplus) +extern "C" { +#endif char *strupr (char *str); +#if defined(__cplusplus) +} #endif +#endif #if !defined (_MSC_VER) && !defined (HAVE_READDIR_R) # include <dirent.h> +#if defined(__cplusplus) +extern "C" { +#endif int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); +#if defined(__cplusplus) +} #endif +#endif // Directories #ifdef WIN32 @@ -161,10 +173,21 @@ #ifdef _MSC_VER # include <stdarg.h> // Defined in port.c +#if defined(__cplusplus) +extern "C" { +#endif int snprintf(char *str, size_t size, const char *format, ...); int vsnprintf(char *str, size_t size, const char *format, va_list args); +#if defined(__cplusplus) +} +#endif + #endif /* _MSC_VER */ +#if defined(__cplusplus) +extern "C" { +#endif + // setenv() #ifndef HAVE_SETENV int setenv (const char *name, const char *value, int overwrite); @@ -178,6 +201,10 @@ typedef unsigned int wint_t; #endif +#if defined(__cplusplus) +} +#endif + #if defined (_MSC_VER) || defined(__MINGW32__) # define USE_WINSOCK #endif Modified: trunk/sc2/src/types.h =================================================================== --- trunk/sc2/src/types.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/types.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -50,6 +50,10 @@ # endif /* defined(PRIxPTR) */ #endif +#if defined(__cplusplus) +extern "C" { +#endif + #if defined(__arch64__) || defined(__alpha) || defined(__x86_64) \ || defined(_M_IA64) || defined(_M_AMD64) /* 64-bit platforms */ @@ -177,4 +181,8 @@ #define UINT16_MAX 0xffff /* 65535U */ #define UINT32_MAX 0xffffffff /* 4294967295U */ +#if defined(__cplusplus) +} +#endif + #endif /* _TYPES_H */ Modified: trunk/sc2/src/uqm/battle.h =================================================================== --- trunk/sc2/src/uqm/battle.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/battle.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,6 +26,10 @@ #include "init.h" // For NUM_SIDES +#if defined(__cplusplus) +extern "C" { +#endif + // The callback function is called on every battle frame // with GraphicsLock held, just before the display queue // is drawn @@ -56,4 +60,8 @@ extern void BattleSong (BOOLEAN DoPlay); extern void FreeBattleSong (void); +#if defined(__cplusplus) +} +#endif + #endif /* _BATTLE_H */ Modified: trunk/sc2/src/uqm/battlecontrols.h =================================================================== --- trunk/sc2/src/uqm/battlecontrols.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/battlecontrols.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -30,6 +30,10 @@ #include "races.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef BATTLE_INPUT_STATE (*BattleFrameInputFunction) ( InputContext *context, STARSHIP *StarShipPtr); typedef BOOLEAN (*SelectShipFunction) (InputContext *context, @@ -88,6 +92,10 @@ // Call InputContext->handlers->freeContext() to release an // InputContext. +#if defined(__cplusplus) +} +#endif + #endif /* _BATTLECONTROLS_H */ Modified: trunk/sc2/src/uqm/build.h =================================================================== --- trunk/sc2/src/uqm/build.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/build.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "displist.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define NAME_OFFSET 5 #define NUM_CAPTAINS_NAMES 16 @@ -60,5 +64,9 @@ extern void free_ship (RACE_DESC *RaceDescPtr, BOOLEAN FreeIconData, BOOLEAN FreeBattleData); +#if defined(__cplusplus) +} +#endif + #endif /* _BUILD_H */ Modified: trunk/sc2/src/uqm/clock.h =================================================================== --- trunk/sc2/src/uqm/clock.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/clock.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -22,7 +22,11 @@ #include "libs/tasklib.h" #include "displist.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define START_YEAR 2155 #define UPDATE_DAY (1 << 0) @@ -100,5 +104,9 @@ // but not much else extern BOOLEAN GameClockRunning (void); +#if defined(__cplusplus) +} +#endif + #endif /* _CLOCK_H */ Modified: trunk/sc2/src/uqm/cnctdlg.h =================================================================== --- trunk/sc2/src/uqm/cnctdlg.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/cnctdlg.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -16,16 +16,23 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef NETPLAY - #ifndef _CNCTDLG_H #define _CNCTDLG_H +#ifdef NETPLAY + #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + BOOLEAN MeleeConnectDialog (int side); -#endif /* _CNCTDLG_H */ +#if defined(__cplusplus) +} +#endif #endif /* NETPLAY */ +#endif /* _CNCTDLG_H */ Modified: trunk/sc2/src/uqm/coderes.h =================================================================== --- trunk/sc2/src/uqm/coderes.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/coderes.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN InstallCodeResType (void); extern void *LoadCodeResInstance (RESOURCE res); extern void *CaptureCodeRes (void *hCode, void *pData, void **ppLocData); @@ -32,5 +36,9 @@ UWORD size; } CODE_REF; +#if defined(__cplusplus) +} +#endif + #endif /* _CODERES_H */ Modified: trunk/sc2/src/uqm/collide.h =================================================================== --- trunk/sc2/src/uqm/collide.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/collide.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "element.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define COLLISION_TURN_WAIT 1 #define COLLISION_THRUST_WAIT 3 @@ -59,5 +63,9 @@ extern void collide (ELEMENT *ElementPtr0, ELEMENT *ElementPtr1); +#if defined(__cplusplus) +} +#endif + #endif /* _COLLIDE_H */ Modified: trunk/sc2/src/uqm/comm.h =================================================================== --- trunk/sc2/src/uqm/comm.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/comm.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -31,6 +31,10 @@ #include "commanim.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern LOCDATA CommData; static inline BOOLEAN @@ -131,6 +135,10 @@ extern void EnableTalkingAnim (BOOLEAN enable); +#if defined(__cplusplus) +} +#endif + #endif /* _COMM_H */ Modified: trunk/sc2/src/uqm/commanim.h =================================================================== --- trunk/sc2/src/uqm/commanim.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/commanim.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,10 @@ #include "libs/compiler.h" #include "libs/gfxlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + // Some background: every animation has a neutral frame which returns // the image to the state it was in before the animation began. Which // frame is neutral depends on the animation type. @@ -130,6 +134,10 @@ extern void InitCommAnimations (void); extern BOOLEAN ProcessCommAnimations (BOOLEAN fullRedraw, BOOLEAN paused); +#if defined(__cplusplus) +} +#endif + #endif /* _COMMANIM_H */ Modified: trunk/sc2/src/uqm/commglue.h =================================================================== --- trunk/sc2/src/uqm/commglue.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/commglue.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "resinst.h" #include "libs/sound/trackplayer.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef enum { ARILOU_CONVERSATION, CHMMR_CONVERSATION, @@ -154,5 +158,9 @@ extern LOCDATA* init_umgah_comm (void); +#if defined(__cplusplus) +} +#endif + #endif /* _COMMGLUE_H */ Modified: trunk/sc2/src/uqm/cons_res.h =================================================================== --- trunk/sc2/src/uqm/cons_res.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/cons_res.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,10 @@ #include "libs/gfxlib.h" #include "libs/sndlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + void load_gravity_well (BYTE selector); void free_gravity_well (void); @@ -27,4 +31,8 @@ MUSIC_REF load_orbit_theme (BYTE selector); +#if defined(__cplusplus) +} +#endif + #endif /* CONS_RES_H_ */ Modified: trunk/sc2/src/uqm/controls.h =================================================================== --- trunk/sc2/src/uqm/controls.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/controls.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "libs/strlib.h" #include "libs/timelib.h" +#if defined(__cplusplus) +extern "C" { +#endif + // Enumerated type for controls enum { KEY_UP, @@ -162,6 +166,10 @@ extern BOOLEAN DoTextEntry (TEXTENTRY_STATE *pTES); +#if defined(__cplusplus) +} #endif +#endif + Modified: trunk/sc2/src/uqm/credits.h =================================================================== --- trunk/sc2/src/uqm/credits.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/credits.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,7 +19,15 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void Credits (BOOLEAN WithOuttakes); +#if defined(__cplusplus) +} +#endif + #endif /* _CREDITS_H */ Modified: trunk/sc2/src/uqm/demo.h =================================================================== --- trunk/sc2/src/uqm/demo.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/demo.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,6 +19,10 @@ #ifndef _DEMO_H #define _DEMO_H +#if defined(__cplusplus) +extern "C" { +#endif + #ifndef DEMO_MODE #define DEMO_MODE 0 #endif /* DEMO_MODE */ @@ -44,5 +48,9 @@ #endif +#if defined(__cplusplus) +} +#endif + #endif /* _DEMO_H */ Modified: trunk/sc2/src/uqm/displist.h =================================================================== --- trunk/sc2/src/uqm/displist.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/displist.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,6 +24,10 @@ #include "libs/compiler.h" #include "libs/memlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + // Note that we MUST use the QUEUE_TABLE variant at this time, because // certain gameplay elements depend on it. Namely, the maximum number // of HyperSpace encounter globes chasing the player is defined by the @@ -120,5 +124,9 @@ extern COUNT CountLinks (QUEUE *pq); void ForAllLinks(QUEUE *pq, void (*callback)(LINK *, void *), void *arg); +#if defined(__cplusplus) +} +#endif + #endif /* _DISPLIST_H */ Modified: trunk/sc2/src/uqm/element.h =================================================================== --- trunk/sc2/src/uqm/element.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/element.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,7 +24,11 @@ #include "velocity.h" #include "libs/gfxlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define NORMAL_LIFE 1 typedef HLINK HELEMENT; @@ -230,5 +234,9 @@ extern BOOLEAN CalculateGravity (ELEMENT *ElementPtr); +#if defined(__cplusplus) +} +#endif + #endif /* _ELEMENT_H */ Modified: trunk/sc2/src/uqm/encount.h =================================================================== --- trunk/sc2/src/uqm/encount.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/encount.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -30,7 +30,11 @@ #include "element.h" #include "races.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef HLINK HENCOUNTER; #define MAX_HYPER_SHIPS 7 @@ -190,5 +194,9 @@ extern SIZE EncounterRace; extern BYTE EncounterGroup; +#if defined(__cplusplus) +} +#endif + #endif /* _ENCOUNT_H */ Modified: trunk/sc2/src/uqm/flash.h =================================================================== --- trunk/sc2/src/uqm/flash.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/flash.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -90,6 +90,10 @@ #include "libs/gfxlib.h" #include "libs/timelib.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef enum { FlashState_fadeIn = 0, // Someway between on and off, going towards on. @@ -211,5 +215,9 @@ COUNT Flash_getCacheSize (const FlashContext *context); +#if defined(__cplusplus) +} +#endif + #endif /* _FLASH_H */ Modified: trunk/sc2/src/uqm/fmv.h =================================================================== --- trunk/sc2/src/uqm/fmv.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/fmv.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,11 @@ #include "libs/compiler.h" #include "libs/sndlib.h" #include "libs/gfxlib.h" + +#if defined(__cplusplus) +extern "C" { +#endif + #define WANT_SHIP_SPINS extern void SplashScreen (void (* DoProcessing)(DWORD TimeOut)); @@ -29,5 +34,9 @@ extern BOOLEAN ShowPresentation (RESOURCE presentation); +#if defined(__cplusplus) +} +#endif + #endif /* _FMV_H */ Modified: trunk/sc2/src/uqm/gameev.h =================================================================== --- trunk/sc2/src/uqm/gameev.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/gameev.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,7 +20,11 @@ #include "libs/compiler.h" #include "libs/gfxlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + enum { ARILOU_ENTRANCE_EVENT = 0, @@ -57,5 +61,9 @@ BYTE func_index); +#if defined(__cplusplus) +} +#endif + #endif /* _GAMEEV_H */ Modified: trunk/sc2/src/uqm/gameopt.h =================================================================== --- trunk/sc2/src/uqm/gameopt.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/gameopt.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,11 +19,19 @@ #include "libs/compiler.h" #include "libs/gfxlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void ConfirmSaveLoad (STAMP *MsgStamp); extern BOOLEAN GameOptions (void); typedef void (NamingCallback) (void); extern void SetNamingCallback (NamingCallback *); +#if defined(__cplusplus) +} +#endif + #endif /* _GAMEOPT_H */ Modified: trunk/sc2/src/uqm/gamestr.h =================================================================== --- trunk/sc2/src/uqm/gamestr.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/gamestr.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -25,6 +25,10 @@ #include "libs/strlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define STAR_STRING_COUNT 133 #define DEVICE_STRING_COUNT 29 #define CARGO_STRING_COUNT 10 @@ -82,5 +86,9 @@ +#if defined(__cplusplus) +} +#endif + #endif /* _GAMESTR_H */ Modified: trunk/sc2/src/uqm/gendef.h =================================================================== --- trunk/sc2/src/uqm/gendef.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/gendef.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -4,7 +4,15 @@ #include "planets/generate.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + const GenerateFunctions *getGenerateFunctions (BYTE Index); +#if defined(__cplusplus) +} +#endif + #endif /* GENDEF_H */ Modified: trunk/sc2/src/uqm/globdata.h =================================================================== --- trunk/sc2/src/uqm/globdata.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/globdata.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -27,7 +27,11 @@ #include "velocity.h" #include "commanim.h" +#if defined(__cplusplus) +extern "C" { +#endif + // general numbers-speech generator info // should accomodate most common base-10 languages // many languages require various plural forms @@ -1010,5 +1014,9 @@ extern BOOLEAN InitGameStructures (void); extern void UninitGameStructures (void); +#if defined(__cplusplus) +} +#endif + #endif /* _GLOBDATA_H */ Modified: trunk/sc2/src/uqm/grpinfo.h =================================================================== --- trunk/sc2/src/uqm/grpinfo.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/grpinfo.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,6 +24,10 @@ // for POINT #include <assert.h> +#if defined(__cplusplus) +extern "C" { +#endif + // XXX: Needed to maintain savegame compatibility #define NUM_SAVED_BATTLE_GROUPS 64 @@ -82,4 +86,8 @@ extern HIPGROUP BuildGroup (QUEUE *pDstQueue, BYTE race_id); +#if defined(__cplusplus) +} +#endif + #endif /* _GRPINFO_H */ Modified: trunk/sc2/src/uqm/hyper.h =================================================================== --- trunk/sc2/src/uqm/hyper.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/hyper.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "units.h" // for UNIT_SCREEN_WIDTH/HEIGHT +#if defined(__cplusplus) +extern "C" { +#endif + #define NUM_RADAR_SCREENS 12 #define RADAR_SCAN_WIDTH (UNIT_SCREEN_WIDTH * NUM_RADAR_SCREENS) @@ -79,5 +83,9 @@ extern void HyperspaceMenu (void); extern void SaveSisHyperState (void); +#if defined(__cplusplus) +} +#endif + #endif /* _HYPER_H */ Modified: trunk/sc2/src/uqm/init.h =================================================================== --- trunk/sc2/src/uqm/init.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/init.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,10 @@ #include "libs/gfxlib.h" #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define NUM_PLAYERS 2 #define NUM_SIDES 2 @@ -35,5 +39,9 @@ RESOURCE med_res, RESOURCE sml_res); extern BOOLEAN free_image (FRAME *pixarray); +#if defined(__cplusplus) +} +#endif + #endif /* _INIT_H */ Modified: trunk/sc2/src/uqm/intel.h =================================================================== --- trunk/sc2/src/uqm/intel.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/intel.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,6 +24,10 @@ #include "element.h" #include "races.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define MANEUVERABILITY(pi) ((pi)->ManeuverabilityIndex) #define WEAPON_RANGE(pi) ((pi)->WeaponRange) @@ -74,6 +78,10 @@ #define AWESOME_RATING (BYTE)(1 << 6) +#if defined(__cplusplus) +} +#endif + #endif /* _INTEL_H */ Modified: trunk/sc2/src/uqm/ipdisp.h =================================================================== --- trunk/sc2/src/uqm/ipdisp.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ipdisp.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,6 +19,10 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void NotifyOthers (COUNT which_race, BYTE target_loc); // Special target locations for NotifyOthers() #define IPNL_INTERCEPT_PLAYER 0 @@ -26,4 +30,8 @@ extern void DoMissions (void); +#if defined(__cplusplus) +} +#endif + #endif /* UQM_IPDISP_H_INCL_ */ Modified: trunk/sc2/src/uqm/load.h =================================================================== --- trunk/sc2/src/uqm/load.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/load.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -22,10 +22,18 @@ #include "libs/compiler.h" #include "globdata.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern ACTIVITY NextActivity; extern BOOLEAN LoadGame (COUNT which_game, SUMMARY_DESC *summary_desc); +#if defined(__cplusplus) +} +#endif + #endif /* _LOAD_H */ Modified: trunk/sc2/src/uqm/master.h =================================================================== --- trunk/sc2/src/uqm/master.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/master.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,10 @@ #include "races.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef HLINK HMASTERSHIP; typedef struct @@ -58,5 +62,9 @@ FRAME GetShipIconsFromIndex (unsigned Index); FRAME GetShipMeleeIconsFromIndex (unsigned Index); +#if defined(__cplusplus) +} +#endif + #endif /* _MASTER_H */ Modified: trunk/sc2/src/uqm/menustat.h =================================================================== --- trunk/sc2/src/uqm/menustat.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/menustat.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "libs/sndlib.h" #include "flash.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct menu_state { // Standard field required by DoInput() @@ -120,5 +124,9 @@ extern BOOLEAN DoMenuChooser (MENU_STATE *pMS, BYTE BaseState); extern void DrawMenuStateStrings (BYTE beg_index, SWORD NewState); +#if defined(__cplusplus) +} +#endif + #endif /* _MENUSTAT_H */ Modified: trunk/sc2/src/uqm/oscill.h =================================================================== --- trunk/sc2/src/uqm/oscill.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/oscill.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,6 +20,10 @@ #include "libs/compiler.h" #include "libs/gfxlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN sliderDisabled; extern BOOLEAN oscillDisabled; @@ -32,5 +36,9 @@ extern void SetSliderImage (FRAME f); void DrawSlider (void); +#if defined(__cplusplus) +} +#endif + #endif /* _OSCILL_H */ Modified: trunk/sc2/src/uqm/pickship.h =================================================================== --- trunk/sc2/src/uqm/pickship.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/pickship.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -20,8 +20,16 @@ #include "libs/compiler.h" #include "races.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern HSTARSHIP GetEncounterStarShip (STARSHIP *LastStarShipPtr, COUNT which_player); extern void DrawArmadaPickShip (BOOLEAN draw_salvage_frame, RECT *pPickRect); +#if defined(__cplusplus) +} +#endif + #endif /* UQM_PICKSHIP_H_INCL_ */ Modified: trunk/sc2/src/uqm/planets/elemdata.h =================================================================== --- trunk/sc2/src/uqm/planets/elemdata.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/elemdata.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,9 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif /*------------------------------ Type Defines ----------------------------- */ enum @@ -205,5 +208,9 @@ extern const BYTE *Elements; +#if defined(__cplusplus) +} +#endif + #endif /* _ELEMDATA_H */ Modified: trunk/sc2/src/uqm/planets/generate/gendefault.h =================================================================== --- trunk/sc2/src/uqm/planets/generate/gendefault.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/generate/gendefault.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "../planets.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + bool GenerateDefault_initNpcs (SOLARSYS_STATE *solarSys); bool GenerateDefault_reinitNpcs (SOLARSYS_STATE *solarSys); bool GenerateDefault_uninitNpcs (SOLARSYS_STATE *solarSys); @@ -52,5 +56,9 @@ extern const GenerateFunctions generateDefaultFunctions; +#if defined(__cplusplus) +} +#endif + #endif /* GENDEFAULT_H */ Modified: trunk/sc2/src/uqm/planets/generate.h =================================================================== --- trunk/sc2/src/uqm/planets/generate.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/generate.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -23,6 +23,10 @@ #include "planets.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* * To do (for further cleanups): * - split off generateOrbital in a calculation and an activation @@ -98,6 +102,9 @@ PickupLifeFunction pickupLife; }; +#if defined(__cplusplus) +} +#endif #endif /* GENERATE_H */ Modified: trunk/sc2/src/uqm/planets/lander.h =================================================================== --- trunk/sc2/src/uqm/planets/lander.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/lander.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,6 +26,9 @@ #include "libs/timelib.h" #include "../element.h" +#if defined(__cplusplus) +extern "C" { +#endif // Surface magnification shift (x4) #define MAG_SHIFT 2 @@ -76,5 +79,9 @@ PS_NON_PLAYER, }; +#if defined(__cplusplus) +} +#endif + #endif /* _LANDER_H */ Modified: trunk/sc2/src/uqm/planets/lifeform.h =================================================================== --- trunk/sc2/src/uqm/planets/lifeform.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/lifeform.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,9 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif #define BEHAVIOR_HUNT (0 << 0) #define BEHAVIOR_FLEE (1 << 0) @@ -65,5 +68,9 @@ extern const LIFEFORM_DESC CreatureData[]; +#if defined(__cplusplus) +} +#endif + #endif /* _LIFEFORM_H */ Modified: trunk/sc2/src/uqm/planets/plandata.h =================================================================== --- trunk/sc2/src/uqm/planets/plandata.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/plandata.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,9 @@ #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif /*------------------------------ Type Defines ----------------------------- */ #define NUMBER_OF_ORBITS 16 @@ -328,5 +331,9 @@ extern const PlanetFrame *PlanData; +#if defined(__cplusplus) +} +#endif + #endif /* _PLANDATA_H */ Modified: trunk/sc2/src/uqm/planets/planets.h =================================================================== --- trunk/sc2/src/uqm/planets/planets.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/planets.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -99,6 +99,9 @@ #include "plandata.h" #include "sundata.h" +#if defined(__cplusplus) +extern "C" { +#endif struct planet_desc { @@ -286,5 +289,9 @@ extern void PlanetOrbitMenu (void); extern void SaveSolarSysLocation (void); +#if defined(__cplusplus) +} +#endif + #endif /* _PLANETS_H */ Modified: trunk/sc2/src/uqm/planets/scan.h =================================================================== --- trunk/sc2/src/uqm/planets/scan.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/scan.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -26,6 +26,9 @@ #include "libs/gfxlib.h" #include "planets.h" +#if defined(__cplusplus) +extern "C" { +#endif struct scan_desc { @@ -62,5 +65,9 @@ void setNodeRetrieved (PLANET_INFO *planetInfo, BYTE scanType, BYTE nodeNr); void setNodeNotRetrieved (PLANET_INFO *planetInfo, BYTE scanType, BYTE nodeNr); +#if defined(__cplusplus) +} +#endif + #endif /* _SCAN_H */ Modified: trunk/sc2/src/uqm/planets/sundata.h =================================================================== --- trunk/sc2/src/uqm/planets/sundata.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/planets/sundata.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -22,6 +22,9 @@ #include "plandata.h" #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif /*------------------------------ Global Data ------------------------------ */ @@ -58,5 +61,9 @@ extern SYSTEM_INFO CurSysInfo; +#if defined(__cplusplus) +} +#endif + #endif /* _SUNDATA_H */ Modified: trunk/sc2/src/uqm/process.h =================================================================== --- trunk/sc2/src/uqm/process.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/process.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,9 +21,17 @@ #include "libs/gfxlib.h" #include "element.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void RedrawQueue (BOOLEAN clear); extern void InitDisplayList (void); extern void SetUpElement (ELEMENT *ElementPtr); extern void InsertPrim (PRIM_LINKS *pLinks, COUNT primIndex, COUNT iPI); +#if defined(__cplusplus) +} +#endif + #endif /* UQM_PROCESS_H_INCL_ */ Modified: trunk/sc2/src/uqm/races.h =================================================================== --- trunk/sc2/src/uqm/races.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/races.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -31,7 +31,11 @@ #include "libs/sndlib.h" #include "libs/reslib.h" +#if defined(__cplusplus) +extern "C" { +#endif + // TODO: remove RACES_PER_PLAYER remnant of SC1 #define RACES_PER_PLAYER 7 #define MAX_SHIPS_PER_SIDE 14 @@ -664,5 +668,9 @@ BUILD_COLOR (MAKE_RGB15_INIT (0x06, 0x06, 0x06), 0x20), /* BLACK_URQUAN_SHIP */ \ BUILD_COLOR (MAKE_RGB15_INIT (0x14, 0x07, 0x1F), 0x39), /* YEHAT_REBEL_SHIP */ +#if defined(__cplusplus) +} +#endif + #endif /* _RACES_H */ Modified: trunk/sc2/src/uqm/restart.h =================================================================== --- trunk/sc2/src/uqm/restart.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/restart.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,8 +19,16 @@ #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN StartGame (void); +#if defined(__cplusplus) +} +#endif + #endif /* _RESTART_H */ Modified: trunk/sc2/src/uqm/save.h =================================================================== --- trunk/sc2/src/uqm/save.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/save.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,8 +21,16 @@ // for SUMMARY_DESC #include "libs/compiler.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void SaveProblem (void); extern BOOLEAN SaveGame (COUNT which_game, SUMMARY_DESC *summary_desc); +#if defined(__cplusplus) +} +#endif + #endif /* _SAVE_H */ Modified: trunk/sc2/src/uqm/settings.h =================================================================== --- trunk/sc2/src/uqm/settings.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/settings.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -19,6 +19,10 @@ #include "libs/sndlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern void ToggleMusic (void); extern void StopMusic (void); extern void ResumeMusic (void); @@ -30,5 +34,9 @@ void *PositionalObject, BYTE Priority); +#if defined(__cplusplus) +} +#endif + #endif /* _SETTINGS_H */ Modified: trunk/sc2/src/uqm/setup.h =================================================================== --- trunk/sc2/src/uqm/setup.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/setup.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -24,6 +24,10 @@ #include "libs/gfxlib.h" #include "libs/threadlib.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern RESOURCE_INDEX hResIndex; extern FRAME Screen; @@ -79,6 +83,10 @@ void ClearPlayerInputAll (void); +#if defined(__cplusplus) +} +#endif + #endif /* _SETUP_H */ Modified: trunk/sc2/src/uqm/setupmenu.h =================================================================== --- trunk/sc2/src/uqm/setupmenu.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/setupmenu.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "controls.h" +#if defined(__cplusplus) +extern "C" { +#endif + typedef enum { OPTVAL_DISABLED, OPTVAL_ENABLED @@ -88,4 +92,8 @@ void GetGlobalOptions (GLOBALOPTS *opts); void SetGlobalOptions (GLOBALOPTS *opts); +#if defined(__cplusplus) +} +#endif + #endif // _SETUPMENU_H Modified: trunk/sc2/src/uqm/ship.h =================================================================== --- trunk/sc2/src/uqm/ship.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ship.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "races.h" #include "element.h" +#if defined(__cplusplus) +extern "C" { +#endif + extern BOOLEAN GetNextStarShip (STARSHIP *LastStarShipPtr, COUNT which_side); extern BOOLEAN GetInitialStarShips (void); @@ -32,4 +36,8 @@ extern STATUS_FLAGS inertial_thrust (ELEMENT *ElementPtr); +#if defined(__cplusplus) +} +#endif + #endif /* UQM_SHIP_H_INCL_ */ Modified: trunk/sc2/src/uqm/shipcont.h =================================================================== --- trunk/sc2/src/uqm/shipcont.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/shipcont.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -21,6 +21,10 @@ #include "menustat.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define FIELD_WIDTH (STATUS_WIDTH - 5) extern void CargoMenu (void); @@ -33,5 +37,9 @@ extern SIZE InventoryDevices (BYTE *pDeviceMap, COUNT Size); +#if defined(__cplusplus) +} +#endif + #endif /* _SHIPCONT_H */ Modified: trunk/sc2/src/uqm/ships/androsyn/androsyn.h =================================================================== --- trunk/sc2/src/uqm/ships/androsyn/androsyn.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/androsyn/androsyn.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef ANDROSYN_H #define ANDROSYN_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_androsynth (void); +#if defined(__cplusplus) +} +#endif + #endif /* ANDROSYN_H */ Modified: trunk/sc2/src/uqm/ships/arilou/arilou.h =================================================================== --- trunk/sc2/src/uqm/ships/arilou/arilou.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/arilou/arilou.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef ARILOU_H #define ARILOU_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_arilou (void); +#if defined(__cplusplus) +} +#endif + #endif /* ARILOU_H */ Modified: trunk/sc2/src/uqm/ships/blackurq/blackurq.h =================================================================== --- trunk/sc2/src/uqm/ships/blackurq/blackurq.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/blackurq/blackurq.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef BLACKURQ_H #define BLACKURQ_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_black_urquan (void); +#if defined(__cplusplus) +} +#endif + #endif /* BLACKURQ_H */ Modified: trunk/sc2/src/uqm/ships/chenjesu/chenjesu.h =================================================================== --- trunk/sc2/src/uqm/ships/chenjesu/chenjesu.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/chenjesu/chenjesu.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef CHENJESU_H #define CHENJESU_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_chenjesu (void); +#if defined(__cplusplus) +} +#endif + #endif /* CHENJESU_H */ Modified: trunk/sc2/src/uqm/ships/chmmr/chmmr.h =================================================================== --- trunk/sc2/src/uqm/ships/chmmr/chmmr.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/chmmr/chmmr.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef CHMMR_H #define CHMMR_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_chmmr (void); +#if defined(__cplusplus) +} +#endif + #endif /* CHMMR_H */ Modified: trunk/sc2/src/uqm/ships/druuge/druuge.h =================================================================== --- trunk/sc2/src/uqm/ships/druuge/druuge.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/druuge/druuge.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef DRUUGE_H #define DRUUGE_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_druuge (void); +#if defined(__cplusplus) +} +#endif + #endif /* DRUUGE_H */ Modified: trunk/sc2/src/uqm/ships/human/human.h =================================================================== --- trunk/sc2/src/uqm/ships/human/human.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/human/human.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef HUMAN_H #define HUMAN_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_human (void); +#if defined(__cplusplus) +} +#endif + #endif /* HUMAN_H */ Modified: trunk/sc2/src/uqm/ships/ilwrath/ilwrath.h =================================================================== --- trunk/sc2/src/uqm/ships/ilwrath/ilwrath.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/ilwrath/ilwrath.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef ILWRATH_H #define ILWRATH_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_ilwrath (void); +#if defined(__cplusplus) +} +#endif + #endif /* ILWRATH_H */ Modified: trunk/sc2/src/uqm/ships/lastbat/lastbat.h =================================================================== --- trunk/sc2/src/uqm/ships/lastbat/lastbat.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/lastbat/lastbat.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef LASTBAT_H #define LASTBAT_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_samatra (void); +#if defined(__cplusplus) +} +#endif + #endif /* LASTBAT_H */ Modified: trunk/sc2/src/uqm/ships/melnorme/melnorme.h =================================================================== --- trunk/sc2/src/uqm/ships/melnorme/melnorme.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/melnorme/melnorme.h 2011-07-24 19:58:25 UTC (rev 3663) @@ -17,7 +17,15 @@ #ifndef MELNORME_H #define MELNORME_H +#if defined(__cplusplus) +extern "C" { +#endif + RACE_DESC *init_melnorme (void); +#if defined(__cplusplus) +} +#endif + #endif /* MELNORME_H */ Modified: trunk/sc2/src/uqm/ships/mmrnmhrm/mmrnmhrm.h =================================================================== --- trunk/sc2/src/uqm/ships/mmrnmhrm/mmrnmhrm.h 2011-07-24 19:03:42 UTC (rev 3662) +++ trunk/sc2/src/uqm/ships/mmrnmhrm/mmrnmhrm.h 2011-07-24 19:58:25 UTC ... [truncated message content] |