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; int32_t i;
for (fg = foundgrps; fg; fg=fg->next) for (fg = foundgrps; fg; fg=fg->next)
{ {
for (i = 0; i<numgrpfiles; i++) if (fg->crcval == grpfiles[i].crcval) break; 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
fg->game = grpfiles[i].game; fg->game = grpfiles[i].game;
if (!first) first = fg; if (!first) first = fg;
if (!Bstrcasecmp(fg->name, defaultduke3dgrp)) 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 "duke3d.h"
#include "grpscan.h" #include "grpscan.h"
struct grpfile grpfiles[numgrpfiles] = struct grpfile grpfiles[NUMGRPFILES] =
{ {
{ "Duke Nukem 3D", 0xBBC9CE44, 26524524, GAME_DUKE, NULL }, { "Duke Nukem 3D", 0xBBC9CE44, 26524524, GAME_DUKE, NULL },
{ "Duke Nukem 3D: Atomic Edition", 0xF514A6AC, 44348015, 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__ #define __grpscan_h__
// List of internally-known GRP files // List of internally-known GRP files
#define numgrpfiles 8 #define NUMGRPFILES 8
struct grpfile { struct grpfile {
const char *name; const char *name;
int32_t crcval; int32_t crcval;
int32_t size; int32_t size;
int32_t game; int32_t game;
struct grpfile *next; struct grpfile *next;
} grpfiles[numgrpfiles], *foundgrps; } grpfiles[NUMGRPFILES], *foundgrps;
int32_t ScanGroups(void); int32_t ScanGroups(void);
void FreeGroups(void); void FreeGroups(void);

View file

@ -447,9 +447,9 @@ static void PopulateForm(unsigned char pgs)
for (fg = foundgrps; fg; fg=fg->next) 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 (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_append(list, &iter);
gtk_list_store_set(list, &iter, 0, grpfiles[i].name, 1, fg->name, 2, (gpointer)fg, -1); 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; if (settings.autoload) ud.config.NoAutoLoad = FALSE;
else ud.config.NoAutoLoad = TRUE; else ud.config.NoAutoLoad = TRUE;
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break; for (i = 0; i<NUMGRPFILES; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles) if (i != NUMGRPFILES)
g_gameNamePtr = (char *)grpfiles[i].name; 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 (fg = foundgrps; fg; fg=fg->next)
{ {
for (i = 0; i<numgrpfiles; i++) if (fg->crcval == grpfiles[i].crcval) break; 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
Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name); Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
j = ListBox_AddString(hwnd, buf); j = ListBox_AddString(hwnd, buf);
(void)ListBox_SetItemData(hwnd, j, (LPARAM)fg); (void)ListBox_SetItemData(hwnd, j, (LPARAM)fg);
@ -782,8 +782,8 @@ int32_t startwin_run(void)
Bstrcpy(g_modDir,settings.gamedir); Bstrcpy(g_modDir,settings.gamedir);
else Bsprintf(g_modDir,"/"); else Bsprintf(g_modDir,"/");
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break; for (i = 0; i<NUMGRPFILES; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles) if (i != NUMGRPFILES)
g_gameNamePtr = (char *)grpfiles[i].name; g_gameNamePtr = (char *)grpfiles[i].name;
} }