TCL9: ClientData macro header file changes
Header files documentation indicates the macros are of type ClientData but previously did not cast to ensure that. So now follow this intention.
This commit is contained in:
parent
17fe81107a
commit
79f2ab0f4b
|
|
@ -39,6 +39,10 @@
|
|||
* the head of that function.
|
||||
*/
|
||||
|
||||
#ifndef _MAGIC_H
|
||||
#include "utils/magic.h"
|
||||
#endif
|
||||
|
||||
#ifndef _MZROUTER_H
|
||||
#include "mzrouter/mzrouter.h"
|
||||
#endif
|
||||
|
|
@ -86,8 +90,8 @@ extern ClientData mzDebugID;
|
|||
* electrically connected to specified start or dest regions.
|
||||
*/
|
||||
#define DEF_EXPAND_ENDPOINTS 1
|
||||
#define MZ_EXPAND_START 1 /* ClientData type for start tiles */
|
||||
#define MZ_EXPAND_DEST 0 /* ClientData type for dest tiles */
|
||||
#define MZ_EXPAND_START INT2CD(1) /* ClientData type for start tiles */
|
||||
#define MZ_EXPAND_DEST INT2CD(0) /* ClientData type for dest tiles */
|
||||
#define MZ_EXPAND_NONE CLIENTDEFAULT /* Normal ClientData type */
|
||||
|
||||
/* If set only hints in toplevel cell are recognized - speeds up processing
|
||||
|
|
|
|||
|
|
@ -161,11 +161,11 @@ typedef struct
|
|||
* of the tile to its right.
|
||||
*/
|
||||
#define TRAIL_UNINIT CLIENTDEFAULT
|
||||
#define TRAILING(tp) (((tp)->ti_client == (ClientData)TRAIL_UNINIT) \
|
||||
? LEFT(tp) : ((int)(tp)->ti_client))
|
||||
#define TRAILING(tp) (((tp)->ti_client == INT2CD(TRAIL_UNINIT)) \
|
||||
? LEFT(tp) : ((int)CD2INT((tp)->ti_client)))
|
||||
#define LEADING(tp) TRAILING(TR(tp))
|
||||
|
||||
#define plowSetTrailing(tp, n) ((tp)->ti_client = (ClientData) (n))
|
||||
#define plowSetTrailing(tp, n) ((tp)->ti_client = INT2CD((n)))
|
||||
|
||||
/* ------------------ Design rules used by plowing -------------------- */
|
||||
|
||||
|
|
|
|||
|
|
@ -49,19 +49,19 @@
|
|||
/* rtrMARKED(t,s) Tile * t; int s;
|
||||
* Return 1 if the indicated horizontal boundary of a tile is marked.
|
||||
*/
|
||||
#define rtrMARKED(t,s) (((int) (t)->ti_client) & (s))
|
||||
#define rtrMARKED(t,s) (((int) CD2INT((t)->ti_client)) & (s))
|
||||
|
||||
/* rtrMARK(t,s) Tile * t; int s;
|
||||
* Mark the indicated horizontal tile edge as a valid channel boundary.
|
||||
*/
|
||||
#define rtrMARK(t,s) \
|
||||
((t)->ti_client = (ClientData) (((int) (t)->ti_client)&(s)))
|
||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(s))))
|
||||
|
||||
/* rtrCLEAR(t,s) Tile * t; int s;
|
||||
* Clear the indicated horizontal tile edge as a valid channel boundary.
|
||||
*/
|
||||
#define rtrCLEAR(t,s) \
|
||||
((t)->ti_client = (ClientData) (((int) (t)->ti_client)&(!s)))
|
||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(!s))))
|
||||
|
||||
/* Private Procedures */
|
||||
int rtrSrPaint();
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ typedef struct
|
|||
/* depending on whether it is cast into a 32 or a 64 bit word. */
|
||||
|
||||
#define CLIENTMAX (((pointertype)1 << (8 * sizeof(pointertype) - 2)) - 4)
|
||||
#define CLIENTDEFAULT (-CLIENTMAX)
|
||||
#define CLIENTDEFAULT INT2CD(-CLIENTMAX)
|
||||
|
||||
/* ------------------------ Flags, etc -------------------------------- */
|
||||
|
||||
|
|
@ -239,9 +239,9 @@ extern Tile *TiSrPoint(Tile *, Plane *, Point *);
|
|||
|
||||
#define TiGetBody(tp) ((tp)->ti_body)
|
||||
/* See diagnostic subroutine version in tile.c */
|
||||
#define TiSetBody(tp, b) ((tp)->ti_body = (ClientData)(pointertype) (b))
|
||||
#define TiSetBody(tp, b) ((tp)->ti_body = INT2CD((b)))
|
||||
#define TiGetClient(tp) ((tp)->ti_client)
|
||||
#define TiSetClient(tp,b) ((tp)->ti_client = (ClientData)(pointertype) (b))
|
||||
#define TiSetClient(tp,b) ((tp)->ti_client = INT2CD((b)))
|
||||
|
||||
Tile *TiAlloc(void);
|
||||
void TiFree(Tile *);
|
||||
|
|
|
|||
Loading…
Reference in New Issue