xblast-commit Mailing List for XBlast
Brought to you by:
alfie
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(46) |
Jul
(20) |
Aug
(92) |
Sep
(89) |
Oct
(84) |
Nov
(84) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(101) |
Feb
(104) |
Mar
(140) |
Apr
(32) |
May
(15) |
Jun
(8) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
| 2006 |
Jan
|
Feb
(72) |
Mar
(17) |
Apr
(4) |
May
(2) |
Jun
(53) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
(44) |
Nov
|
Dec
|
| 2007 |
Jan
(29) |
Feb
(13) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
(1) |
| 2008 |
Jan
(13) |
Feb
(19) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Frank Z. <fz...@us...> - 2009-03-07 02:50:23
|
Update of /cvsroot/xblast/xblast In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18772 Modified Files: sdl_sound.c sdl_text.c util.c Log Message: Fixed a few minor menory leaks. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- util.c 7 Mar 2009 01:36:30 -0000 1.31 +++ util.c 7 Mar 2009 02:50:04 -0000 1.32 @@ -150,6 +150,8 @@ } } + free(fullpath); + return NULL; } Index: sdl_text.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_text.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- sdl_text.c 17 Feb 2008 00:36:15 -0000 1.22 +++ sdl_text.c 7 Mar 2009 02:50:04 -0000 1.23 @@ -64,6 +64,9 @@ fprintf (stderr, "xblast: %s:%d:%s: TTF_OpenFont(fontName, fontSize) failed: %s\n", __FILE__, __LINE__, __FUNCTION__, TTF_GetError ()); }; + + free(fullpath); + return font; } /* LoadFont */ Index: sdl_sound.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_sound.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- sdl_sound.c 17 Feb 2008 00:36:15 -0000 1.13 +++ sdl_sound.c 7 Mar 2009 02:50:03 -0000 1.14 @@ -318,6 +318,9 @@ #ifdef DEBUG fprintf (stderr, "Opened file \"%s\".\n", fname); #endif + + free(fname); + (void)fstat (f, &snd_stat); sound_size = snd_stat.st_size / sizeof (uint8_t); if (sound_name[id].samples != NULL) { @@ -387,6 +390,7 @@ } else { fprintf (stderr, "Couldn't open file \"%s\".\n", fname); + free(fname); } } return XBTrue; |
|
From: Frank Z. <fz...@us...> - 2009-03-07 02:16:44
|
Update of /cvsroot/xblast/xblast In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3409 Modified Files: util.c util.h xblast.c xbsndsrv.c Log Message: Make InitPaths a global function and call it from each program that needs it. It fixes a compile issue with xbsndsrv. Index: util.h =================================================================== RCS file: /cvsroot/xblast/xblast/util.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- util.h 23 Feb 2008 16:49:56 -0000 1.11 +++ util.h 7 Mar 2009 01:36:31 -0000 1.12 @@ -41,6 +41,8 @@ * function prototypes */ +extern void InitPaths (const char *datadir); + /* loading config file */ extern char *GetFilePath(const char *path, const char *name, const char *ext, const char *mode); extern FILE *FileOpen (const char *path, const char *name, const char *ext, const char *mode); Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- util.c 23 Feb 2008 16:49:56 -0000 1.30 +++ util.c 7 Mar 2009 01:36:30 -0000 1.31 @@ -38,16 +38,13 @@ /* * set paths for loading and saving */ -static void -InitPaths (void) +void +InitPaths (const char *datadir) { char *tmp; char *home; int i; - if (userPath) - return; - /* set private xblast path */ home = getenv ("HOME"); if (NULL == home) { @@ -90,9 +87,11 @@ i = 0; - /* Default path fropm command line */ - dataPaths[i] = xblast_datadir; - if (dataPaths[i]) i++; + /* Default path from command line */ + if (datadir) { + dataPaths[i] = strdup(datadir); + i++; + } /* check environment for xblast search path. */ dataPaths[i] = getenv ("XBLASTDIR"); @@ -128,9 +127,6 @@ assert (name); assert (ext); - /* setup paths for loading */ - InitPaths (); - access_mode = R_OK; if (mode[0] == 'w') access_mode |= W_OK; @@ -173,9 +169,6 @@ assert (NULL != ext); assert (NULL != mode); - /* setup paths for loading */ - InitPaths (); - fullpath = GetFilePath(path, name, ext, mode); if (fullpath) { fp = fopen (fullpath, mode); @@ -288,9 +281,6 @@ assert (NULL != ext); assert ('.' != ext[0]); - /* set load paths if needed */ - InitPaths (); - /* search all directories */ lenExt = strlen (ext); for (i = 0; dataPaths[i]; i++) { Index: xbsndsrv.c =================================================================== RCS file: /cvsroot/xblast/xblast/xbsndsrv.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- xbsndsrv.c 17 Feb 2008 00:36:15 -0000 1.24 +++ xbsndsrv.c 7 Mar 2009 01:36:31 -0000 1.25 @@ -586,6 +586,10 @@ fprintf (stderr, "xbsndsrv already running\n"); return 1; } + + /* Init paths so XBlast will find its data files. */ + InitPaths(NULL); + /* * open and prepare sound device */ Index: xblast.c =================================================================== RCS file: /cvsroot/xblast/xblast/xblast.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- xblast.c 23 Feb 2008 16:54:35 -0000 1.32 +++ xblast.c 7 Mar 2009 01:36:31 -0000 1.33 @@ -31,9 +31,6 @@ /* Turn debugging options on/off */ int xblast_debug; -/* User provided datadir */ -char *xblast_datadir; - #ifdef SDL char *xblast_default_font; int GfontSize[3] = { 0, }; /* kind of hack-ish */ @@ -129,6 +126,7 @@ int smpf; int basex; int basey; + char *datadir = NULL; #ifdef ENABLE_NLS setlocale (LC_ALL, ""); @@ -186,7 +184,7 @@ return 0; break; case 'd': - xblast_datadir = optarg; + datadir = optarg; break; #ifdef SDL case 'f': @@ -213,6 +211,9 @@ } #endif + /* Init paths so XBlast will find its data files. */ + InitPaths(datadir); + if(mini){ SetBaseX(XBLAST_BASE_X/2); SetBaseY(XBLAST_BASE_Y/2); |
|
From: Gerfried F. <al...@us...> - 2008-03-26 14:23:17
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv699 Modified Files: ChangeLog Log Message: cvs2cl -I ChangeLog --show-dead --follow-only trunk --utc Index: ChangeLog =================================================================== RCS file: /cvsroot/xblast/xblast/ChangeLog,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ChangeLog 14 Dec 2007 13:17:54 -0000 1.32 +++ ChangeLog 26 Mar 2008 14:23:17 -0000 1.33 @@ -1,3 +1,145 @@ +2008-02-24 00:04 fzago + + * debug.h: Code reorg for Solaris. + +2008-02-23 23:47 fzago + + * sdl_tile.c, x11c_tile.c: Fixed a crash. + +2008-02-23 22:29 fzago + + * client.c, client.h: Removed unused function (and they look bogus + anyway). + +2008-02-23 22:22 fzago + + * game_server.c: ShowPlayerFlags will be optimized out if not used. + +2008-02-23 22:13 fzago + + * com_query.c: No need for ifdef's for this code portion. + +2008-02-23 22:09 fzago + + * client.c, client.h: Fixed prototype. + +2008-02-23 21:06 fzago + + * ABOUT-NLS, Makefile.in, config.guess, config.rpath, config.sub, + configure, configure.in, m4/gettext.m4, m4/lib-link.m4, + m4/lib-prefix.m4, m4/nls.m4, m4/po.m4, po/Makefile.in.in: Update + autoconf/gettext stuff. Fixed autoconf warning. + +2008-02-23 20:05 fzago + + * intro.c: Removed unused code. + +2008-02-23 16:54 fzago + + * xblast.c: Documented --size option, and regrouped SDL options. + +2008-02-23 16:49 fzago + + * util.c, util.h, xblast.c: Added --datadir option to set new data + directory at runtime. + +2008-02-17 02:29 fzago + + * configure.in: Don't add -Wall to any c compiler. + +2008-02-17 01:43 fzago + + * util.c: Removed unused macro. + +2008-02-17 01:38 fzago + + * util.c: Split pathList into userPath and dataPaths. + +2008-02-17 01:24 fzago + + * util.c: Config files may not be created yet, and thus their + access will always fail. + +2008-02-17 00:55 fzago + + * util.c: Removed hardcoded access to pathList, and make it a NULL + ended list instead. + +2008-02-17 00:42 fzago + + * util.c: Commented out some functions not used by SDL, only on SDL + builds. + +2008-02-17 00:36 fzago + + * Makefile.am, Makefile.in, cfg_level.c, image.c, ini_file.c, + menu_edit.c, sdl_image.c, sdl_sound.c, sdl_text.c, util.c, + util.h, xbsndsrv.c: Make file requests relative. This removed + most occurences of GAME_DATADIR. + +2008-01-25 21:43 rado + + * introdat.c, sdl_init.c, version.h, w32_init.c, x11c_init.c: Damn + cpp macros don't work well with "" strings, so reverted back to + old variant, added TITLE_STRING for the titles. + +2008-01-23 19:10 rado + + * introdat.c, version.h: adjusted version string usage to work with + VERSION_MAJOR,MINOR,PATCH rather than with _STRING, so _STRING + can be used at full length with window title line. + +2008-01-23 19:03 rado + + * chat.c, network.c, xblast.c: Set autoflush for stdout + stderr, + add timecode for chat stdout, record time+host/player info of + joiners to stderr. + +2008-01-21 22:45 aluleich + + * w32_config.c, w32_text.c: getting rid of commented code + +2008-01-20 23:43 aluleich + + * xblast.coff: this file should be removed and recompiled locally + +2008-01-20 23:34 aluleich + + * w32_config.c: defaultGeometry made local because of non-constant + initialization + +2008-01-20 23:31 aluleich + + * map.c, sdl_pixmap.c, status.c, w32_pixmap.c, x11c_pixmap.c, + xblast.h: making STAT_H independent of SMPF-definition and adjust + sources to work with --smpf option + +2008-01-20 23:24 aluleich + + * w32_text.c: initPen made local because of non-constant + initialization + +2008-01-20 23:21 aluleich + + * timeval.h: Updated to work with cygwin/mingw32 + +2008-01-20 23:19 aluleich + + * server.c: Stop listening on server's "Disconnect" + +2008-01-20 23:15 aluleich + + * Makefile.w32: Updated to compile W32/cygwin/mingw + +2008-01-17 16:10 rado + + * menu_network.c, version.h: Change informational text in title bar + and menus, pointing to HomePage and IRC-page. + +2008-01-09 23:41 fzago + + * sdl_sound.c: Fixed path for SDL_mixer.h + 2007-11-22 19:56 fzago * sdl_text.c, xblast.c: (SDL only) New option --size to resize the @@ -4284,7 +4426,7 @@ x11c_sprite.c, x11c_sprite.h, x11c_text.c, x11c_text.h, x11c_tile.c, x11c_tile.h, xblast.c, xblast.h, xblast.man, xbsndsrv.c: Updated FSF address. Removed $Log$ - xbsndsrv.c: Updated FSF address. Removed Revision 1.32 2007/12/14 13:17:54 alfie + xbsndsrv.c: Updated FSF address. Removed Revision 1.33 2008/03/26 14:23:17 alfie xbsndsrv.c: Updated FSF address. Removed cvs2cl -I ChangeLog --show-dead --follow-only trunk --utc xbsndsrv.c: Updated FSF address. Removed entries.... |
|
From: Frank Z. <fz...@us...> - 2008-02-24 00:04:22
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25874 Modified Files: debug.h Log Message: Code reorg for Solaris. Index: debug.h =================================================================== RCS file: /cvsroot/xblast/xblast/debug.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- debug.h 5 Jan 2007 22:13:11 -0000 1.33 +++ debug.h 24 Feb 2008 00:04:25 -0000 1.34 @@ -57,19 +57,20 @@ /* * global macros */ +#if defined(__GNUC__) && defined(DEBUG) +#define DBGATTR __attribute__ ((format (printf, 1, 2))); +#else +#define DBGATTR +#endif + #if defined(__GNUC__) && !defined(DEBUG) #define Dbg_Out(fmt, ...) (void)0 -#define DBGATTR #else -#ifdef __GNUC__ -#define DBGATTR __attribute__ ((format (printf, 1, 2))); +extern void Dbg_Out (const char *fmt, ...) DBGATTR; #endif + extern void Dbg_StartClock (void); extern time_t Dbg_FinishClock (void); -extern void -Dbg_Out (const char *fmt, ...) - DBGATTR; -#endif #ifdef DEBUG_ALLOC #define malloc(a) Dbg_Malloc (__FILE__,__LINE__,a) |
|
From: Frank Z. <fz...@us...> - 2008-02-23 23:47:41
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18652 Modified Files: sdl_tile.c x11c_tile.c Log Message: Fixed a crash. Index: sdl_tile.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_tile.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sdl_tile.c 29 Jun 2006 02:51:29 -0000 1.8 +++ sdl_tile.c 23 Feb 2008 23:47:44 -0000 1.9 @@ -305,7 +305,10 @@ int i; for (i = 0; i < MAX_EXPLOSION; i++) { - SDL_FreeSurface (pixExplBlock[i]); + if (pixExplBlock[i]) { + SDL_FreeSurface (pixExplBlock[i]); + pixExplBlock[i] = NULL; + } } } /* GUI_FreeExplosionBlocks */ Index: x11c_tile.c =================================================================== RCS file: /cvsroot/xblast/xblast/x11c_tile.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- x11c_tile.c 29 Jun 2006 02:51:29 -0000 1.11 +++ x11c_tile.c 23 Feb 2008 23:47:44 -0000 1.12 @@ -278,7 +278,10 @@ int i; for (i = 0; i < MAX_EXPLOSION; i++) { - XFreePixmap (dpy, pixExplBlock[i]); + if (pixExplBlock[i] != None) { + XFreePixmap (dpy, pixExplBlock[i]); + pixExplBlock[i] = None; + } } } /* GUI_FreeExplosionBlocks */ |
|
From: Frank Z. <fz...@us...> - 2008-02-23 22:29:21
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21986 Modified Files: client.c client.h Log Message: Removed unused function (and they look bogus anyway). Index: client.c =================================================================== RCS file: /cvsroot/xblast/xblast/client.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- client.c 23 Feb 2008 22:09:55 -0000 1.75 +++ client.c 23 Feb 2008 22:29:23 -0000 1.76 @@ -700,15 +700,6 @@ } /* Client_GetHostState */ /* - * retrieve host state requests for a host - */ -unsigned * -Client_GetHostStateReq (unsigned id) -{ - return Network_GetHostStateReq (id); -} /* Client_GetHostStateReq */ - -/* * retrieve team state for a host/player */ unsigned @@ -718,15 +709,6 @@ } /* Client_GetHostState */ /* - * retrieve team state requests for a host/player - */ -unsigned * -Client_GetTeamStateReq (unsigned id, unsigned pl) -{ - return Network_GetTeamStateReq (id, pl); -} /* Client_GetTeamStateReq */ - -/* * query rejection status for level config */ XBBool Index: client.h =================================================================== RCS file: /cvsroot/xblast/xblast/client.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- client.h 23 Feb 2008 22:09:55 -0000 1.33 +++ client.h 23 Feb 2008 22:29:23 -0000 1.34 @@ -94,9 +94,7 @@ extern unsigned Client_GetHostState (unsigned id); extern int Client_GetPingTime (unsigned clientID); extern unsigned Client_GetHostState (unsigned id); -extern unsigned *Client_GetHostStateReq (unsigned id); extern unsigned Client_GetTeamState (unsigned id, unsigned pl); -extern unsigned *Client_GetTeamStateReq (unsigned id, unsigned pl); extern XBBool Client_RejectsLevel (void); extern XBBool Client_FixedLevel (void); extern void Client_GetPlayerAction (int, PlayerAction *); |
|
From: Frank Z. <fz...@us...> - 2008-02-23 22:22:50
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19144 Modified Files: game_server.c Log Message: ShowPlayerFlags will be optimized out if not used. Index: game_server.c =================================================================== RCS file: /cvsroot/xblast/xblast/game_server.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- game_server.c 8 Oct 2006 20:02:16 -0000 1.53 +++ game_server.c 23 Feb 2008 22:22:42 -0000 1.54 @@ -152,7 +152,6 @@ } } /* CheckConnections */ -#ifdef DEBUG_GAME /* * output flag array (obsolete) */ @@ -167,7 +166,6 @@ } return tmp; } /* ShowPlayerFlags */ -#endif /* * server waits until all clients sent given event |
|
From: Frank Z. <fz...@us...> - 2008-02-23 22:13:32
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15359 Modified Files: com_query.c Log Message: No need for ifdef's for this code portion. Index: com_query.c =================================================================== RCS file: /cvsroot/xblast/xblast/com_query.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- com_query.c 10 Oct 2006 19:21:27 -0000 1.21 +++ com_query.c 23 Feb 2008 22:13:33 -0000 1.22 @@ -123,10 +123,9 @@ static XBBool EventQuery (XBCommBrowse * bComm, XBBrowseEvent ev) { -#if defined(DEBUG_QUERY) || defined(WMS) XBCommQuery *qComm = (XBCommQuery *) bComm; unsigned id = qComm->id; -#endif + switch (ev) { case XBBE_Wait: Dbg_Query ("all data sent on #%u\n", id); @@ -146,6 +145,7 @@ default: Dbg_Query ("unknown browse event on #%u, ignoring!\n", ev); } + return XBFalse; } /* EventQuery */ |
|
From: Frank Z. <fz...@us...> - 2008-02-23 22:09:52
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13664 Modified Files: client.c client.h Log Message: Fixed prototype. Index: client.c =================================================================== RCS file: /cvsroot/xblast/xblast/client.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- client.c 3 Feb 2007 11:41:20 -0000 1.74 +++ client.c 23 Feb 2008 22:09:55 -0000 1.75 @@ -678,7 +678,7 @@ * receive async status from server */ void -Client_ReceiveAsync (unsigned ev) +Client_ReceiveAsync (unsigned int ev) { /* ev always equal to XBNW_SyncLevelResult */ Dbg_Client ("receiving level result async\n"); Index: client.h =================================================================== RCS file: /cvsroot/xblast/xblast/client.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- client.h 10 Oct 2006 19:21:27 -0000 1.32 +++ client.h 23 Feb 2008 22:09:55 -0000 1.33 @@ -87,7 +87,7 @@ extern void Client_ReceiveRandomSeed (unsigned); extern void Client_ReceivePlayerAction (int, const PlayerAction *); extern void Client_ReceiveFinish (void); -extern void Client_ReceiveAsync (XBBool as); +extern void Client_ReceiveAsync (unsigned int ev); extern XBBool Client_ReceiveDisconnect (unsigned); /* retrieving local data */ |
|
From: Frank Z. <fz...@us...> - 2008-02-23 21:06:33
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18984 Modified Files: ABOUT-NLS Makefile.in config.guess config.rpath config.sub configure configure.in Log Message: Update autoconf/gettext stuff. Fixed autoconf warning. Index: ABOUT-NLS =================================================================== RCS file: /cvsroot/xblast/xblast/ABOUT-NLS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ABOUT-NLS 9 Feb 2006 21:56:12 -0000 1.1 +++ ABOUT-NLS 23 Feb 2008 21:06:35 -0000 1.2 @@ -118,8 +118,8 @@ language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of -locales supported by your system for your country by running the command -`locale -a | grep '^LL''. +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you @@ -172,787 +172,897 @@ [...1643 lines suppressed...] + wdiff | [] [] | 22 + wget | [] [] [] | 19 + xchat | [] [] [] [] | 29 + xkeyboard-config | [] [] [] [] | 11 + xpad | [] [] [] | 14 + +---------------------------------------------------+ + 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu + 170 domains 0 1 1 77 39 0 136 10 1 48 5 54 0 2028 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are @@ -965,7 +1075,7 @@ lag between the mere existence a PO file and its wide availability in a distribution. - If March 2005 seems to be old, you may fetch a more recent copy of + If October 2006 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Index: config.rpath =================================================================== RCS file: /cvsroot/xblast/xblast/config.rpath,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.rpath 9 Feb 2006 21:56:12 -0000 1.1 +++ config.rpath 23 Feb 2008 21:06:35 -0000 1.2 @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2005 Free Software Foundation, Inc. +# Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -35,7 +35,17 @@ host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -cc_basename=`echo "$CC" | sed -e 's%^.*/%%'` +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. @@ -48,7 +58,7 @@ wl='-Wl,' ;; darwin*) - case "$cc_basename" in + case $cc_basename in xlc*) wl='-Wl,' ;; @@ -78,6 +88,13 @@ como) wl='-lopt=' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; esac ;; osf3* | osf4* | osf5*) @@ -120,6 +137,10 @@ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -127,6 +148,12 @@ ld_shlibs=yes if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken @@ -162,9 +189,20 @@ ld_shlibs=no fi ;; + interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; netbsd*) ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then @@ -173,16 +211,23 @@ ld_shlibs=no fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; sunos4*) hardcode_direct=yes ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : @@ -191,10 +236,8 @@ fi ;; esac - if test "$ld_shlibs" = yes; then - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= fi else case "$host_os" in @@ -225,6 +268,7 @@ break fi done + ;; esac fi hardcode_direct=yes @@ -244,6 +288,7 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. @@ -291,7 +336,7 @@ if test "$GCC" = yes ; then : else - case "$cc_basename" in + case $cc_basename in xlc*) ;; *) @@ -326,24 +371,25 @@ # but as the default location of the library. hardcode_minus_L=yes ;; - hpux10* | hpux11*) + hpux10*) if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) hardcode_direct=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -397,8 +443,6 @@ fi hardcode_libdir_separator=: ;; - sco3.2v5*) - ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; @@ -427,14 +471,11 @@ ld_shlibs=yes fi ;; - sysv4.2uw2*) - hardcode_direct=yes - hardcode_minus_L=no - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; - sysv5*) - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' @@ -471,12 +512,12 @@ ;; kfreebsd*-gnu) ;; - freebsd*) + freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) - case "$host_cpu" in + case $host_cpu in ia64*) shrext=.so ;; @@ -488,6 +529,8 @@ ;; esac ;; + interix3*) + ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) @@ -523,16 +566,16 @@ ;; osf3* | osf4* | osf5*) ;; - sco3.2v5*) - ;; solaris*) ;; sunos4*) ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.3*) ;; sysv4*MP*) ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + ;; uts4*) ;; esac Index: configure =================================================================== RCS file: /cvsroot/xblast/xblast/configure,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- configure 29 Jun 2006 10:04:14 -0000 1.31 +++ configure 23 Feb 2008 21:06:35 -0000 1.32 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59e. +# Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -10,7 +10,8 @@ ## M4sh Initialization. ## ## --------------------- ## [...3731 lines suppressed...] ;; - "default-1":C) + "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -12403,11 +11530,12 @@ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES Index: configure.in =================================================================== RCS file: /cvsroot/xblast/xblast/configure.in,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- configure.in 17 Feb 2008 02:29:37 -0000 1.37 +++ configure.in 23 Feb 2008 21:06:35 -0000 1.38 @@ -11,6 +11,7 @@ AM_INIT_AUTOMAKE([xblast], 2.10.3 ) AC_CONFIG_HEADER(config.h) AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.16]) XBLAST_CC_SET_CFLAGS() Index: Makefile.in =================================================================== RCS file: /cvsroot/xblast/xblast/Makefile.in,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Makefile.in 17 Feb 2008 00:36:15 -0000 1.29 +++ Makefile.in 23 Feb 2008 21:06:35 -0000 1.30 @@ -213,6 +213,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -232,8 +233,8 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -257,6 +258,7 @@ XBSNDSRV_FALSE = @XBSNDSRV_FALSE@ XBSNDSRV_TRUE = @XBSNDSRV_TRUE@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ Index: config.guess =================================================================== RCS file: /cvsroot/xblast/xblast/config.guess,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.guess 16 Jun 2006 23:27:20 -0000 1.5 +++ config.guess 23 Feb 2008 21:06:35 -0000 1.6 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2006-02-23' +timestamp='2007-03-06' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -160,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -210,7 +212,7 @@ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -770,6 +772,8 @@ case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac @@ -777,10 +781,7 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS_NT-*:*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[345]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -831,6 +835,9 @@ arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -947,6 +954,9 @@ x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -989,7 +999,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun) + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -1205,6 +1215,15 @@ SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; Index: config.sub =================================================================== RCS file: /cvsroot/xblast/xblast/config.sub,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.sub 16 Jun 2006 23:27:20 -0000 1.5 +++ config.sub 23 Feb 2008 21:06:35 -0000 1.6 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2006-02-23' +timestamp='2007-01-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -240,15 +241,16 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -274,21 +276,19 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -318,18 +318,18 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -358,23 +358,21 @@ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - m32c-*) - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -912,6 +910,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -923,6 +925,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1128,7 +1133,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1217,7 +1222,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1369,6 +1374,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1378,9 +1389,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1406,6 +1417,9 @@ m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; |
|
From: Frank Z. <fz...@us...> - 2008-02-23 21:06:32
|
Update of /cvsroot/xblast/xblast/m4 In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18984/m4 Modified Files: gettext.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 Log Message: Update autoconf/gettext stuff. Fixed autoconf warning. Index: lib-link.m4 =================================================================== RCS file: /cvsroot/xblast/xblast/m4/lib-link.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lib-link.m4 9 Feb 2006 21:56:12 -0000 1.1 +++ lib-link.m4 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 6 (gettext-0.14.3) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +# lib-link.m4 serial 9 (gettext-0.16) +dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -126,6 +126,7 @@ dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. @@ -148,7 +149,7 @@ ]) else additional_includedir="$withval/include" - additional_libdir="$withval/lib" + additional_libdir="$withval/$acl_libdirstem" fi fi ]) @@ -197,9 +198,16 @@ found_so= found_a= if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + if test -n "$shlibext" \ + && { test -f "$additional_libdir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.$shlibext"; then + found_so="$additional_libdir/lib$name.$shlibext" + else + found_so="$additional_libdir/lib$name.dll.a" + fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi @@ -219,9 +227,16 @@ case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + if test -n "$shlibext" \ + && { test -f "$dir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" - found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.$shlibext"; then + found_so="$dir/lib$name.$shlibext" + else + found_so="$dir/lib$name.dll.a" + fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi @@ -248,7 +263,7 @@ dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -334,8 +349,8 @@ dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in - */lib | */lib/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac @@ -396,9 +411,9 @@ dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/lib"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -551,3 +566,79 @@ fi done ]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) Index: gettext.m4 =================================================================== RCS file: /cvsroot/xblast/xblast/m4/gettext.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gettext.m4 9 Feb 2006 21:56:12 -0000 1.1 +++ gettext.m4 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,5 +1,5 @@ -# gettext.m4 serial 36 (gettext-0.14.3) -dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. +# gettext.m4 serial 59 (gettext-0.16.1) +dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ dnl Authors: dnl Ulrich Drepper <dr...@cy...>, 1995-2000. -dnl Bruno Haible <ha...@cl...>, 2000-2003. +dnl Bruno Haible <ha...@cl...>, 2000-2006. dnl Macro to add for using GNU gettext. @@ -63,8 +63,13 @@ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) - define([gt_included_intl], ifelse([$1], [external], [no], [yes])) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ @@ -78,7 +83,7 @@ dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then - dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: @@ -94,7 +99,7 @@ gt_INTL_MACOSX dnl Set USE_NLS. - AM_NLS + AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no @@ -104,6 +109,15 @@ LTLIBINTL= POSUB= + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no @@ -122,28 +136,35 @@ dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. - dnl Add a version number to the cache macros. - define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) - define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) - define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) - - AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, - [AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include <libintl.h> +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); -return (gettext ("") != 0)]ifelse([$2], [need-ngettext], [ + (ngettext ("", "", 0) != 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], - gt_cv_func_gnugettext_libc=yes, - gt_cv_func_gnugettext_libc=no)]) +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) - if test "$gt_cv_func_gnugettext_libc" != "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK @@ -154,52 +175,40 @@ dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], - gt_cv_func_gnugettext_libintl, + [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); -return (gettext ("") != 0)]ifelse([$2], [need-ngettext], [ + (ngettext ("", "", 0) != 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - gt_cv_func_gnugettext_libintl=yes, - gt_cv_func_gnugettext_libintl=no) +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. - if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -], [])[extern int _nl_msg_cat_cntr; +$gt_revision_test_code +extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); -return (gettext ("") != 0)]ifelse([$2], [need-ngettext], [ + (ngettext ("", "", 0) != 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext_libintl=yes + eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" @@ -210,8 +219,8 @@ dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if test "$gt_cv_func_gnugettext_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes @@ -234,8 +243,8 @@ dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi @@ -271,7 +280,7 @@ if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" @@ -285,7 +294,7 @@ if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) @@ -353,134 +362,6 @@ ]) -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_MKINSTALLDIRS])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([bh_C_SIGNED])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl - AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ -stdlib.h string.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ -mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ -strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ -__fsetlocking]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) - gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) - gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) - gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_ICONV - AM_LANGINFO_CODESET - if test $ac_cv_header_locale_h = yes; then - gt_LC_MESSAGES - fi - - if test -n "$INTL_MACOSX_LIBS"; then - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - fi - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], @@ -488,15 +369,12 @@ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include <CFPreferences.h>], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, @@ -504,14 +382,11 @@ fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" - gt_save_LIBS="$LIBS" - LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) - CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, @@ -525,23 +400,18 @@ ]) -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], [ - AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, - [AC_TRY_COMPILE([$2], [ -#ifndef $1 - char *p = (char *) $1; -#endif -], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) Index: lib-prefix.m4 =================================================================== RCS file: /cvsroot/xblast/xblast/m4/lib-prefix.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lib-prefix.m4 9 Feb 2006 21:56:12 -0000 1.1 +++ lib-prefix.m4 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,4 +1,4 @@ -# lib-prefix.m4 serial 4 (gettext-0.14.2) +# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -24,6 +24,7 @@ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes @@ -45,7 +46,7 @@ ]) else additional_includedir="$withval/include" - additional_libdir="$withval/lib" + additional_libdir="$withval/$acl_libdirstem" fi fi ]) @@ -87,7 +88,7 @@ dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/lib"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) @@ -97,7 +98,7 @@ fi done if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/lib"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; @@ -151,3 +152,34 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) Index: nls.m4 =================================================================== RCS file: /cvsroot/xblast/xblast/m4/nls.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- nls.m4 9 Feb 2006 21:56:12 -0000 1.1 +++ nls.m4 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,5 +1,5 @@ -# nls.m4 serial 2 (gettext-0.14.3) -dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc. +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,23 +29,3 @@ AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) - -AC_DEFUN([AM_MKINSTALLDIRS], -[ - dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly - dnl find the mkinstalldirs script in another subdir but $(top_srcdir). - dnl Try to locate it. - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - case "$ac_aux_dir" in - /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; - *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; - esac - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - AC_SUBST(MKINSTALLDIRS) -]) Index: po.m4 =================================================================== RCS file: /cvsroot/xblast/xblast/m4/po.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- po.m4 9 Feb 2006 21:56:12 -0000 1.1 +++ po.m4 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,5 +1,5 @@ -# po.m4 serial 7 (gettext-0.14.3) -dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. +# po.m4 serial 13 (gettext-0.15) +dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -24,7 +24,7 @@ [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, @@ -39,6 +39,22 @@ :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. @@ -49,44 +65,26 @@ dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU msgfmt. - if test "$GMSGFMT" != ":"; then - dnl If it is no GNU msgfmt we define it as : so that the - dnl Makefiles still can work. - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - AC_MSG_RESULT( - [found $GMSGFMT program is not GNU msgfmt; ignore it]) - GMSGFMT=":" - fi - fi - - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - fi + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) - AC_OUTPUT_COMMANDS([ + AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -123,11 +121,12 @@ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -197,10 +196,10 @@ fi ;; esac - done], + done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake. + # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -286,7 +285,7 @@ changequote([,])dnl # Set POTFILES to the value of the Makefile variable POTFILES. - sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`" + sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` # Compute POTFILES_DEPS as # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) @@ -305,10 +304,10 @@ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. - sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`" + sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake. + # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
|
From: Frank Z. <fz...@us...> - 2008-02-23 21:06:32
|
Update of /cvsroot/xblast/xblast/po In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18984/po Modified Files: Makefile.in.in Log Message: Update autoconf/gettext stuff. Fixed autoconf warning. Index: Makefile.in.in =================================================================== RCS file: /cvsroot/xblast/xblast/po/Makefile.in.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.in.in 9 Feb 2006 21:56:13 -0000 1.1 +++ Makefile.in.in 23 Feb 2008 21:06:35 -0000 1.2 @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <dr...@gn...> +# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <dr...@gn...> # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -8,7 +8,7 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.14.3 +# Origin: gettext-0.16 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -23,18 +23,38 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ datadir = @datadir@ -localedir = $(datadir)/locale +localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ +# We use $(mkdir_p). +# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as +# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, +# @install_sh@ does not start with $(SHELL), so we add it. +# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined +# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake +# versions, $(mkinstalldirs) and $(install_sh) are unused. +mkinstalldirs = $(SHELL) @install_sh@ -d +install_sh = $(SHELL) @install_sh@ +MKDIR_P = @MKDIR_P@ +mkdir_p = @mkdir_p@ + +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit @@ -158,7 +178,7 @@ install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ @@ -171,13 +191,13 @@ fi install-data-no: all install-data-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) + $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ @@ -217,19 +237,19 @@ installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: - $(mkinstalldirs) $(DESTDIR)$(datadir) + $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ @@ -374,8 +394,7 @@ Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status + && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: |
|
From: Frank Z. <fz...@us...> - 2008-02-23 20:05:21
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25307 Modified Files: intro.c Log Message: Removed unused code. Index: intro.c =================================================================== RCS file: /cvsroot/xblast/xblast/intro.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- intro.c 20 Jan 2007 16:31:05 -0000 1.28 +++ intro.c 23 Feb 2008 20:05:15 -0000 1.29 @@ -198,18 +198,11 @@ DoIntro (void) { XBEventData data; - BMRectangle rect; XBEventCode event; double pfactor; int count; int x, y, w, h, lw; - - rect.x = GetBlockWidth()*6; - rect.y = GetBlockHeight()*5; - rect.w = GetBlockWidth()*3; - rect.h = GetBlockHeight(); - /* clear pixmap with default bitmap */ GUI_ClearPixmap (); /* standard init text */ |
|
From: Frank Z. <fz...@us...> - 2008-02-23 16:54:31
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11287 Modified Files: xblast.c Log Message: Documented --size option, and regrouped SDL options. Index: xblast.c =================================================================== RCS file: /cvsroot/xblast/xblast/xblast.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- xblast.c 23 Feb 2008 16:49:56 -0000 1.31 +++ xblast.c 23 Feb 2008 16:54:35 -0000 1.32 @@ -91,6 +91,7 @@ printf(" --datadir override default data directory\n"); #ifdef SDL printf(" --font <font> TrueType font pathname\n"); + printf(" --size <a,b,x,y,z> window (a,b) and font sizes (x,y,z) (eg. 4,3,14,10,8)\n"); #endif } @@ -154,9 +155,6 @@ struct option long_options[] = { { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'v' }, -#ifdef SDL - { "font", 1, NULL, 'f' }, -#endif { "nosound", 0, &nsound, XBTrue }, { "check", 0, &check, XBTrue }, { "central", 0, &autoCentral, XBTrue }, @@ -165,6 +163,7 @@ { "debug", 0, &xblast_debug, XBTrue }, { "datadir", 1, NULL, 'd' }, #ifdef SDL + { "font", 1, NULL, 'f' }, { "size", 1, NULL, 's' }, #endif { NULL, 0, NULL, 0 }, |
|
From: Frank Z. <fz...@us...> - 2008-02-23 16:49:59
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9205 Modified Files: util.c util.h xblast.c Log Message: Added --datadir option to set new data directory at runtime. Index: util.h =================================================================== RCS file: /cvsroot/xblast/xblast/util.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- util.h 17 Feb 2008 00:36:15 -0000 1.10 +++ util.h 23 Feb 2008 16:49:56 -0000 1.11 @@ -35,6 +35,8 @@ struct _xb_dir *next; } XBDir; +extern char *xblast_datadir; + /* * function prototypes */ Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- util.c 17 Feb 2008 01:43:02 -0000 1.29 +++ util.c 23 Feb 2008 16:49:56 -0000 1.30 @@ -90,6 +90,10 @@ i = 0; + /* Default path fropm command line */ + dataPaths[i] = xblast_datadir; + if (dataPaths[i]) i++; + /* check environment for xblast search path. */ dataPaths[i] = getenv ("XBLASTDIR"); if (dataPaths[i]) i++; Index: xblast.c =================================================================== RCS file: /cvsroot/xblast/xblast/xblast.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- xblast.c 23 Jan 2008 19:03:52 -0000 1.30 +++ xblast.c 23 Feb 2008 16:49:56 -0000 1.31 @@ -31,6 +31,9 @@ /* Turn debugging options on/off */ int xblast_debug; +/* User provided datadir */ +char *xblast_datadir; + #ifdef SDL char *xblast_default_font; int GfontSize[3] = { 0, }; /* kind of hack-ish */ @@ -85,6 +88,7 @@ printf(" --help this help\n"); printf(" --version display version\n"); printf(" --debug turn some debugging options on\n"); + printf(" --datadir override default data directory\n"); #ifdef SDL printf(" --font <font> TrueType font pathname\n"); #endif @@ -159,6 +163,7 @@ { "mini", 0, &mini, XBTrue }, { "smpf", 0, &smpf, XBTrue }, { "debug", 0, &xblast_debug, XBTrue }, + { "datadir", 1, NULL, 'd' }, #ifdef SDL { "size", 1, NULL, 's' }, #endif @@ -181,6 +186,9 @@ display_version(); return 0; break; + case 'd': + xblast_datadir = optarg; + break; #ifdef SDL case 'f': xblast_default_font = optarg; |
|
From: Frank Z. <fz...@us...> - 2008-02-17 02:29:34
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28147 Modified Files: configure.in Log Message: Don't add -Wall to any c compiler. Index: configure.in =================================================================== RCS file: /cvsroot/xblast/xblast/configure.in,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- configure.in 29 Jun 2006 10:04:14 -0000 1.36 +++ configure.in 17 Feb 2008 02:29:37 -0000 1.37 @@ -12,7 +12,6 @@ AC_CONFIG_HEADER(config.h) AM_GNU_GETTEXT([external]) -CPPFLAGS="$CPPFLAGS -Wall " XBLAST_CC_SET_CFLAGS() AC_PROG_INSTALL |
|
From: Frank Z. <fz...@us...> - 2008-02-17 01:42:59
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10162 Modified Files: util.c Log Message: Removed unused macro. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- util.c 17 Feb 2008 01:38:03 -0000 1.28 +++ util.c 17 Feb 2008 01:43:02 -0000 1.29 @@ -24,14 +24,6 @@ #include "xblast.h" /* - * local macros - */ - -#ifndef XBLASTDIR -#define XBLASTDIR NULL -#endif - -/* * local variables */ static char *userPath; |
|
From: Frank Z. <fz...@us...> - 2008-02-17 01:38:04
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7993 Modified Files: util.c Log Message: Split pathList into userPath and dataPaths. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- util.c 17 Feb 2008 01:24:47 -0000 1.27 +++ util.c 17 Feb 2008 01:38:03 -0000 1.28 @@ -34,10 +34,11 @@ /* * local variables */ -static char *pathList[5]; +static char *userPath; +static char *dataPaths[5]; -/* Size of the longest entry in pathList. */ -static int pathList_maxlen; +/* Size of the longest entry in dataPaths. */ +static int dataPaths_maxlen; /* shared buffer for complete filename */ static char zeile[1024]; @@ -48,21 +49,19 @@ static void InitPaths (void) { - char *userPath; char *tmp; char *home; int i; - if (pathList[0] != NULL) + if (userPath) return; /* set private xblast path */ home = getenv ("HOME"); if (NULL == home) { - userPath = malloc(20); + userPath = strdup("./user"); if (!userPath) return; - strcpy (userPath, "./user"); } else { userPath = malloc(strlen(home) + 20); @@ -99,26 +98,25 @@ i = 0; - /* set user path as first path to load from */ - pathList[i++] = userPath; - /* check environment for xblast search path. */ - pathList[i] = getenv ("XBLASTDIR"); - if (pathList[i]) i++; + dataPaths[i] = getenv ("XBLASTDIR"); + if (dataPaths[i]) i++; /* In place data */ - pathList[i] = strdup("."); - if (pathList[i]) i++; + dataPaths[i] = strdup("."); + if (dataPaths[i]) i++; /* system wide data */ - pathList[i] = strdup(GAME_DATADIR); - if (pathList[i]) i++; + dataPaths[i] = strdup(GAME_DATADIR); + if (dataPaths[i]) i++; /* Compute largest path. */ - for(i=0; pathList[i]; i++) { - if (pathList_maxlen < strlen(pathList[i])) - pathList_maxlen = strlen(pathList[i]); + dataPaths_maxlen = strlen(userPath); + for(i=0; dataPaths[i]; i++) { + if (dataPaths_maxlen < strlen(dataPaths[i])) + dataPaths_maxlen = strlen(dataPaths[i]); } + } /* InitPaths */ /* Return full path to a file. Path must be free'd by caller. mode is @@ -141,20 +139,20 @@ if (mode[0] == 'w') access_mode |= W_OK; - fullpath = malloc(pathList_maxlen + 1 + strlen(path) + 1 + strlen(name) + 1 + strlen(ext) + 1); + fullpath = malloc(dataPaths_maxlen + 1 + strlen(path) + 1 + strlen(name) + 1 + strlen(ext) + 1); if (!fullpath) return NULL; if (strcmp(path, "config") == 0) { /* Special case. Config files may not be created yet, and thus * their access will always fail. This is hack'ish. */ - sprintf (fullpath, "%s/%s/%s.%s", pathList[0], path, name, ext); + sprintf (fullpath, "%s/%s/%s.%s", userPath, path, name, ext); return fullpath; } /* Check file access, in directories given in path list */ - for (i = 0; pathList[i]; i++) { - sprintf (fullpath, "%s/%s/%s.%s", pathList[i], path, name, ext); + for (i = 0; dataPaths[i]; i++) { + sprintf (fullpath, "%s/%s/%s.%s", dataPaths[i], path, name, ext); if (!access(fullpath, access_mode)) { return fullpath; } @@ -171,6 +169,7 @@ { FILE *fp; int i; + char *fullpath; /* sanity checks */ assert (NULL != path); @@ -181,26 +180,21 @@ /* setup paths for loading */ InitPaths (); - /* try to open file, in directories given in path list */ - for (i = 0; pathList[i]; i++) { - char *fullpath; - - fullpath = GetFilePath(path, name, ext, mode); - if (fullpath) { - fp = fopen (fullpath, mode); - free(fullpath); - - if (fp) { - /* file opened succesfully, use fclose to close it */ - return fp; - } + fullpath = GetFilePath(path, name, ext, mode); + if (fullpath) { + fp = fopen (fullpath, mode); + free(fullpath); + + if (fp) { + /* file opened succesfully, use fclose to close it */ + return fp; } } /* sorry file opening failed */ fprintf (stderr, "failed to open file \"%s/%s.%s\".\n", path, name, ext); - for (i = 0; pathList[i]; i++) { - fprintf(stderr,"%i : %s\n",i,pathList[i]); + for (i = 0; dataPaths[i]; i++) { + fprintf(stderr,"%i : %s\n",i,dataPaths[i]); } return NULL; } /* FileOpen */ @@ -303,10 +297,10 @@ /* search all directories */ lenExt = strlen (ext); - for (i = 0; pathList[i]; i++) { - Dbg_File ("trying path %s...\n", pathList[i]); + for (i = 0; dataPaths[i]; i++) { + Dbg_File ("trying path %s...\n", dataPaths[i]); /* create path to search */ - strcpy (dirName, pathList[i]); + strcpy (dirName, dataPaths[i]); strcat (dirName, "/"); strcat (dirName, path); /* prepare full path for file */ |
|
From: Frank Z. <fz...@us...> - 2008-02-17 01:24:43
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2450 Modified Files: util.c Log Message: Config files may not be created yet, and thus their access will always fail. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- util.c 17 Feb 2008 00:55:16 -0000 1.26 +++ util.c 17 Feb 2008 01:24:47 -0000 1.27 @@ -145,6 +145,13 @@ if (!fullpath) return NULL; + if (strcmp(path, "config") == 0) { + /* Special case. Config files may not be created yet, and thus + * their access will always fail. This is hack'ish. */ + sprintf (fullpath, "%s/%s/%s.%s", pathList[0], path, name, ext); + return fullpath; + } + /* Check file access, in directories given in path list */ for (i = 0; pathList[i]; i++) { sprintf (fullpath, "%s/%s/%s.%s", pathList[i], path, name, ext); |
|
From: Frank Z. <fz...@us...> - 2008-02-17 00:55:15
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22132 Modified Files: util.c Log Message: Removed hardcoded access to pathList, and make it a NULL ended list instead. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- util.c 17 Feb 2008 00:42:32 -0000 1.25 +++ util.c 17 Feb 2008 00:55:16 -0000 1.26 @@ -26,7 +26,6 @@ /* * local macros */ -#define NUM_XBLAST_PATH 4 #ifndef XBLASTDIR #define XBLASTDIR NULL @@ -35,12 +34,7 @@ /* * local variables */ -static char *pathList[NUM_XBLAST_PATH] = { - NULL, /* User home */ - NULL, /* XBLASTDIR */ - ".", /* in place data */ - "/", /* system wide data */ -}; +static char *pathList[5]; /* Size of the longest entry in pathList. */ static int pathList_maxlen; @@ -103,18 +97,26 @@ free(tmp); + i = 0; + /* set user path as first path to load from */ - pathList[0] = userPath; + pathList[i++] = userPath; - /* check environment for xblast search path */ - pathList[1] = getenv ("XBLASTDIR"); + /* check environment for xblast search path. */ + pathList[i] = getenv ("XBLASTDIR"); + if (pathList[i]) i++; - pathList[3] = malloc(strlen(GAME_DATADIR) + 10); - if (pathList[3]) - sprintf(pathList[3], "%s", GAME_DATADIR); + /* In place data */ + pathList[i] = strdup("."); + if (pathList[i]) i++; - for(i=0; i<NUM_XBLAST_PATH; i++) { - if (pathList[i] && pathList_maxlen < strlen(pathList[i])) + /* system wide data */ + pathList[i] = strdup(GAME_DATADIR); + if (pathList[i]) i++; + + /* Compute largest path. */ + for(i=0; pathList[i]; i++) { + if (pathList_maxlen < strlen(pathList[i])) pathList_maxlen = strlen(pathList[i]); } } /* InitPaths */ @@ -144,12 +146,10 @@ return NULL; /* Check file access, in directories given in path list */ - for (i = 0; i < NUM_XBLAST_PATH; i++) { - if (NULL != pathList[i]) { - sprintf (fullpath, "%s/%s/%s.%s", pathList[i], path, name, ext); - if (!access(fullpath, access_mode)) { - return fullpath; - } + for (i = 0; pathList[i]; i++) { + sprintf (fullpath, "%s/%s/%s.%s", pathList[i], path, name, ext); + if (!access(fullpath, access_mode)) { + return fullpath; } } @@ -175,29 +175,25 @@ InitPaths (); /* try to open file, in directories given in path list */ - for (i = 0; i < NUM_XBLAST_PATH; i++) { - if (NULL != pathList[i]) { - char *fullpath; + for (i = 0; pathList[i]; i++) { + char *fullpath; - fullpath = GetFilePath(path, name, ext, mode); - if (fullpath) { - fp = fopen (fullpath, mode); - free(fullpath); + fullpath = GetFilePath(path, name, ext, mode); + if (fullpath) { + fp = fopen (fullpath, mode); + free(fullpath); - if (fp) { - /* file opened succesfully, use fclose to close it */ - return fp; - } + if (fp) { + /* file opened succesfully, use fclose to close it */ + return fp; } } } /* sorry file opening failed */ fprintf (stderr, "failed to open file \"%s/%s.%s\".\n", path, name, ext); - for (i = 0; i < NUM_XBLAST_PATH; i++) { - if (NULL != pathList[i]) { - fprintf(stderr,"%i : %s\n",i,pathList[i]); - } + for (i = 0; pathList[i]; i++) { + fprintf(stderr,"%i : %s\n",i,pathList[i]); } return NULL; } /* FileOpen */ @@ -300,133 +296,131 @@ /* search all directories */ lenExt = strlen (ext); - for (i = 0; i < NUM_XBLAST_PATH; i++) { - if (NULL != pathList[i]) { - Dbg_File ("trying path %s...\n", pathList[i]); - /* create path to search */ - strcpy (dirName, pathList[i]); - strcat (dirName, "/"); - strcat (dirName, path); - /* prepare full path for file */ - strcpy (fileName, dirName); - strcat (fileName, "/"); - pFile = fileName + strlen (fileName); - /* open directory to read */ + for (i = 0; pathList[i]; i++) { + Dbg_File ("trying path %s...\n", pathList[i]); + /* create path to search */ + strcpy (dirName, pathList[i]); + strcat (dirName, "/"); + strcat (dirName, path); + /* prepare full path for file */ + strcpy (fileName, dirName); + strcat (fileName, "/"); + pFile = fileName + strlen (fileName); + /* open directory to read */ #if defined(__MINGW32__) || defined(WMS) - /* windows specific */ - strcpy (dirToOpen, dirName); - strcat (dirToOpen, "/*"); - /* try to open dir */ - if (INVALID_HANDLE_VALUE == (dp = FindFirstFile (dirToOpen, &find_data))) { + /* windows specific */ + strcpy (dirToOpen, dirName); + strcat (dirToOpen, "/*"); + /* try to open dir */ + if (INVALID_HANDLE_VALUE == (dp = FindFirstFile (dirToOpen, &find_data))) { + continue; + } + Dbg_File ("opening dir %s\n", dirName); + while (testFile) { + /* ignore hidden files */ + if (find_data.cFileName[0] == '.') { + testFile = FindNextFile (dp, &find_data); continue; } - Dbg_File ("opening dir %s\n", dirName); - while (testFile) { - /* ignore hidden files */ - if (find_data.cFileName[0] == '.') { - testFile = FindNextFile (dp, &find_data); - continue; - } - /* ignore files with wrong extension */ - lenName = strlen (find_data.cFileName); - if (lenName <= lenExt) { - testFile = FindNextFile (dp, &find_data); - continue; - } - /* check for directory */ - if (0 != strcmp (find_data.cFileName + lenName - lenExt, ext)) { - /* if recursive check if directory */ - if (0 != rec && find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - sprintf (dirName1, "%s/%s/*", dirName, find_data.cFileName); - /* try to open */ - if (INVALID_HANDLE_VALUE != (dp1 = FindFirstFile (dirName1, &find_data1))) { - /* cut the \/* */ - dirName1[strlen (dirName1) - 2] = '\0'; - /* create list */ - list1 = CreateFileList (dirName1, ext, rec); - if (list1 != NULL) { - for (ptr = list1; NULL != ptr; ptr = ptr->next) { - sprintf (fileName1, "%s/%s", find_data.cFileName, ptr->name); - AddToFileList (&list, fileName1, strlen (fileName1), - ptr->mtime); - } - DeleteFileList (list1); - list1 = NULL; + /* ignore files with wrong extension */ + lenName = strlen (find_data.cFileName); + if (lenName <= lenExt) { + testFile = FindNextFile (dp, &find_data); + continue; + } + /* check for directory */ + if (0 != strcmp (find_data.cFileName + lenName - lenExt, ext)) { + /* if recursive check if directory */ + if (0 != rec && find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + sprintf (dirName1, "%s/%s/*", dirName, find_data.cFileName); + /* try to open */ + if (INVALID_HANDLE_VALUE != (dp1 = FindFirstFile (dirName1, &find_data1))) { + /* cut the \/* */ + dirName1[strlen (dirName1) - 2] = '\0'; + /* create list */ + list1 = CreateFileList (dirName1, ext, rec); + if (list1 != NULL) { + for (ptr = list1; NULL != ptr; ptr = ptr->next) { + sprintf (fileName1, "%s/%s", find_data.cFileName, ptr->name); + AddToFileList (&list, fileName1, strlen (fileName1), + ptr->mtime); } - testFile = FindNextFile (dp, &find_data); - continue; + DeleteFileList (list1); + list1 = NULL; } + testFile = FindNextFile (dp, &find_data); + continue; } - testFile = FindNextFile (dp, &find_data); - continue; } - /* ignore files without modification time */ - strcpy (pFile, find_data.cFileName); - if (0 != _stat (fileName, &buf)) { - testFile = FindNextFile (dp, &find_data); - continue; - } - AddToFileList (&list, find_data.cFileName, lenName - lenExt - 1, buf.st_mtime); testFile = FindNextFile (dp, &find_data); + continue; } - /* close directory */ - FindClose (dp); + /* ignore files without modification time */ + strcpy (pFile, find_data.cFileName); + if (0 != _stat (fileName, &buf)) { + testFile = FindNextFile (dp, &find_data); + continue; + } + AddToFileList (&list, find_data.cFileName, lenName - lenExt - 1, buf.st_mtime); + testFile = FindNextFile (dp, &find_data); + } + /* close directory */ + FindClose (dp); #else - /* try to open */ - if (NULL == (dp = opendir (dirName))) { + /* try to open */ + if (NULL == (dp = opendir (dirName))) { + continue; + } + Dbg_File ("opening dir %s\n", dirName); + /* read files */ + while (NULL != (dirp = readdir (dp))) { + /* ignore hidden files */ + if (dirp->d_name[0] == '.') { continue; } - Dbg_File ("opening dir %s\n", dirName); - /* read files */ - while (NULL != (dirp = readdir (dp))) { - /* ignore hidden files */ - if (dirp->d_name[0] == '.') { - continue; - } - /* ignore files with wrong extension */ - lenName = strlen (dirp->d_name); - if (lenName <= lenExt) { - continue; - } - /* check name for sanity */ - if (0 != strcmp (dirp->d_name + lenName - lenExt, ext)) { - /* if recursive check if directory */ - if (0 != rec) { - /* it might be a directory */ - sprintf (dirName1, "%s/%s", dirName, dirp->d_name); - if (NULL != (dp1 = opendir (dirName1))) { - /* create a list of the dir / subdirs */ - list1 = CreateFileList (dirName1, ext, rec); - /* list not empty */ - if (list1 != NULL) { - /* save list in sub list */ - for (ptr = list1; NULL != ptr; ptr = ptr->next) { - /* list name is filename from the path GAME_DATADIR/level */ - sprintf (fileName1, "%s/%s", dirp->d_name, ptr->name); - /* add to main list */ - AddToFileList (&list, fileName1, strlen (fileName1), - ptr->mtime); - } - DeleteFileList (list1); - list1 = NULL; + /* ignore files with wrong extension */ + lenName = strlen (dirp->d_name); + if (lenName <= lenExt) { + continue; + } + /* check name for sanity */ + if (0 != strcmp (dirp->d_name + lenName - lenExt, ext)) { + /* if recursive check if directory */ + if (0 != rec) { + /* it might be a directory */ + sprintf (dirName1, "%s/%s", dirName, dirp->d_name); + if (NULL != (dp1 = opendir (dirName1))) { + /* create a list of the dir / subdirs */ + list1 = CreateFileList (dirName1, ext, rec); + /* list not empty */ + if (list1 != NULL) { + /* save list in sub list */ + for (ptr = list1; NULL != ptr; ptr = ptr->next) { + /* list name is filename from the path GAME_DATADIR/level */ + sprintf (fileName1, "%s/%s", dirp->d_name, ptr->name); + /* add to main list */ + AddToFileList (&list, fileName1, strlen (fileName1), + ptr->mtime); } - continue; + DeleteFileList (list1); + list1 = NULL; } + continue; } - continue; } - /* ignore files without modification time */ - strcpy (pFile, dirp->d_name); - if (0 != stat (fileName, &buf)) { - continue; - } - /* add the file */ - AddToFileList (&list, dirp->d_name, lenName - lenExt - 1, buf.st_mtime); + continue; } - /* close directory */ - closedir (dp); -#endif + /* ignore files without modification time */ + strcpy (pFile, dirp->d_name); + if (0 != stat (fileName, &buf)) { + continue; + } + /* add the file */ + AddToFileList (&list, dirp->d_name, lenName - lenExt - 1, buf.st_mtime); } + /* close directory */ + closedir (dp); +#endif } return list; } /* CreateFileList */ |
|
From: Frank Z. <fz...@us...> - 2008-02-17 00:42:32
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17032 Modified Files: util.c Log Message: Commented out some functions not used by SDL, only on SDL builds. Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- util.c 17 Feb 2008 00:36:15 -0000 1.24 +++ util.c 17 Feb 2008 00:42:32 -0000 1.25 @@ -454,6 +454,8 @@ * loading images * ******************/ +#ifndef SDL + /* * swaps bit order of pbm data to xbm format */ @@ -583,7 +585,6 @@ return NULL; } /* ReadPbmFile */ - /* * shrink ppm data to half size */ @@ -627,6 +628,7 @@ *height = hHeight; } /* ShrinkPpm */ +#endif /* SDL */ /* * public function read pbm file @@ -800,6 +802,8 @@ return NULL; } /* ReadEpmFile */ +#ifndef SDL + /* * load raw sound file into memory */ @@ -864,6 +868,8 @@ return NULL; } /* ReadRawFile */ +#endif /* SDL */ + /* * end of file util.h */ |
|
From: Frank Z. <fz...@us...> - 2008-02-17 00:36:19
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13667 Modified Files: Makefile.am Makefile.in cfg_level.c image.c ini_file.c menu_edit.c sdl_image.c sdl_sound.c sdl_text.c util.c util.h xbsndsrv.c Log Message: Make file requests relative. This removed most occurences of GAME_DATADIR. Index: sdl_sound.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_sound.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- sdl_sound.c 9 Jan 2008 23:41:23 -0000 1.12 +++ sdl_sound.c 17 Feb 2008 00:36:15 -0000 1.13 @@ -45,117 +45,117 @@ int mono; /* mono flag indicating mono sounds */ } sound_name[] = { { - SND_BAD, "xb_bad.raw", NULL, 0, XBFalse, XBFalse}, /* got a skull */ + SND_BAD, "xb_bad", NULL, 0, XBFalse, XBFalse}, /* got a skull */ { - SND_DROP, "xb_drop.raw", NULL, 0, XBFalse, XBTrue}, /* dropped a bomb */ + SND_DROP, "xb_drop", NULL, 0, XBFalse, XBTrue}, /* dropped a bomb */ { - SND_NEWBOMB, "xbnbmb.raw", NULL, 0, XBFalse, XBTrue}, /* got an extra bomb */ + SND_NEWBOMB, "xbnbmb", NULL, 0, XBFalse, XBTrue}, /* got an extra bomb */ { - SND_NEWKICK, "xbnkick.raw", NULL, 0, XBFalse, XBTrue}, /* got kick extra */ + SND_NEWKICK, "xbnkick", NULL, 0, XBFalse, XBTrue}, /* got kick extra */ { - SND_NEWPUMP, "xbnpmp.raw", NULL, 0, XBFalse, XBTrue}, /* got pump extra */ + SND_NEWPUMP, "xbnpmp", NULL, 0, XBFalse, XBTrue}, /* got pump extra */ { - SND_NEWRC, "xbnrc.raw", NULL, 0, XBFalse, XBTrue}, /* got rem. control */ + SND_NEWRC, "xbnrc", NULL, 0, XBFalse, XBTrue}, /* got rem. control */ { - SND_MOREFIRE, "xbfire.raw", NULL, 0, XBFalse, XBTrue}, /* got more range */ + SND_MOREFIRE, "xbfire", NULL, 0, XBFalse, XBTrue}, /* got more range */ { - SND_DEAD, "xb_dead.raw", NULL, 0, XBFalse, XBFalse}, /* player died */ + SND_DEAD, "xb_dead", NULL, 0, XBFalse, XBFalse}, /* player died */ { - SND_EXPL, "xb_expl.raw", NULL, 0, XBFalse, XBTrue}, /* normal explosion */ + SND_EXPL, "xb_expl", NULL, 0, XBFalse, XBTrue}, /* normal explosion */ { - SND_KICK, "xb_kick.raw", NULL, 0, XBFalse, XBTrue}, /* kick a bomb */ + SND_KICK, "xb_kick", NULL, 0, XBFalse, XBTrue}, /* kick a bomb */ { - SND_PUMP, "xb_pump.raw", NULL, 0, XBFalse, XBTrue}, /* pump a bomb */ + SND_PUMP, "xb_pump", NULL, 0, XBFalse, XBTrue}, /* pump a bomb */ { - SND_OUCH, "xb_ouch.raw", NULL, 0, XBFalse, XBFalse}, /* player lost life */ + SND_OUCH, "xb_ouch", NULL, 0, XBFalse, XBFalse}, /* player lost life */ { - SND_INTRO, "xb_intro.raw", NULL, 0, XBFalse, XBFalse}, /* intro fanfare */ + SND_INTRO, "xb_intro", NULL, 0, XBFalse, XBFalse}, /* intro fanfare */ { - SND_APPL, "xb_appl.raw", NULL, 0, XBFalse, XBFalse}, /* applause */ + SND_APPL, "xb_appl", NULL, 0, XBFalse, XBFalse}, /* applause */ { - SND_APPL2, "xb_app2.raw", NULL, 0, XBFalse, XBFalse}, /* applause */ + SND_APPL2, "xb_app2", NULL, 0, XBFalse, XBFalse}, /* applause */ { - SND_BUTT, "xb_butt.raw", NULL, 0, XBFalse, XBTrue}, /* triggered button */ + SND_BUTT, "xb_butt", NULL, 0, XBFalse, XBTrue}, /* triggered button */ { - SND_SHOOT, "xb_shoot.raw", NULL, 0, XBFalse, XBFalse}, /* using rem. ctrl. */ + SND_SHOOT, "xb_shoot", NULL, 0, XBFalse, XBFalse}, /* using rem. ctrl. */ { - SND_INVIS, "xb_nvis.raw", NULL, 0, XBFalse, XBFalse}, /* player invisible */ + SND_INVIS, "xb_nvis", NULL, 0, XBFalse, XBFalse}, /* player invisible */ { - SND_INVINC, "xb_nvnc.raw", NULL, 0, XBFalse, XBFalse}, /* player invincible */ + SND_INVINC, "xb_nvnc", NULL, 0, XBFalse, XBFalse}, /* player invincible */ { - SND_NEWTELE, "xbntel.raw", NULL, 0, XBFalse, XBTrue}, /* player got telep. */ + SND_NEWTELE, "xbntel", NULL, 0, XBFalse, XBTrue}, /* player got telep. */ { - SND_TELE, "xbtele.raw", NULL, 0, XBFalse, XBTrue}, /* player uses tele. */ + SND_TELE, "xbtele", NULL, 0, XBFalse, XBTrue}, /* player uses tele. */ { - SND_INJ, "xbinj.raw", NULL, 0, XBFalse, XBFalse}, /* player got junkie */ + SND_INJ, "xbinj", NULL, 0, XBFalse, XBFalse}, /* player got junkie */ { - SND_MINIBOMB, "xbmbmb.raw", NULL, 0, XBFalse, XBTrue}, /* small bomb expl. */ + SND_MINIBOMB, "xbmbmb", NULL, 0, XBFalse, XBTrue}, /* small bomb expl. */ { - SND_WON, "xb_won.raw", NULL, 0, XBFalse, XBFalse}, /* player won */ + SND_WON, "xb_won", NULL, 0, XBFalse, XBFalse}, /* player won */ { - SND_HAUNT, "xb_haunt.raw", NULL, 0, XBFalse, XBFalse}, /* haunting bomb */ + SND_HAUNT, "xb_haunt", NULL, 0, XBFalse, XBFalse}, /* haunting bomb */ { - SND_SPIRAL, "xb_spir.raw", NULL, 0, XBFalse, XBTrue}, /* spiral shrinking */ + SND_SPIRAL, "xb_spir", NULL, 0, XBFalse, XBTrue}, /* spiral shrinking */ { - SND_SPBOMB, "xb_spbmb.raw", NULL, 0, XBFalse, XBTrue}, /* got special bomb */ + SND_SPBOMB, "xb_spbmb", NULL, 0, XBFalse, XBTrue}, /* got special bomb */ { - SND_SLIDE, "xbslide.raw", NULL, 0, XBFalse, XBTrue}, /* bomb slide sound */ + SND_SLIDE, "xbslide", NULL, 0, XBFalse, XBTrue}, /* bomb slide sound */ { - SND_FINALE, "xbfin.raw", NULL, 0, XBFalse, XBFalse}, /* final fanfare */ + SND_FINALE, "xbfin", NULL, 0, XBFalse, XBFalse}, /* final fanfare */ { - SND_WARN, "xb_warn.raw", NULL, 0, XBFalse, XBFalse}, /* shrink warn sound */ + SND_WARN, "xb_warn", NULL, 0, XBFalse, XBFalse}, /* shrink warn sound */ { - SND_STUN, "xb_stun.raw", NULL, 0, XBFalse, XBFalse}, /* player stun sound */ + SND_STUN, "xb_stun", NULL, 0, XBFalse, XBFalse}, /* player stun sound */ { - SND_WHIRL, "xb_whrl.raw", NULL, 0, XBTrue, XBFalse}, /* intro whirl */ + SND_WHIRL, "xb_whrl", NULL, 0, XBTrue, XBFalse}, /* intro whirl */ { - SND_COMPOUND, "xb_cmpnd.raw", NULL, 0, XBFalse, XBFalse}, /* compound shrink */ + SND_COMPOUND, "xb_cmpnd", NULL, 0, XBFalse, XBFalse}, /* compound shrink */ { - SND_TELE1, "xbtele1.raw", NULL, 0, XBFalse, XBTrue}, /* teleport start */ + SND_TELE1, "xbtele1", NULL, 0, XBFalse, XBTrue}, /* teleport start */ { - SND_TELE2, "xbtele2.raw", NULL, 0, XBFalse, XBTrue}, /* teleport end */ + SND_TELE2, "xbtele2", NULL, 0, XBFalse, XBTrue}, /* teleport end */ { - SND_HOLY, "xbholy.raw", NULL, 0, XBFalse, XBFalse}, /* holy grail extra */ + SND_HOLY, "xbholy", NULL, 0, XBFalse, XBFalse}, /* holy grail extra */ { - SND_ENCLOAK, "xbcloak.raw", NULL, 0, XBFalse, XBTrue}, /* encloak sound */ + SND_ENCLOAK, "xbcloak", NULL, 0, XBFalse, XBTrue}, /* encloak sound */ { - SND_DECLOAK, "xbdcloak.raw", NULL, 0, XBFalse, XBTrue}, /* decloak sound */ + SND_DECLOAK, "xbdcloak", NULL, 0, XBFalse, XBTrue}, /* decloak sound */ { - SND_FAST, "xbfast.raw", NULL, 0, XBFalse, XBTrue}, /* speed up extra */ + SND_FAST, "xbfast", NULL, 0, XBFalse, XBTrue}, /* speed up extra */ { - SND_SLOW, "xbslow.raw", NULL, 0, XBFalse, XBTrue}, /* slow down extra */ + SND_SLOW, "xbslow", NULL, 0, XBFalse, XBTrue}, /* slow down extra */ { - SND_SLAY, "xbslay.raw", NULL, 0, XBFalse, XBTrue}, /* slay extra */ + SND_SLAY, "xbslay", NULL, 0, XBFalse, XBTrue}, /* slay extra */ { - SND_LIFE, "xblife.raw", NULL, 0, XBFalse, XBTrue}, /* extra life */ + SND_LIFE, "xblife", NULL, 0, XBFalse, XBTrue}, /* extra life */ { - SND_NEWCLOAK, "xbcloakx.raw", NULL, 0, XBFalse, XBTrue}, /* new cloak extra */ + SND_NEWCLOAK, "xbcloakx", NULL, 0, XBFalse, XBTrue}, /* new cloak extra */ { - SND_BOMBMORPH, "xb_bombmorph.raw", NULL, 0, XBFalse, XBTrue}, /* bomb morph */ + SND_BOMBMORPH, "xb_bombmorph", NULL, 0, XBFalse, XBTrue}, /* bomb morph */ { - SND_STEP1, "xbstep1.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #1 */ + SND_STEP1, "xbstep1", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #1 */ { - SND_STEP2, "xbstep2.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #2 */ + SND_STEP2, "xbstep2", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #2 */ { - SND_STEP3, "xbstep3.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #3 */ + SND_STEP3, "xbstep3", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #3 */ { - SND_STEP4, "xbstep4.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #4 */ + SND_STEP4, "xbstep4", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #4 */ { - SND_STEP5, "xbstep5.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #5 */ + SND_STEP5, "xbstep5", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #5 */ { - SND_STEP6, "xbstep6.raw", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #6 */ + SND_STEP6, "xbstep6", NULL, 0, XBFalse, XBTrue}, /* Backgr. song #6 */ { - SND_SNG1, "xbsng1.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #1 */ + SND_SNG1, "xbsng1", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #1 */ { - SND_SNG2, "xbsng2.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #2 */ + SND_SNG2, "xbsng2", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #2 */ { - SND_SNG3, "xbsng3.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #3 */ + SND_SNG3, "xbsng3", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #3 */ { - SND_SNG4, "xbsng4.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #4 */ + SND_SNG4, "xbsng4", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #4 */ { - SND_SNG5, "xbsng5.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #5 */ + SND_SNG5, "xbsng5", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #5 */ { - SND_SNG6, "xbsng6.raw", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #6 */ + SND_SNG6, "xbsng6", NULL, 0, XBTrue, XBFalse}, /* Backgr. song #6 */ { SND_MAX, NULL, NULL, 0} }; @@ -305,101 +305,89 @@ { if (soundInitialized) { /* First load RAW into memory */ - char fname[1000]; - int i, f; - static char *path_list[3] = { - NULL, - GAME_DATADIR "/", - ".", - }; - - /* check environment for xblast search path */ - path_list[0] = getenv ("XBLASTDIR"); + char *fname; + int f; + + fname = GetFilePath("sounds", sound_name[id].name, "raw", "r"); - for (i = 0; i < 3; i++) { - if (path_list[i] != NULL) { - sprintf (fname, "%s/%s/%s", path_list[i], "sounds", sound_name[id].name); - if ((f = open (fname, O_RDONLY)) >= 0) { - int sound_size; - uint8_t *sb, *sb1; - struct stat snd_stat; + if (fname && (f = open (fname, O_RDONLY)) >= 0) { + int sound_size; + uint8_t *sb, *sb1; + struct stat snd_stat; #ifdef DEBUG - fprintf (stderr, "Opened file \"%s\".\n", fname); + fprintf (stderr, "Opened file \"%s\".\n", fname); #endif - (void)fstat (f, &snd_stat); - sound_size = snd_stat.st_size / sizeof (uint8_t); - if (sound_name[id].samples != NULL) { - free (sound_name[id].samples); - sound_name[id].samples = NULL; - sound_name[id].length = 0; - } + (void)fstat (f, &snd_stat); + sound_size = snd_stat.st_size / sizeof (uint8_t); + if (sound_name[id].samples != NULL) { + free (sound_name[id].samples); + sound_name[id].samples = NULL; + sound_name[id].length = 0; + } - if ((sb = malloc (sound_size * sizeof (uint8_t))) == NULL) { - close (f); - return (-1); - } - else { - if (read (f, sb, sound_size) != sound_size) { - free(sb); - close(f); - return -1; - } - close (f); + if ((sb = malloc (sound_size * sizeof (uint8_t))) == NULL) { + close (f); + return (-1); + } + else { + if (read (f, sb, sound_size) != sound_size) { + free(sb); + close(f); + return -1; + } + close (f); #if defined(SERVER_STATISTICS) - total_loaded++; + total_loaded++; #endif - /* make sound Stereo although mono... blame SDL_mixer - same problem as the 2 channels issue - */ - if (mono_mode != XBTrue && sound_name[id].mono == XBTrue) { - if ((sb1 = malloc (2 * sound_size * sizeof (uint8_t))) == NULL) { - free (sb); - return (-1); - } - for (i = 0; i < sound_size; i++) { - sb1[2*i] = sb1[2*i + 1] = sb[i]; + /* make sound Stereo although mono... blame SDL_mixer + same problem as the 2 channels issue + */ + if (mono_mode != XBTrue && sound_name[id].mono == XBTrue) { + int i; - } - /* we free sb afterwards so we need - to pass sb1 to sb */ - free (sb); - sb = sb1; - sound_size *= 2; - } - sound_name[id].samples = sb; - sound_name[id].length = sound_size; - /* - * convert stereo samples to mono if running in mono mode - */ + if ((sb1 = malloc (2 * sound_size * sizeof (uint8_t))) == NULL) { + free (sb); + return (-1); + } + for (i = 0; i < sound_size; i++) { + sb1[2*i] = sb1[2*i + 1] = sb[i]; - if (mono_mode == XBTrue && sound_name[id].mono == XBFalse) { - int i; - uint8_t *m, *s; - s16 sum; + } + /* we free sb afterwards so we need + to pass sb1 to sb */ + free (sb); + sb = sb1; + sound_size *= 2; + } + sound_name[id].samples = sb; + sound_name[id].length = sound_size; + /* + * convert stereo samples to mono if running in mono mode + */ - m = s = sound_name[id].samples; + if (mono_mode == XBTrue && sound_name[id].mono == XBFalse) { + int i; + uint8_t *m, *s; + s16 sum; - sound_name[id].length >>= 1; - for (i = 0; i < sound_name[id].length; i++) { - sum = *s + *(s + 1); - *m++ = sum >> 1; - s += 2; - } - } - if (!(sound_chunk[id] = Mix_QuickLoad_RAW (sb, sound_name[id].length))) - fprintf (stderr, "Warning: Could not open RAW from memory: %s\n", - Mix_GetError ()); + m = s = sound_name[id].samples; - break; + sound_name[id].length >>= 1; + for (i = 0; i < sound_name[id].length; i++) { + sum = *s + *(s + 1); + *m++ = sum >> 1; + s += 2; } } - else { - fprintf (stderr, "Couldnt open file \"%s\".\n", fname); - } + if (!(sound_chunk[id] = Mix_QuickLoad_RAW (sb, sound_name[id].length))) + fprintf (stderr, "Warning: Could not open RAW from memory: %s\n", + Mix_GetError ()); } } - + else { + fprintf (stderr, "Couldn't open file \"%s\".\n", fname); + } } return XBTrue; } /* SND_Load */ Index: Makefile.in =================================================================== RCS file: /cvsroot/xblast/xblast/Makefile.in,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Makefile.in 29 Jun 2006 10:04:14 -0000 1.28 +++ Makefile.in 17 Feb 2008 00:36:15 -0000 1.29 @@ -159,7 +159,7 @@ $(am__objects_1) $(am__objects_2) xblast_OBJECTS = $(am_xblast_OBJECTS) xblast_LDADD = $(LDADD) -am_xbsndsrv_OBJECTS = xbsndsrv.$(OBJEXT) +am_xbsndsrv_OBJECTS = xbsndsrv.$(OBJEXT) util.$(OBJEXT) xbsndsrv_OBJECTS = $(am_xbsndsrv_OBJECTS) xbsndsrv_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. @@ -379,7 +379,7 @@ image/sprite/*.pbm image/sprite/*.ppm image/block/*.ppm \ image/sprite/*.epm level/*.xal sounds/*.raw -xbsndsrv_SOURCES = xbsndsrv.c snd.h +xbsndsrv_SOURCES = xbsndsrv.c util.c snd.h SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 all: config.h Index: sdl_image.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_image.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- sdl_image.c 22 Nov 2007 18:55:39 -0000 1.15 +++ sdl_image.c 17 Feb 2008 00:36:15 -0000 1.16 @@ -48,64 +48,6 @@ } /* FinishImages */ /* - * library function: CatPathAndFilename - * description: Concatenate path and filename in single string. - * parameters: path - relative path for image - * filename - name of image file - * return value: Absolute filename. - */ -static char * -CatPathAndFilename (const char *path, const char *filename) -{ - char *absPath; - size_t pathLength, filenameLength; - - /* Check if last character is a path separator "/" */ - pathLength = strlen (path); - filenameLength = strlen (filename); - - /* 1 separator "/" char + 1 string terminating NULL = 2 */ - absPath = (char *)calloc (pathLength + filenameLength + 2, sizeof (char)); - if (!absPath) { - fprintf (stderr, "Could not allocate memory in CatPathAndFile(%s, %s)\n", path, filename); - return NULL; - }; - strcat (absPath, path); - strcat (absPath, "/"); - strcat (absPath, filename); - return absPath; -} - -/* - * library function: AddExtension - * description: Add specified extension to filename. - * parameters: - Filename (without extension) - * - Extension (duh!) - * return value: Filename + Extension. - */ -static char * -AddExtension (const char *Filename, const char *Extension) -{ - char *result; - size_t FilenameLength, ExtensionLength; - - /* Check if last character is a path separator "/" */ - FilenameLength = strlen (Filename); - ExtensionLength = strlen (Extension); - - /* 1 "." char + 1 string terminating NULL = 2 */ - result = calloc (FilenameLength + ExtensionLength + 2, sizeof (char)); - if (!result) { - fprintf (stderr, "Could not allocate memory in AddExtension(%s, %s)\n", Filename, Extension); - return NULL; - }; - strcat (result, Filename); - strcat (result, "."); - strcat (result, Extension); - return result; -} - -/* * local function: BitmapFromRGBPixel * description: creates bitmap from pixel data in 24 bit RGB format * parameters: data - 24 bit pixel data (b,g,r!) @@ -152,12 +94,16 @@ ReadPbmBitmap (const char *path, const char *filename) { SDL_Surface *temp1, *temp2, *bitmap; + char *absFilename; - char *tempAbsFilename, *absFilename; - tempAbsFilename = CatPathAndFilename (path, filename); - absFilename = AddExtension (tempAbsFilename, "pbm"); + absFilename = GetFilePath(path, filename, "pbm", "r"); + if (!absFilename) { + fprintf (stderr, "Could not read bitmap file %s/%s.%s\n", path, filename, "pbm"); + return NULL; + } temp1 = IMG_Load (absFilename); + free(absFilename); if (!temp1) { fprintf (stderr, "Could not create bitmap (%s)\n", SDL_GetError ()); return NULL; @@ -174,9 +120,6 @@ SDL_FreeSurface (temp2); } - free (tempAbsFilename); - free (absFilename); - return bitmap; } /* ReadPbmBitmap */ @@ -282,7 +225,7 @@ unsigned char *epm; unsigned char *ppm; SDL_Surface *bitmap, *mask, *temp; - char *tempAbsFilename, *absFilename; + char *absFilename; /* assert (NULL != color); */ assert (NULL != path); @@ -304,10 +247,14 @@ EpmToPpm (epm, ppm, width, height, n_colors, color); bitmap = BitmapFromRGBPixel (ppm, width, height); - tempAbsFilename = CatPathAndFilename (path, filename); - absFilename = AddExtension (tempAbsFilename, "pbm"); + absFilename = GetFilePath(path, filename, "pbm", "r"); + if (absFilename) { + temp = IMG_Load (absFilename); + } else { + temp = NULL; + } + free(absFilename); - temp = IMG_Load (absFilename); /* Some epm files dont have a companion mask file */ if (temp != NULL) { if (GetBaseX() == XBLAST_BASE_X && GetBaseY() == XBLAST_BASE_Y) { @@ -322,8 +269,6 @@ SDL_FreeSurface (mask); } SDL_SetColorKey (bitmap, SDL_SRCCOLORKEY, SDL_MapRGB (bitmap->format, 0xFF, 0xFF, 0xFF)); - free (tempAbsFilename); - free (absFilename); free (epm); free (ppm); Index: image.c =================================================================== RCS file: /cvsroot/xblast/xblast/image.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- image.c 19 Jun 2006 14:09:02 -0000 1.12 +++ image.c 17 Feb 2008 00:36:15 -0000 1.13 @@ -38,15 +38,11 @@ */ /* search paths */ -#ifdef WMS -#define GAME_DATADIR "." -#endif - -const char *imgPathBlock = GAME_DATADIR"/image/block"; -const char *imgPathExpl = GAME_DATADIR"/image/explosion"; -const char *imgPathMisc = GAME_DATADIR"/image/misc"; -const char *imgPathScore = GAME_DATADIR"/image/score"; -const char *imgPathSprite = GAME_DATADIR"/image/sprite"; +const char *imgPathBlock = "/image/block"; +const char *imgPathExpl = "/image/explosion"; +const char *imgPathMisc = "/image/misc"; +const char *imgPathScore = "/image/score"; +const char *imgPathSprite = "/image/sprite"; /* background pixmaps */ const char *imgFileTitle = "title"; @@ -370,8 +366,8 @@ Dbg_StartClock (); #endif - epmList = CreateFileList (GAME_DATADIR"/image/sprite", "epm", XBFalse); - pbmList = CreateFileList (GAME_DATADIR"/image/sprite", "pbm", XBFalse); + epmList = CreateFileList ("/image/sprite", "epm", XBFalse); + pbmList = CreateFileList ("/image/sprite", "pbm", XBFalse); /* find possible shapes */ list = CreateShapeList (epmList); /* check them */ Index: cfg_level.c =================================================================== RCS file: /cvsroot/xblast/xblast/cfg_level.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- cfg_level.c 28 Mar 2006 11:41:19 -0000 1.23 +++ cfg_level.c 17 Feb 2008 00:36:15 -0000 1.24 @@ -650,7 +650,7 @@ /* scan search paths */ Dbg_Config ("loading list of levels\n"); if (DB_LoadDir - (dbLevel, GAME_DATADIR "/level", "xal", DT_Level, atomTime, atomInfo, InsertLevel, + (dbLevel, "/level", "xal", DT_Level, atomTime, atomInfo, InsertLevel, XBTrue)) { SaveLevelConfig (); } Index: util.c =================================================================== RCS file: /cvsroot/xblast/xblast/util.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- util.c 22 Nov 2007 18:55:39 -0000 1.23 +++ util.c 17 Feb 2008 00:36:15 -0000 1.24 @@ -36,12 +36,15 @@ * local variables */ static char *pathList[NUM_XBLAST_PATH] = { - NULL, - NULL, - ".", - "/", + NULL, /* User home */ + NULL, /* XBLASTDIR */ + ".", /* in place data */ + "/", /* system wide data */ }; +/* Size of the longest entry in pathList. */ +static int pathList_maxlen; + /* shared buffer for complete filename */ static char zeile[1024]; @@ -54,6 +57,7 @@ char *userPath; char *tmp; char *home; + int i; if (pathList[0] != NULL) return; @@ -104,8 +108,54 @@ /* check environment for xblast search path */ pathList[1] = getenv ("XBLASTDIR"); + + pathList[3] = malloc(strlen(GAME_DATADIR) + 10); + if (pathList[3]) + sprintf(pathList[3], "%s", GAME_DATADIR); + + for(i=0; i<NUM_XBLAST_PATH; i++) { + if (pathList[i] && pathList_maxlen < strlen(pathList[i])) + pathList_maxlen = strlen(pathList[i]); + } } /* InitPaths */ +/* Return full path to a file. Path must be free'd by caller. mode is + * either "r" or "w". */ +char *GetFilePath(const char *path, const char *name, const char *ext, const char *mode) +{ + int i; + int access_mode; + char *fullpath; + + /* sanity checks */ + assert (path); + assert (name); + assert (ext); + + /* setup paths for loading */ + InitPaths (); + + access_mode = R_OK; + if (mode[0] == 'w') + access_mode |= W_OK; + + fullpath = malloc(pathList_maxlen + 1 + strlen(path) + 1 + strlen(name) + 1 + strlen(ext) + 1); + if (!fullpath) + return NULL; + + /* Check file access, in directories given in path list */ + for (i = 0; i < NUM_XBLAST_PATH; i++) { + if (NULL != pathList[i]) { + sprintf (fullpath, "%s/%s/%s.%s", pathList[i], path, name, ext); + if (!access(fullpath, access_mode)) { + return fullpath; + } + } + } + + return NULL; +} + /* * find and open an xblast data file. */ @@ -114,6 +164,7 @@ { FILE *fp; int i; + /* sanity checks */ assert (NULL != path); assert (NULL != name); @@ -126,15 +177,21 @@ /* try to open file, in directories given in path list */ for (i = 0; i < NUM_XBLAST_PATH; i++) { if (NULL != pathList[i]) { - /* create full path to file */ - sprintf (zeile, "%s/%s/%s.%s", pathList[i], path, name, ext); - /* try to open it */ - if (NULL != (fp = fopen (zeile, mode))) { - /* file opened succesfully, use fclose to close it */ - return fp; + char *fullpath; + + fullpath = GetFilePath(path, name, ext, mode); + if (fullpath) { + fp = fopen (fullpath, mode); + free(fullpath); + + if (fp) { + /* file opened succesfully, use fclose to close it */ + return fp; + } } } } + /* sorry file opening failed */ fprintf (stderr, "failed to open file \"%s/%s.%s\".\n", path, name, ext); for (i = 0; i < NUM_XBLAST_PATH; i++) { @@ -180,7 +237,8 @@ /* create new element */ ptr = calloc (1, sizeof (XBDir)); assert (ptr != NULL); - ptr->name = DupStringNum (name, len); + ptr->name = strdup (name); + ptr->name[len] = 0; ptr->mtime = mtime; /* insert element after prev */ if (prev == NULL) { Index: sdl_text.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_text.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- sdl_text.c 22 Nov 2007 19:56:15 -0000 1.21 +++ sdl_text.c 17 Feb 2008 00:36:15 -0000 1.22 @@ -52,15 +52,14 @@ LoadFont (const char *fontName, int fontSize) { TTF_Font *font; + char *fullpath; /* Workaround SDL_ttf bug. TTF_OpenFont segfaults if the font doesn't exist. */ - if (access(fontName, R_OK) == -1) { - fprintf (stderr, "xblast: font \"%s\" doesn't exist or isn't readable\n", - fontName); + fullpath = GetFilePath("", fontName, "ttf", "r"); + if (!fullpath) return NULL; - } - font = TTF_OpenFont (fontName, fontSize); + font = TTF_OpenFont (fullpath, fontSize); if (NULL == font) { fprintf (stderr, "xblast: %s:%d:%s: TTF_OpenFont(fontName, fontSize) failed: %s\n", __FILE__, __LINE__, __FUNCTION__, TTF_GetError ()); @@ -96,7 +95,7 @@ if (xblast_default_font) { fontName = xblast_default_font; } else { - fontName = "Vera.ttf"; + fontName = "Vera"; } /* Set font size depending on screen size */ Index: xbsndsrv.c =================================================================== RCS file: /cvsroot/xblast/xblast/xbsndsrv.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- xbsndsrv.c 12 Jun 2006 11:06:36 -0000 1.23 +++ xbsndsrv.c 17 Feb 2008 00:36:15 -0000 1.24 @@ -143,117 +143,117 @@ int mono; /* mono flag indicating mono sounds */ } sound_name[] = { { - SND_BAD, "xb_bad.raw", NULL, 0, FALSE, FALSE}, /* got a skull */ + SND_BAD, "xb_bad", NULL, 0, FALSE, FALSE}, /* got a skull */ { - SND_DROP, "xb_drop.raw", NULL, 0, FALSE, TRUE}, /* dropped a bomb */ + SND_DROP, "xb_drop", NULL, 0, FALSE, TRUE}, /* dropped a bomb */ { - SND_NEWBOMB, "xbnbmb.raw", NULL, 0, FALSE, TRUE}, /* got an extra bomb */ + SND_NEWBOMB, "xbnbmb", NULL, 0, FALSE, TRUE}, /* got an extra bomb */ { - SND_NEWKICK, "xbnkick.raw", NULL, 0, FALSE, TRUE}, /* got kick extra */ + SND_NEWKICK, "xbnkick", NULL, 0, FALSE, TRUE}, /* got kick extra */ { - SND_NEWPUMP, "xbnpmp.raw", NULL, 0, FALSE, TRUE}, /* got pump extra */ + SND_NEWPUMP, "xbnpmp", NULL, 0, FALSE, TRUE}, /* got pump extra */ { - SND_NEWRC, "xbnrc.raw", NULL, 0, FALSE, TRUE}, /* got rem. control */ + SND_NEWRC, "xbnrc", NULL, 0, FALSE, TRUE}, /* got rem. control */ { - SND_MOREFIRE, "xbfire.raw", NULL, 0, FALSE, TRUE}, /* got more range */ + SND_MOREFIRE, "xbfire", NULL, 0, FALSE, TRUE}, /* got more range */ { - SND_DEAD, "xb_dead.raw", NULL, 0, FALSE, FALSE}, /* player died */ + SND_DEAD, "xb_dead", NULL, 0, FALSE, FALSE}, /* player died */ { - SND_EXPL, "xb_expl.raw", NULL, 0, FALSE, TRUE}, /* normal explosion */ + SND_EXPL, "xb_expl", NULL, 0, FALSE, TRUE}, /* normal explosion */ { - SND_KICK, "xb_kick.raw", NULL, 0, FALSE, TRUE}, /* kick a bomb */ + SND_KICK, "xb_kick", NULL, 0, FALSE, TRUE}, /* kick a bomb */ { - SND_PUMP, "xb_pump.raw", NULL, 0, FALSE, TRUE}, /* pump a bomb */ + SND_PUMP, "xb_pump", NULL, 0, FALSE, TRUE}, /* pump a bomb */ { - SND_OUCH, "xb_ouch.raw", NULL, 0, FALSE, FALSE}, /* player lost life */ + SND_OUCH, "xb_ouch", NULL, 0, FALSE, FALSE}, /* player lost life */ { - SND_INTRO, "xb_intro.raw", NULL, 0, FALSE, FALSE}, /* intro fanfare */ + SND_INTRO, "xb_intro", NULL, 0, FALSE, FALSE}, /* intro fanfare */ { - SND_APPL, "xb_appl.raw", NULL, 0, FALSE, FALSE}, /* applause */ + SND_APPL, "xb_appl", NULL, 0, FALSE, FALSE}, /* applause */ { - SND_APPL2, "xb_app2.raw", NULL, 0, FALSE, FALSE}, /* applause */ + SND_APPL2, "xb_app2", NULL, 0, FALSE, FALSE}, /* applause */ { - SND_BUTT, "xb_butt.raw", NULL, 0, FALSE, TRUE}, /* triggered button */ + SND_BUTT, "xb_butt", NULL, 0, FALSE, TRUE}, /* triggered button */ { - SND_SHOOT, "xb_shoot.raw", NULL, 0, FALSE, FALSE}, /* using rem. ctrl. */ + SND_SHOOT, "xb_shoot", NULL, 0, FALSE, FALSE}, /* using rem. ctrl. */ { - SND_INVIS, "xb_nvis.raw", NULL, 0, FALSE, FALSE}, /* player invisible */ + SND_INVIS, "xb_nvis", NULL, 0, FALSE, FALSE}, /* player invisible */ { - SND_INVINC, "xb_nvnc.raw", NULL, 0, FALSE, FALSE}, /* player invincible */ + SND_INVINC, "xb_nvnc", NULL, 0, FALSE, FALSE}, /* player invincible */ { - SND_NEWTELE, "xbntel.raw", NULL, 0, FALSE, TRUE}, /* player got telep. */ + SND_NEWTELE, "xbntel", NULL, 0, FALSE, TRUE}, /* player got telep. */ { - SND_TELE, "xbtele.raw", NULL, 0, FALSE, TRUE}, /* player uses tele. */ + SND_TELE, "xbtele", NULL, 0, FALSE, TRUE}, /* player uses tele. */ { - SND_INJ, "xbinj.raw", NULL, 0, FALSE, FALSE}, /* player got junkie */ + SND_INJ, "xbinj", NULL, 0, FALSE, FALSE}, /* player got junkie */ { - SND_MINIBOMB, "xbmbmb.raw", NULL, 0, FALSE, TRUE}, /* small bomb expl. */ + SND_MINIBOMB, "xbmbmb", NULL, 0, FALSE, TRUE}, /* small bomb expl. */ { - SND_WON, "xb_won.raw", NULL, 0, FALSE, FALSE}, /* player won */ + SND_WON, "xb_won", NULL, 0, FALSE, FALSE}, /* player won */ { - SND_HAUNT, "xb_haunt.raw", NULL, 0, FALSE, FALSE}, /* haunting bomb */ + SND_HAUNT, "xb_haunt", NULL, 0, FALSE, FALSE}, /* haunting bomb */ { - SND_SPIRAL, "xb_spir.raw", NULL, 0, FALSE, TRUE}, /* spiral shrinking */ + SND_SPIRAL, "xb_spir", NULL, 0, FALSE, TRUE}, /* spiral shrinking */ { - SND_SPBOMB, "xb_spbmb.raw", NULL, 0, FALSE, TRUE}, /* got special bomb */ + SND_SPBOMB, "xb_spbmb", NULL, 0, FALSE, TRUE}, /* got special bomb */ { - SND_SLIDE, "xbslide.raw", NULL, 0, FALSE, TRUE}, /* bomb slide sound */ + SND_SLIDE, "xbslide", NULL, 0, FALSE, TRUE}, /* bomb slide sound */ { - SND_FINALE, "xbfin.raw", NULL, 0, FALSE, FALSE}, /* final fanfare */ + SND_FINALE, "xbfin", NULL, 0, FALSE, FALSE}, /* final fanfare */ { - SND_WARN, "xb_warn.raw", NULL, 0, FALSE, FALSE}, /* shrink warn sound */ + SND_WARN, "xb_warn", NULL, 0, FALSE, FALSE}, /* shrink warn sound */ { - SND_STUN, "xb_stun.raw", NULL, 0, FALSE, FALSE}, /* player stun sound */ + SND_STUN, "xb_stun", NULL, 0, FALSE, FALSE}, /* player stun sound */ { - SND_WHIRL, "xb_whrl.raw", NULL, 0, TRUE, FALSE}, /* intro whirl */ + SND_WHIRL, "xb_whrl", NULL, 0, TRUE, FALSE}, /* intro whirl */ { - SND_COMPOUND, "xb_cmpnd.raw", NULL, 0, FALSE, FALSE}, /* compound shrink */ + SND_COMPOUND, "xb_cmpnd", NULL, 0, FALSE, FALSE}, /* compound shrink */ { - SND_TELE1, "xbtele1.raw", NULL, 0, FALSE, TRUE}, /* teleport start */ + SND_TELE1, "xbtele1", NULL, 0, FALSE, TRUE}, /* teleport start */ { - SND_TELE2, "xbtele2.raw", NULL, 0, FALSE, TRUE}, /* teleport end */ + SND_TELE2, "xbtele2", NULL, 0, FALSE, TRUE}, /* teleport end */ { - SND_HOLY, "xbholy.raw", NULL, 0, FALSE, FALSE}, /* holy grail extra */ + SND_HOLY, "xbholy", NULL, 0, FALSE, FALSE}, /* holy grail extra */ { - SND_ENCLOAK, "xbcloak.raw", NULL, 0, FALSE, TRUE}, /* encloak sound */ + SND_ENCLOAK, "xbcloak", NULL, 0, FALSE, TRUE}, /* encloak sound */ { - SND_DECLOAK, "xbdcloak.raw", NULL, 0, FALSE, TRUE}, /* decloak sound */ + SND_DECLOAK, "xbdcloak", NULL, 0, FALSE, TRUE}, /* decloak sound */ { - SND_FAST, "xbfast.raw", NULL, 0, FALSE, TRUE}, /* speed up extra */ + SND_FAST, "xbfast", NULL, 0, FALSE, TRUE}, /* speed up extra */ { - SND_SLOW, "xbslow.raw", NULL, 0, FALSE, TRUE}, /* slow down extra */ + SND_SLOW, "xbslow", NULL, 0, FALSE, TRUE}, /* slow down extra */ { - SND_SLAY, "xbslay.raw", NULL, 0, FALSE, TRUE}, /* slay extra */ + SND_SLAY, "xbslay", NULL, 0, FALSE, TRUE}, /* slay extra */ { - SND_LIFE, "xblife.raw", NULL, 0, FALSE, TRUE}, /* extra life */ + SND_LIFE, "xblife", NULL, 0, FALSE, TRUE}, /* extra life */ { - SND_NEWCLOAK, "xbcloakx.raw", NULL, 0, FALSE, TRUE}, /* new cloak extra */ + SND_NEWCLOAK, "xbcloakx", NULL, 0, FALSE, TRUE}, /* new cloak extra */ { - SND_BOMBMORPH, "xb_bombmorph.raw", NULL, 0, FALSE, TRUE}, /* bomb morph */ + SND_BOMBMORPH, "xb_bombmorph", NULL, 0, FALSE, TRUE}, /* bomb morph */ { - SND_STEP1, "xbstep1.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #1 */ + SND_STEP1, "xbstep1", NULL, 0, FALSE, TRUE}, /* Backgr. song #1 */ { - SND_STEP2, "xbstep2.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #2 */ + SND_STEP2, "xbstep2", NULL, 0, FALSE, TRUE}, /* Backgr. song #2 */ { - SND_STEP3, "xbstep3.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #3 */ + SND_STEP3, "xbstep3", NULL, 0, FALSE, TRUE}, /* Backgr. song #3 */ { - SND_STEP4, "xbstep4.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #4 */ + SND_STEP4, "xbstep4", NULL, 0, FALSE, TRUE}, /* Backgr. song #4 */ { - SND_STEP5, "xbstep5.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #5 */ + SND_STEP5, "xbstep5", NULL, 0, FALSE, TRUE}, /* Backgr. song #5 */ { - SND_STEP6, "xbstep6.raw", NULL, 0, FALSE, TRUE}, /* Backgr. song #6 */ + SND_STEP6, "xbstep6", NULL, 0, FALSE, TRUE}, /* Backgr. song #6 */ { - SND_SNG1, "xbsng1.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #1 */ + SND_SNG1, "xbsng1", NULL, 0, TRUE, FALSE}, /* Backgr. song #1 */ { - SND_SNG2, "xbsng2.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #2 */ + SND_SNG2, "xbsng2", NULL, 0, TRUE, FALSE}, /* Backgr. song #2 */ { - SND_SNG3, "xbsng3.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #3 */ + SND_SNG3, "xbsng3", NULL, 0, TRUE, FALSE}, /* Backgr. song #3 */ { - SND_SNG4, "xbsng4.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #4 */ + SND_SNG4, "xbsng4", NULL, 0, TRUE, FALSE}, /* Backgr. song #4 */ { - SND_SNG5, "xbsng5.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #5 */ + SND_SNG5, "xbsng5", NULL, 0, TRUE, FALSE}, /* Backgr. song #5 */ { - SND_SNG6, "xbsng6.raw", NULL, 0, TRUE, FALSE}, /* Backgr. song #6 */ + SND_SNG6, "xbsng6", NULL, 0, TRUE, FALSE}, /* Backgr. song #6 */ { SND_MAX, NULL, NULL, 0} }; @@ -434,74 +434,62 @@ static int server_load_sound (int number) #else -static int -server_load_sound (number) - int number; + static int + server_load_sound (number) +int number; #endif { - char fname[1000]; - int i, f; - static char *path_list[3] = { - NULL, - GAME_DATADIR "/", - ".", - }; + char *fname; + int f; - /* check environment for xblast search path */ - path_list[0] = getenv ("XBLASTDIR"); + fname = GetFilePath("sounds", sound_name[number].name, "raw", "r"); - for (i = 0; i < 3; i++) { - if (path_list[i] != NULL) { - sprintf (fname, "%s/%s/%s", path_list[i], "sounds", sound_name[number].name); - // fprintf(stderr," opening %s \n",fname); - if ((f = open (fname, O_RDONLY)) >= 0) { - int sound_size; - u8 *sb; - struct stat snd_stat; + if (fname && (f = open (fname, O_RDONLY)) >= 0) { + int sound_size; + u8 *sb; + struct stat snd_stat; #ifdef DEBUG - fprintf (stderr, "Opened file \"%s\".\n", fname); + fprintf (stderr, "Opened file \"%s\".\n", fname); #endif - (void)fstat (f, &snd_stat); - sound_size = snd_stat.st_size / sizeof (u8); - if (sound_name[number].samples != NULL) { - free (sound_name[number].samples); - sound_name[number].samples = NULL; - sound_name[number].length = 0; - } + (void)fstat (f, &snd_stat); + sound_size = snd_stat.st_size / sizeof (u8); + if (sound_name[number].samples != NULL) { + free (sound_name[number].samples); + sound_name[number].samples = NULL; + sound_name[number].length = 0; + } - if ((sb = (u8 *) malloc (sound_size * sizeof (u8))) == NULL) { - close (f); - return (-1); - } - else { - read (f, sb, sound_size * sizeof (u8)); - sound_name[number].samples = sb; - sound_name[number].length = sound_size; - close (f); + if ((sb = (u8 *) malloc (sound_size * sizeof (u8))) == NULL) { + close (f); + return (-1); + } + else { + read (f, sb, sound_size * sizeof (u8)); + sound_name[number].samples = sb; + sound_name[number].length = sound_size; + close (f); #if defined(SERVER_STATISTICS) - total_loaded++; + total_loaded++; #endif - /* - * convert stereo samples to mono if running in mono mode - */ - if (mono_mode == TRUE && sound_name[number].mono == FALSE) { - int i; - u8 *m, *s; - s16 sum; + /* + * convert stereo samples to mono if running in mono mode + */ + if (mono_mode == TRUE && sound_name[number].mono == FALSE) { + int i; + u8 *m, *s; + s16 sum; - m = s = sound_name[number].samples; + m = s = sound_name[number].samples; - sound_name[number].length >>= 1; - for (i = 0; i < sound_name[number].length; i++) { - sum = *s + *(s + 1); - *m++ = sum >> 1; - s += 2; - } - } - return (0); + sound_name[number].length >>= 1; + for (i = 0; i < sound_name[number].length; i++) { + sum = *s + *(s + 1); + *m++ = sum >> 1; + s += 2; } } + return (0); } } fprintf (stderr, "could not open sound data file %s\n", sound_name[number].name); Index: util.h =================================================================== RCS file: /cvsroot/xblast/xblast/util.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- util.h 22 Nov 2007 18:55:39 -0000 1.9 +++ util.h 17 Feb 2008 00:36:15 -0000 1.10 @@ -40,6 +40,7 @@ */ /* loading config file */ +extern char *GetFilePath(const char *path, const char *name, const char *ext, const char *mode); extern FILE *FileOpen (const char *path, const char *name, const char *ext, const char *mode); /* create/destroy dir lists */ Index: ini_file.c =================================================================== RCS file: /cvsroot/xblast/xblast/ini_file.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ini_file.c 6 Nov 2007 02:18:19 -0000 1.29 +++ ini_file.c 17 Feb 2008 00:36:15 -0000 1.30 @@ -65,7 +65,7 @@ /* paths for database file */ static const char *db_path[NUM_DT] = { "config", - GAME_DATADIR "/level", + "level", "demo", "central", }; Index: Makefile.am =================================================================== RCS file: /cvsroot/xblast/xblast/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile.am 15 Jun 2006 10:49:18 -0000 1.25 +++ Makefile.am 17 Feb 2008 00:36:15 -0000 1.26 @@ -79,7 +79,7 @@ image/sprite/*.pbm image/sprite/*.ppm image/block/*.ppm \ image/sprite/*.epm level/*.xal sounds/*.raw -xbsndsrv_SOURCES = xbsndsrv.c snd.h +xbsndsrv_SOURCES = xbsndsrv.c util.c snd.h game_datadir=@game_datadir@ localedir = $(game_datadir)/locale Index: menu_edit.c =================================================================== RCS file: /cvsroot/xblast/xblast/menu_edit.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- menu_edit.c 29 Jun 2006 02:51:29 -0000 1.31 +++ menu_edit.c 17 Feb 2008 00:36:15 -0000 1.32 @@ -1535,7 +1535,7 @@ 3 * CELL_W / 2, &rgbs[blockSelected][2].blue, colorValueList); MenuSetDefault (MenuAddHButton (2 * CELL_W / 2, MENU_BOTTOM, 4 * CELL_W, N_("Return"), CreateGraphicsMenu, par)); - ppmList = CreateFileList (GAME_DATADIR "/image/block/", "ppm", XBFalse); + ppmList = CreateFileList ("/image/block/", "ppm", XBFalse); MenuAddHButton (3 * CELL_W, MENU_ROW (6), CELL_W * 6, N_("Change Block"), BlockGraphicToolClicked, (void *)block); MenuAddComboBool (3 * CELL_W, MENU_ROW (7), 5 * CELL_W, N_("Change Colors"), |
|
From: Rado S. <ra...@us...> - 2008-01-25 21:43:33
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8968 Modified Files: introdat.c sdl_init.c version.h w32_init.c x11c_init.c Log Message: Damn cpp macros don't work well with "" strings, so reverted back to old variant, added TITLE_STRING for the titles. Index: introdat.c =================================================================== RCS file: /cvsroot/xblast/xblast/introdat.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- introdat.c 23 Jan 2008 19:10:23 -0000 1.16 +++ introdat.c 25 Jan 2008 21:43:34 -0000 1.17 @@ -69,7 +69,7 @@ } , { - "XBlast TNT " "VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH", + "XBlast TNT " VERSION_STRING, FF_Large | FF_White, {36, 39, 48, 8,} , Index: sdl_init.c =================================================================== RCS file: /cvsroot/xblast/xblast/sdl_init.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- sdl_init.c 10 Oct 2006 19:32:17 -0000 1.16 +++ sdl_init.c 25 Jan 2008 21:43:34 -0000 1.17 @@ -297,7 +297,7 @@ free(icon_mask); */ /* Set the title bar */ - title = "XBlast TNT " VERSION_STRING; + title = "XBlast TNT " VERSION_STRING TITLE_STRING; SDL_WM_SetCaption (title, "XBlast TNT"); /* See if it's really set */ Index: x11c_init.c =================================================================== RCS file: /cvsroot/xblast/xblast/x11c_init.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- x11c_init.c 19 Jun 2006 13:43:54 -0000 1.9 +++ x11c_init.c 25 Jan 2008 21:43:34 -0000 1.10 @@ -251,7 +251,7 @@ return XBFalse; } /* now initialize the window */ - if (!InitWindow ("XBlast TNT " VERSION_STRING, "XBlast TNT")) { + if (!InitWindow ("XBlast TNT " VERSION_STRING TITLE_STRING, "XBlast TNT")) { return XBFalse; } /* now setup image loading */ Index: w32_init.c =================================================================== RCS file: /cvsroot/xblast/xblast/w32_init.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- w32_init.c 19 Jun 2006 13:43:54 -0000 1.5 +++ w32_init.c 25 Jan 2008 21:43:34 -0000 1.6 @@ -133,7 +133,7 @@ /* get program instance */ instance = GetModuleHandleA (0); /* create game window */ - if (!InitWindow ("XBlast TNT " VERSION_STRING)) { + if (!InitWindow ("XBlast TNT " VERSION_STRING TITLE_STRING)) { return XBFalse; } /* init image loading */ Index: version.h =================================================================== RCS file: /cvsroot/xblast/xblast/version.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- version.h 23 Jan 2008 19:10:23 -0000 1.29 +++ version.h 25 Jan 2008 21:43:34 -0000 1.30 @@ -28,10 +28,11 @@ /* * global macros */ -#define VERSION_STRING "2.10.5 (Join IRC at http://xblast.sf.net/)" #define VERSION_MAJOR 2 #define VERSION_MINOR 10 #define VERSION_PATCH 5 +#define VERSION_STRING "2.10.5" +#define TITLE_STRING " (Join IRC at http://xblast.sf.net/)" #define COPYRIGHT_YEAR "1993-2008" /* version struct */ |
|
From: Rado S. <ra...@us...> - 2008-01-23 19:10:20
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31150 Modified Files: introdat.c version.h Log Message: adjusted version string usage to work with VERSION_MAJOR,MINOR,PATCH rather than with _STRING, so _STRING can be used at full length with window title line. Index: introdat.c =================================================================== RCS file: /cvsroot/xblast/xblast/introdat.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- introdat.c 22 Jun 2006 16:27:19 -0000 1.15 +++ introdat.c 23 Jan 2008 19:10:23 -0000 1.16 @@ -69,7 +69,7 @@ } , { - "XBlast TNT " VERSION_STRING, + "XBlast TNT " "VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH", FF_Large | FF_White, {36, 39, 48, 8,} , Index: version.h =================================================================== RCS file: /cvsroot/xblast/xblast/version.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- version.h 17 Jan 2008 16:10:45 -0000 1.28 +++ version.h 23 Jan 2008 19:10:23 -0000 1.29 @@ -28,7 +28,7 @@ /* * global macros */ -#define VERSION_STRING "2.10.5 (See IRC! at http://xblast.sf.net/)" +#define VERSION_STRING "2.10.5 (Join IRC at http://xblast.sf.net/)" #define VERSION_MAJOR 2 #define VERSION_MINOR 10 #define VERSION_PATCH 5 |
|
From: Rado S. <ra...@us...> - 2008-01-23 19:03:49
|
Update of /cvsroot/xblast/xblast In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28633 Modified Files: chat.c network.c xblast.c Log Message: Set autoflush for stdout + stderr, add timecode for chat stdout, record time+host/player info of joiners to stderr. Index: network.c =================================================================== RCS file: /cvsroot/xblast/xblast/network.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- network.c 6 Jul 2006 16:37:07 -0000 1.44 +++ network.c 23 Jan 2008 19:03:52 -0000 1.45 @@ -710,6 +710,8 @@ XBAtom atom; unsigned p; char name[256]; + time_t ltime; + assert (id < MAX_HOSTS); /* get remote atom with received data */ atom = (id == 0) ? SERVERGAMECONFIG : LOCALGAMECONFIG (id); @@ -747,6 +749,11 @@ /* now store player section atom */ Network_SetPlayer (id, p, atom); Dbg_Network ("hostPlayer[%u][%d] = %s\n", id, p, GUI_AtomToString (atom)); + + /* add time for connections to see when they came when been idle for long */ + time(<ime); + fprintf (stderr, "\n%s= hostPlayer[%u][%d] = %s\n", ctime(<ime),id, p, GUI_AtomToString (atom)); + /* set chat controls */ if (localId == id) { switch (cfg.players.control[p]) { Index: chat.c =================================================================== RCS file: /cvsroot/xblast/xblast/chat.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- chat.c 11 Feb 2007 15:14:24 -0000 1.23 +++ chat.c 23 Jan 2008 19:03:52 -0000 1.24 @@ -201,6 +201,7 @@ XBBool any; XBAtom from; XBAtom to; + time_t ltime; assert (NULL != chat); @@ -256,7 +257,8 @@ } #ifdef DEBUG_CHAT /* full print to stdout */ - fprintf (stdout, "CHAT %s%s%s: %s\n", snd, sep, trg, chat->txt); + time(<ime); + fprintf (stdout, "%s CHAT %s%s%s: %s\n", ctime(<ime), snd, sep, trg, chat->txt); #endif /* truncated display in GUI */ if (chat->how != XBCM_System) { Index: xblast.c =================================================================== RCS file: /cvsroot/xblast/xblast/xblast.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- xblast.c 22 Nov 2007 19:56:16 -0000 1.29 +++ xblast.c 23 Jan 2008 19:03:52 -0000 1.30 @@ -138,6 +138,9 @@ smpf = XBFalse; basex = XBLAST_BASE_X; basey = XBLAST_BASE_Y; + + setbuf(stdout,NULL); + setbuf(stderr,NULL); #ifndef WMS while(1) { |