rename Region to ExtRegion

On Macos, Tk includes X11, which has this define:

    #if !defined(MAC_OSX_TK)
    #   include <X11/X.h>
    #endif
    #ifdef MAC_OSX_TK
    #   include <X11/X.h>
    #   define Cursor XCursor
    #   define Region XRegion
    #endif

This causes the keywords `Cursor` and `Region` to be reserved, which
prevents magic from building.

Rename `Region` to `ExtRegion` as suggested by @RTimothyEdwards in
https://github.com/RTimothyEdwards/magic/issues/195#issuecomment-1298870983
and https://github.com/RTimothyEdwards/magic/pull/222#pullrequestreview-1334900670

Signed-off-by: Sean Cross <[email protected]>
This commit is contained in:
Sean Cross
2023-03-10 11:07:55 -05:00
committed by Tim Edwards
parent 5e5879c53d
commit 1e7da74672
14 changed files with 69 additions and 69 deletions
+12 -12
View File
@@ -132,7 +132,7 @@ typedef struct ll
* The following are the structures built up by the various
* clients of ExtFindRegions. The general rule for these
* structures is that their initial fields must be identical
* to those in a Region, but subsequent fields are up to
* to those in a ExtRegion, but subsequent fields are up to
* the individual client.
*
* Regions marked as GENERIC are the types accepted by
@@ -140,8 +140,8 @@ typedef struct ll
*/
/*
* GENERIC Region struct.
* All this provides is a pointer to the next Region.
* GENERIC ExtRegion struct.
* All this provides is a pointer to the next ExtRegion.
* This is the type passed to functions like ExtFreeRegions,
* and is the type returned by ExtFindRegions. Clients should
* cast pointers of this type to their own, client type.
@@ -149,7 +149,7 @@ typedef struct ll
typedef struct reg
{
struct reg *reg_next; /* Next region in list */
} Region;
} ExtRegion;
/*
* GENERIC region with labels.
@@ -253,9 +253,9 @@ typedef struct
* field of a tile if it's not yet
* been visited.
*/
Region *(*fra_first)(); /* Function to init new region */
ExtRegion *(*fra_first)(); /* Function to init new region */
int (*fra_each)(); /* Function for each tile in region */
Region *fra_region; /* Ptr to Region struct for current
ExtRegion *fra_region; /* Ptr to ExtRegion struct for current
* region. May be set by fra_first
* and used by fra_each.
*/
@@ -1027,16 +1027,16 @@ extern ClientData extUnInit;
STACKPUSH((ClientData)(pointertype)(pl | TT_SIDE), extNodeStack); \
STACKPUSH((ClientData)(pointertype)tp, extNodeStack)
/* ------------------------- Region finding --------------------------- */
/* ------------------------- ExtRegion finding --------------------------- */
extern Region *ExtFindRegions();
extern ExtRegion *ExtFindRegions();
extern LabelList *ExtLabelRegions();
/* Filter functions for ExtFindRegions() */
extern Region *extTransFirst(); extern int extTransEach();
extern Region *extResFirst(); extern int extResEach();
extern Region *extNodeFirst(); extern int extNodeEach();
extern Region *extHierLabFirst(); extern int extHierLabEach();
extern ExtRegion *extTransFirst(); extern int extTransEach();
extern ExtRegion *extResFirst(); extern int extResEach();
extern ExtRegion *extNodeFirst(); extern int extNodeEach();
extern ExtRegion *extHierLabFirst(); extern int extHierLabEach();
extern Tile *extNodeToTile();