database: DBTypeLongNameTbl() constify data (const char*)
This commit is contained in:
parent
6d8c3eee1a
commit
dc45242d46
|
|
@ -232,7 +232,7 @@ showTech(
|
||||||
fprintf(outf, "\n");
|
fprintf(outf, "\n");
|
||||||
fprintf(outf, "Types:\n");
|
fprintf(outf, "Types:\n");
|
||||||
for (i = 0; i < DBNumTypes; i++) {
|
for (i = 0; i < DBNumTypes; i++) {
|
||||||
int pl ; char *spl ;
|
int pl ; const char *spl ;
|
||||||
|
|
||||||
pl = DBPlane(i);
|
pl = DBPlane(i);
|
||||||
spl = ( pl <= 0 || pl > DBNumPlanes ) ? "??" : DBPlaneLongName(pl);
|
spl = ( pl <= 0 || pl > DBNumPlanes ) ? "??" : DBPlaneLongName(pl);
|
||||||
|
|
@ -1047,7 +1047,7 @@ CmdWatch(
|
||||||
pNum = DBTechNamePlane(cmd->tx_argv[1]);
|
pNum = DBTechNamePlane(cmd->tx_argv[1]);
|
||||||
if (pNum < 0)
|
if (pNum < 0)
|
||||||
{
|
{
|
||||||
char *cp;
|
const char *cp;
|
||||||
TxError("Unrecognized plane: %s. Legal names are:\n",
|
TxError("Unrecognized plane: %s. Legal names are:\n",
|
||||||
cmd->tx_argv[1]);
|
cmd->tx_argv[1]);
|
||||||
for(pNum=0; pNum < PL_MAXTYPES; pNum++) {
|
for(pNum=0; pNum < PL_MAXTYPES; pNum++) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
|
|
||||||
/* Types and their names */
|
/* Types and their names */
|
||||||
int DBNumTypes;
|
int DBNumTypes;
|
||||||
char *DBTypeLongNameTbl[NT];
|
const char *DBTypeLongNameTbl[NT];
|
||||||
int DBTypePlaneTbl[NT]; /* Normally accessed as macro "DBPlane(x)" */
|
int DBTypePlaneTbl[NT]; /* Normally accessed as macro "DBPlane(x)" */
|
||||||
NameList dbTypeNameLists = {NULL, NULL, NULL, (ClientData)0, FALSE};
|
NameList dbTypeNameLists = {NULL, NULL, NULL, (ClientData)0, FALSE};
|
||||||
HashTable DBTypeAliasTable;
|
HashTable DBTypeAliasTable;
|
||||||
|
|
|
||||||
|
|
@ -1121,7 +1121,7 @@ extern int DBTypePlaneTbl[TT_MAXTYPES];
|
||||||
extern PlaneMask DBTypePlaneMaskTbl[TT_MAXTYPES];
|
extern PlaneMask DBTypePlaneMaskTbl[TT_MAXTYPES];
|
||||||
|
|
||||||
/* Gives the long name for each tile type: */
|
/* Gives the long name for each tile type: */
|
||||||
extern char *DBTypeLongNameTbl[TT_MAXTYPES];
|
extern const char *DBTypeLongNameTbl[TT_MAXTYPES];
|
||||||
|
|
||||||
/* Gives a short name for a tile type: */
|
/* Gives a short name for a tile type: */
|
||||||
extern const char *DBTypeShortName(TileType type);
|
extern const char *DBTypeShortName(TileType type);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue