TCL9: ClientData macro assignment and access usage

This commit is contained in:
Darryl L. Miles 2024-10-21 09:13:23 +01:00 committed by Tim Edwards
parent 79f2ab0f4b
commit 0ce8265570
26 changed files with 121 additions and 121 deletions

View File

@ -867,15 +867,15 @@ calmaProcessDef(
HashEntry *he; HashEntry *he;
/* Skip if already output */ /* Skip if already output */
if ((int) def->cd_client > 0) if ((int) CD2INT(def->cd_client) > 0)
return (0); return (0);
/* Assign it a (negative) number if it doesn't have one yet */ /* Assign it a (negative) number if it doesn't have one yet */
if ((int) def->cd_client == 0) if ((int) CD2INT(def->cd_client) == 0)
def->cd_client = (ClientData) calmaCellNum--; def->cd_client = INT2CD(calmaCellNum--);
/* Mark this cell */ /* Mark this cell */
def->cd_client = (ClientData) (- (int) def->cd_client); def->cd_client = INT2CD(- (int) CD2INT(def->cd_client));
/* Read the cell in if it is not already available. */ /* Read the cell in if it is not already available. */
if ((def->cd_flags & CDAVAILABLE) == 0) if ((def->cd_flags & CDAVAILABLE) == 0)
@ -1769,7 +1769,7 @@ calmaOutStructName(
{ {
/* Bad name: use XXXXXcalmaNum */ /* Bad name: use XXXXXcalmaNum */
bad: bad:
calmanum = (int) def->cd_client; calmanum = (int) CD2INT(def->cd_client);
if (calmanum < 0) calmanum = -calmanum; if (calmanum < 0) calmanum = -calmanum;
defname = (char *)mallocMagic(32); defname = (char *)mallocMagic(32);
(void) sprintf(defname, "XXXXX%d", calmanum); (void) sprintf(defname, "XXXXX%d", calmanum);

View File

@ -821,15 +821,15 @@ calmaProcessDefZ(
HashEntry *he; HashEntry *he;
/* Skip if already output */ /* Skip if already output */
if ((int) def->cd_client > 0) if ((int) CD2INT(def->cd_client) > 0)
return (0); return (0);
/* Assign it a (negative) number if it doesn't have one yet */ /* Assign it a (negative) number if it doesn't have one yet */
if ((int) def->cd_client == 0) if ((int) CD2INT(def->cd_client) == 0)
def->cd_client = (ClientData) calmaCellNum--; def->cd_client = INT2CD(calmaCellNum--);
/* Mark this cell */ /* Mark this cell */
def->cd_client = (ClientData) (- (int) def->cd_client); def->cd_client = INT2CD(- (int) CD2INT(def->cd_client));
/* Read the cell in if it is not already available. */ /* Read the cell in if it is not already available. */
if ((def->cd_flags & CDAVAILABLE) == 0) if ((def->cd_flags & CDAVAILABLE) == 0)
@ -1610,7 +1610,7 @@ calmaOutStructNameZ(
{ {
/* Bad name: use XXXXXcalmaNum */ /* Bad name: use XXXXXcalmaNum */
bad: bad:
calmanum = (int) def->cd_client; calmanum = (int) CD2INT(def->cd_client);
if (calmanum < 0) calmanum = -calmanum; if (calmanum < 0) calmanum = -calmanum;
defname = (char *)mallocMagic(32); defname = (char *)mallocMagic(32);
(void) sprintf(defname, "XXXXX%d", calmanum); (void) sprintf(defname, "XXXXX%d", calmanum);

View File

@ -5064,7 +5064,7 @@ CIFGenLayer(
if (CIFErrorDef == NULL) break; if (CIFErrorDef == NULL) break;
/* co_client contains the flag (1) for top-level only */ /* co_client contains the flag (1) for top-level only */
if ((int)op->co_client == 1) if ((int)CD2INT(op->co_client) == 1)
{ {
/* Only generate output for the top-level cell */ /* Only generate output for the top-level cell */
int found = 0; int found = 0;

View File

@ -697,7 +697,7 @@ CIFPaintCurrent(
&DBAllButSpaceBits, cifCheckPaintFunc, &DBAllButSpaceBits, cifCheckPaintFunc,
(ClientData)NULL) == 1)) (ClientData)NULL) == 1))
DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect, DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect,
&CIFSolidBits, cifMakeBoundaryFunc, (ClientData)filetype); &CIFSolidBits, cifMakeBoundaryFunc, INT2CD(filetype));
} }
/* Swap planes */ /* Swap planes */
@ -709,7 +709,7 @@ CIFPaintCurrent(
{ {
DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect, DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect,
&CIFSolidBits, cifPaintCurrentFunc, &CIFSolidBits, cifPaintCurrentFunc,
(ClientData)type); INT2CD(type));
} }
/* Recycle the plane, which was dynamically allocated. */ /* Recycle the plane, which was dynamically allocated. */

View File

@ -167,8 +167,8 @@ CIFWrite(
cifOutPreamble(f, rootDef); cifOutPreamble(f, rootDef);
cifOut(f); cifOut(f);
StackFree(cifStack); StackFree(cifStack);
if ((int) rootDef->cd_client < 0) if ((int) CD2INT(rootDef->cd_client) < 0)
rootDef->cd_client = (ClientData) (- (int) rootDef->cd_client); rootDef->cd_client = INT2CD(- (int) CD2INT(rootDef->cd_client));
/* See if any problems occurred. */ /* See if any problems occurred. */
@ -182,7 +182,7 @@ CIFWrite(
* Now we are almost done. * Now we are almost done.
* Just output a call on the root cell * Just output a call on the root cell
*/ */
fprintf(f, "C %d;\nEnd\n", (int) rootDef->cd_client); fprintf(f, "C %d;\nEnd\n", (int) CD2INT(rootDef->cd_client));
good = !ferror(f); good = !ferror(f);
return (good); return (good);
} }
@ -233,7 +233,7 @@ cifWriteMarkFunc(
CellUse *use) CellUse *use)
{ {
if (use->cu_def->cd_client != (ClientData) 0) return 0; if (use->cu_def->cd_client != (ClientData) 0) return 0;
use->cu_def->cd_client = (ClientData) cifCellNum; use->cu_def->cd_client = INT2CD(cifCellNum);
cifCellNum -= 1; cifCellNum -= 1;
StackPush((ClientData) use->cu_def, cifStack); StackPush((ClientData) use->cu_def, cifStack);
return (0); return (0);
@ -313,10 +313,10 @@ cifOut(
while (!StackEmpty(cifStack)) while (!StackEmpty(cifStack))
{ {
def = (CellDef *) StackPop(cifStack); def = (CellDef *) StackPop(cifStack);
if ((int) def->cd_client >= 0) continue; /* Already output */ if ((int) CD2INT(def->cd_client) >= 0) continue; /* Already output */
if (SigInterruptPending) continue; if (SigInterruptPending) continue;
def->cd_client = (ClientData) (- (int) def->cd_client); def->cd_client = INT2CD(- (int) CD2INT(def->cd_client));
/* Read the cell in if it is not already available. */ /* Read the cell in if it is not already available. */
if ((def->cd_flags & CDAVAILABLE) == 0) if ((def->cd_flags & CDAVAILABLE) == 0)
@ -362,7 +362,7 @@ cifOutFunc(
int type; int type;
CIFLayer *layer; CIFLayer *layer;
fprintf(f, "DS %d %d %d;\n", (int) def->cd_client, fprintf(f, "DS %d %d %d;\n", (int) CD2INT(def->cd_client),
CIFCurStyle->cs_reducer, 2 * CIFCurStyle->cs_expander); CIFCurStyle->cs_reducer, 2 * CIFCurStyle->cs_expander);
if (def->cd_name != (char *) NULL) if (def->cd_name != (char *) NULL)
@ -493,7 +493,7 @@ cifWriteUseFunc(
Transform *t; Transform *t;
int cifnum; int cifnum;
cifnum = (int) use->cu_def->cd_client; cifnum = (int) CD2INT(use->cu_def->cd_client);
if (cifnum < 0) cifnum = (-cifnum); if (cifnum < 0) cifnum = (-cifnum);
topx = use->cu_xhi - use->cu_xlo; topx = use->cu_xhi - use->cu_xlo;
if (topx < 0) topx = -topx; if (topx < 0) topx = -topx;
@ -773,7 +773,7 @@ CIFWriteFlat(
* Just output a call on the root cell * Just output a call on the root cell
*/ */
fprintf(f, "C %d;\nEnd\n", (int) CIFComponentDef->cd_client); fprintf(f, "C %d;\nEnd\n", (int) CD2INT(CIFComponentDef->cd_client));
DBCellClearDef(CIFComponentDef); DBCellClearDef(CIFComponentDef);
good = !ferror(f); good = !ferror(f);

View File

@ -212,5 +212,5 @@ cmwUndoDone(void)
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
if (cmwColorsChanged[i]) if (cmwColorsChanged[i])
(void) WindSearch(CMWclientID, (ClientData) NULL, (Rect *) NULL, (void) WindSearch(CMWclientID, (ClientData) NULL, (Rect *) NULL,
cmwRedisplayFunc, (ClientData) i); cmwRedisplayFunc, INT2CD(i));
} }

View File

@ -1132,7 +1132,7 @@ cmdExpandOneLevel(
/* now, unexpand its direct children (ONE LEVEL ONLY) */ /* now, unexpand its direct children (ONE LEVEL ONLY) */
if (expand) if (expand)
(void) DBCellEnum(cu->cu_def, cmdExpand1func, (ClientData) bitmask); (void) DBCellEnum(cu->cu_def, cmdExpand1func, INT2CD(bitmask));
} }
int int
@ -1140,7 +1140,7 @@ cmdExpand1func(
CellUse *cu, CellUse *cu,
ClientData bitmask) ClientData bitmask)
{ {
DBExpand(cu, (int) bitmask, FALSE); DBExpand(cu, (int)CD2INT(bitmask), FALSE);
return 0; return 0;
} }

View File

@ -483,13 +483,13 @@ dbSrConnectFunc(tile, csa)
/* Drop the first entry on the stack */ /* Drop the first entry on the stack */
pNum = csa->csa_pNum; pNum = csa->csa_pNum;
STACKPUSH((ClientData)tile, dbConnectStack); STACKPUSH(INT2CD(tile), dbConnectStack);
STACKPUSH((ClientData)pNum, dbConnectStack); STACKPUSH(INT2CD(pNum), dbConnectStack);
while (!StackEmpty(dbConnectStack)) while (!StackEmpty(dbConnectStack))
{ {
pNum = (int)STACKPOP(dbConnectStack); pNum = (int)CD2INT(STACKPOP(dbConnectStack));
tile = (Tile *)STACKPOP(dbConnectStack); tile = (Tile *)CD2INT(STACKPOP(dbConnectStack));
if (result == 1) continue; if (result == 1) continue;
TiToRect(tile, &tileArea); TiToRect(tile, &tileArea);
@ -565,9 +565,9 @@ dbSrConnectFunc(tile, csa)
} }
else if (t2->ti_client == (ClientData) 1) continue; else if (t2->ti_client == (ClientData) 1) continue;
if (IsSplit(t2)) if (IsSplit(t2))
TiSetBody(t2, (ClientData)(t2->ti_body | TT_SIDE)); /* bit set */ TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) | TT_SIDE)); /* bit set */
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)pNum, dbConnectStack); STACKPUSH(INT2CD(pNum), dbConnectStack);
} }
} }
@ -596,13 +596,13 @@ bottomside:
{ {
if (SplitDirection(t2)) if (SplitDirection(t2))
/* bit set */ /* bit set */
TiSetBody(t2, (ClientData)(t2->ti_body | TT_SIDE)); TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) | TT_SIDE));
else else
/* bit clear */ /* bit clear */
TiSetBody(t2, (ClientData)(t2->ti_body & ~TT_SIDE)); TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) & ~TT_SIDE));
} }
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)pNum, dbConnectStack); STACKPUSH(INT2CD(pNum), dbConnectStack);
} }
} }
@ -627,9 +627,9 @@ rightside:
} }
else if (t2->ti_client == (ClientData) 1) goto nextRight; else if (t2->ti_client == (ClientData) 1) goto nextRight;
if (IsSplit(t2)) if (IsSplit(t2))
TiSetBody(t2, (ClientData)(t2->ti_body & ~TT_SIDE)); /* bit clear */ TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) & ~TT_SIDE)); /* bit clear */
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)pNum, dbConnectStack); STACKPUSH(INT2CD(pNum), dbConnectStack);
} }
nextRight: if (BOTTOM(t2) <= tileArea.r_ybot) break; nextRight: if (BOTTOM(t2) <= tileArea.r_ybot) break;
} }
@ -658,13 +658,13 @@ topside:
{ {
if (SplitDirection(t2)) if (SplitDirection(t2))
/* bit clear */ /* bit clear */
TiSetBody(t2, (ClientData)(t2->ti_body & ~TT_SIDE)); TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) & ~TT_SIDE));
else else
/* bit set */ /* bit set */
TiSetBody(t2, (ClientData)(t2->ti_body | TT_SIDE)); TiSetBody(t2, INT2CD(CD2INT(t2->ti_body) | TT_SIDE));
} }
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)pNum, dbConnectStack); STACKPUSH(INT2CD(pNum), dbConnectStack);
} }
nextTop: if (LEFT(t2) <= tileArea.r_xbot) break; nextTop: if (LEFT(t2) <= tileArea.r_xbot) break;
} }
@ -692,16 +692,16 @@ donesides:
TiGetTypeExact(tile), &newArea, connectMask, TiGetTypeExact(tile), &newArea, connectMask,
dbcFindTileFunc, (ClientData)&t2) != 0) dbcFindTileFunc, (ClientData)&t2) != 0)
{ {
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)i, dbConnectStack); STACKPUSH(INT2CD(i), dbConnectStack);
} }
} }
else if (DBSrPaintArea((Tile *) NULL, csa->csa_def->cd_planes[i], else if (DBSrPaintArea((Tile *) NULL, csa->csa_def->cd_planes[i],
&newArea, connectMask, dbcFindTileFunc, &newArea, connectMask, dbcFindTileFunc,
(ClientData)&t2) != 0) (ClientData)&t2) != 0)
{ {
STACKPUSH((ClientData)t2, dbConnectStack); STACKPUSH(INT2CD(t2), dbConnectStack);
STACKPUSH((ClientData)i, dbConnectStack); STACKPUSH(INT2CD(i), dbConnectStack);
} }
} }
} }

View File

@ -140,7 +140,7 @@ DBTechInitPlane()
for (dpp = dbTechDefaultPlanes; dpp->dp_names; dpp++) for (dpp = dbTechDefaultPlanes; dpp->dp_names; dpp++)
{ {
cp = dbTechNameAdd(dpp->dp_names, (ClientData) dpp->dp_plane, cp = dbTechNameAdd(dpp->dp_names, INT2CD(dpp->dp_plane),
&dbPlaneNameLists, FALSE); &dbPlaneNameLists, FALSE);
if (cp == NULL) if (cp == NULL)
{ {
@ -223,7 +223,7 @@ DBTechInitType()
*/ */
for (dtp = dbTechDefaultTypes; dtp->dt_names; dtp++) for (dtp = dbTechDefaultTypes; dtp->dt_names; dtp++)
{ {
cp = dbTechNameAdd(dtp->dt_names, (ClientData) dtp->dt_type, cp = dbTechNameAdd(dtp->dt_names, INT2CD(dtp->dt_type),
&dbTypeNameLists, FALSE); &dbTypeNameLists, FALSE);
if (cp == NULL) if (cp == NULL)
{ {
@ -283,7 +283,7 @@ DBTechAddPlane(sectionName, argc, argv)
return FALSE; return FALSE;
} }
cp = dbTechNameAdd(argv[0], (ClientData) DBNumPlanes, &dbPlaneNameLists, FALSE); cp = dbTechNameAdd(argv[0], INT2CD(DBNumPlanes), &dbPlaneNameLists, FALSE);
if (cp == NULL) if (cp == NULL)
return FALSE; return FALSE;
DBPlaneLongNameTbl[DBNumPlanes++] = cp; DBPlaneLongNameTbl[DBNumPlanes++] = cp;
@ -315,7 +315,7 @@ DBTechAddNameToType(newname, ttype, canonical)
{ {
char *cp; char *cp;
cp = dbTechNameAdd(newname, (ClientData) ttype, &dbTypeNameLists, TRUE); cp = dbTechNameAdd(newname, INT2CD(ttype), &dbTypeNameLists, TRUE);
if (canonical) if (canonical)
DBTypeLongNameTbl[ttype] = cp; DBTypeLongNameTbl[ttype] = cp;
} }
@ -455,7 +455,7 @@ DBTechAddType(sectionName, argc, argv)
} }
else else
{ {
cp = dbTechNameAdd(argv[1], (ClientData) DBNumTypes, &dbTypeNameLists, FALSE); cp = dbTechNameAdd(argv[1], INT2CD(DBNumTypes), &dbTypeNameLists, FALSE);
if (cp == NULL) if (cp == NULL)
return FALSE; return FALSE;
@ -513,7 +513,7 @@ dbTechNewStackedType(type1, type2)
} }
sprintf(buf, "%s+%s", DBTypeShortName(type1), DBTypeShortName(type2)); sprintf(buf, "%s+%s", DBTypeShortName(type1), DBTypeShortName(type2));
cp = dbTechNameAdd(buf, (ClientData) DBNumTypes, &dbTypeNameLists, FALSE); cp = dbTechNameAdd(buf, INT2CD(DBNumTypes), &dbTypeNameLists, FALSE);
if (cp == NULL) if (cp == NULL)
{ {
TechError("Couldn't generate new stacking type %s\n", buf); TechError("Couldn't generate new stacking type %s\n", buf);

View File

@ -266,12 +266,12 @@ nm_enum:
if (!(ignore_sides & IGNORE_LEFT)) if (!(ignore_sides & IGNORE_LEFT))
{ {
TiSetBody(tp, (ClientData)(tpt & ~TT_SIDE)); /* bit clear */ TiSetBody(tp, INT2CD(tpt & ~TT_SIDE)); /* bit clear */
if ((*func)(tp, arg)) return (1); if ((*func)(tp, arg)) return (1);
} }
if (!(ignore_sides & IGNORE_RIGHT)) if (!(ignore_sides & IGNORE_RIGHT))
{ {
TiSetBody(tp, (ClientData)(tpt | TT_SIDE)); /* bit set */ TiSetBody(tp, INT2CD(tpt | TT_SIDE)); /* bit set */
if ((*func)(tp, arg)) return (1); if ((*func)(tp, arg)) return (1);
} }
} }
@ -416,7 +416,7 @@ enumerate:
(dlong)(rect->r_xbot - LEFT(tp)) * theight : DLONG_MIN; (dlong)(rect->r_xbot - LEFT(tp)) * theight : DLONG_MIN;
if (SplitDirection(tp) ? (f1 > f4) : (f2 > f4)) if (SplitDirection(tp) ? (f1 > f4) : (f2 > f4))
{ {
TiSetBody(tp, (ClientData)((TileType)TiGetBody(tp) TiSetBody(tp, INT2CD((TileType)CD2INT(TiGetBody(tp))
& ~TT_SIDE)); /* bit clear */ & ~TT_SIDE)); /* bit clear */
if ((*func)(tp, arg)) return (1); if ((*func)(tp, arg)) return (1);
} }
@ -429,7 +429,7 @@ enumerate:
(dlong)(RIGHT(tp) - rect->r_xtop) * theight : DLONG_MIN; (dlong)(RIGHT(tp) - rect->r_xtop) * theight : DLONG_MIN;
if (SplitDirection(tp) ? (f2 > f3) : (f1 > f3)) if (SplitDirection(tp) ? (f2 > f3) : (f1 > f3))
{ {
TiSetBody(tp, (ClientData)((TileType)TiGetBody(tp) TiSetBody(tp, INT2CD((TileType)CD2INT(TiGetBody(tp))
| TT_SIDE)); /* bit set */ | TT_SIDE)); /* bit set */
if ((*func)(tp, arg)) return (1); if ((*func)(tp, arg)) return (1);
} }
@ -576,7 +576,7 @@ enumerate:
(dlong)(rect->r_xbot - LEFT(tp)) * (dlong)theight : DLONG_MIN; (dlong)(rect->r_xbot - LEFT(tp)) * (dlong)theight : DLONG_MIN;
if (SplitDirection(tp) ? (f1 > f4) : (f2 > f4)) if (SplitDirection(tp) ? (f1 > f4) : (f2 > f4))
{ {
TiSetBody(tp, (ClientData)((TileType)TiGetBody(tp) TiSetBody(tp, INT2CD((TileType)CD2INT(TiGetBody(tp))
& ~TT_SIDE)); /* bit clear */ & ~TT_SIDE)); /* bit clear */
if ((tp->ti_client == client) && (*func)(tp, arg)) if ((tp->ti_client == client) && (*func)(tp, arg))
return (1); return (1);
@ -590,7 +590,7 @@ enumerate:
(dlong)(RIGHT(tp) - rect->r_xtop) * (dlong)theight : DLONG_MIN; (dlong)(RIGHT(tp) - rect->r_xtop) * (dlong)theight : DLONG_MIN;
if (SplitDirection(tp) ? (f2 > f3) : (f1 > f3)) if (SplitDirection(tp) ? (f2 > f3) : (f1 > f3))
{ {
TiSetBody(tp, (ClientData)((TileType)TiGetBody(tp) TiSetBody(tp, INT2CD((TileType)CD2INT(TiGetBody(tp))
| TT_SIDE)); /* bit set */ | TT_SIDE)); /* bit set */
if ((tp->ti_client == client) && (*func)(tp, arg)) if ((tp->ti_client == client) && (*func)(tp, arg))
return (1); return (1);

View File

@ -549,8 +549,8 @@ DBWloadWindow(window, name, flags)
if (expand) if (expand)
DBExpandAll(newEditUse, &(newEditUse->cu_bbox), DBExpandAll(newEditUse, &(newEditUse->cu_bbox),
((DBWclientRec *)window->w_clientData)->dbw_bitmask, ((DBWclientRec *)window->w_clientData)->dbw_bitmask,
FALSE, UnexpandFunc, (ClientData) FALSE, UnexpandFunc,
(((DBWclientRec *)window->w_clientData)->dbw_bitmask)); INT2CD(((DBWclientRec *)window->w_clientData)->dbw_bitmask));
if (newEdit) if (newEdit)
{ {

View File

@ -82,7 +82,7 @@ DebugAddClient(name, maxflags)
dc->dc_flags[maxflags].df_value = FALSE; dc->dc_flags[maxflags].df_value = FALSE;
} }
return ((ClientData) debugNumClients++); return (INT2CD(debugNumClients++));
} }
/* /*
@ -116,7 +116,7 @@ DebugAddFlag(clientID, name)
ClientData clientID; /* Client identifier from DebugAddClient */ ClientData clientID; /* Client identifier from DebugAddClient */
char *name; /* Name of debugging flag */ char *name; /* Name of debugging flag */
{ {
int id = (int) clientID; int id = (int) CD2INT(clientID);
struct debugClient *dc; struct debugClient *dc;
if (id < 0 || id >= debugNumClients) if (id < 0 || id >= debugNumClients)
@ -159,7 +159,7 @@ void
DebugShow(clientID) DebugShow(clientID)
ClientData clientID; ClientData clientID;
{ {
int id = (int) clientID; int id = (int) CD2INT(clientID);
struct debugClient *dc; struct debugClient *dc;
int n; int n;
@ -202,7 +202,7 @@ DebugSet(clientID, argc, argv, value)
bool value; bool value;
{ {
bool badFlag = FALSE; bool badFlag = FALSE;
int id = (int) clientID; int id = (int) CD2INT(clientID);
struct debugClient *dc; struct debugClient *dc;
int n; int n;

View File

@ -146,7 +146,7 @@ EFFlatBuild(name, flags)
else else
{ {
flatnodeflags |= FLATNODE_DOWARN; /* No FLATNODE_STDCELL flag */ flatnodeflags |= FLATNODE_DOWARN; /* No FLATNODE_STDCELL flag */
efFlatNodes(&efFlatContext, (ClientData)flatnodeflags); efFlatNodes(&efFlatContext, INT2CD(flatnodeflags));
} }
efFlatKills(&efFlatContext); efFlatKills(&efFlatContext);
if (!(flags & EF_NONAMEMERGE)) if (!(flags & EF_NONAMEMERGE))
@ -217,7 +217,7 @@ EFFlatBuildOneLevel(def, flags)
/* Record all nodes down the hierarchy from here */ /* Record all nodes down the hierarchy from here */
flatnodeflags = 0; /* No FLATNODE_DOWARN */ flatnodeflags = 0; /* No FLATNODE_DOWARN */
efFlatNodes(&efFlatContext, (ClientData)flatnodeflags); efFlatNodes(&efFlatContext, INT2CD(flatnodeflags));
/* Expand all subcells that contain connectivity information but */ /* Expand all subcells that contain connectivity information but */
/* no active devices (including those in subcells). */ /* no active devices (including those in subcells). */
@ -319,7 +319,7 @@ efFlatNodes(hc, clientData)
HierContext *hc; HierContext *hc;
ClientData clientData; ClientData clientData;
{ {
int flags = (int)clientData; int flags = (int)CD2INT(clientData);
bool stdcell = (flags & FLATNODE_STDCELL) ? TRUE : FALSE; bool stdcell = (flags & FLATNODE_STDCELL) ? TRUE : FALSE;
bool doWarn = (flags & FLATNODE_DOWARN) ? TRUE : FALSE; bool doWarn = (flags & FLATNODE_DOWARN) ? TRUE : FALSE;
@ -616,7 +616,7 @@ efAddConns(hc, doWarn)
if (conn->conn_1.cn_nsubs == 0) if (conn->conn_1.cn_nsubs == 0)
efAddOneConn(hc, conn->conn_name1, conn->conn_name2, conn, doWarn); efAddOneConn(hc, conn->conn_name1, conn->conn_name2, conn, doWarn);
else else
efHierSrArray(hc, conn, efAddOneConn, (ClientData)doWarn); efHierSrArray(hc, conn, efAddOneConn, INT2CD(doWarn));
} }
return (0); return (0);

View File

@ -745,12 +745,12 @@ glChanBlockDens(ch)
{ {
/* Clip tiles overlapped by pa->pa_area */ /* Clip tiles overlapped by pa->pa_area */
while (DBSrPaintArea((Tile *) NULL, glChanPlane, &pa->pa_area, while (DBSrPaintArea((Tile *) NULL, glChanPlane, &pa->pa_area,
&DBAllTypeBits, glChanClipFunc, (ClientData) &pa->pa_area)) &DBAllTypeBits, glChanClipFunc, PTR2CD(&pa->pa_area)))
/* Nothing */; /* Nothing */;
/* Change the type of all tiles within the area */ /* Change the type of all tiles within the area */
(void) DBSrPaintArea((Tile *) NULL, glChanPlane, &pa->pa_area, (void) DBSrPaintArea((Tile *) NULL, glChanPlane, &pa->pa_area,
&DBAllTypeBits, glChanPaintFunc, (ClientData) pa->pa_type); &DBAllTypeBits, glChanPaintFunc, INT2CD(pa->pa_type));
/* /*
* Allow merging, as long as no tiles get merged across * Allow merging, as long as no tiles get merged across

View File

@ -134,7 +134,7 @@ GlGlobalRoute(chanList, netList)
glPenSetPerChan(net); glPenSetPerChan(net);
} }
numTerms += glMultiSteiner(EditCellUse, net, glProcessLoc, numTerms += glMultiSteiner(EditCellUse, net, glProcessLoc,
glCrossMark, (ClientData) doFast, (ClientData) 0); glCrossMark, INT2CD(doFast), (ClientData) 0);
if (DebugIsSet(glDebugID, glDebPen)) if (DebugIsSet(glDebugID, glDebPen))
glPenClearPerChan(net); glPenClearPerChan(net);
RtrMilestonePrint(); RtrMilestonePrint();

View File

@ -285,7 +285,7 @@ mzBlockSubcellsFunc(scx, cdarg)
r = scx->scx_use->cu_def->cd_bbox; r = scx->scx_use->cu_def->cd_bbox;
GEOTRANSRECT(&scx->scx_trans, &r, &rDest); GEOTRANSRECT(&scx->scx_trans, &r, &rDest);
if((int)(scx->scx_use->cu_client) != MZ_EXPAND_DEST) if(scx->scx_use->cu_client != MZ_EXPAND_DEST)
/* cell over part of dest node, paint normal blocks onto affected /* cell over part of dest node, paint normal blocks onto affected
* planes. * planes.
* (area is bloated by appropriate spacing on each affected plane) * (area is bloated by appropriate spacing on each affected plane)

View File

@ -423,7 +423,7 @@ mzConnectedTileFunc(tile, cxp)
* MZAddStart() and MZAddDest(). * MZAddStart() and MZAddDest().
*/ */
if ((int)tile->ti_client != mzMakeEndpoints) if ((int)CD2INT(tile->ti_client) != mzMakeEndpoints)
{ {
SearchContext *scx = cxp->tc_scx; SearchContext *scx = cxp->tc_scx;
List *expandList = (List *) (cxp->tc_filter->tf_arg); List *expandList = (List *) (cxp->tc_filter->tf_arg);
@ -434,12 +434,12 @@ mzConnectedTileFunc(tile, cxp)
GEOTRANSRECT(&scx->scx_trans, &rRaw, &r); GEOTRANSRECT(&scx->scx_trans, &rRaw, &r);
/* mark tile with destination type */ /* mark tile with destination type */
tile->ti_client = (ClientData) mzMakeEndpoints; tile->ti_client = INT2CD(mzMakeEndpoints);
/* Add tiles connected to Start to mzStartTerms */ /* Add tiles connected to Start to mzStartTerms */
/* (Added by Tim, August 2006) */ /* (Added by Tim, August 2006) */
if (mzMakeEndpoints == MZ_EXPAND_START) if (INT2CD(mzMakeEndpoints) == MZ_EXPAND_START)
{ {
ColoredRect *newTerm; ColoredRect *newTerm;
extern List *mzStartTerms; extern List *mzStartTerms;
@ -454,7 +454,7 @@ mzConnectedTileFunc(tile, cxp)
/* or the planes will get fractured up, possibly into areas too */ /* or the planes will get fractured up, possibly into areas too */
/* small to place a valid route. */ /* small to place a valid route. */
else if (mzMakeEndpoints == MZ_EXPAND_DEST) else if (INT2CD(mzMakeEndpoints) == MZ_EXPAND_DEST)
{ {
RouteLayer *rL; RouteLayer *rL;
TileType ttype = TiGetType(tile); TileType ttype = TiGetType(tile);

View File

@ -373,7 +373,7 @@ plowProcessJogFunc(edge, area)
ret = 0; ret = 0;
plowJogEraseList = (LinkedRect *) NULL; plowJogEraseList = (LinkedRect *) NULL;
if (plowSrShadowBack(newedge.e_pNum, &r, mask, if (plowSrShadowBack(newedge.e_pNum, &r, mask,
plowJogDragLHS, (ClientData) newedge.e_newx - width) == 0) plowJogDragLHS, INT2CD(newedge.e_newx - width)) == 0)
{ {
/* Success: first paint to extend the RHS of the jog */ /* Success: first paint to extend the RHS of the jog */
plane = plowYankDef->cd_planes[newedge.e_pNum]; plane = plowYankDef->cd_planes[newedge.e_pNum];

View File

@ -736,11 +736,11 @@ plowPropagateRect(def, userRect, lc, changedArea)
/* Add the initial edges */ /* Add the initial edges */
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
(void) plowSrShadowInitial(pNum, &plowRect, (void) plowSrShadowInitial(pNum, &plowRect,
lc, plowInitialPaint, (ClientData) plowRect.r_xtop); lc, plowInitialPaint, INT2CD(plowRect.r_xtop));
/* Find any subcells crossed by the plow */ /* Find any subcells crossed by the plow */
(void) DBSrCellPlaneArea(plowYankDef->cd_cellPlane, (void) DBSrCellPlaneArea(plowYankDef->cd_cellPlane,
&cellPlowRect, plowInitialCell, (ClientData) &cellPlowRect); &cellPlowRect, plowInitialCell, PTR2CD(&cellPlowRect));
/* While edges remain, process them */ /* While edges remain, process them */
tooFar = 0; tooFar = 0;
@ -910,9 +910,9 @@ plowPropagateSel(def, pdistance, changedArea)
/* Add everything in the selection */ /* Add everything in the selection */
SelEnumPaint(&DBAllButSpaceBits, TRUE, &dummy, SelEnumPaint(&DBAllButSpaceBits, TRUE, &dummy,
plowSelPaintPlow, (ClientData) *pdistance); plowSelPaintPlow, INT2CD(*pdistance));
SelEnumCells(TRUE, &dummy, (SearchContext *) NULL, SelEnumCells(TRUE, &dummy, (SearchContext *) NULL,
plowSelCellPlow, (ClientData) *pdistance); plowSelCellPlow, INT2CD(*pdistance));
/* While edges remain, process them */ /* While edges remain, process them */
tooFar = 0; tooFar = 0;
@ -1043,7 +1043,7 @@ plowSelPaintPlow(rect, type, distance)
#endif /* notdef */ #endif /* notdef */
plowLHS.r_xbot--; plowLHS.r_xbot--;
plowSrShadow(DBPlane(type), &plowLHS, DBZeroTypeBits, plowSrShadow(DBPlane(type), &plowLHS, DBZeroTypeBits,
plowInitialPaint, (ClientData) plowLHS.r_xtop); plowInitialPaint, INT2CD(plowLHS.r_xtop));
/* Queue the RHS */ /* Queue the RHS */
plowRHS.r_xbot = plowRHS.r_xtop; plowRHS.r_xbot = plowRHS.r_xtop;
@ -1054,7 +1054,7 @@ plowSelPaintPlow(rect, type, distance)
plowRHS.r_xbot--; plowRHS.r_xbot--;
TTMaskSetOnlyType(&mask, type); TTMaskSetOnlyType(&mask, type);
plowSrShadow(DBPlane(type), &plowRHS, mask, plowSrShadow(DBPlane(type), &plowRHS, mask,
plowInitialPaint, (ClientData) plowRHS.r_xtop); plowInitialPaint, INT2CD(plowRHS.r_xtop));
return (0); return (0);
} }
@ -1102,8 +1102,8 @@ plowSelCellPlow(selUse, realUse, transform, distance)
/* Find the cell in the yanked def that has the same use-id as this one */ /* Find the cell in the yanked def that has the same use-id as this one */
save = realUse->cu_client; save = realUse->cu_client;
realUse->cu_client = (ClientData)distance; realUse->cu_client = INT2CD(distance);
(void) DBCellEnum(plowYankDef, plowFindSelCell, (ClientData)realUse); (void) DBCellEnum(plowYankDef, plowFindSelCell, PTR2CD(realUse));
realUse->cu_client = save; realUse->cu_client = save;
return (0); return (0);
@ -1125,7 +1125,7 @@ plowFindSelCell(yankUse, editUse)
edge.e_ytop = yankUse->cu_bbox.r_ytop; edge.e_ytop = yankUse->cu_bbox.r_ytop;
edge.e_ybot = yankUse->cu_bbox.r_ybot; edge.e_ybot = yankUse->cu_bbox.r_ybot;
edge.e_x = yankUse->cu_bbox.r_xtop; edge.e_x = yankUse->cu_bbox.r_xtop;
edge.e_newx = yankUse->cu_bbox.r_xtop + (int)editUse->cu_client; edge.e_newx = yankUse->cu_bbox.r_xtop + (int)CD2INT(editUse->cu_client);
edge.e_ltype = PLOWTYPE_CELL; edge.e_ltype = PLOWTYPE_CELL;
edge.e_rtype = PLOWTYPE_CELL; edge.e_rtype = PLOWTYPE_CELL;
(void) plowQueueAdd(&edge); (void) plowQueueAdd(&edge);
@ -1538,7 +1538,7 @@ plowProcessEdge(edge, changedArea)
plowProcessedEdges++; plowProcessedEdges++;
if (edge->e_use) if (edge->e_use)
{ {
if (amountToMove > (int)edge->e_use->cu_client) if (amountToMove > (int)CD2INT(edge->e_use->cu_client))
{ {
/* Update area modified by plowing */ /* Update area modified by plowing */
(void) GeoInclude(&edge->e_rect, changedArea); (void) GeoInclude(&edge->e_rect, changedArea);
@ -1558,7 +1558,7 @@ plowProcessEdge(edge, changedArea)
* to update the area changed by the area of the * to update the area changed by the area of the
* cell PLUS the area swept out by its RHS. * cell PLUS the area swept out by its RHS.
*/ */
edge->e_use->cu_client = (ClientData)amountToMove; edge->e_use->cu_client = INT2CD(amountToMove);
r = edge->e_use->cu_bbox; r = edge->e_use->cu_bbox;
r.r_xbot += amountToMove; r.r_xbot += amountToMove;
r.r_xtop += amountToMove; r.r_xtop += amountToMove;

View File

@ -1086,7 +1086,7 @@ plowFoundCell(use, ar)
/* Only queue the edge if the cell has not moved far enough */ /* Only queue the edge if the cell has not moved far enough */
if ((use->cu_client != (ClientData)CLIENTDEFAULT) && if ((use->cu_client != (ClientData)CLIENTDEFAULT) &&
((int)(use->cu_client) < xmove)) ((int)CD2INT(use->cu_client) < xmove))
{ {
edge.e_use = use; edge.e_use = use;
edge.e_flags = 0; edge.e_flags = 0;

View File

@ -185,7 +185,7 @@ plowYankMore(area, halo, back)
{ {
(void) DBSrPaintArea((Tile *) NULL, plowYankDef->cd_planes[pNum], (void) DBSrPaintArea((Tile *) NULL, plowYankDef->cd_planes[pNum],
&oldArea, &DBAllTypeBits, plowYankUpdatePaint, &oldArea, &DBAllTypeBits, plowYankUpdatePaint,
(ClientData) pNum); INT2CD(pNum));
} }
/* Switch the yank cell and the spare cell */ /* Switch the yank cell and the spare cell */
@ -487,16 +487,16 @@ plowUpdateCell(use, origDef)
switch (plowDirection) switch (plowDirection)
{ {
case GEO_NORTH: case GEO_NORTH:
y = (int)use->cu_client; y = (int)CD2INT(use->cu_client);
break; break;
case GEO_SOUTH: case GEO_SOUTH:
y = -(int)use->cu_client; y = -(int)CD2INT(use->cu_client);
break; break;
case GEO_WEST: case GEO_WEST:
x = -(int)use->cu_client; x = -(int)CD2INT(use->cu_client);
break; break;
case GEO_EAST: case GEO_EAST:
x = (int)use->cu_client; x = (int)CD2INT(use->cu_client);
break; break;
} }
GeoTranslateTrans(&origUse->cu_transform, x, y, &newTrans); GeoTranslateTrans(&origUse->cu_transform, x, y, &newTrans);

View File

@ -323,7 +323,7 @@ rtrEnumSidesFunc(tile)
Side side; Side side;
/* Skip if already processed, out of the area, or not a cell tile */ /* Skip if already processed, out of the area, or not a cell tile */
yprev = (int) tile->ti_client; yprev = (int) CD2INT(tile->ti_client);
ybot = MAX(BOTTOM(tile), rtrSideArea.r_ybot); ybot = MAX(BOTTOM(tile), rtrSideArea.r_ybot);
if (yprev <= ybot || tile->ti_body == (ClientData) NULL if (yprev <= ybot || tile->ti_body == (ClientData) NULL
|| RIGHT(tile) >= rtrSideArea.r_xtop) || RIGHT(tile) >= rtrSideArea.r_xtop)
@ -392,7 +392,7 @@ rtrEnumSidesFunc(tile)
if (LEFT(tp) != RIGHT(tile) || TOP(tp) <= ybot) if (LEFT(tp) != RIGHT(tile) || TOP(tp) <= ybot)
{ {
/* Processed this tile completely */ /* Processed this tile completely */
tile->ti_client = (ClientData) ybot; tile->ti_client = INT2CD(ybot);
return (0); return (0);
} }
} }
@ -441,7 +441,7 @@ rtrEnumSidesFunc(tile)
else else
{ {
side.side_line.r_ytop = MIN(TOP(tp), ytop); side.side_line.r_ytop = MIN(TOP(tp), ytop);
tp->ti_client = (ClientData) ybot; tp->ti_client = INT2CD(ybot);
} }
} }
} }

View File

@ -1274,7 +1274,7 @@ SelectAndCopy2(newSourceDef)
{ {
(void) DBSrPaintArea((Tile *) NULL, Select2Def->cd_planes[plane], (void) DBSrPaintArea((Tile *) NULL, Select2Def->cd_planes[plane],
&TiPlaneRect, &DBAllButSpaceAndDRCBits, selACPaintFunc, &TiPlaneRect, &DBAllButSpaceAndDRCBits, selACPaintFunc,
(ClientData) plane); INT2CD(plane));
DBMergeNMTiles(Select2Def->cd_planes[plane], &TiPlaneRect, DBMergeNMTiles(Select2Def->cd_planes[plane], &TiPlaneRect,
(PaintUndoInfo *)NULL); (PaintUndoInfo *)NULL);
} }

View File

@ -404,9 +404,9 @@ selShortTileProc(tile, ssd)
Tile *tile; Tile *tile;
ShortSearchData *ssd; ShortSearchData *ssd;
{ {
if ((int)tile->ti_client < ssd->cost) if ((int)CD2INT(tile->ti_client) < ssd->cost)
{ {
ssd->cost = (int)tile->ti_client; ssd->cost = (int)CD2INT(tile->ti_client);
ssd->tile = tile; ssd->tile = tile;
} }
return 0; return 0;
@ -448,7 +448,7 @@ selShortFindReverse(rlist, tile, pnum, fdir)
TileType ttype; TileType ttype;
mindir = fdir; mindir = fdir;
mincost = (int)tile->ti_client; mincost = (int)CD2INT(tile->ti_client);
while (TRUE) while (TRUE)
{ {
@ -495,7 +495,7 @@ selShortFindReverse(rlist, tile, pnum, fdir)
newrrec->r_next = *rlist; newrrec->r_next = *rlist;
*rlist = newrrec; *rlist = newrrec;
if ((int)tile->ti_client == 0) return 0; /* We're done */ if ((int)CD2INT(tile->ti_client) == 0) return 0; /* We're done */
minp = pnum; minp = pnum;
@ -510,9 +510,9 @@ selShortFindReverse(rlist, tile, pnum, fdir)
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp)) for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
{ {
if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue; if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue;
if ((int)tp->ti_client < mincost) if ((int)CD2INT(tp->ti_client) < mincost)
{ {
mincost = (int)tp->ti_client; mincost = (int)CD2INT(tp->ti_client);
mintp = tp; mintp = tp;
mindir = GEO_NORTH; mindir = GEO_NORTH;
} }
@ -530,9 +530,9 @@ leftside:
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp = RT(tp)) for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp = RT(tp))
{ {
if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue; if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue;
if ((int)tp->ti_client < mincost) if ((int)CD2INT(tp->ti_client) < mincost)
{ {
mincost = (int)tp->ti_client; mincost = (int)CD2INT(tp->ti_client);
mintp = tp; mintp = tp;
mindir = GEO_WEST; mindir = GEO_WEST;
} }
@ -550,9 +550,9 @@ bottomside:
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp = TR(tp)) for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp = TR(tp))
{ {
if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue; if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue;
if ((int)tp->ti_client < mincost) if ((int)CD2INT(tp->ti_client) < mincost)
{ {
mincost = (int)tp->ti_client; mincost = (int)CD2INT(tp->ti_client);
mintp = tp; mintp = tp;
mindir = GEO_SOUTH; mindir = GEO_SOUTH;
} }
@ -570,9 +570,9 @@ rightside:
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp = LB(tp)) for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp = LB(tp))
{ {
if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue; if (tp->ti_client == (ClientData)CLIENTDEFAULT) continue;
if ((int)tp->ti_client < mincost) if ((int)CD2INT(tp->ti_client) < mincost)
{ {
mincost = (int)tp->ti_client; mincost = (int)CD2INT(tp->ti_client);
mintp = tp; mintp = tp;
mindir = GEO_EAST; mindir = GEO_EAST;
} }
@ -741,7 +741,7 @@ selShortProcessTile(tile, cost, fdir, mask)
if (tile->ti_client == (ClientData)CLIENTDEFAULT) if (tile->ti_client == (ClientData)CLIENTDEFAULT)
TiSetClient(tile, cost); TiSetClient(tile, cost);
else if ((int)tile->ti_client > cost) else if ((int)CD2INT(tile->ti_client) > cost)
TiSetClient(tile, cost); TiSetClient(tile, cost);
else else
return 1; return 1;
@ -1222,7 +1222,7 @@ SelectExpand(mask)
extern int selExpandFunc(); /* Forward reference. */ extern int selExpandFunc(); /* Forward reference. */
(void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL, (void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL,
selExpandFunc, (ClientData) mask); selExpandFunc, INT2CD(mask));
} }
/* ARGSUSED */ /* ARGSUSED */

View File

@ -732,9 +732,9 @@ TileStoreFree(ptr)
} }
else else
{ {
TileStoreFreeList_end->ti_client = (unsigned long)ptr; TileStoreFreeList_end->ti_client = PTR2CD(ptr);
TileStoreFreeList_end = ptr; TileStoreFreeList_end = ptr;
TileStoreFreeList_end->ti_client = (unsigned long) 0; TileStoreFreeList_end->ti_client = INT2CD(0);
} }
} }
@ -827,5 +827,5 @@ tiPrintAll(tp)
printf("UR=(%d,%d)\n", RIGHT(tp), TOP(tp)); printf("UR=(%d,%d)\n", RIGHT(tp), TOP(tp));
/* The following is for plowing debugging */ /* The following is for plowing debugging */
printf("LEAD=%d\n", (int) tp->ti_client); printf("LEAD=%d\n", (int) CD2INT(tp->ti_client));
} }

View File

@ -103,7 +103,7 @@ MacroDefine(client, xc, str, help, imacro)
HashInit(clienttable, 32, HT_WORDKEYS); HashInit(clienttable, 32, HT_WORDKEYS);
HashSetValue(h, clienttable); HashSetValue(h, clienttable);
} }
h = HashFind(clienttable, (char *)((ClientData)xc)); h = HashFind(clienttable, (char *)INT2CD(xc));
oldMacro = (macrodef *)HashGetValue(h); oldMacro = (macrodef *)HashGetValue(h);
if (oldMacro != NULL) if (oldMacro != NULL)
{ {
@ -158,7 +158,7 @@ MacroDefineHelp(client, xc, help)
clienttable = (HashTable *)HashGetValue(h); clienttable = (HashTable *)HashGetValue(h);
if (clienttable == NULL) return; if (clienttable == NULL) return;
h = HashFind(clienttable, (char *)((ClientData)xc)); h = HashFind(clienttable, (char *)INT2CD(xc));
curMacro = (macrodef *)HashGetValue(h); curMacro = (macrodef *)HashGetValue(h);
if (curMacro == NULL) return; if (curMacro == NULL) return;
@ -202,7 +202,7 @@ MacroRetrieve(client, xc, iReturn)
clienttable = (HashTable *)HashGetValue(h); clienttable = (HashTable *)HashGetValue(h);
if (clienttable != NULL) if (clienttable != NULL)
{ {
h = HashLookOnly(clienttable, (char *)((ClientData)xc)); h = HashLookOnly(clienttable, (char *)INT2CD(xc));
if (h != NULL) if (h != NULL)
{ {
cMacro = (macrodef *)HashGetValue(h); cMacro = (macrodef *)HashGetValue(h);
@ -249,7 +249,7 @@ MacroRetrieveHelp(client, xc)
clienttable = (HashTable *)HashGetValue(h); clienttable = (HashTable *)HashGetValue(h);
if (clienttable != NULL) if (clienttable != NULL)
{ {
h = HashLookOnly(clienttable, (char *)((ClientData)xc)); h = HashLookOnly(clienttable, (char *)INT2CD(xc));
if (h != NULL) if (h != NULL)
{ {
cMacro = (macrodef *)HashGetValue(h); cMacro = (macrodef *)HashGetValue(h);
@ -347,7 +347,7 @@ MacroDelete(client, xc)
clienttable = (HashTable *)HashGetValue(h); clienttable = (HashTable *)HashGetValue(h);
if (clienttable != NULL) if (clienttable != NULL)
{ {
h = HashLookOnly(clienttable, (char *)((ClientData)xc)); h = HashLookOnly(clienttable, (char *)INT2CD(xc));
if (h != NULL) if (h != NULL)
{ {
cMacro = (macrodef *)HashGetValue(h); cMacro = (macrodef *)HashGetValue(h);