Capitalize numgrpfiles macro to NUMGRPFILES.

git-svn-id: https://svn.eduke32.com/eduke32@2543 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-26 22:03:40 +00:00
parent ee5dd2cf32
commit f0885f665b
5 changed files with 13 additions and 13 deletions

View file

@ -10009,8 +10009,8 @@ int32_t app_main(int32_t argc,const char **argv)
int32_t i;
for (fg = foundgrps; fg; fg=fg->next)
{
for (i = 0; i<numgrpfiles; i++) if (fg->crcval == grpfiles[i].crcval) break;
if (i == numgrpfiles) continue; // unrecognised grp file
for (i = 0; i<NUMGRPFILES; i++) if (fg->crcval == grpfiles[i].crcval) break;
if (i == NUMGRPFILES) continue; // unrecognised grp file
fg->game = grpfiles[i].game;
if (!first) first = fg;
if (!Bstrcasecmp(fg->name, defaultduke3dgrp))

View file

@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "duke3d.h"
#include "grpscan.h"
struct grpfile grpfiles[numgrpfiles] =
struct grpfile grpfiles[NUMGRPFILES] =
{
{ "Duke Nukem 3D", 0xBBC9CE44, 26524524, GAME_DUKE, NULL },
{ "Duke Nukem 3D: Atomic Edition", 0xF514A6AC, 44348015, GAME_DUKE, NULL },

View file

@ -24,14 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __grpscan_h__
// List of internally-known GRP files
#define numgrpfiles 8
#define NUMGRPFILES 8
struct grpfile {
const char *name;
int32_t crcval;
int32_t size;
int32_t game;
struct grpfile *next;
} grpfiles[numgrpfiles], *foundgrps;
} grpfiles[NUMGRPFILES], *foundgrps;
int32_t ScanGroups(void);
void FreeGroups(void);

View file

@ -447,9 +447,9 @@ static void PopulateForm(unsigned char pgs)
for (fg = foundgrps; fg; fg=fg->next)
{
for (i = 0; i<numgrpfiles; i++)
for (i = 0; i<NUMGRPFILES; i++)
if (fg->crcval == grpfiles[i].crcval) break;
if (i == numgrpfiles) continue; // unrecognised grp file
if (i == NUMGRPFILES) continue; // unrecognised grp file
gtk_list_store_append(list, &iter);
gtk_list_store_set(list, &iter, 0, grpfiles[i].name, 1, fg->name, 2, (gpointer)fg, -1);
@ -918,8 +918,8 @@ int32_t startwin_run(void)
if (settings.autoload) ud.config.NoAutoLoad = FALSE;
else ud.config.NoAutoLoad = TRUE;
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles)
for (i = 0; i<NUMGRPFILES; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != NUMGRPFILES)
g_gameNamePtr = (char *)grpfiles[i].name;
}

View file

@ -254,8 +254,8 @@ static void PopulateForm(int32_t pgs)
for (fg = foundgrps; fg; fg=fg->next)
{
for (i = 0; i<numgrpfiles; i++) if (fg->crcval == grpfiles[i].crcval) break;
if (i == numgrpfiles) continue; // unrecognised grp file
for (i = 0; i<NUMGRPFILES; i++) if (fg->crcval == grpfiles[i].crcval) break;
if (i == NUMGRPFILES) continue; // unrecognised grp file
Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
j = ListBox_AddString(hwnd, buf);
(void)ListBox_SetItemData(hwnd, j, (LPARAM)fg);
@ -782,8 +782,8 @@ int32_t startwin_run(void)
Bstrcpy(g_modDir,settings.gamedir);
else Bsprintf(g_modDir,"/");
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles)
for (i = 0; i<NUMGRPFILES; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != NUMGRPFILES)
g_gameNamePtr = (char *)grpfiles[i].name;
}