Updates from running the fix-ending-whitespace script.

This commit is contained in:
Tim Edwards 2020-05-23 17:13:14 -04:00
parent c81d9add00
commit 2af38a4191
505 changed files with 10013 additions and 10020 deletions

View File

@ -131,16 +131,9 @@ TAGS:
${RM} TAGS
find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs etags -o TAGS
<<<<<<< HEAD
fix-trailing-whitespace:
find -name "*.[ch]" | xargs sed -i -e's/\s\+$$//'
find -name "*.cpp" | xargs sed -i -e's/\s\+$$//'
find -name "*.tcl" | xargs sed -i -e's/\s\+$$//'
=======
setup-git:
git config --local include.path ../.gitconfig
git stash save
rm .git/index
git checkout HEAD -- "$$(git rev-parse --show-toplevel)"
git stash pop
>>>>>>> Adding git expanding command.

View File

@ -1 +1 @@
8.3.13
8.3.14

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -47,8 +47,8 @@
/* Tcl linked Parameters */
int bpMinBAPop = 10; /* don't sub(bin) when count less than this */
double bpMinAvgBinPop = 1.0; /* try to keep average bin pop at or
* below this
double bpMinAvgBinPop = 1.0; /* try to keep average bin pop at or
* below this
*/
/*
@ -73,10 +73,10 @@ static __inline__ int roundUp(int i, int res)
* bpBinArrayNew -- allocate new bin array.
*
* ----------------------------------------------------------------------------
*/
static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */
*/
static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */
int dy, /* y diameter of bins */
Rect *bbox) /* area covered */
Rect *bbox) /* area covered */
{
BinArray *new;
@ -92,7 +92,7 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */
numBins = dimX*dimY;
/* allocate array */
size = sizeof(BinArray) + numBins*(sizeof(void *));
size = sizeof(BinArray) + numBins*(sizeof(void *));
new = (BinArray *)callocMagic(size);
/* initial */
@ -100,7 +100,7 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */
new->ba_dx = dx;
new->ba_dy = dy;
new->ba_dimX = dimX;
new->ba_numBins = numBins;
new->ba_numBins = numBins;
/* pull bbox back one from top-edge, right-edge, to simplify index
* computation in bpEnumPush
@ -119,11 +119,11 @@ static BinArray *bpBinArrayNew(int dx, /* x diameter of bins */
* bpBinAdd -- add element to bin array
*
* ----------------------------------------------------------------------------
*/
*/
void bpBinAdd(BinArray *ba,
Element *e)
{
int i; /* bin index */
int i; /* bin index */
/* compute bin index */
if(GEO_WIDTH(&e->e_rect) >= ba->ba_dx ||
@ -170,7 +170,7 @@ void bpBinAdd(BinArray *ba,
* Returns: (singly linked) list of elements formerly in the array
*
* ----------------------------------------------------------------------------
*/
*/
static Element *bpBinArrayUnbuild(BinArray *ba)
{
Element *elements = NULL;
@ -206,7 +206,7 @@ static Element *bpBinArrayUnbuild(BinArray *ba)
/* free the array */
freeMagic((char *)ba);
return elements;
}
@ -216,15 +216,15 @@ static Element *bpBinArrayUnbuild(BinArray *ba)
* ----------------------------------------------------------------------------
* bpListExceedsQ --
*
* check if element list exceeds given length
* check if element list exceeds given length
*
* Returns size of list.
*
* ----------------------------------------------------------------------------
*/
static __inline__ int
*/
static __inline__ int
bpListExceedsQ(Element *e, /* list */
int n) /* length to check against */
int n) /* length to check against */
{
n++;
@ -243,21 +243,21 @@ bpListExceedsQ(Element *e, /* list */
* bpBinArraySizeIt -- choose bin sizes for new bin array.
*
* RESULT:
*
*
* normally returns TRUE,
* returns FALSE on failure: could not come up with binning that
* makes progress.
*
* NOTE: the various 'return' parameters are not set on failure.
* NOTE: the various 'return' parameters are not set on failure.
*
* ----------------------------------------------------------------------------
*/
static __inline__ bool
*/
static __inline__ bool
bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
Element *elements, /* initial elements */
int *dxp, /* return bin x-diameter here */
int *dyp, /* return bin y-diameter here */
int *maxDXp,
int *maxDXp,
int *maxDYp,
int *numBinsp, /* return number of bins here */
int *countp) /* return number of elements here */
@ -269,15 +269,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
int w = GEO_WIDTH(bbox);
int dx,dy; /* individual bin diameter */
int maxEX, maxEY; /* max element dimensions */
int maxEX, maxEY; /* max element dimensions */
int maxDX, maxDY; /* max bin diameter allowed */
int xDim, yDim; /* array dimensions */
int maxBins; /* max number of bins
* (due to bpMinAvgBinPop)
* (due to bpMinAvgBinPop)
*/
/* compute max element dimensions
/* compute max element dimensions
* (would like bins coarser than max dimensisons)
*/
{
@ -298,15 +298,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
count++;
}
}
/* if too few elements, don't bother with binning */
if(count < bpMinBAPop) return FALSE;
/* if too tiny don't subbin,
/* if too tiny don't subbin,
* avoid nasty corner-cases in code below
*/
if(h<2 || w<2) return FALSE;
/* tentatively choose bin size to fit all elements */
dx = maxEX+1;
dy = maxEY+1;
@ -380,7 +380,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
dx = maxDX;
dy = h+1;
}
else
else
{
/* are we making progress? */
if(yOver == count) return FALSE;
@ -423,16 +423,16 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
dx = (w+1) / MAX(xDimTarget,1);
dx = MIN(dx,maxDX);
}
else
{
else
{
/* try for square bins */
double area = h * (w + 0.0);
int d = MAX(sqrt(area/maxBins),1);
if(d<dx)
if(d<dx)
{
/* target d too small in x-dim
* leave xdim fixed and just increase y-dim
* leave xdim fixed and just increase y-dim
*/
int yDimTarget = maxBins/xDim;
@ -442,13 +442,13 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
else if (d<dy)
{
/* target d too small in y-dim
* leave xdim fixed and just increase y-dim
* leave xdim fixed and just increase y-dim
*/
int xDimTarget = maxBins/yDim;
dx = (w+1) / MAX(xDimTarget,1);
dx = MIN(dx,maxDX);
}
}
else if(d>maxDX)
{
/* d too big for x-dim
@ -473,7 +473,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
}
else
{
/* we're cool, create square bins */
/* we're cool, create square bins */
dx = d;
dy = d;
}
@ -485,7 +485,7 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
numBins = xDim*yDim;
}
/* DEBUG */
if(BPD)
{
@ -518,15 +518,15 @@ bpBinArraySizeIt(Rect *bbox, /* bin array bbox */
* Returns: pointer to new bin array.
*
* ----------------------------------------------------------------------------
*/
static BinArray *bpBinArrayBuild1(Rect *bbox,
*/
static BinArray *bpBinArrayBuild1(Rect *bbox,
Element *elements, /* initial elements */
int dx, /* bin diameter */
int dy)
{
{
BinArray *ba;
/* build bin array */
ba = bpBinArrayNew(dx, dy, bbox);
@ -538,10 +538,10 @@ static BinArray *bpBinArrayBuild1(Rect *bbox,
/* pop list */
e = elements;
elements = e->e_link;
bpBinAdd(ba, e);
}
return ba;
}
@ -550,20 +550,20 @@ static BinArray *bpBinArrayBuild1(Rect *bbox,
*
* bpBinArrayBuild -- build and populate bin array of given area,
*
* NOTE: optimal bin size determined by trial and error.
* oversized subbinned, as indicated.
* NOTE: optimal bin size determined by trial and error.
* oversized subbinned, as indicated.
*
* Returns: pointer to new bin array, NULL on failure.
*
* ----------------------------------------------------------------------------
*/
BinArray *bpBinArrayBuild(Rect bbox,
*/
BinArray *bpBinArrayBuild(Rect bbox,
Element *elements, /* initial elements */
bool subbin) /* subbin as needed */
{
BinArray *ba;
int dx,dy; /* individual bin diameter */
int maxDX, maxDY;
int maxDX, maxDY;
int numBins;
int count;
@ -594,13 +594,13 @@ BinArray *bpBinArrayBuild(Rect bbox,
{
BinArray *sub;
sub = bpBinArrayBuild(bpBinArea(ba,i),
sub = bpBinArrayBuild(bpBinArea(ba,i),
bpBinList(ba, i),
TRUE);
if(sub)
{
ba->ba_bins[i] =
ba->ba_bins[i] =
(void *) ((pointertype) sub | BT_ARRAY);
}
}
@ -609,14 +609,14 @@ BinArray *bpBinArrayBuild(Rect bbox,
/* sub-bin oversized */
{
BinArray *sub;
sub = bpBinArrayBuild(bbox,
bpBinList(ba, numBins),
TRUE);
if(sub)
{
ba->ba_bins[numBins] =
ba->ba_bins[numBins] =
(void *) ((pointertype) sub | BT_ARRAY);
}
}
@ -637,7 +637,7 @@ BinArray *bpBinArrayBuild(Rect bbox,
* Called prior to enumerations.
*
* ----------------------------------------------------------------------------
*/
*/
int bpBinLife = 0;
void bpBinsUpdate(BPlane *bp)
{
@ -651,7 +651,7 @@ void bpBinsUpdate(BPlane *bp)
/* do bins already exist ? */
oldBins = (bp->bp_rootNode != 0);
/* if bins exist, dissolve them */
if(oldBins)
{
@ -668,7 +668,7 @@ void bpBinsUpdate(BPlane *bp)
e->e_link = elist;
elist = e;
}
bp->bp_inBox = elist;
}
@ -703,8 +703,8 @@ void bpBinsUpdate(BPlane *bp)
bp->bp_inAdds = 0;
/* if(BPD) bpDump(bp, 0); */
}

View File

@ -1,35 +1,35 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
/* bpDump.c
*
* routines to dump bin system (for debugging)
* routines to dump bin system (for debugging)
*
*/
@ -49,8 +49,8 @@ static int bpDumpFlags; /* set by bpDump, used by subroutines */
* tab over n spaces on stderr
*
* ----------------------------------------------------------------------------
*/
static void bpIndent(int n)
*/
static void bpIndent(int n)
{
int i;
@ -60,11 +60,11 @@ static void bpIndent(int n)
/*
* ----------------------------------------------------------------------------
* bpDumpRect --
*
*
* list rects.
*
* ----------------------------------------------------------------------------
*/
*/
void bpDumpRect(Rect *r)
{
if(bpDumpFlags & BPD_INTERNAL_UNITS)
@ -98,16 +98,16 @@ void bpDumpRect(Rect *r)
/*
* ----------------------------------------------------------------------------
* bpDumpElements --
*
*
* list rects.
*
* ----------------------------------------------------------------------------
*/
*/
void bpDumpElements(Element *list, int indent)
{
Element *e;
for(e = list; e; e=e->e_link)
for(e = list; e; e=e->e_link)
{
bpIndent(indent);
fprintf(stderr,"{element ");
@ -127,11 +127,11 @@ void bpDumpElements(Element *list, int indent)
/*
* ----------------------------------------------------------------------------
* bpDumpEnums --
*
*
* list active enumerations
*
* ----------------------------------------------------------------------------
*/
*/
void bpDumpEnums(BPEnum *bpe, int indent)
{
for(; bpe; bpe=bpe->bpe_next)
@ -146,10 +146,10 @@ void bpDumpEnums(BPEnum *bpe, int indent)
* ----------------------------------------------------------------------------
* bpBinArrayDump --
*
* recursively dump hierarchical bin system
* recursively dump hierarchical bin system
*
* ----------------------------------------------------------------------------
*/
*/
static void bpBinArrayDump(BinArray *ba, int indent)
{
@ -207,7 +207,7 @@ static void bpBinArrayDump(BinArray *ba, int indent)
/* open bin */
bpIndent(indent+2);
fprintf(stderr,"{bin {number %d} { bbox ",
i);
i);
bpDumpRect(&area);
fprintf(stderr," }\n");
@ -269,7 +269,7 @@ static void bpBinArrayDump(BinArray *ba, int indent)
* dump bplane (for debugging)
*
* ----------------------------------------------------------------------------
*/
*/
void bpDump(BPlane *bp, int flags)
{
fprintf(stderr, "======= BPLANE DUMP ======\n");
@ -277,7 +277,7 @@ void bpDump(BPlane *bp, int flags)
bpDumpFlags = flags;
/* open bplane */
fprintf(stderr,"{bplane {count %d} {bbox ",
fprintf(stderr,"{bplane {count %d} {bbox ",
bp->bp_count);
bpDumpRect(&bp->bp_bbox);
fprintf(stderr,"}\n");
@ -292,7 +292,7 @@ void bpDump(BPlane *bp, int flags)
/*** bins ***/
bpIndent(2);
fprintf(stderr,"{binned {area ");
fprintf(stderr,"{binned {area ");
bpDumpRect(&bp->bp_binArea);
fprintf(stderr,"}\n");
@ -302,8 +302,8 @@ void bpDump(BPlane *bp, int flags)
/*** enums ***/
bpIndent(2);
fprintf(stderr,"{enums\n");
fprintf(stderr,"{enums\n");
bpDumpEnums(bp->bp_enums,4);
bpIndent(2);

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -47,11 +47,11 @@
* set up search.
*
* ----------------------------------------------------------------------------
*/
*/
void BPEnumInit(BPEnum *bpe, /* enum to initialize */
BPlane *bp,
BPlane *bp,
Rect *area, /* search area */
int match,
int match,
char *id) /* for debugging */
{
bool inside = FALSE;
@ -79,7 +79,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */
/* don't need to setup stack, just return */
return;
case BPE_ALL:
case BPE_ALL:
/* If we start 'INSIDE', no match checks will be done */
bpe->bpe_top->bps_state = BPS_BINS_INSIDE;
inside = TRUE;
@ -94,7 +94,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */
}
else
{
bpe->bpe_top->bps_state = BPS_BINS;
bpe->bpe_top->bps_state = BPS_BINS;
bpe->bpe_subBinMinX = GEO_WIDTH(&bpe->bpe_srchArea)/2;
bpe->bpe_subBinMinY = GEO_HEIGHT(&bpe->bpe_srchArea)/2;
bpBinsUpdate(bp);
@ -111,7 +111,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */
}
else
{
bpe->bpe_top->bps_state = BPS_BINS;
bpe->bpe_top->bps_state = BPS_BINS;
bpe->bpe_subBinMinX = GEO_WIDTH(&bpe->bpe_srchArea)/2;
bpe->bpe_subBinMinY = GEO_HEIGHT(&bpe->bpe_srchArea)/2;
bpBinsUpdate(bp);
@ -119,14 +119,14 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */
break;
default:
ASSERT(FALSE,"BPEnumInit, bad match value");
ASSERT(FALSE,"BPEnumInit, bad match value");
}
/* push rootnode */
if(bp->bp_rootNode)
{
bpEnumPush(bpe, bp->bp_rootNode, inside);
bpe->bpe_nextElement = NULL;
bpe->bpe_nextElement = NULL;
}
else
{
@ -143,7 +143,7 @@ void BPEnumInit(BPEnum *bpe, /* enum to initialize */
* terminate enumeration
*
* ----------------------------------------------------------------------------
*/
*/
void BPEnumTerm(BPEnum *bpe)
{
BPEnum **linkp;

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
#ifndef _BPENUM_H
@ -44,12 +44,12 @@
extern void DumpRect(char *msg, Rect *r);
/* state machine states */
#define BPS_BINS 0
#define BPS_BINS_INSIDE 1
#define BPS_INBOX 2
#define BPS_INBOX_INSIDE 3
#define BPS_HASH 4
#define BPS_DONE 5
#define BPS_BINS 0
#define BPS_BINS_INSIDE 1
#define BPS_INBOX 2
#define BPS_INBOX_INSIDE 3
#define BPS_HASH 4
#define BPS_DONE 5
/* range code */
#define R_LEFT 1
@ -65,7 +65,7 @@ extern void DumpRect(char *msg, Rect *r);
* Returns: bin area.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ Rect bpBinArea(BinArray *ba, int i)
{
int dimX = ba->ba_dimX;
@ -74,9 +74,9 @@ static __inline__ Rect bpBinArea(BinArray *ba, int i)
int xi = i % dimX;
int yi = i / dimX;
Rect area;
area.r_xbot = ba->ba_bbox.r_xbot + dx*xi;
area.r_ybot = ba->ba_bbox.r_ybot + dy*yi;
area.r_xbot = ba->ba_bbox.r_xbot + dx*xi;
area.r_ybot = ba->ba_bbox.r_ybot + dy*yi;
area.r_xtop = area.r_xbot + dx;
area.r_ytop = area.r_ybot + dy;
@ -96,7 +96,7 @@ static __inline__ Rect bpBinArea(BinArray *ba, int i)
* Returns: int encoding 'range'.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ int
bpEnumRange(Rect *bin, Rect *srch)
{
@ -125,7 +125,7 @@ bpEnumRange(Rect *bin, Rect *srch)
* Returns: TRUE on match, FALSE otherwise.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ bool
bpEnumMatchQ(BPEnum *bpe, Element *e)
{
@ -149,8 +149,8 @@ bpEnumMatchQ(BPEnum *bpe, Element *e)
* push a bin array onto an enum stack.
*
* ----------------------------------------------------------------------------
*/
static __inline__ bool bpEnumPushInside(BPEnum *bpe,
*/
static __inline__ bool bpEnumPushInside(BPEnum *bpe,
BinArray *ba)
{
BPStack *bps;
@ -164,7 +164,7 @@ static __inline__ bool bpEnumPushInside(BPEnum *bpe,
/* set up indices to scan entire bin array */
bps->bps_i = -1;
bps->bps_max = ba->ba_numBins;
return TRUE;
}
@ -174,11 +174,11 @@ static __inline__ bool bpEnumPushInside(BPEnum *bpe,
*
* push a bin array onto an enum stack.
*
* normally returns TRUE, returns FALSE on (possible) state change.
* normally returns TRUE, returns FALSE on (possible) state change.
*
* ----------------------------------------------------------------------------
*/
static __inline__ bool bpEnumPush(BPEnum *bpe,
*/
static __inline__ bool bpEnumPush(BPEnum *bpe,
BinArray *ba,
bool inside)
{
@ -194,7 +194,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe,
/* special case inside */
if(inside) return bpEnumPushInside(bpe,ba);
bbox = &ba->ba_bbox;
if(GEO_SURROUND(&bpe->bpe_srchArea,bbox))
{
@ -210,13 +210,13 @@ static __inline__ bool bpEnumPush(BPEnum *bpe,
bps->bps_subbin = FALSE;
bps->bps_rejects = 0;
/* compute search area for this bin array */
/* compute search area for this bin array */
dx = ba->ba_dx;
dy = ba->ba_dy;
area.r_xbot = bpe->bpe_srchArea.r_xbot - dx;
area.r_xtop = bpe->bpe_srchArea.r_xtop + 1;
area.r_ybot = bpe->bpe_srchArea.r_ybot - dy;
area.r_ytop = bpe->bpe_srchArea.r_ytop + 1;
area.r_xbot = bpe->bpe_srchArea.r_xbot - dx;
area.r_xtop = bpe->bpe_srchArea.r_xtop + 1;
area.r_ybot = bpe->bpe_srchArea.r_ybot - dy;
area.r_ytop = bpe->bpe_srchArea.r_ytop + 1;
GEOCLIP(&area,bbox);
if(GEO_RECTNULL(&area))
@ -238,7 +238,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe,
area.r_ybot -= bbox->r_ybot;
area.r_ytop -= bbox->r_ybot;
/* DumpRect("area relative to bin bbox = ",&area); */
/* DumpRect("area relative to bin bbox = ",&area); */
area.r_xbot /= ba->ba_dx;
area.r_xtop /= ba->ba_dx;
@ -246,7 +246,7 @@ static __inline__ bool bpEnumPush(BPEnum *bpe,
area.r_ytop /= ba->ba_dy;
i = area.r_ybot*dimX + area.r_xbot; /* next index */
bps->bps_i = i-1;
bps->bps_i = i-1;
bps->bps_rowMax = i + area.r_xtop - area.r_xbot;
bps->bps_max = area.r_ytop*dimX + area.r_xtop;
bps->bps_rowDelta = dimX + area.r_xbot - area.r_xtop;
@ -259,19 +259,19 @@ static __inline__ bool bpEnumPush(BPEnum *bpe,
}
}
return TRUE;
return TRUE;
}
/*
* ----------------------------------------------------------------------------
* bpEnumNextBin1 --
*
* called by bpEnumNextBin() after indexes for new bin are setup
* called by bpEnumNextBin() after indexes for new bin are setup
*
* returns: normally returns TRUE, returns FALSE on state change.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ bool
bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside)
{
@ -290,8 +290,8 @@ bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside)
* bpEnumNextBin --
*
* called by bpEnumNextBINS to advance to next bin (bucket).
*
* cycles through normal bins first, then oversized,
*
* cycles through normal bins first, then oversized,
* finally, for toplevel, sets INBOX state.
*
* sets bpe->bpe_nextElement to first element in next bin.
@ -299,7 +299,7 @@ bpEnumNextBin1(BPEnum *bpe, BPStack *bps, bool inside)
* returns: normally returns TRUE, returns FALSE on state change.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ bool
bpEnumNextBin(BPEnum *bpe, bool inside)
{
@ -308,7 +308,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
#ifdef PARANOID
ASSERT(bps,"bpEnumNextBin");
ASSERT(!bpe->bpe_nextElement,"bpEnumNextBin");
#endif
#endif
/*
fprintf(stderr,"DEBUG bpEnumNextBin TOP inside=%d nextElement=%x\n",
@ -318,7 +318,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
/* consider subbining this bin before advancing to next */
if(!inside)
{
if(bps->bps_rejects >= bpMinBAPop
if(bps->bps_rejects >= bpMinBAPop
&& (bps->bps_subbin || bps->bps_i == bps->bps_node->ba_numBins))
{
int i = bps->bps_i;
@ -338,7 +338,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
}
bps->bps_rejects = 0;
}
/* handle inside case first */
if(inside)
{
@ -354,7 +354,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
else
{
/* cycle only through relevant bins */
/* next in row */
if(bps->bps_i<bps->bps_rowMax)
{
@ -365,7 +365,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
/* next row */
if(bps->bps_i<bps->bps_max)
{
bps->bps_i += bps->bps_rowDelta;
bps->bps_i += bps->bps_rowDelta;
bps->bps_rowMax += bps->bps_dimX;
goto bin;
}
@ -382,7 +382,7 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
/* fprintf(stderr,"DEBUG BPEnumNextBin Pop.\n"); */
bpe->bpe_top--;
if(bpe->bpe_top>bpe->bpe_stack) return FALSE; /* state may have changed */
/* inbox */
/* fprintf(stderr,"DEBUG BPEnumNextBin INBOX.\n"); */
bpe->bpe_nextElement = bpe->bpe_plane->bp_inBox;
@ -403,14 +403,14 @@ bpEnumNextBin(BPEnum *bpe, bool inside)
* (bin enumeration.)
*
* ----------------------------------------------------------------------------
*/
static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside)
*/
static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside)
{
/* bin by bin */
do
{
/* search this bin */
Element *e = bpe->bpe_nextElement;
/* search this bin */
Element *e = bpe->bpe_nextElement;
while(e && !inside && !bpEnumMatchQ(bpe,e))
{
@ -427,7 +427,7 @@ static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside)
bpe->bpe_nextElement = NULL;
}
while(bpEnumNextBin(bpe,inside));
while(bpEnumNextBin(bpe,inside));
/* next state */
return NULL;
@ -442,8 +442,8 @@ static __inline__ Element* bpEnumNextBINS(BPEnum *bpe, bool inside)
* unbinned enumeration.
*
* ----------------------------------------------------------------------------
*/
static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe,
*/
static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe,
bool inside)
{
Element *e = bpe->bpe_nextElement;
@ -469,14 +469,14 @@ static __inline__ Element *bpEnumNextINBOX(BPEnum *bpe,
* (hash based (EQUALS) enumerations.)
*
* ----------------------------------------------------------------------------
*/
static __inline__ Element *bpEnumNextHASH(BPEnum *bpe)
*/
static __inline__ Element *bpEnumNextHASH(BPEnum *bpe)
{
Element *e = bpe->bpe_nextElement;
if(e)
{
bpe->bpe_nextElement =
bpe->bpe_nextElement =
IHashLookUpNext(bpe->bpe_plane->bp_hashTable, e);
}
else
@ -493,7 +493,7 @@ static __inline__ Element *bpEnumNextHASH(BPEnum *bpe)
* get next element in enumeration.
*
* ----------------------------------------------------------------------------
*/
*/
static __inline__ void *BPEnumNext(BPEnum *bpe)
{
Element *e;

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -51,7 +51,7 @@
* Return newly created BPlane.
*
* ----------------------------------------------------------------------------
*/
*/
BPlane *BPNew(void)
{
BPlane *new;
@ -92,7 +92,7 @@ BPlane *BPNew(void)
* free (empty) BPlane
*
* ----------------------------------------------------------------------------
*/
*/
void BPFree(BPlane *bp)
{
ASSERT(bp->bp_count == 0,"BPFree");
@ -109,7 +109,7 @@ void BPFree(BPlane *bp)
* NOTE: e_rect better be canonical!
*
* ----------------------------------------------------------------------------
*/
*/
void BPAdd(BPlane *bp, void *element)
{
int size;
@ -126,8 +126,8 @@ void BPAdd(BPlane *bp, void *element)
ASSERT(!bp->bp_enums,
"BPAdd, attempted during active enumerations");
/* element rect must be canonical! */
#ifdef PARANOID
/* element rect must be canonical! */
#ifdef PARANOID
ASSERT(GeoIsCanonicalRect(r),"BPAdd, rect must be canonical.");
#endif
@ -145,7 +145,7 @@ void BPAdd(BPlane *bp, void *element)
{
GeoIncludeRectInBBox(r,&bp->bp_bbox);
}
/* no bins? */
if(!bp->bp_rootNode) goto inBox;
@ -175,10 +175,10 @@ void BPAdd(BPlane *bp, void *element)
* remove element from bplane
*
* ----------------------------------------------------------------------------
*/
*/
void BPDelete(BPlane *bp, void *element)
{
Element *e = element;
Element *e = element;
ASSERT(e,"BPDelete");
if (bp->bp_count == 0)
@ -219,7 +219,7 @@ void BPDelete(BPlane *bp, void *element)
}
}
IHashDelete(bp->bp_hashTable, e);
IHashDelete(bp->bp_hashTable, e);
/* next pointer of prev element */
*e->e_linkp = e->e_link;
@ -234,11 +234,11 @@ void BPDelete(BPlane *bp, void *element)
*
* Get current bplane bbox.
*
* returns: current bplane bbox
* (returns an inverted rect, if bplane is empty)
* returns: current bplane bbox
* (returns an inverted rect, if bplane is empty)
*
* ----------------------------------------------------------------------------
*/
*/
Rect BPBBox(BPlane *bp)
{
@ -261,7 +261,7 @@ Rect BPBBox(BPlane *bp)
e = BPEnumNext(&bpe);
bp->bp_bbox = e->e_rect;
while(e = BPEnumNext(&bpe))
while(e = BPEnumNext(&bpe))
{
GeoIncludeRectInBBox(&e->e_rect, &bp->bp_bbox);
}

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -45,8 +45,8 @@
*
*/
/* data element, stored in BPlane
*
/* data element, stored in BPlane
*
* Storage managed by caller.
* Inital part must correspond to below.
*/
@ -59,8 +59,8 @@ typedef struct element
/* client data goes here */
} Element;
/* number of link fields in element
*
/* number of link fields in element
*
* user code should not depend on more than 1 link.
* (and should only use/ref that link when element is not in a bplane)
*/
@ -72,24 +72,24 @@ typedef struct binarray
Rect ba_bbox; /* area covered by array */
int ba_dx; /* dimensions of a single bin */
int ba_dy;
int ba_dimX; /* number of bins in a row */
int ba_dimX; /* number of bins in a row */
int ba_numBins; /* number of regular bins (size of array - 1) */
void *ba_bins[1]; /* low order bit(s) used to encode type info.
* DON'T ACCESS DIRECTLY, USE MACROS BELOW
* DON'T ACCESS DIRECTLY, USE MACROS BELOW
*
* (last bin is for oversized)
*/
} BinArray;
/* bin types
/* bin types
*
* NOTE: its important that simple lists have type 0, i.e. are
* just standard pointers. This is so that the list head
* 'link' can be treated just as any other link, during
* deletion etc.
*/
#define BT_TYPE_MASK 1
#define BT_LIST 0
#define BT_ARRAY 1
@ -106,7 +106,7 @@ static __inline__ bool bpBinType(BinArray *ba, int i)
static __inline__ Element *bpBinList(BinArray *ba, int i)
{
#ifdef PARANOID
#ifdef PARANOID
ASSERT(bpBinType(ba,i)==BT_LIST,"bpBinList");
#endif
return (Element *) ba->ba_bins[i];
@ -114,7 +114,7 @@ static __inline__ Element *bpBinList(BinArray *ba, int i)
static __inline__ Element **bpBinListHead(BinArray *ba, int i)
{
#ifdef PARANOID
#ifdef PARANOID
ASSERT(bpBinType(ba,i)==BT_LIST,"bpBinList");
#endif
return (Element **) &ba->ba_bins[i];
@ -122,7 +122,7 @@ static __inline__ Element **bpBinListHead(BinArray *ba, int i)
static __inline__ BinArray *bpSubArray(BinArray *ba, int i)
{
#ifdef PARANOID
#ifdef PARANOID
ASSERT(bpBinType(ba,i)==BT_ARRAY,"bpSubArray");
#endif
return (BinArray *) ((pointertype) ba->ba_bins[i] & ~BT_TYPE_MASK);
@ -136,12 +136,12 @@ typedef struct bplane
* if reset bp_bbox may be over-sized.
*/
int bp_count; /* total number of elements in bplane */
struct bpenum *bp_enums; /* list of active enums */
struct bpenum *bp_enums; /* list of active enums */
/* HASH TABLE */
IHashTable *bp_hashTable; /* hash table
* (for expediting BP_EQUAL searches) */
/* IN BOX */
IHashTable *bp_hashTable; /* hash table
* (for expediting BP_EQUAL searches) */
/* IN BOX */
Element *bp_inBox; /* elements not yet added to bin system */
/* BINS */
@ -159,7 +159,7 @@ typedef struct bplane
typedef struct bpStack
{
int bps_state; /* where we are at rolled in one convenient
* number (see BPS_* defs in bpEnum.h)
* number (see BPS_* defs in bpEnum.h)
*/
BinArray *bps_node; /* current bin array */
int bps_i; /* current index */
@ -178,17 +178,17 @@ typedef struct bpStack
/* enumeration 'handle' */
typedef struct bpenum
{
struct bpenum *bpe_next; /* all enums for bplane linked together */
struct bpenum *bpe_next; /* all enums for bplane linked together */
BPlane *bpe_plane; /* plane being searched */
Rect bpe_srchArea; /* area being searched */
int bpe_match; /* match criteria */
char *bpe_id; /* for debug */
int bpe_subBinMinX;
int bpe_subBinMinY; /* consider subbinning
int bpe_subBinMinY; /* consider subbinning
* for bins bigger than this.
*/
Element *bpe_nextElement; /* next element in current list */
BPStack *bpe_top; /* top of stack */
Element *bpe_nextElement; /* next element in current list */
BPStack *bpe_top; /* top of stack */
BPStack bpe_stack[10000]; /* stack for tree traversal during enum */
} BPEnum;

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -49,11 +49,11 @@
* Returns size of list.
*
* ----------------------------------------------------------------------------
*/
*/
int bpCount(Element *e)
{
int i = 0;
while(e)
{
i++;
@ -69,13 +69,13 @@ int bpCount(Element *e)
*
* compute bin array statistics.
* (includes sub-arrays)
*
*
*
* Returns memory used by bplane (excluding elements)
*
* ----------------------------------------------------------------------------
*/
unsigned int bpStatBA(BinArray *ba,
*/
unsigned int bpStatBA(BinArray *ba,
int *totCount, /* total number of elements */
int *totBins, /* ret tot num of bins */
int *emptyBins, /* ret num of empty bins */
@ -91,12 +91,12 @@ unsigned int bpStatBA(BinArray *ba,
int numBins = ba->ba_numBins;
int dimX = ba->ba_dimX;
int dimY = numBins/dimX;
int w = GEO_WIDTH(bbox);
int w = GEO_WIDTH(bbox);
int h = GEO_HEIGHT(bbox);
/* initial statistics */
unsigned int mem = 0;
int tot = 0;
int tot = 0;
int bins = 0;
int emptys = 0;
int binArrays = 1;
@ -112,13 +112,13 @@ unsigned int bpStatBA(BinArray *ba,
/* add bins in this array */
bins += numBins;
/* add memory usage for this array (sub arrays already tabulated) */
/* add memory usage for this array (sub arrays already tabulated) */
if(ba) mem += sizeof(BinArray) + numBins*sizeof(void*);
/* gather stats bin by bin */
for(i=0;i<numBins;i++)
{
if(bpBinType(ba,i) != BT_ARRAY)
if(bpBinType(ba,i) != BT_ARRAY)
{
/* simple bin */
int count = bpCount(bpBinList(ba,i));
@ -160,7 +160,7 @@ unsigned int bpStatBA(BinArray *ba,
/* oversized */
if(bpBinType(ba,numBins) != BT_ARRAY)
{
/* oversized unbinned */
/* oversized unbinned */
int over = bpCount(bpBinList(ba,numBins));
tot += over;
unbinned += over;
@ -215,8 +215,8 @@ unsigned int bpStatBA(BinArray *ba,
* Returns memory used by bplane (excluding elements)
*
* ----------------------------------------------------------------------------
*/
unsigned int BPStat(BPlane *bp,
*/
unsigned int BPStat(BPlane *bp,
int *totCount, /* total number of elements */
int *inBox, /* ret num of elements in inBox */
int *totBins, /* ret tot num of bins */
@ -246,7 +246,7 @@ unsigned int BPStat(BPlane *bp,
mem += bpStatBA(bp->bp_rootNode,
&tot, /* total number of elements */
&bins, /* ret tot num of bins */
&emptys, /* ret tot num of empty bins */
&emptys, /* ret tot num of empty bins */
&binArrays, /* ret tot num of bin arrays */
&maxEff, /* ret max effective list length */
&maxCount, /* ret max count for regular bin */
@ -260,9 +260,9 @@ unsigned int BPStat(BPlane *bp,
maxEff += in;
unbinned += in;
/* add in memory usage for bplane */
/* add in memory usage for bplane */
mem += sizeof(BPlane);
mem += IHashStats2(bp->bp_hashTable,NULL,NULL);
mem += IHashStats2(bp->bp_hashTable,NULL,NULL);
/* set results */
if(totCount) *totCount = tot;
@ -277,28 +277,28 @@ unsigned int BPStat(BPlane *bp,
return mem;
}
/*
* ----------------------------------------------------------------------------
* BPStatMemory --
*
* returns memory usage of BPlane in bytes
* returns memory usage of BPlane in bytes
* (exclusive of elements contained by the BPlane)
*
* ----------------------------------------------------------------------------
*/
*/
unsigned int BPStatMemory(BPlane *bp)
{
return BPStat(bp,
NULL,
NULL,
NULL,
return BPStat(bp,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
}

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -45,7 +45,7 @@
#include "cifInt.h"
/*
/*
* elements used by test code.
*/
typedef struct rectc
@ -57,26 +57,26 @@ typedef struct rectc
/*
* ----------------------------------------------------------------------------
* bpRand --
* bpRand --
* generate a random int in given range.
*
* side effects: sets coords of input rect.
* ----------------------------------------------------------------------------
*/
*/
int bpRand(int min, int max)
{
double f = rand()/ (double) RAND_MAX; /* random number in unit interval */
return min + (int) ((max-min+1)*f);
}
/*
* ----------------------------------------------------------------------------
* bpTestRandRect --
* bpTestRandRect --
* generate a random unit rectangle inside bbox
*
* side effects: sets coords of input rect.
* ----------------------------------------------------------------------------
*/
*/
static void bpTestRandRect(Rect *r, Rect *bbox)
{
r->r_xbot = bpRand(bbox->r_xbot,bbox->r_xtop-1);
@ -91,11 +91,11 @@ static void bpTestRandRect(Rect *r, Rect *bbox)
/*
* ----------------------------------------------------------------------------
* bpTestIntersectGold --
*
* bpTestIntersectGold --
*
* check whether rc intersects list
* ----------------------------------------------------------------------------
*/
*/
static bool bpTestIntersectGold(RectC *rc, RectC *list)
{
while(list)
@ -108,20 +108,20 @@ static bool bpTestIntersectGold(RectC *rc, RectC *list)
/*
* ----------------------------------------------------------------------------
* bpTestSnowGold --
* populate square of dimension 'size' with non-overlapping random unit
* bpTestSnowGold --
* populate square of dimension 'size' with non-overlapping random unit
* rectangles. Keep adding rectangles until failures exceed successes.
* (stop when maxFailures reached.)
*
* coded with simple linked list.
*
* ---------------------------------------------------------------------------- */
* ---------------------------------------------------------------------------- */
void bpTestSnowGold(int size, bool trace)
{
int failures = 0;
int successes = 0;
int i = 0;
int crc = 0;
int crc = 0;
RectC *result = NULL;
RectC *rc = NULL;
Rect area;
@ -143,9 +143,9 @@ void bpTestSnowGold(int size, bool trace)
if(!bpTestIntersectGold(rc,result))
{
if(trace) DumpRect("success ",&rc->rc_rect);
if(trace) DumpRect("success ",&rc->rc_rect);
crc ^= i+ 3*rc->rc_rect.r_xbot+ 5*rc->rc_rect.r_ybot;
rc->rc_links[0] = result;
result = rc;
rc = NULL;
@ -154,7 +154,7 @@ void bpTestSnowGold(int size, bool trace)
}
else
{
if(trace) DumpRect("failure ",&rc->rc_rect);
if(trace) DumpRect("failure ",&rc->rc_rect);
failures++;
}
@ -179,20 +179,20 @@ void bpTestSnowGold(int size, bool trace)
}
/* ====== bplane snow test.
*/
*/
/*
* ----------------------------------------------------------------------------
* bpTestIntersect --
*
* bpTestIntersect --
*
* check whether rc intersects list
* ----------------------------------------------------------------------------
*/
*/
static bool bpTestIntersect(RectC *rc, BPlane *bp)
{
BPEnum bpe;
int result;
BPEnumInit(&bpe,bp, &rc->rc_rect, BPE_TOUCH,"bpTestIntersect");
result = (BPEnumNext(&bpe)!=NULL);
BPEnumTerm(&bpe);
@ -202,19 +202,19 @@ static bool bpTestIntersect(RectC *rc, BPlane *bp)
/*
* ----------------------------------------------------------------------------
* bpTestSnow --
* populate area with non-overlapping random unit rectangles.
* bpTestSnow --
* populate area with non-overlapping random unit rectangles.
*
* using bplane.
*
* ----------------------------------------------------------------------------
*/
*/
BPlane *bpTestSnow(int size, bool trace)
{
int failures = 0;
int successes = 0;
int i = 0;
int crc = 0;
int crc = 0;
RectC *result = NULL;
RectC *rc = NULL;
BPlane *bp = BPNew();
@ -227,7 +227,7 @@ BPlane *bpTestSnow(int size, bool trace)
area.r_ybot = 0;
area.r_xtop = size;
area.r_ytop = size;
while(failures<=successes)
{
i++;
@ -237,9 +237,9 @@ BPlane *bpTestSnow(int size, bool trace)
if(!bpTestIntersect(rc,bp))
{
if(trace) DumpRect("success ",&rc->rc_rect);
if(trace) DumpRect("success ",&rc->rc_rect);
crc ^= i+ 3*rc->rc_rect.r_xbot+ 5*rc->rc_rect.r_ybot;
BPAdd(bp,rc);
rc = NULL;
@ -247,7 +247,7 @@ BPlane *bpTestSnow(int size, bool trace)
}
else
{
if(trace) DumpRect("failure ",&rc->rc_rect);
if(trace) DumpRect("failure ",&rc->rc_rect);
failures++;
}
}
@ -257,7 +257,7 @@ BPlane *bpTestSnow(int size, bool trace)
failures,
successes,
crc);
return bp;
}
@ -266,14 +266,14 @@ BPlane *bpTestSnow(int size, bool trace)
/*
* ----------------------------------------------------------------------------
* bpTestIntersectTile --
*
* bpTestIntersectTile --
*
* check whether r intersects existing tiles
*
* ----------------------------------------------------------------------------
*/
*/
int bpTestIntersectTileFunc(Tile *tile, ClientData cd)
int bpTestIntersectTileFunc(Tile *tile, ClientData cd)
{
return 1;
}
@ -290,7 +290,7 @@ static bool bpTestIntersectTile(Rect *r, Plane *plane)
area.r_xtop += 1;
area.r_ytop += 1;
return DBPlaneEnumAreaPaint((Tile *) NULL,
return DBPlaneEnumAreaPaint((Tile *) NULL,
plane,
&area,
&DBAllButSpaceBits,
@ -300,19 +300,19 @@ static bool bpTestIntersectTile(Rect *r, Plane *plane)
/*
* ----------------------------------------------------------------------------
* bpTestSnowTile --
* populate area with non-overlapping random unit rectangles.
*
* bpTestSnowTile --
* populate area with non-overlapping random unit rectangles.
*
* using tile plane
*
* ----------------------------------------------------------------------------
*/
*/
Plane *bpTestSnowTile(int size, bool trace)
{
int failures = 0;
int successes = 0;
int i = 0;
int crc = 0;
int crc = 0;
RectC *result = NULL;
RectC *rc = NULL;
Plane *plane = DBPlaneNew((ClientData) TT_SPACE);
@ -325,7 +325,7 @@ Plane *bpTestSnowTile(int size, bool trace)
area.r_ybot = 0;
area.r_xtop = size;
area.r_ytop = size;
while(failures<=successes)
{
Rect r;
@ -335,9 +335,9 @@ Plane *bpTestSnowTile(int size, bool trace)
if(!bpTestIntersectTile(&r,plane))
{
if(trace) DumpRect("success ",&r);
if(trace) DumpRect("success ",&r);
crc ^= i+ 3*r.r_xbot + 5*r.r_ybot;
DBPaintPlane(plane, &r, CIFPaintTable, (PaintUndoInfo *) NULL);
rc = NULL;
@ -345,7 +345,7 @@ Plane *bpTestSnowTile(int size, bool trace)
}
else
{
if(trace) DumpRect("failure ",&r);
if(trace) DumpRect("failure ",&r);
failures++;
}
}

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -48,7 +48,7 @@
* return dimension of rectangle in xDir
*
* ----------------------------------------------------------------------------
*/
*/
int bpRectDim(Rect *r, bool xDir)
{
return xDir ? r->r_xtop - r->r_xbot : r->r_ytop - r->r_ybot;
@ -61,8 +61,8 @@ int bpRectDim(Rect *r, bool xDir)
* compute bin indices corresponding to area.
*
* ----------------------------------------------------------------------------
*/
static __inline__ void
*/
static __inline__ void
bpBinIndices(Rect area, /* area */
Rect binArea, /* lower left corner of bin system */
int indexBits,
@ -71,7 +71,7 @@ bpBinIndices(Rect area, /* area */
int *min, /* results go here */
int *max)
{
int ref, coord;
int ref, coord;
int index;
}

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -33,13 +33,13 @@
/*
* bplane.h --
*
* This file defines the interface between the bplane
* This file defines the interface between the bplane
* module and the rest of max.
*
* BUGS
* ====
*
* NOTE nested enums are currently broken do to dynamic binning.
* NOTE nested enums are currently broken do to dynamic binning.
*
* OVERVIEW OF BPLANES
* ===================
@ -47,17 +47,17 @@
* BPlanes ('Binned' Planes) are a data-structure for storing, sorting,
* and accessing two dimensional geometric objects.
*
* BPlanes are an alternative to Planes, i.e. corner-stitched tile planes,
* BPlanes are an alternative to Planes, i.e. corner-stitched tile planes,
* defined in the tile module.
*
* Differences between Planes and BPlanes:
* --------------------------------------
*
* 1. BPlanes are more memory efficient.
* Three pointers (+ a modest amount of binning overhead)
* replaces approximately 8 pointers (4/tile, approx. 1 space
* tile for each data tile).
*
* Three pointers (+ a modest amount of binning overhead)
* replaces approximately 8 pointers (4/tile, approx. 1 space
* tile for each data tile).
*
* 2. BPlanes use a 'next' procedure for enumeration, instead of
* function call-backs. This allows client code to be simpler
* and more readable, partcularly with regard to passing state info.
@ -67,20 +67,20 @@
*
* 3. Planes fundamentally assume objects don't overlap, while BPlanes
* make no such assumption. This makes BPlanes more generally useful.
* In particular they are a natural choice for instance uses,
* In particular they are a natural choice for instance uses,
* labels, and non-manhattan polygons (sorted on bounding boxes).
*
* 4. Planes are optimized for merging (merging recangles
* into maximal horizontal strips) and neighbor access
* (finding nearest elements to current element). BPlanes are less
* 4. Planes are optimized for merging (merging recangles
* into maximal horizontal strips) and neighbor access
* (finding nearest elements to current element). BPlanes are less
* efficient for these operations.
*
* 5. Planes generally cannot be safely modified during an enumeration,
* but BPlanes can. This makes operations such as delete, copy, and
* move simpler in BPlanes.
*
* Interface
* ---------
* Interface
* ---------
*
* 1. The structure of elements to be stored in BPlanes must be as
* follows:
@ -88,7 +88,7 @@
* typedef struct foo
* {
* struct void *foo_bpLinks[BP_NUM_LINKS];
* Rect foo_rect;
* Rect foo_rect;
* <client fields go here>
* } Foo
*
@ -97,7 +97,7 @@
* 3. The client must set foo_rect before adding the element
* to a BPlane. foo_rect must be canonical: not inverted.
*
* 4. The BPlane module does not access or modify any client fields.
* 4. The BPlane module does not access or modify any client fields.
*
* 5. The client may access/modify client fields at any time.
*
@ -116,7 +116,7 @@
* element does not belong to a bplane.
*
* 8. Concurrent (nested) enumerations of a bplane are permitted.
*
*
* 9. Elements may not be added to a bplane during active enumeration(s)
* on that bplane.
*
@ -127,7 +127,7 @@
*
* Example
* -------
*
*
* Here is a procedure that takes an array of id'ed rectangles and an
* area as input, and prints the ids of all rectangles impinging on the
* area.
@ -135,18 +135,18 @@
* typedef struct rid
* {
* struct rid *rid_bpLinks[BP_NUM_LINKS];
* Rect rid_rect;
* Rect rid_rect;
* char *rid_id;
* } RId;
*
* void findRects(RId data[], // ided rects
* int n, // number of rects in data
*
* void findRects(RId data[], // ided rects
* int n, // number of rects in data
* Rect *area) // area to search
* {
* int i;
* BPEnum bpe;
* BPlane *bp;
* RId *rid;
* RId *rid;
*
* bp = BPNew();
* for(i=0;i<n;i++) BPAdd(bp,&data[i]);
@ -157,8 +157,8 @@
* printf("%s\n", rid->rid_id);
* }
* BPEnumTerm(&bpe);
*
*/
*
*/
/* offset of a structure member (used to gen offsets for ihash stuff) */
#if _MSC_VER
@ -182,12 +182,12 @@ extern BPlane *BPNew(void);
*/
extern void BPFree(BPlane *bp);
/* add an element to a BPlane */
extern void BPAdd(BPlane *bp,
/* add an element to a BPlane */
extern void BPAdd(BPlane *bp,
void *element);
/* remove an element from a BPlane */
extern void BPDelete(BPlane *bp,
/* remove an element from a BPlane */
extern void BPDelete(BPlane *bp,
void *element);
/* begin an enumeration */
@ -201,7 +201,7 @@ extern void BPEnumInit(BPEnum *bpe, /* this procedure initializes this
char *id); /* for debugging */
/* match values */
/* enum all elements in the bplane (area arg must be null) */
/* enum all elements in the bplane (area arg must be null) */
#define BPE_ALL 0
/* element need only touch area */
#define BPE_TOUCH 1
@ -209,13 +209,13 @@ extern void BPEnumInit(BPEnum *bpe, /* this procedure initializes this
#define BPE_OVERLAP 2
/* elements rect must be identical to area */
#define BPE_EQUAL 3
/* return next element in enumeration (returns NULL if none) */
#include "bplane/bpEnum.h"
/* inlined extern void *BPEnumNext(BPEnum *bpe); */
/* terminate enumeration
*
/* terminate enumeration
*
* (unterminated enumerations can cause great inefficiency since
* all active enumerations for a bplane must be considered whenever
* an element is added or deleted.)
@ -225,14 +225,14 @@ extern void BPEnumTerm(BPEnum *bpe);
/* get current bounding box of BPlane */
extern Rect BPBBox(BPlane *bp);
/* compute number of bytes used by BPlane
/* compute number of bytes used by BPlane
* (does not count memory of the elements themselves)
*/
extern unsigned int BPStatMemory(BPlane *bp);
/* tabulate statistics on a bplane */
extern unsigned int
BPStat(BPlane *bp,
extern unsigned int
BPStat(BPlane *bp,
int *totCount, /* ret total number of elements */
int *inBox, /* ret num of elements in inBox */
int *totBins, /* ret tot num of bins */

View File

@ -1,28 +1,28 @@
// ************************************************************************
//
//
// Copyright (c) 1995-2002 Juniper Networks, Inc. All rights reserved.
//
//
// Permission is hereby granted, without written agreement and without
// license or royalty fees, to use, copy, modify, and distribute this
// software and its documentation for any purpose, provided that the
// above copyright notice and the following three paragraphs appear in
// all copies of this software.
//
//
// IN NO EVENT SHALL JUNIPER NETWORKS, INC. BE LIABLE TO ANY PARTY FOR
// DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// JUNIPER NETWORKS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
//
// JUNIPER NETWORKS, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
// NON-INFRINGEMENT.
//
//
// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND JUNIPER
// NETWORKS, INC. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
//
// ************************************************************************
@ -30,21 +30,21 @@
/*
* bplaneInt.h --
*
* This file defines constants and datastructures used internally by the
* This file defines constants and datastructures used internally by the
* bplane module, but not exported to the rest of the world.
*/
#ifndef _BPLANEINT_H
#define _BPLANEINT_H
/* Tcl linked Parameters */
extern int bpMinBAPop; /* don't sub(bin) when count less than this
extern int bpMinBAPop; /* don't sub(bin) when count less than this
*/
extern double bpMinAvgBinPop; /* try to keep average bin pop at or
* below this
extern double bpMinAvgBinPop; /* try to keep average bin pop at or
* below this
*/
/* LabeledElement
*
*
* Used in this module as elements for test bplanes.
*/
typedef struct labeledelement
@ -60,7 +60,7 @@ extern void bpBinsUpdate(BPlane *bp);
extern void bpBinAdd(BinArray *ba, Element *e);
extern BinArray *bpBinArrayBuild(Rect bbox,
extern BinArray *bpBinArrayBuild(Rect bbox,
Element *elements, /* initial elements */
bool subbin); /* subbin as needed */

View File

@ -4,16 +4,16 @@
* Input of Calma GDS-II stream format.
* Processing for cells.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -256,7 +256,7 @@ calmaExact()
}
/*
* ----------------------------------------------------------------------------
*
@ -483,7 +483,7 @@ syntaxerror:
return (calmaSkipTo(CALMA_ENDSTR));
}
/*
* ----------------------------------------------------------------------------
*
@ -530,7 +530,7 @@ calmaParseElement(filename, pnsrefs, pnpaths)
if (madeinst >= 0)
(*pnsrefs) += madeinst;
break;
case CALMA_BOUNDARY:
case CALMA_BOUNDARY:
calmaElementBoundary();
(*pnpaths)++;
break;
@ -538,11 +538,11 @@ calmaParseElement(filename, pnsrefs, pnpaths)
calmaElementBox();
(*pnpaths)++;
break;
case CALMA_PATH:
case CALMA_PATH:
calmaElementPath();
(*pnpaths)++;
break;
case CALMA_TEXT:
case CALMA_TEXT:
calmaElementText();
break;
case CALMA_NODE:
@ -969,7 +969,7 @@ calmaElementSref(filename)
return ((def->cd_flags & CDFLATGDS) ? (madeinst ? 1 : 0) : 1);
}
/* Callback function for determining if a cell has at least one subcell */
@ -1008,7 +1008,7 @@ gdsCopyPaintFunc(tile, gdsCopyRec)
DBNMPaintPlane(plane, dinfo, &targetRect, CIFPaintTable,
(PaintUndoInfo *)NULL);
return 0;
}

View File

@ -4,16 +4,16 @@
* Input of Calma GDS-II stream format.
* Low-level input.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -49,7 +49,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
bool calmaReadR8();
bool calmaSkipBytes();
/*
* ----------------------------------------------------------------------------
*
@ -180,7 +180,7 @@ calmaReadTransform(ptrans, name)
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -226,7 +226,7 @@ eof:
CalmaReadError("Unexpected EOF.\n");
return (FALSE);
}
/*
* ----------------------------------------------------------------------------
*
@ -271,7 +271,7 @@ eof:
CalmaReadError("Unexpected EOF.\n");
return (FALSE);
}
/*
* ----------------------------------------------------------------------------
*
@ -320,7 +320,7 @@ eof:
CalmaReadError("Unexpected EOF.\n");
return (FALSE);
}
/*
* ----------------------------------------------------------------------------
*
@ -387,7 +387,7 @@ calmaReadR8(pd)
*pd = d;
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -433,7 +433,7 @@ skipit:
(void) calmaSkipBytes(nbytes - CALMAHEADERLENGTH);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -481,7 +481,7 @@ eof:
CalmaReadError("Unexpected EOF.\n");
return (FALSE);
}
/*
* ----------------------------------------------------------------------------
*
@ -515,7 +515,7 @@ calmaSkipTo(what)
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Input of Calma GDS-II stream format.
* Processing of paint (paths, boxes, and boundaries) and text.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -184,7 +184,7 @@ calmaReadPoint(p, iscale)
p->p_y /= calmaReadScale2;
}
/*
* ----------------------------------------------------------------------------
*
@ -233,7 +233,7 @@ calmaElementBoundary()
plane = cifCurReadPlanes[ciftype];
/* Read the path itself, building up a path structure */
if (!calmaReadPath(&pathheadp, (plane == NULL) ? 0 : 1))
if (!calmaReadPath(&pathheadp, (plane == NULL) ? 0 : 1))
{
if (plane != NULL)
CalmaReadError("Error while reading path for boundary/box; ignored.\n");
@ -347,7 +347,7 @@ calmaElementBoundary()
DBPlaceCell(use, cifReadCellDef);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -502,10 +502,10 @@ calmaElementPath()
* Allow zero-width paths; we will ignore them later.
*/
width = 0;
PEEKRH(nbytes, rtype)
PEEKRH(nbytes, rtype)
if (nbytes > 0 && rtype == CALMA_WIDTH)
{
if (!calmaReadI4Record(CALMA_WIDTH, &width))
if (!calmaReadI4Record(CALMA_WIDTH, &width))
{
CalmaReadError("Error in reading WIDTH in calmaElementPath()\n") ;
return;
@ -558,7 +558,7 @@ calmaElementPath()
/* Read the points in the path */
savescale = calmaReadScale1;
if (!calmaReadPath(&pathheadp, 2))
if (!calmaReadPath(&pathheadp, 2))
{
CalmaReadError("Improper path; ignored.\n");
return;
@ -714,7 +714,7 @@ calmaElementText()
cifnum = CIFCalmaLayerToCifLayer(layer, textt, cifCurReadStyle);
if (cifnum < 0)
{
if (cifCurReadStyle->crs_flags & CRF_IGNORE_UNKNOWNLAYER_LABELS)
if (cifCurReadStyle->crs_flags & CRF_IGNORE_UNKNOWNLAYER_LABELS)
type = -1;
else {
calmaLayerError("Label on unknown layer/datatype", layer, textt);
@ -781,7 +781,7 @@ calmaElementText()
int width;
/* Use WIDTH value to set the font size */
if (!calmaReadI4Record(CALMA_WIDTH, &width))
if (!calmaReadI4Record(CALMA_WIDTH, &width))
{
CalmaReadError("Error in reading WIDTH in calmaElementText()\n") ;
return;
@ -865,7 +865,7 @@ calmaElementText()
* a flag for that in the "cifoutput" section of the techfile.
*/
#if 0
#if 0
{
static bool algmsg = FALSE;
@ -874,7 +874,7 @@ calmaElementText()
char *savstring;
for (cp = textbody; *cp; cp++)
{
if (*cp <= ' ' | *cp > '~')
if (*cp <= ' ' | *cp > '~')
{
if (!changed)
{
@ -883,7 +883,7 @@ calmaElementText()
}
if (*cp == '\r' && *(cp+1) == '\0')
*cp = '\0';
else if (*cp == '\r')
else if (*cp == '\r')
*cp = '_';
else if (*cp == ' ')
*cp = '_';
@ -1006,7 +1006,7 @@ calmaElementText()
/* done with textbody */
if (textbody != NULL) freeMagic(textbody);
}
/*
* ----------------------------------------------------------------------------
*
@ -1113,7 +1113,7 @@ calmaReadPath(pathheadpp, iscale)
}
return (*pathheadpp != NULL);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Input of Calma GDS-II stream format.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -115,7 +115,7 @@ HashTable calmaDefInitHash;
/* Common stuff to ignore */
int calmaElementIgnore[] = { CALMA_ELFLAGS, CALMA_PLEX, -1 };
/*
* ----------------------------------------------------------------------------
*
@ -144,7 +144,7 @@ CalmaReadFile(file, filename)
static int hdrSkip[] = { CALMA_FORMAT, CALMA_MASK, CALMA_ENDMASKS,
CALMA_REFLIBS, CALMA_FONTS, CALMA_ATTRTABLE,
CALMA_STYPTABLE, CALMA_GENERATIONS, -1 };
static int skipBeforeLib[] = { CALMA_LIBDIRSIZE, CALMA_SRFNAME,
static int skipBeforeLib[] = { CALMA_LIBDIRSIZE, CALMA_SRFNAME,
CALMA_LIBSECUR, -1 };
/* We will use full cell names as keys in this hash table */
@ -181,7 +181,7 @@ CalmaReadFile(file, filename)
if (version < 600)
TxPrintf("Library written using GDS-II Release %d.0\n", version);
else
TxPrintf("Library written using GDS-II Release %d.%d\n",
TxPrintf("Library written using GDS-II Release %d.%d\n",
version / 100, version % 100);
if (!calmaSkipExact(CALMA_BGNLIB)) goto done;
calmaSkipSet(skipBeforeLib);
@ -326,7 +326,7 @@ calmaParseUnits()
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -359,7 +359,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
if (CIFWarningLevel == CIF_WARN_NONE) return;
if ((calmaTotalErrors < 100) || (CIFWarningLevel != CIF_WARN_LIMIT))
{
{
filepos = ftello(calmaInputFile);
if (CIFWarningLevel == CIF_WARN_REDIRECT)
@ -370,7 +370,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
cifReadCellDef->cd_name);
fprintf(calmaErrorFile, "(byte position %"DLONG_PREFIX"ld): ",
(dlong)filepos);
fprintf(calmaErrorFile, format, a1, a2, a3, a4, a5, a6, a7,
fprintf(calmaErrorFile, format, a1, a2, a3, a4, a5, a6, a7,
a8, a9, a10);
}
}
@ -386,7 +386,7 @@ CalmaReadError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
TxError("Error limit set: Remaining errors will not be reported.\n");
}
}
/*
* ----------------------------------------------------------------------------
*
@ -429,7 +429,7 @@ calmaUnexpected(wanted, got)
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -478,7 +478,7 @@ calmaRecordName(rtype)
return (calmaRecordNames[rtype]);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Output of Calma GDS-II stream format.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -118,7 +118,7 @@ typedef struct BT1 {
int bt_points; /* Number of points in this list */
struct BT1 *bt_next; /* Next polygon record */
} BoundaryTop;
/*--------------------------------------------------------------*/
/* Number assigned to each cell */
@ -146,7 +146,7 @@ HashTable calmaPrefixHash;
/* Imports */
extern time_t time();
/* -------------------------------------------------------------------- */
/*
@ -238,7 +238,7 @@ static char calmaMapTablePermissive[] =
'x', 'y', 'z', '{', '|', '}', '~', 0, /* x - DEL */
};
/*
* ----------------------------------------------------------------------------
*
@ -340,7 +340,7 @@ CalmaWrite(rootDef, f)
TxPrintf("%d problems occurred. See feedback entries.\n", problems);
/*
* Destroy all contact cell definitions
* Destroy all contact cell definitions
*/
if (CalmaContactArrays) calmaDelContacts();
@ -348,7 +348,7 @@ CalmaWrite(rootDef, f)
HashKill(&calmaPrefixHash);
return (good);
}
/*
* ----------------------------------------------------------------------------
@ -498,7 +498,7 @@ calmaDumpStructure(def, outf, calmaDefHash, filename)
/* for handling any AREF or SREF names, which need name */
/* checks. */
while (1)
while (1)
{
int datatype;
@ -785,7 +785,7 @@ calmaProcessDef(def, outf)
* not, or if there is any problem obtaining the original cell
* definition, resort to writing out magic's version of the def,
* and print a warning message.
*
*
* Treat the lack of a GDS_START property as an indication
* that we should treat this cell like a reference-only
* cell. That is, the instance will be called but no
@ -912,7 +912,7 @@ calmaProcessDef(def, outf)
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -1315,7 +1315,7 @@ calmaWriteUseFunc(use, f)
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -1346,7 +1346,7 @@ calmaOutStructName(type, def, f)
int calmanum;
char *table;
if (CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS)
if (CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS)
{
table = calmaMapTablePermissive;
} else {
@ -1545,7 +1545,7 @@ calmaWriteContacts(f)
/* the proper contact cut drawn. It is turned on again at the end */
/* of the routine. Note that this routine is not called unless */
/* CalmaContactArrays is TRUE. */
CalmaContactArrays = FALSE;
DBEnumerateTypes(&tMask);
@ -1649,7 +1649,7 @@ calmaDelContacts()
* this should be most efficient.
*
* Side effects:
* May allocate memory.
* May allocate memory.
* ---------------------------------------------------------------------------
*/
@ -1756,7 +1756,7 @@ calmaRemoveDegenerate(blist)
freeMagic(curseg->lb_next);
freeMagic(curseg);
/* Make sure record doesn't point to a free'd segment */
bounds->bt_first = lastseg;
bounds->bt_points -= 2;
@ -1806,7 +1806,7 @@ calmaRemoveColinear(blist)
(lastseg->lb_start.p_y == curseg->lb_next->lb_start.p_y)))
{
lastseg->lb_next = curseg->lb_next;
/* Make sure record doesn't point to a free'd segment */
if (curseg == bounds->bt_first) bounds->bt_first = lastseg;
@ -1872,7 +1872,7 @@ calmaRemoveColinear(blist)
* Still, each segment is never checked against more than 200 points,
* because when a boundary reaches this number (the maximum for GDS
* boundary records), the record will tend to be skipped (it should
* probably be output here. . .)
* probably be output here. . .)
*
* Results:
* None.
@ -1885,7 +1885,7 @@ calmaRemoveColinear(blist)
void
calmaMergeSegments(edge, blist, num_points)
LinkedBoundary *edge;
LinkedBoundary *edge;
BoundaryTop **blist;
int num_points;
{
@ -1933,7 +1933,7 @@ calmaMergeSegments(edge, blist, num_points)
freeMagic(compseg);
freeMagic(curseg);
/* Make sure the record doesn't point to the free'd segment */
if (compseg == bounds->bt_first) bounds->bt_first = complast;
bounds->bt_points += num_points - 2;
@ -1944,7 +1944,7 @@ calmaMergeSegments(edge, blist, num_points)
}
/* If still no connecting edge was found, or if we overflowed the GDS max */
/* number of records for a boundary, then start a new entry. */
/* number of records for a boundary, then start a new entry. */
make_new_bound:
@ -2029,7 +2029,7 @@ calmaProcessBoundary(blist, cos)
{
if (lbref != listtop)
TxPrintf("->");
else
else
lbstop = listtop;
switch(lbref->lb_type)
@ -2343,7 +2343,7 @@ done_searches:
/* tiles, we may have expanded it. This could use a LOT of */
/* optimizing. 1) remove colinear points in calmaAddSegment */
/* when both subsegments are external paths, and 2) here, */
/* take the shortest path to making "edge" exactly 4 points.*/
/* take the shortest path to making "edge" exactly 4 points.*/
/* Note that in non-Manhattan mode, num_points may be 3. */
if (num_points != 4)
@ -2484,7 +2484,7 @@ calmaWritePaintFunc(tile, cos)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -2648,7 +2648,7 @@ calmaWriteLabelFunc(lab, type, f)
calmaOutRH(4, CALMA_ENDEL, CALMA_NODATA, f);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -2704,7 +2704,7 @@ calmaOutHeader(rootDef, f)
if (CIFCurStyle->cs_flags & CWF_ANGSTROMS) mum = 1e-10;
calmaOutR8(mum, f); /* Meters per database unit */
}
/*
* ----------------------------------------------------------------------------
*
@ -2737,7 +2737,7 @@ calmaOutDate(t, f)
calmaOutI2(datep->tm_min, f);
calmaOutI2(datep->tm_sec, f);
}
/*
* ----------------------------------------------------------------------------
*
@ -2769,7 +2769,7 @@ calmaOutStringRecord(type, str, f)
char *table, *locstr, *origstr = NULL;
char *locstrprv; /* Added by BSI */
if(CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS)
if(CIFCurStyle->cs_flags & CWF_PERMISSIVE_LABELS)
{
table = calmaMapTablePermissive;
} else {
@ -2917,7 +2917,7 @@ calmaOutR8(d, f)
}
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* This file defines things that are exported by the
* calma module to the rest of the world.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* rcsid $Header: /usr/cvsroot/magic-8.0/calma/calma.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $

View File

@ -4,16 +4,16 @@
* This file defines constants used internally by the calma
* module, but not exported to the rest of the world.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* rcsid $Header: /usr/cvsroot/magic-8.0/calma/calmaInt.h,v 1.2 2010/06/24 12:37:15 tim Exp $
@ -157,7 +157,7 @@ extern int calmaLArtype;
# define ntohs(x) (x)
# define htonl(x) (x)
# define htons(x) (x)
# endif
# endif
#endif
typedef union { char uc[2]; unsigned short us; } TwoByteInt;

View File

@ -4,16 +4,16 @@
* tile information, using one of the styles read from the
* technology file.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -135,7 +135,7 @@ cifPaintFunc(tile, table)
* needed for implants on FET gates to maintain the implant width for
* small gates, the "rect_only" requirement is not particularly
* constraining.
*
*
* ----------------------------------------------------------------------------
*/
@ -352,7 +352,7 @@ cifGrowGridFunc(tile, table)
* create a euclidean distance to the edge of growDistance while
* keeping corner points on-grid. This requires a substantially
* different algorithm from cifGrowFunc.
*
*
* Results:
* Always returns 0 to keep the search alive.
*
@ -733,7 +733,7 @@ cifBloatFunc(tile, clientData)
cifArea.r_ytop *= cifScale;
/* This is a modified version of the nonmanhattan grow function. */
/* We grow only in the direction of the diagonal. */
/* We grow only in the direction of the diagonal. */
/* This will not work in all situations! Corner extensions are not */
/* considered (but should be, for completeness). */
@ -839,7 +839,7 @@ cifBloatFunc(tile, clientData)
* Start with the left side, and output the bloats along that
* side, if any.
*/
tilestop = tileArea.r_ytop;
cifstop = cifArea.r_ytop;
type = oldType;
@ -1144,7 +1144,7 @@ cifBloatAllFunc(tile, bls)
t = (Tile *) STACKPOP(BloatStack);
if (t->ti_client != (ClientData)CIF_PENDING) continue;
t->ti_client = (ClientData)CIF_PROCESSED;
/* Get the tile into CIF coordinates. */
TiToRect(t, &area);
@ -1441,7 +1441,7 @@ cifSquaresStripFunc(tile, stripsData)
if ((height < stripsData->size) || (height >=
(stripsData->size + stripsData->pitch)))
return 0;
/* Ignore strips that are part of a larger */
/* collection of non-manhattan geometry. */
@ -1487,7 +1487,7 @@ cifSquaresStripFunc(tile, stripsData)
TTMaskHasType(&DBSpaceBits, TiGetBottomType(tp)))
tp = BL(tp);
segstart = MAX(LEFT(tile), RIGHT(tp));
if (segend <= segstart) break;
if (segend <= segstart) break;
/* Find matching segments along the bottom of the tile */
@ -1504,7 +1504,7 @@ cifSquaresStripFunc(tile, stripsData)
TTMaskHasType(&DBSpaceBits, TiGetTopType(tp2)))
tp2 = TR(tp2);
matchend = MIN(LEFT(tp2), segend);
if (matchend <= matchstart) break;
if (matchend <= matchstart) break;
/* Process the strip */
@ -1615,14 +1615,14 @@ cifRectBoundingBox(op, cellDef, plane)
simple = TRUE;
tile = plane->pl_hint;
TiToRect(tile, &bbox);
PUSHTILE(tile, BoxStack);
while (!StackEmpty(BoxStack))
{
t = (Tile *) STACKPOP(BoxStack);
if (t->ti_client != (ClientData)CIF_PENDING) continue;
t->ti_client = (ClientData)CIF_PROCESSED;
/* Adjust bounding box */
TiToRect(t, &area);
GeoInclude(&area, &bbox);
@ -1739,7 +1739,7 @@ cifRectBoundingBox(op, cellDef, plane)
* tile-based contact cut generation by collecting all connected tiles
* in an area, and placing cuts relative to that area's bounding box.
* A tile search is used to select the parts of any non-rectangular area
* inside the bounding box that allow contact cuts, which lets cuts
* inside the bounding box that allow contact cuts, which lets cuts
* be placed across tile boundaries and inside non-manhattan tiles.
* It also allows contacts to be placed inside complex structures such
* as (possibly intersecting) guardrings.
@ -1802,7 +1802,7 @@ cifSquaresFillArea(op, cellDef, plane)
while (stripList != NULL)
{
Rect stripLess = stripList->area;
if (diff > 0)
{
if (stripList->vertical)
@ -1888,14 +1888,14 @@ cifSquaresFillArea(op, cellDef, plane)
simple = TRUE;
tile = plane->pl_hint;
TiToRect(tile, &bbox);
PUSHTILE(tile, CutStack);
while (!StackEmpty(CutStack))
{
t = (Tile *) STACKPOP(CutStack);
if (t->ti_client != (ClientData)CIF_PENDING) continue;
t->ti_client = (ClientData)CIF_PROCESSED;
/* Adjust bounding box */
TiToRect(t, &area);
GeoInclude(&area, &bbox);
@ -2139,7 +2139,7 @@ cifSlotsFillArea(op, cellDef, plane)
while (stripList != NULL)
{
Rect stripLess = stripList->area;
if (diff > 0)
{
if (stripList->vertical)
@ -2230,14 +2230,14 @@ cifSlotsFillArea(op, cellDef, plane)
simple = TRUE;
tile = plane->pl_hint;
TiToRect(tile, &bbox);
PUSHTILE(tile, CutStack);
while (!StackEmpty(CutStack))
{
t = (Tile *) STACKPOP(CutStack);
if (t->ti_client != (ClientData)CIF_PENDING) continue;
t->ti_client = (ClientData)CIF_PROCESSED;
/* Adjust bounding box */
TiToRect(t, &area);
GeoInclude(&area, &bbox);
@ -2478,7 +2478,7 @@ cifBloatMaxFunc(tile, op)
if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000;
else bloat = 10000000;
for (t = BL(tile); BOTTOM(t) < TOP(tile); t = RT(t))
{
{
otherType = TiGetType(t);
if (otherType == type) continue;
tmp = bloats->bl_distance[otherType];
@ -2496,7 +2496,7 @@ cifBloatMaxFunc(tile, op)
if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000;
else bloat = 10000000;
for (t = RT(tile); RIGHT(t) > LEFT(tile); t = BL(t))
{
{
otherType = TiGetType(t);
if (otherType == type) continue;
tmp = bloats->bl_distance[otherType];
@ -2510,11 +2510,11 @@ cifBloatMaxFunc(tile, op)
area.r_ytop += bloat;
/* Now the right side. */
if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000;
else bloat = 10000000;
for (t = TR(tile); TOP(t) > BOTTOM(tile); t = LB(t))
{
{
otherType = TiGetType(t);
if (otherType == type) continue;
tmp = bloats->bl_distance[otherType];
@ -2532,7 +2532,7 @@ cifBloatMaxFunc(tile, op)
if (op->co_opcode == CIFOP_BLOATMAX) bloat = -10000000;
else bloat = 10000000;
for (t = LB(tile); LEFT(t) < RIGHT(tile); t = TR(t))
{
{
otherType = TiGetType(t);
if (otherType == type) continue;
tmp = bloats->bl_distance[otherType];
@ -3004,7 +3004,7 @@ cifSquareGridFunc(area, op, rows, columns, cut)
*rows = 0;
return 0;
}
*rows = (locarea.r_ytop - bottom + squares->sq_sep) / pitch;
if (*rows == 0) return 0;
@ -3023,7 +3023,7 @@ cifSquareGridFunc(area, op, rows, columns, cut)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -3104,7 +3104,7 @@ cifSrTiles(cifOp, area, cellDef, temps, func, cdArg)
(void) DBSrPaintArea((Tile *) NULL, *temps, &TiPlaneRect,
&CIFSolidBits, func, (ClientData) cdArg);
}
/*
* ----------------------------------------------------------------------------
*
@ -3191,7 +3191,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
&DBSpaceBits, cifPaintFunc,
(ClientData) CIFEraseTable);
break;
/* For OR, just use cifPaintFunc to OR the areas of all
* relevant tiles into plane. HOWEVER, if the co_client
* record is non-NULL and CalmaContactArrays is TRUE,
@ -3269,7 +3269,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
(ClientData) CIFPaintTable);
}
break;
/* For ANDNOT, do exactly the same thing as OR, except erase
* instead of paint.
*/
@ -3279,12 +3279,12 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
cifSrTiles(op, area, cellDef, temps, cifPaintFunc,
(ClientData) CIFEraseTable);
break;
/* For GROW, just find all solid tiles in the current plane,
* and paint a larger version into a new plane. The switch
* the current and new planes.
*/
case CIFOP_GROW:
growDistance = op->co_distance;
DBClearPaintPlane(nextPlane);
@ -3324,7 +3324,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
curPlane = nextPlane;
nextPlane = temp;
break;
/* SHRINK is just like grow except work from the space tiles. */
case CIFOP_SHRINK:
@ -3340,7 +3340,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
curPlane = nextPlane;
nextPlane = temp;
break;
case CIFOP_CLOSE:
growDistance = op->co_distance;
DBClearPaintPlane(nextPlane);
@ -3362,7 +3362,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
cifSrTiles(op, area, cellDef, temps,
cifBloatFunc, op->co_client);
break;
case CIFOP_BLOATMAX:
case CIFOP_BLOATMIN:
cifPlane = curPlane;
@ -3377,7 +3377,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
cifSrTiles(op, area, cellDef, temps,
cifBloatAllFunc, (ClientData)&bls);
break;
case CIFOP_SQUARES:
if (CalmaContactArrays == FALSE)
{
@ -3458,7 +3458,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
bbox.r_ybot *= cifScale;
bbox.r_ytop *= cifScale;
DBNMPaintPlane(cifPlane, CIF_SOLIDTYPE, &bbox,
CIFPaintTable, (PaintUndoInfo *)NULL);
CIFPaintTable, (PaintUndoInfo *)NULL);
}
break;
@ -3493,7 +3493,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
bbox.r_ybot *= cifScale;
bbox.r_ytop *= cifScale;
DBNMPaintPlane(curPlane, CIF_SOLIDTYPE, &bbox,
CIFPaintTable, (PaintUndoInfo *)NULL);
CIFPaintTable, (PaintUndoInfo *)NULL);
break;
default:
@ -3503,7 +3503,7 @@ CIFGenLayer(op, area, cellDef, temps, clientdata)
return curPlane;
}
/*
* ----------------------------------------------------------------------------
*
@ -3621,7 +3621,7 @@ CIFGen(cellDef, area, planes, layers, replace, genAllPlanes, clientdata)
else planes[i] = new[i];
}
}
/*
* ----------------------------------------------------------------------------
*
@ -3670,7 +3670,7 @@ cifClipPlane(plane, clip)
DBPaintPlane(plane, &r, CIFEraseTable, (PaintUndoInfo *) NULL);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -3725,7 +3725,7 @@ cifGenClip(area, expanded, clip)
}
else clip->r_ytop = expanded->r_ytop = area->r_ytop;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -8,16 +8,16 @@
* separately. This module computes the extra CIF that may be
* needed.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -82,7 +82,7 @@ static CIFLayer *CurCifLayer;
(dst)->r_ybot = (src)->r_ybot * scale; \
(dst)->r_xtop = (src)->r_xtop * scale; \
(dst)->r_ytop = (src)->r_ytop * scale;
/*
* ----------------------------------------------------------------------------
@ -148,7 +148,7 @@ CIFInitCells()
CIFDummyUse = DBCellNewUse(CIFTotalDef, (char *) NULL);
DBSetTrans (CIFDummyUse, &GeoIdentityTransform);
}
/*
* ----------------------------------------------------------------------------
*
@ -198,7 +198,7 @@ cifHierCleanup()
SigEnableInterrupts();
}
/*
* ----------------------------------------------------------------------------
*
@ -274,7 +274,7 @@ cifHierCopyFunc(tile, cxp)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -317,7 +317,7 @@ cifHierCellFunc(scx)
GEO_EXPAND(&scx->scx_area, CIFCurStyle->cs_radius, &newscx.scx_area);
(void) DBTreeSrTiles(&newscx, &CIFCurStyle->cs_yankLayers, 0,
cifHierCopyFunc, (ClientData) CIFComponentDef);
/* Set CIFErrorDef to NULL to ignore errors here... these will
* get reported anyway when the cell is CIF'ed non-hierarchically,
* so there's no point in making a second report here.
@ -329,7 +329,7 @@ cifHierCellFunc(scx)
&CIFCurStyle->cs_hierLayers, FALSE, TRUE);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -370,7 +370,7 @@ cifHierErrorFunc(tile, checkArea)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -453,7 +453,7 @@ cifHierPaintFunc(tile, plane)
CIFTileOps += 1;
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -482,7 +482,7 @@ cifCheckAndErase(style)
int i;
/* Process all of the bits of CIF in CIFComponentPlanes. */
for (i=0; i<style->cs_nLayers; i++)
{
CIFErrorLayer = i;
@ -492,7 +492,7 @@ cifCheckAndErase(style)
(ClientData) CIFTotalPlanes[i]);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -548,7 +548,7 @@ CIFGenSubcells(def, area, output)
* out if there are any subcell interactions within one
* radius of the square.
*/
totalArea = *area;
GeoClip(&totalArea, &def->cd_bbox);
for (y = totalArea.r_ybot; y < totalArea.r_ytop; y += stepSize)
@ -565,12 +565,12 @@ CIFGenSubcells(def, area, output)
GEO_EXPAND(&square, radius, &square);
if (!DRCFindInteractions(def, &square, radius,
&interaction)) continue;
/* We've found an interaction. Flatten it into CIFTotalUse, then
* make CIF from what's flattened. Yank extra material to
* ensure that CIF is generated correctly.
*/
GEO_EXPAND(&interaction, CIFCurStyle->cs_radius, &scx.scx_area);
(void) DBTreeSrTiles(&scx, &CIFCurStyle->cs_yankLayers, 0,
cifHierCopyFunc, (ClientData) CIFTotalDef);
@ -582,10 +582,10 @@ CIFGenSubcells(def, area, output)
* and generate CIF for each subcell individually. OR this
* combined CIF together into CIFComponentPlanes.
*/
scx.scx_area = interaction;
(void) DBCellSrArea(&scx, cifHierCellFunc, (ClientData) NULL);
/* Also generate CIF for the paint in the parent alone. Ignore
* CIF generation errors here, since they will already have been
* recorded when the parent was CIF'ed by itself.
@ -599,14 +599,14 @@ CIFGenSubcells(def, area, output)
* CIF, then erase the piece stuff from the overall, and
* throw away the pieces.
*/
CIFErrorDef = def;
cifCheckAndErase(CIFCurStyle);
/* Lastly, paint everything from the pieces into the result
* planes.
*/
oldTileOps2 = CIFTileOps;
for (i=0; i<CIFCurStyle->cs_nLayers; i++)
{
@ -619,11 +619,11 @@ CIFGenSubcells(def, area, output)
cifHierCleanup();
}
CIFHierTileOps += CIFTileOps - oldTileOps;
UndoEnable();
}
/*
* ----------------------------------------------------------------------------
*
@ -684,14 +684,14 @@ cifHierElementFunc(use, transform, x, y, checkArea)
return 0;
}
/*
* ---------------------------------------------------------------------------
* cifGrowSliver() --
*
* This function is passed the address of a "sliver" rectangle. It then
* grows the shortest dimension of the sliver so that it is at least minimum
* grows the shortest dimension of the sliver so that it is at least minimum
* width. The minimum width is found through the variable CurCifLayer which
* identifies the current layer being generated. A "minwidth" command has been
* added to the cifoutput section for which the minimum width of each layer
@ -744,7 +744,7 @@ cifGrowSliver(tile, area)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -794,7 +794,7 @@ cifHierPaintArrayFunc(tile)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -852,7 +852,7 @@ cifHierArrayFunc(scx, output)
radius = CIFCurStyle->cs_radius;
if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi))
return 2;
/* We only want interactions between neighboring cells, so reduce */
/* the array size to at most 2x2, process, then restore the */
/* original array count. */
@ -869,7 +869,7 @@ cifHierArrayFunc(scx, output)
* of the parent. If the array is 1-dimensional, we set the
* corresponding spacing to an impossibly large distance.
*/
childArea.r_xbot = 0;
childArea.r_ybot = 0;
@ -956,7 +956,7 @@ cifHierArrayFunc(scx, output)
CIFErrorDef = use->cu_parent;
CIFGen(CIFTotalDef, &B, CIFTotalPlanes, &CIFCurStyle->cs_hierLayers,
FALSE, TRUE);
/* D */
D.r_xbot = use->cu_bbox.r_xtop - xsep + radius;
@ -977,7 +977,7 @@ cifHierArrayFunc(scx, output)
/* Remove redundant CIF that's already in the children, and
* make sure everything in the kids is in the parent too.
*/
CIFErrorDef = use->cu_parent;
cifCheckAndErase(CIFCurStyle);
@ -986,7 +986,7 @@ cifHierArrayFunc(scx, output)
* be replicated many times over to cover each of the array
* interaction areas.
*/
oldTileOps = CIFTileOps;
for (i=0; i<CIFCurStyle->cs_nLayers; i++)
{
@ -1037,7 +1037,7 @@ cifHierArrayFunc(scx, output)
(void) DBSrPaintArea((Tile *) NULL, CIFTotalPlanes[i],
&cifArea, &CIFSolidBits, cifHierPaintArrayFunc,
(ClientData) NULL);
/* The right edge of the array (from D). */
cifHierXSpacing = 0;
@ -1048,7 +1048,7 @@ cifHierArrayFunc(scx, output)
(void) DBSrPaintArea((Tile *) NULL, CIFTotalPlanes[i],
&cifArea, &CIFSolidBits, cifHierPaintArrayFunc,
(ClientData) NULL);
/* The core of the array (from A and B). This code is a bit
* tricky in order to work correctly even for arrays where
* radius < ysep. The "if" statement handles this case.
@ -1081,7 +1081,7 @@ cifHierArrayFunc(scx, output)
return 2;
}
/*
* ----------------------------------------------------------------------------
*
@ -1122,7 +1122,7 @@ CIFGenArrays(def, area, output)
/* Bill all tile operations here to hierarchical processing in
* addition to adding to the total.
*/
oldTileOps = CIFTileOps;
if (output == NULL)

View File

@ -4,16 +4,16 @@
* Defines things shared internally by the cif module of Magic,
* but not generally needed outside the cif module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* rcsid "$Header: /usr/cvsroot/magic-8.0/cif/CIFint.h,v 1.3 2008/12/04 17:10:29 tim Exp $"
@ -198,7 +198,7 @@ typedef struct
*/
int min_width; /* the minimum width rule in centi-microns
* for the layer. This is used by Grow Sliver
* to generate drc correct parent slivers
* to generate drc correct parent slivers
*/
#ifdef THREE_D
int cl_renderStyle; /* Style to render CIF layer with */
@ -258,7 +258,7 @@ typedef struct cifstyle
* file more readable). Default of 1.
* Unused for GDS input/output.
*/
int cs_expander; /* cs_scaleFactor / cs_expander = scale in
int cs_expander; /* cs_scaleFactor / cs_expander = scale in
* centimicrons. Default of 1. Value 10
* means cs_scaleFactor is measured in
* nanometers (millimicrons)

View File

@ -3,16 +3,16 @@
* This file contains global information for the CIF module,
* such as performance statistics.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -76,7 +76,7 @@ static int cifTotalHierRects = 0;
global CellDef *CIFErrorDef; /* Definition in which to record errors. */
global int CIFErrorLayer; /* Index of CIF layer associated with errors.*/
/*
* ----------------------------------------------------------------------------
*
@ -128,7 +128,7 @@ CIFPrintStats()
* Results:
* Internal units-to-(nanometers * convert) conversion factor (float).
* Use convert = 1000 for centimicrons-to-microns conversion
*
*
* Side effects:
* None.
*
@ -212,7 +212,7 @@ CIFPrintStyle(dolist, doforall, docurrent)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -269,7 +269,7 @@ CIFSetStyle(name)
TxError("\"%s\" is not one of the CIF output styles Magic knows.\n", name);
CIFPrintStyle(FALSE, TRUE, TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -346,7 +346,7 @@ CIFNameToMask(name, result, depend)
TxError(".\n");
return FALSE;
}
/*
* ----------------------------------------------------------------------------
*
@ -385,7 +385,7 @@ CIFError(area, message)
DBWFeedbackAdd(area, msg, CIFErrorDef, CIFCurStyle->cs_scaleFactor,
STYLE_PALEHIGHLIGHTS);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -5,16 +5,16 @@
* both definitions and calls, and user-defined features
* like labels.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -103,7 +103,7 @@ typedef struct {
*/
char *cifSubcellId = NULL;
/*
* ----------------------------------------------------------------------------
*
@ -150,7 +150,7 @@ CIFReadCellInit(ptrkeys)
* cifForgetCell --
*
* This local procedure is used to find a cell in the subcell
* table and remove its CellDef entry.
* table and remove its CellDef entry.
*
* Results:
* FALSE if no such entry was found, otherwise TRUE.
@ -234,7 +234,7 @@ cifUniqueCell(cifNum)
CIFReadError("Warning: cell definition %d reused.\n", cifNum);
}
/*
* ----------------------------------------------------------------------------
*
@ -346,7 +346,7 @@ CIFScalePlanes(scalen, scaled, planearray)
*
* ----------------------------------------------------------------------------
*/
void
CIFInputRescale(n, d)
int n, d;
@ -418,7 +418,7 @@ bool
CIFParseStart()
{
int number;
if (cifSubcellBeingRead)
{
CIFReadError("definition start inside other definition; ignored.\n");
@ -489,7 +489,7 @@ CIFParseStart()
cifCurReadPlanes = cifSubcellPlanes;
return TRUE;
}
/*
* ----------------------------------------------------------------------------
@ -573,7 +573,7 @@ CIFPaintCurrent(filetype)
plane = CIFGenLayer(cifCurReadStyle->crs_layers[i]->crl_ops,
&TiPlaneRect, (CellDef *) NULL, cifCurReadPlanes);
/* Generate a paint/erase table, then paint from the CIF
* plane into the current Magic cell.
*/
@ -607,7 +607,7 @@ CIFPaintCurrent(filetype)
* is set in flags. This condition has occurred, though, and
* needs to be debugged.
*/
if ((cifReadCellDef->cd_flags & CDFLATGDS) &&
if ((cifReadCellDef->cd_flags & CDFLATGDS) &&
(cifReadCellDef->cd_client != (ClientData)CLIENTDEFAULT))
parray = (Plane **)cifReadCellDef->cd_client;
else
@ -672,7 +672,7 @@ CIFPaintCurrent(filetype)
DBSrPaintArea((Tile *) NULL, plane, &TiPlaneRect,
&CIFSolidBits, cifPaintCurrentFunc,
(ClientData)type);
}
}
/* Recycle the plane, which was dynamically allocated. */
@ -827,7 +827,7 @@ cifPaintCurrentFunc(tile, type)
return 0; /* To keep the search alive. */
}
/*
* ----------------------------------------------------------------------------
*
@ -855,12 +855,12 @@ CIFParseFinish()
CIFSkipToSemi();
return FALSE;
}
if (cifSubcellId != NULL)
if (cifSubcellId != NULL)
{
CIFReadError("pending call identifier %s discarded.\n", cifSubcellId);
(void) StrDup(&cifSubcellId, (char *) NULL);
}
/* Take the `F'. */
TAKE();
@ -869,7 +869,7 @@ CIFParseFinish()
* the appropriate cell of the database. Then restore the saved
* layer info.
*/
CIFPaintCurrent(FILE_CIF);
DBAdjustLabels(cifReadCellDef, &TiPlaneRect);
@ -882,7 +882,7 @@ CIFParseFinish()
cifCurReadPlanes = cifEditCellPlanes;
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -922,7 +922,7 @@ CIFParseDelete()
CIFSkipToSemi();
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -954,7 +954,7 @@ cifParseName()
for (ch = PEEK() ; ch == ' ' || ch == '\t' ; ch = PEEK())
TAKE();
/* Read the string. */
bufferp = &buffer[0];
@ -965,7 +965,7 @@ cifParseName()
*bufferp = '\0';
return buffer;
}
/*
* ----------------------------------------------------------------------------
*
@ -998,7 +998,7 @@ cifParseUser9()
}
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1024,7 +1024,7 @@ CIFParseCall()
Transform transform;
CellUse *use;
CellDef *def;
/* Take the `C'. */
TAKE();
@ -1063,7 +1063,7 @@ CIFParseCall()
(void) StrDup(&cifSubcellId, (char *) NULL);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1095,7 +1095,7 @@ cifParseUser91()
(void) StrDup(&cifSubcellId, cifParseName());
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1148,7 +1148,7 @@ cifParseUser94()
* current cell. Tricky business: in order for the default
* label location to be computed
*/
CIFSkipBlanks();
if (PEEK() != ';')
{
@ -1185,7 +1185,7 @@ cifParseUser94()
freeMagic(name);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1224,12 +1224,12 @@ cifParseUser95()
CIFSkipToSemi();
return FALSE;
}
savescale = cifCurReadStyle->crs_scaleFactor;
/* The center coordinates returned are in CIF units *2 */
/* the values will be halved later before conversion to magic units */
if (! CIFParsePoint(&center, 2))
{
CIFReadError("95 command, but no location; ignored.\n");
@ -1253,10 +1253,10 @@ cifParseUser95()
lowerleft.p_x = center.p_x - size.p_x;
lowerleft.p_y = center.p_y - size.p_y;
upperright.p_x = center.p_x + size.p_x;
upperright.p_y = center.p_y + size.p_y;
if ((lowerleft.p_x % 2 == 0) && (lowerleft.p_y % 2 == 0)) {
/* if possible convert values to CIF units by dividing by two */
@ -1274,9 +1274,9 @@ cifParseUser95()
CIFInputRescale(2, 1);
}
/* now scale each of the co-ordinates in turn */
lowerleft.p_x = CIFScaleCoord(lowerleft.p_x, COORD_ANY);
savescale = cifCurReadStyle->crs_scaleFactor;
@ -1347,7 +1347,7 @@ cifParseUser95()
freeMagic(name);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1395,7 +1395,7 @@ CIFParseUser()
return FALSE;
}
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
* This file contains procedures that turn polygons into
* rectangles, as part of CIF file reading.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#define HEDGE 0 /* Horizontal edge */
#define REDGE 1 /* Rising edge */
#define FEDGE -1 /* Falling edge */
/*
* ----------------------------------------------------------------------------
*
@ -52,7 +52,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
* ----------------------------------------------------------------------------
*/
int
int
cifLowX(a, b)
CIFPath **a, **b;
{
@ -66,7 +66,7 @@ cifLowX(a, b)
return (1);
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -85,7 +85,7 @@ cifLowX(a, b)
* ----------------------------------------------------------------------------
*/
int
int
cifLowY(a, b)
Point **a, **b;
{
@ -95,7 +95,7 @@ cifLowY(a, b)
return (1);
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -157,7 +157,7 @@ cifOrient(edges, nedges, dir)
}
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -200,7 +200,7 @@ cifCross(edge, dir, ybot, ytop)
return (FALSE);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* particular, it contains the routines to handle paint,
* including rectangles, wires, flashes, and polygons.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -37,7 +37,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "cif/CIFint.h"
#include "cif/CIFread.h"
/*
* ----------------------------------------------------------------------------
*
@ -69,7 +69,7 @@ CIFParseBox()
Point direction;
Rect rectangle, r2;
int savescale;
/* Take the 'B'. */
TAKE();
@ -122,7 +122,7 @@ CIFParseBox()
rectangle.r_xbot = -rectangle.r_xtop;
rectangle.r_ybot = -rectangle.r_ytop;
/* Optional direction vector: have to build transform to do rotate. */
if (CIFParseSInteger(&direction.p_x))
@ -147,7 +147,7 @@ CIFParseBox()
DBPaintPlane(cifReadPlane, &r2, CIFPaintTable, (PaintUndoInfo *) NULL);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -180,7 +180,7 @@ CIFParseFlash()
int savescale;
Point center;
Rect rectangle;
/* Take the 'R'. */
TAKE();
@ -570,7 +570,7 @@ PaintPolygon(pointlist, number, plane, ptable, ui, keep)
LinkedRect *rectp, *rectlist;
CIFPath *newpath, *cifpath = (CIFPath *)NULL;
int i;
for (i = 0; i < number; i++)
{
newpath = (CIFPath *) mallocMagic((unsigned) sizeof (CIFPath));
@ -625,7 +625,7 @@ PaintWireList(pointlist, number, width, endcap, plane, ptable, ui)
{
CIFPath *newpath, *cifpath = (CIFPath *)NULL;
int i;
for (i = 0; i < number; i++)
{
newpath = (CIFPath *) mallocMagic((unsigned) sizeof (CIFPath));
@ -637,7 +637,7 @@ PaintWireList(pointlist, number, width, endcap, plane, ptable, ui)
CIFPaintWirePath(cifpath, width, endcap, plane, ptable, ui);
}
/*
* ----------------------------------------------------------------------------
*
@ -698,7 +698,7 @@ CIFParseWire()
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -745,7 +745,7 @@ CIFParseLayer()
/* Set current plane for use by the routines that parse geometric
* elements.
*/
type = CIFReadNameToType(name, FALSE);
if (type < 0)
{
@ -761,7 +761,7 @@ CIFParseLayer()
CIFSkipToSemi();
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -794,7 +794,7 @@ CIFParsePoly()
CIFSkipToSemi();
return FALSE;
}
if (!CIFParsePath(&pathheadp, 1))
if (!CIFParsePath(&pathheadp, 1))
{
CIFReadError("polygon, but improper path; ignored.\n");
CIFSkipToSemi();

View File

@ -4,16 +4,16 @@
* pertain to reading CIF files, and builds the tables used by
* the CIF-reading code.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -142,7 +142,7 @@ CIFReadNameToType(name, newOK)
/* Only accept this layer if it's in the current CIF style or
* it's OK to add new layers to the current style.
*/
if (!TTMaskHasType(&cifCurReadStyle->crs_cifLayers, i) && !newOK)
continue;
if (strcmp(cifReadLayers[i], name) == 0)
@ -173,7 +173,7 @@ CIFReadNameToType(name, newOK)
cifNReadLayers += 1;
return cifNReadLayers-1;
}
/*
* ----------------------------------------------------------------------------
*
@ -226,7 +226,7 @@ CIFCalmaLayerToCifLayer(layer, datatype, calmaStyle)
/* No luck */
return (-1);
}
/*
* ----------------------------------------------------------------------------
*
@ -264,7 +264,7 @@ CIFParseReadLayers(string, mask)
p = strchr(string, ',');
if (p != NULL)
*p = 0;
i = CIFReadNameToType(string, TRUE);
if (i >= 0)
TTMaskSetType(mask, i);
@ -286,7 +286,7 @@ CIFParseReadLayers(string, mask)
for (string = p; *string == ','; string += 1) /* do nothing */;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -369,7 +369,7 @@ cifReadStyleInit()
cifCurReadStyle->crs_layers[i] = NULL;
}
}
/*
*
* ----------------------------------------------------------------------------
@ -392,17 +392,17 @@ void
CIFReadTechInit()
{
CIFReadKeep *style;
/* Cleanup any old info. */
cifNewReadStyle();
freeMagic(cifCurReadStyle);
cifCurReadStyle = NULL;
/* forget the list of styles */
for (style = cifReadStyleList; style != NULL; style = style->crs_next)
{
{
freeMagic(style->crs_name);
freeMagic(style);
}
@ -434,7 +434,7 @@ CIFReadTechStyleInit()
cifCurReadOp = NULL;
}
/*
* ----------------------------------------------------------------------------
*
@ -474,7 +474,7 @@ CIFReadTechLine(sectionName, argc, argv)
* make sure there's already a style around, and create one if
* there isn't.
*/
if (strcmp(argv[0], "style") == 0)
{
if (argc != 2)
@ -490,7 +490,7 @@ CIFReadTechLine(sectionName, argc, argv)
return TRUE;
}
}
for (newStyle = cifReadStyleList; newStyle != NULL;
for (newStyle = cifReadStyleList; newStyle != NULL;
newStyle = newStyle->crs_next)
{
if (!strncmp(newStyle->crs_name, argv[1], l))
@ -544,7 +544,7 @@ CIFReadTechLine(sectionName, argc, argv)
for (p = cifReadStyleList; p->crs_next; p = p->crs_next);
p->crs_next = newStyle;
}
if (cptr == NULL)
break;
else
@ -553,7 +553,7 @@ CIFReadTechLine(sectionName, argc, argv)
newStyle = saveStyle;
}
}
if (cifCurReadStyle == NULL)
{
cifNewReadStyle();
@ -605,7 +605,7 @@ CIFReadTechLine(sectionName, argc, argv)
if (cifCurReadStyle == NULL) return FALSE;
if ((cifCurReadStyle->crs_status != TECH_PENDING) &&
(cifCurReadStyle->crs_status != TECH_SUSPENDED)) return TRUE;
/* Process scalefactor lines next. */
if (strcmp(argv[0], "scalefactor") == 0)
@ -637,7 +637,7 @@ CIFReadTechLine(sectionName, argc, argv)
}
/* Process "gridlimit" lines. */
if (strncmp(argv[0], "grid", 4) == 0)
{
if (StrIsInt(argv[1]))
@ -695,7 +695,7 @@ CIFReadTechLine(sectionName, argc, argv)
return TRUE;
}
}
if (cptr == NULL)
break;
else
@ -737,7 +737,7 @@ CIFReadTechLine(sectionName, argc, argv)
/* Handle a special case of a list of layer names on the
* layer line. Turn them into an OR operation.
*/
if (argc == 3)
{
cifCurReadOp = (CIFOp *) mallocMagic(sizeof(CIFOp));
@ -787,7 +787,7 @@ CIFReadTechLine(sectionName, argc, argv)
/* Handle a special case of a list of layer names on the
* layer line. Turn them into an OR operation.
*/
if (argc == 3)
{
cifCurReadOp = (CIFOp *) mallocMagic(sizeof(CIFOp));
@ -836,7 +836,7 @@ CIFReadTechLine(sectionName, argc, argv)
/* Figure out which Magic layer should get labels from which
* CIF layers.
*/
if (strcmp(argv[0], "labels") == 0)
{
TileTypeBitMask mask;
@ -884,7 +884,7 @@ CIFReadTechLine(sectionName, argc, argv)
* will cause the layers to be ignored when encountered in
* cells.
*/
if (strcmp(argv[0], "ignore") == 0)
{
TileTypeBitMask mask;
@ -921,11 +921,11 @@ CIFReadTechLine(sectionName, argc, argv)
}
return TRUE;
}
/* Anything below here is a geometric operation, so we can
* do some set-up that is common to all the operations.
*/
if (cifCurReadLayer == NULL)
{
TechError("Must define layer before specifying operations.\n");
@ -1001,7 +1001,7 @@ CIFReadTechLine(sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1081,7 +1081,7 @@ CIFReadLoadStyle(stylename)
/* CIFReadTechFinal(); */ /* Taken care of by TechLoad() */
CIFTechInputScale(DBLambda[0], DBLambda[1], TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -1246,7 +1246,7 @@ CIFPrintReadStyle(dolist, doforall, docurrent)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -1304,7 +1304,7 @@ CIFSetReadStyle(name)
TxError("\"%s\" is not one of the CIF input styles Magic knows.\n", name);
CIFPrintReadStyle(FALSE, TRUE, TRUE);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -5,16 +5,16 @@
* reading CIF files, plus a bunch of utility routines
* for skipping white space, parsing numbers and points, etc.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -92,7 +92,7 @@ Plane *cifReadPlane; /* Plane into which to paint material
* NULL means no layer command has
* been seen for the current cell.
*/
/*
* ----------------------------------------------------------------------------
*
@ -133,7 +133,7 @@ CIFReadError(char *format, ...)
TxError("Error limit set: Remaining errors will not be reported.\n");
}
}
void
CIFReadWarning(char *format, ...)
@ -300,7 +300,7 @@ CIFScaleCoord(cifCoord, snap_type)
return result;
}
/*
* ----------------------------------------------------------------------------
*
@ -333,7 +333,7 @@ cifIsBlank(ch)
}
else return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -355,7 +355,7 @@ cifIsBlank(ch)
void
CIFSkipBlanks()
{
while (cifIsBlank(PEEK())) {
if (TAKE() == '\n')
{
@ -363,7 +363,7 @@ CIFSkipBlanks()
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -393,7 +393,7 @@ CIFSkipSep()
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -415,7 +415,7 @@ void
CIFSkipToSemi()
{
int ch;
for (ch = PEEK() ; ((ch != ';') && (ch != EOF)) ; ch = PEEK()) {
if (TAKE() == '\n')
{
@ -423,7 +423,7 @@ CIFSkipToSemi()
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -443,7 +443,7 @@ CIFSkipToSemi()
void
CIFSkipSemi()
{
CIFSkipBlanks();
if (PEEK() != ';') {
CIFReadError("`;\' expected.\n");
@ -452,7 +452,7 @@ CIFSkipSemi()
TAKE();
CIFSkipBlanks();
}
/*
* ----------------------------------------------------------------------------
*
@ -498,7 +498,7 @@ CIFParseSInteger(valuep)
*valuep = -(*valuep);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -616,7 +616,7 @@ CIFParsePoint(pointp, iscale)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -713,7 +713,7 @@ CIFParsePath(pathheadpp, iscale)
* first three points in the given CIF path.
*
* Results:
* TRUE if point is inside, FALSE if outside or on the border
* TRUE if point is inside, FALSE if outside or on the border
*
* Side effects:
* None.
@ -754,7 +754,7 @@ test_insideness(start, tpoint)
* Side effects:
* value of respt contains point to which segment will be
* truncated.
*
*
* ----------------------------------------------------------------------------
*/
@ -856,7 +856,7 @@ path_intersect(pathHead, start, respt)
/* with the smaller absolute distance takes precedence.) */
if (test_insideness(start, &path->cifp_point)) {
int tmpdist = abs(newdist); /* save this value */
int tmpdist = abs(newdist); /* save this value */
if (path->cifp_x == path->cifp_next->cifp_x ||
path->cifp_y == path->cifp_next->cifp_y)
{
@ -1072,7 +1072,7 @@ CIFMakeManhattanPath(pathHead, plane, resultTbl, ui)
edir = CIFEdgeDirection(first, last);
if (edir == CIF_DIAG_DL || edir == CIF_DIAG_UR)
{
new->cifp_x = first->cifp_x;
new->cifp_x = first->cifp_x;
new->cifp_y = last->cifp_y;
}
else /* edir == CIF_DIAG_DR || edir == CIF_DIAG_UL */
@ -1135,7 +1135,7 @@ CIFMakeManhattanPath(pathHead, plane, resultTbl, ui)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -1184,7 +1184,7 @@ CIFEdgeDirection(first, last)
return CIF_DOWN;
return CIF_ZERO;
}
/*
* ----------------------------------------------------------------------------
*
@ -1225,7 +1225,7 @@ CIFCleanPath(pathHead)
path = next;
if (!path) return;
}
while (next = path->cifp_next)
{
if ((dir2 = CIFEdgeDirection(path, next)) == CIF_ZERO)
@ -1259,7 +1259,7 @@ path_inc:
if (!pathHead->cifp_next)
{
/* Ensure that the resulting path is closed. */
if ((pathHead->cifp_x != path->cifp_x) ||
if ((pathHead->cifp_x != path->cifp_x) ||
(pathHead->cifp_y != path->cifp_y))
{
next = (CIFPath *) mallocMagic((unsigned) (sizeof (CIFPath)));
@ -1287,7 +1287,7 @@ path_inc:
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -1314,7 +1314,7 @@ CIFFreePath(path)
path = path->cifp_next;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -1340,7 +1340,7 @@ cifCommandError()
CIFSkipToSemi();
}
/*
* ----------------------------------------------------------------------------
*
@ -1370,7 +1370,7 @@ cifParseEnd()
}
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1392,7 +1392,7 @@ cifParseComment()
{
int opens;
int ch;
/*
* take the '('
*/
@ -1417,7 +1417,7 @@ cifParseComment()
} while (opens > 0);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1459,7 +1459,7 @@ CIFDirectionToTrans(point)
point->p_x, point->p_y);
return &GeoIdentityTransform;
}
/*
* ----------------------------------------------------------------------------
*
@ -1554,7 +1554,7 @@ CIFParseTransform(transformp)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -5,16 +5,16 @@
* by the CIF writing code. The definitions are only used internally
* to this module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
*

View File

@ -3,16 +3,16 @@
* This file provides procedures for displaying CIF layers on
* the screen using the highlight facilities.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -311,7 +311,7 @@ CIFSeeLayer(rootDef, area, layer)
}
UndoEnable();
}
/*
* ----------------------------------------------------------------------------
*
@ -358,7 +358,7 @@ CIFSeeHierLayer(rootDef, area, layer, arrays, subcells)
CIFGenSubcells(rootDef, area, CIFPlanes);
if (arrays)
CIFGenArrays(rootDef, area, CIFPlanes);
/* Report any errors that occurred. */
if (DBWFeedbackCount != oldCount)
@ -366,7 +366,7 @@ CIFSeeHierLayer(rootDef, area, layer, arrays, subcells)
TxPrintf("%d problems occurred. See feedback entries.\n",
DBWFeedbackCount - oldCount);
}
(void) sprintf(msg, "CIF layer \"%s\"", layer);
cifSeeDef = rootDef;
sld.text = msg;
@ -442,7 +442,7 @@ CIFCoverageLayer(rootDef, area, layer)
cifHierCopyFunc, (ClientData) CIFComponentDef);
CIFGen(CIFComponentDef, area, CIFPlanes, &depend, TRUE, TRUE);
DBCellClearDef(CIFComponentDef);
cstats.coverage = 0;
cstats.bounds.r_xbot = cstats.bounds.r_xtop = 0;
cstats.bounds.r_ybot = cstats.bounds.r_ytop = 0;

View File

@ -4,16 +4,16 @@
* files pertaining to CIF, and builds the tables
* used by the CIF generator.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -188,7 +188,7 @@ cifTechStyleInit()
CIFCurStyle->cs_layers[i] = NULL;
}
/*
* ----------------------------------------------------------------------------
*
@ -284,7 +284,7 @@ okpaint:
/* Make sure that there's exactly one match among cif and
* paint layers together.
*/
if ((paintType == -1)
|| ((paintType >= 0) && !TTMaskEqual(&curCifMask, &DBZeroTypeBits)))
{
@ -310,7 +310,7 @@ okpaint:
if (TTMaskHasType(rMask, paintType))
TTMaskSetType(paintMask, rtype);
}
}
}
}
else if (!TTMaskEqual(&curCifMask, &DBZeroTypeBits))
{
@ -332,7 +332,7 @@ okpaint:
}
}
}
/*
* ----------------------------------------------------------------------------
@ -498,7 +498,7 @@ CIFParseScale(true_scale, expander)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -541,7 +541,7 @@ CIFTechLine(sectionName, argc, argv)
* sure that the current (maybe default?) CIF style has
* a name.
*/
if (strcmp(argv[0], "style") == 0)
{
if (argc != 2)
@ -557,7 +557,7 @@ CIFTechLine(sectionName, argc, argv)
return TRUE;
}
}
for (newStyle = CIFStyleList; newStyle != NULL;
for (newStyle = CIFStyleList; newStyle != NULL;
newStyle = newStyle->cs_next)
{
/* Here we're only establishing existence; */
@ -614,7 +614,7 @@ CIFTechLine(sectionName, argc, argv)
for (p = CIFStyleList; p->cs_next; p = p->cs_next);
p->cs_next = newStyle;
}
if (cptr == NULL)
break;
else
@ -769,7 +769,7 @@ CIFTechLine(sectionName, argc, argv)
while (*tptr != '\0')
{
cptr = strchr(tptr, ',');
if (cptr != NULL)
if (cptr != NULL)
{
*cptr = '\0';
for (j = 1; isspace(*(cptr - j)); j++)
@ -790,7 +790,7 @@ CIFTechLine(sectionName, argc, argv)
return TRUE;
}
}
if (cptr == NULL)
break;
else
@ -843,9 +843,9 @@ CIFTechLine(sectionName, argc, argv)
cifGotLabels = FALSE;
/* Handle a special case of a list of layer names on the layer
* line. Turn them into an OR operation.
* line. Turn them into an OR operation.
*/
if (argc == 3)
{
cifCurOp = (CIFOp *) mallocMagic(sizeof(CIFOp));
@ -976,7 +976,7 @@ CIFTechLine(sectionName, argc, argv)
return TRUE;
}
/*
/*
* miscellaneous cif/calma-writing boolean options
*/
@ -1003,7 +1003,7 @@ CIFTechLine(sectionName, argc, argv)
/* Anything below here is a geometric operation, so we can
* do some set-up that is common to all the operations.
*/
if (cifCurLayer == NULL)
{
TechError("Must define layer before specifying operation.\n");
@ -1070,7 +1070,7 @@ CIFTechLine(sectionName, argc, argv)
cifParseLayers(argv[1], CIFCurStyle, &newOp->co_paintMask,
&newOp->co_cifMask,FALSE);
break;
case CIFOP_GROW:
case CIFOP_GROWMIN:
case CIFOP_GROW_G:
@ -1084,7 +1084,7 @@ CIFTechLine(sectionName, argc, argv)
goto errorReturn;
}
break;
case CIFOP_BLOATALL:
if (argc != 3) goto wrongNumArgs;
cifParseLayers(argv[1], CIFCurStyle, &newOp->co_paintMask,
@ -1108,7 +1108,7 @@ CIFTechLine(sectionName, argc, argv)
if (TTMaskHasType(&mask, i))
bloats->bl_distance[i] = 1;
goto bloatCheck;
case CIFOP_BLOAT:
case CIFOP_BLOATMIN:
case CIFOP_BLOATMAX:
@ -1138,7 +1138,7 @@ CIFTechLine(sectionName, argc, argv)
}
if (!TTMaskEqual(&tempMask, &DBZeroTypeBits))
TechError("Can't use templayers in bloat statement.\n");
distance = atoi(bloatArg[1]);
if ((distance < 0) && (newOp->co_opcode == CIFOP_BLOAT))
{
@ -1165,7 +1165,7 @@ bloatCheck:
/* Make sure that all the layers specified in the statement
* fall in a single plane.
*/
for (i = 0; i < PL_MAXTYPES; i++)
{
tempMask = bloatLayers;
@ -1218,7 +1218,7 @@ bloatCheck:
case CIFOP_SQUARES_G:
case CIFOP_SQUARES:
squares = (SquaresData *)mallocMagic(sizeof(SquaresData));
newOp->co_client = (ClientData)squares;
@ -1303,7 +1303,7 @@ bloatCheck:
break;
case CIFOP_SLOTS:
slots = (SlotsData *)mallocMagic(sizeof(SlotsData));
newOp->co_client = (ClientData)slots;
@ -1434,13 +1434,13 @@ cifCheckCalmaNum(str)
while (*str) {
char ch = *str++;
if (ch < '0' || ch > '9')
if (ch < '0' || ch > '9')
return (FALSE);
}
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -1478,7 +1478,7 @@ cifComputeRadii(layer, des)
/* If CIF layers are used, switch to the max of current
* distances and those of the layers used.
*/
if (!TTMaskEqual(&op->co_cifMask, &DBZeroTypeBits))
{
for (i=0; i < des->cs_nLayers; i++)
@ -1508,11 +1508,11 @@ cifComputeRadii(layer, des)
case CIFOP_GROW_G:
grow += op->co_distance;
break;
case CIFOP_SHRINK:
shrink += op->co_distance;
break;
/* For bloats use the largest distances (negative values are
* for shrinks).
*/
@ -1530,7 +1530,7 @@ cifComputeRadii(layer, des)
grow += curGrow;
shrink += curShrink;
break;
case CIFOP_SQUARES: break;
case CIFOP_SQUARES_G: break;
}
@ -1582,8 +1582,8 @@ cifComputeHalo(style)
* style->cs_name, style->cs_radius);
*/
}
/*
* ----------------------------------------------------------------------------
*
@ -1637,7 +1637,7 @@ CIFTechFinal()
/* Allow the case where there's no CIF at all. This is indicated
* by a NULL CIFCurStyle.
*/
if (!style) return;
if ((cifCurLayer != NULL) && (cifCurOp == NULL) && !cifGotLabels)
@ -2088,7 +2088,7 @@ CIFGetContactSize(type, edge, spacing, border)
* represented by integers.
*
* Note that because contacts may be placed at 1/2 grid spacing to
* center them, the size and spacing of contacts as given in the
* center them, the size and spacing of contacts as given in the
* "squares" function must *always* be an even number. To ensure this,
* we check for odd numbers in these positions. If there are any, and
* "d" is also an odd number, then we multiply both "n" and "d" by 2.

View File

@ -3,16 +3,16 @@
*
* Output of CIF.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -86,7 +86,7 @@ char *CIFPathPrefix = NULL;
bool CIFHierWriteDisable = FALSE;
bool CIFArrayWriteDisable = FALSE;
/*
* ----------------------------------------------------------------------------
*
@ -178,7 +178,7 @@ CIFWrite(rootDef, f)
good = !ferror(f);
return (good);
}
/*
* ----------------------------------------------------------------------------
*
@ -203,7 +203,7 @@ cifWriteInitFunc(def)
def->cd_client = (ClientData) 0;
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -230,7 +230,7 @@ cifWriteMarkFunc(use)
StackPush((ClientData) use->cu_def, cifStack);
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -277,7 +277,7 @@ cifOutPreamble(outf, cell)
fprintf(outf,"( @@style : %s );\n", CIFCurStyle->cs_name);
fprintf(outf,"( @@date : %s );\n", now);
}
/*
* ----------------------------------------------------------------------------
*
@ -328,7 +328,7 @@ cifOut(outf)
cifOutFunc(def, outf);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -375,7 +375,7 @@ cifOutFunc(def, f)
* Output all the tiles associated with this cell. Skip temporary
* layers.
*/
GEO_EXPAND(&def->cd_bbox, CIFCurStyle->cs_radius, &bigArea);
CIFErrorDef = def;
CIFGen(def, &bigArea, CIFPlanes, &DBAllTypeBits, TRUE, TRUE);
@ -450,7 +450,7 @@ cifOutFunc(def, f)
(void) DBCellEnum(def, cifWriteUseFunc, (ClientData) f);
fprintf(f, "DF;\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -495,7 +495,7 @@ cifWriteUseFunc(use, f)
* use identifier, which should include array subscripting
* information.
*/
/*
* Insert a 91 user command to label the next cell
*/
@ -547,7 +547,7 @@ cifWriteUseFunc(use, f)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -615,15 +615,15 @@ cifWritePaintFunc(tile, f)
CIFRects += 1;
return 0;
}
/*
* ----------------------------------------------------------------------------
*
* CIFWriteFlat --
*
* Write out the entire tree rooted at the supplied CellDef in CIF format,
* to the specified file, but write non-hierarchical CIF.
*
* to the specified file, but write non-hierarchical CIF.
*
* Results:
* TRUE if the cell could be written successfully, FALSE otherwise.
*
@ -635,9 +635,9 @@ cifWritePaintFunc(tile, f)
*
* Algorithm:
* We operate on the cell in chunks chosen to keep the memory utilization
* reasonable. Foreach chunk, we use DBTreeSrTiles and cifHierCopyFunc to
* flatten the
* chunk into a yank buffer ("eliminating" the subcell problem), then use
* reasonable. Foreach chunk, we use DBTreeSrTiles and cifHierCopyFunc to
* flatten the
* chunk into a yank buffer ("eliminating" the subcell problem), then use
* cifOut to generate the CIF.
* No hierarchical design rule checking or bounding box computation
* occur during this operation -- both are explicitly avoided.
@ -665,11 +665,11 @@ CIFWriteFlat(rootDef, f)
cifOutPreamble(f, rootDef);
/*
* Now process each chunk. We cheat and use cifOut(), so we need to have
* Now process each chunk. We cheat and use cifOut(), so we need to have
* a stack for the single flattened "component" to be on.
*/
{
{
scx.scx_use = CIFDummyUse;
scx.scx_trans = GeoIdentityTransform;
GEO_EXPAND(&rootDef->cd_bbox, CIFCurStyle->cs_radius, &scx.scx_area);
@ -700,7 +700,7 @@ CIFWriteFlat(rootDef, f)
fprintf(f, "C %d;\nEnd\n", (int) CIFComponentDef->cd_client);
DBCellClearDef(CIFComponentDef);
good = !ferror(f);
/* Report any errors that occurred. */
if (DBWFeedbackCount != oldCount)

View File

@ -4,16 +4,16 @@
* This procedure defines things that are exported by the
* cif module to the rest of the world.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
*

View File

@ -3,16 +3,16 @@
*
* Commands for the color map editor.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -64,7 +64,7 @@ bool cmwWatchButtonUp;
bool cmwModified = FALSE;
/*
* ----------------------------------------------------------------------------
*
@ -194,7 +194,7 @@ cmwButtonDown(w, p, button)
/* See if the cursor is over the current color area. If so, remember
* the fact and wait for the button to be released.
*/
if (GEO_ENCLOSE(&surfacePoint, &cmwCurrentColorArea))
{
cmwWindow = w;
@ -237,7 +237,7 @@ cmwButtonUp(w, p, button)
* (the one displaying the current color), then we ignore the
* button release.
*/
if (!cmwWatchButtonUp) return;
cmwWatchButtonUp = FALSE;
@ -246,7 +246,7 @@ cmwButtonUp(w, p, button)
* color values from the pixel underneath the cursor to the current
* color.
*/
/* Read the pixel from the window that was underneath the cursor when
* the button was released.
*/
@ -426,10 +426,10 @@ cmwColor(w, cmd)
}
CMWloadWindow(w, color);
}
else
else
TxError("Usage: color [#|next|last|get|rgb]\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -473,7 +473,7 @@ cmwSave(w, cmd)
}
if (ok) cmwModified = FALSE;
}
/*
* ----------------------------------------------------------------------------
*
@ -514,7 +514,7 @@ cmwLoad(w, cmd)
else (void) GrReadCMap(DBWStyleType, (char *) NULL,
MainMonType, ".", SysLibPath);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Procedures to interface the colormap editor with the window package
* for the purposes of window creation, deletion, and modification.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -71,7 +71,7 @@ extern void CMWundoInit();
* | | - | | | | + | | - | | | | + | |
* | +---+ +----------------+ +---+ +---+ +----------------+ +---+ |
* | |
* | Blue Value
* | Blue Value
* | +---+ +----------------+ +---+ +---+ +----------------+ +---+ |
* | | - | | | | + | | - | | | | + | |
* | +---+ +----------------+ +---+ +---+ +----------------+ +---+ |
@ -130,13 +130,13 @@ char *cmwCurrentColorText = "Color Being Edited";
/* Bounding rectangle for entire window */
Rect colorWindowRect = {{0, 1500}, {24000, 17000}};
/*
* ----------------------------------------------------------------------------
*
* CMWcreate --
*
* A new window has been created. Create and initialize the needed
* A new window has been created. Create and initialize the needed
* structures.
*
* Results:
@ -171,7 +171,7 @@ CMWcreate(window, argc, argv)
CMWloadWindow(window, color);
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -200,7 +200,7 @@ CMWdelete(window)
freeMagic((char *) cr);
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -227,7 +227,7 @@ CMWreposition(window, newScreenArea, final)
WindMove(window, &colorWindowRect);
}
/*
* ----------------------------------------------------------------------------
*
@ -332,7 +332,7 @@ CMWredisplay(w, rootArea, clipArea)
* to that color. Instead, change the color in a particular style
* reserved for our own use.
*/
if (GEO_TOUCH(&cmwCurrentColorArea, rootArea))
{
GrStyleTable[STYLE_CMEDIT].color = cr->cmw_color;
@ -353,7 +353,7 @@ CMWredisplay(w, rootArea, clipArea)
GrUnlock(w);
}
/*
* ----------------------------------------------------------------------------
*
@ -389,7 +389,7 @@ CMWloadWindow(w, color)
/* move the contents of the window so the color bars show */
WindMove(w, &colorWindowRect);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Procedures to translate between RGB color space and HSV color space.
* Courtesy of Ken Fishkin.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -194,7 +194,7 @@ HSLxRGB( h, s, l, r, g, b )
int i;
double vsf;
if ( l <= 0.5)
if ( l <= 0.5)
v = l * (1.0 + s);
else
v = l + s - l*s;

View File

@ -3,16 +3,16 @@
*
* Interface to the undo package for the color map editor.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -57,7 +57,7 @@ void cmwUndoStart(), cmwUndoDone();
* of an undo/redo command.
*/
bool cmwColorsChanged[256];
/*
* ----------------------------------------------------------------------------
*
@ -83,7 +83,7 @@ CMWundoInit()
cmwUndoForw, cmwUndoBack, "color map");
}
/*
* ----------------------------------------------------------------------------
*
@ -116,7 +116,7 @@ cmwUndoBack(up)
(void) GrPutColor(up->cue_color, up->old_r, up->old_g, up->old_b);
cmwColorsChanged[up->cue_color] = TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -153,7 +153,7 @@ cmwUndoColor(color, oldr, oldg, oldb, newr, newg, newb)
up->new_g = newg;
up->new_b = newb;
}
/*
* ----------------------------------------------------------------------------
*
@ -178,7 +178,7 @@ cmwUndoStart()
for (i = 0; i < 256; i++)
cmwColorsChanged[i] = FALSE;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Interface definitions for the 'glue' between the window
* manager and the color map editor.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* rcsid $Header: /usr/cvsroot/magic-8.0/cmwind/cmwind.h,v 1.2 2009/09/10 20:32:51 tim Exp $

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters A through B.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -44,7 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/netlist.h"
#include "select/select.h"
/* ---------------------------------------------------------------------------
*
* CmdAddPath --
@ -80,7 +80,7 @@ CmdAddPath( w, cmd )
}
PaAppend(&Path, cmd->tx_argv[1]);
}
/* Linked-list structure for returning information about arrayed cells */
@ -173,7 +173,7 @@ CmdArray(w, cmd)
}
if (locargc <= 1)
goto badusage; /* Prohibits "array -list" alone */
option = Lookup(cmd->tx_argv[argstart], cmdArrayOption);
if (option < 0) {
if (locargc == 3 || locargc == 5)
@ -186,7 +186,7 @@ CmdArray(w, cmd)
/* Get all information about cell uses in the current selection */
(void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL,
(void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL,
selGetArrayFunc, (ClientData) &lahead);
/* Note: All "unimplemented functions" below will require a routine
@ -240,7 +240,7 @@ CmdArray(w, cmd)
goto badusage;
if (!StrIsInt(cmd->tx_argv[argstart + 1])
|| !StrIsInt(cmd->tx_argv[argstart + 2]))
|| !StrIsInt(cmd->tx_argv[argstart + 2]))
goto badusage;
if (locargc == 4)
@ -253,7 +253,7 @@ CmdArray(w, cmd)
}
else if (locargc == 6)
{
if (!StrIsInt(cmd->tx_argv[argstart + 3]) ||
if (!StrIsInt(cmd->tx_argv[argstart + 3]) ||
!StrIsInt(cmd->tx_argv[argstart + 4])) goto badusage;
a.ar_xlo = atoi(cmd->tx_argv[argstart + 1]);
a.ar_xhi = atoi(cmd->tx_argv[argstart + 2]);
@ -426,7 +426,7 @@ CmdArray(w, cmd)
case ARRAY_DEFAULT:
if (!StrIsInt(cmd->tx_argv[argstart])
|| !StrIsInt(cmd->tx_argv[argstart + 1]))
|| !StrIsInt(cmd->tx_argv[argstart + 1]))
goto badusage;
if (locargc == 3)
{
@ -438,7 +438,7 @@ CmdArray(w, cmd)
}
else
{
if (!StrIsInt(cmd->tx_argv[argstart + 2]) ||
if (!StrIsInt(cmd->tx_argv[argstart + 2]) ||
!StrIsInt(cmd->tx_argv[argstart + 3])) goto badusage;
a.ar_xlo = atoi(cmd->tx_argv[argstart]);
a.ar_xhi = atoi(cmd->tx_argv[argstart + 1]);
@ -487,7 +487,7 @@ selGetArrayFunc(selUse, use, trans, arg)
LinkedArray **arg;
{
/* Check "use" for array information and pass this to arrayInfo */
LinkedArray *la;
int xlo, xhi, ylo, yhi, xsep, ysep, t;
@ -510,17 +510,17 @@ selGetArrayFunc(selUse, use, trans, arg)
la->arrayInfo.ar_xhi = xhi;
la->arrayInfo.ar_ylo = ylo;
la->arrayInfo.ar_yhi = yhi;
/* Reverse the transformation in DBMakeArray */
ysep = (trans->t_d * use->cu_xsep - trans->t_a * use->cu_ysep);
ysep /= (trans->t_d * trans->t_b - trans->t_a * trans->t_e);
if (trans->t_a == 0)
xsep = (use->cu_ysep - trans->t_e * ysep) / trans->t_d;
else
xsep = (use->cu_xsep - trans->t_b * ysep) / trans->t_a;
la->arrayInfo.ar_xsep = xsep;
la->arrayInfo.ar_ysep = ysep;
@ -531,7 +531,7 @@ selGetArrayFunc(selUse, use, trans, arg)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -690,7 +690,7 @@ CmdBox(w, cmd)
#endif
return;
}
if (needBox)
{
if (refEdit)

View File

@ -5,16 +5,16 @@
* functions which have been compiled as Tcl modules, using the Tcl
* interface.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters C through D.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -65,7 +65,7 @@ struct cmdCornerArea
int cmdDumpFunc();
bool cmdDumpParseArgs();
#ifdef CALMA_MODULE
/*
* ----------------------------------------------------------------------------
*
@ -124,7 +124,7 @@ CmdCalma(w, cmd)
static char *cmdCalmaWarnOptions[] = { "default", "none", "align",
"limit", "redirect", "help", 0 };
static char *cmdCalmaOption[] =
{
{
"help print this help information",
"arrays [yes|no] output arrays as individual subuses (like in CIF)",
"contacts [yes|no] optimize output by arraying contacts as subcells",
@ -605,7 +605,7 @@ CmdCellname(w, cmd)
CellDef *newDef, *cellDef;
static char *cmdCellOption[] =
{
{
"children list children of selected or named cell",
"parents list parents of selected or named cell",
"exists true if loaded, false if not, or name of selected",
@ -672,7 +672,7 @@ CmdCellname(w, cmd)
}
}
if (func != DBUsePrint)
if (func != DBUsePrint)
{
/* These functions only work with cell uses (instances) */
switch (option) {
@ -683,7 +683,7 @@ CmdCellname(w, cmd)
return;
}
}
else
else
{
/* These functions only work with cell definitions */
switch (option) {
@ -765,7 +765,7 @@ CmdCellname(w, cmd)
SelectClear();
DBCellDelete(cellname, FALSE);
}
else
else
TxError("Delete cell command missing cellname\n");
break;
@ -913,7 +913,7 @@ CmdCellname(w, cmd)
if (cellDef->cd_file != NULL)
freeMagic(cellDef->cd_file);
cellDef->cd_file = fullpath;
cellDef->cd_file = fullpath;
}
}
break;
@ -1052,7 +1052,7 @@ CmdCif(w, cmd)
static char *cmdCifYesNo[] = { "no", "yes", 0 };
static char *cmdCifInOut[] = { "input", "output", 0 };
static char *cmdCifOption[] =
{
{
"*array layer display CIF layer under box (array only)",
"*hier layer display CIF layer under box (hier only)",
"arealabels yes|no enable/disable us of area label extension",
@ -1087,7 +1087,7 @@ CmdCif(w, cmd)
option = CIF_WRITE;
else
{
if (!strncmp(argv[1], "list", 4))
if (!strncmp(argv[1], "list", 4))
{
dolist = TRUE;
if (!strncmp(argv[1], "listall", 7))
@ -1166,7 +1166,7 @@ CmdCif(w, cmd)
}
CIFSeeHierLayer(rootDef, &box, argv[2], TRUE, FALSE);
return;
case HIER:
if (argc == 4) {
if (!strncmp(argv[2], "write", 5))
@ -1303,7 +1303,7 @@ CmdCif(w, cmd)
TxPrintf ("Output of CIF cell ID labels is now %s\n",
CIFDoCellIdLabels ? "enabled" : "disabled");
return;
case ISTYLE:
if (argc == 3)
CIFSetReadStyle(argv[2]);
@ -1363,7 +1363,7 @@ CmdCif(w, cmd)
StrDup (&CIFPathPrefix, argv[2]);
else goto wrongNumArgs;
return;
case OSTYLE:
if (argc == 3)
CIFSetStyle(argv[2]);
@ -1384,7 +1384,7 @@ CmdCif(w, cmd)
CIFReadFile(f);
(void) fclose(f);
return;
case RESCALE:
if (argc == 2)
{
@ -1406,7 +1406,7 @@ CmdCif(w, cmd)
if (!CIFRescaleAllow)
CIFWarningLevel = CIF_WARN_LIMIT;
return;
case CIF_DRC_CHECK:
if (argc == 2)
{
@ -1426,7 +1426,7 @@ CmdCif(w, cmd)
goto wrongNumArgs;
CIFNoDRCCheck = !yesno;
return;
case SEE:
if (argc != 3) goto wrongNumArgs;
if (!ToolGetBox(&rootDef, &box))
@ -1469,7 +1469,7 @@ CmdCif(w, cmd)
DRCCheckThis(paintDef, TT_CHECKPAINT, &box);
}
return;
case STATS:
CIFPrintStats();
return;
@ -1532,7 +1532,7 @@ CmdCif(w, cmd)
{
TxError("I/O error in writing file %s.\n", namep);
TxError("File may be incompletely written.\n");
}
}
else
@ -1541,13 +1541,13 @@ CmdCif(w, cmd)
{
TxError("I/O error in writing file %s.\n", namep);
TxError("File may be incompletely written.\n");
}
}
(void) fclose(f);
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -1630,7 +1630,7 @@ CmdClockwise(w, cmd)
* then move it so its lower-left corner is at the same place
* that it used to be.
*/
if (noAdjust)
{
GeoTransRect(&t2, &SelectDef->cd_bbox, &bbox);
@ -1648,7 +1648,7 @@ CmdClockwise(w, cmd)
/* Rotate the box, if it exists and is in the same window as the
* selection.
*/
if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef))
{
Rect newBox;
@ -1954,7 +1954,7 @@ CmdCopy(w, cmd)
/* Use the displacement between the box lower-left corner and
* the point as the transform.
*/
MagWindow *window;
window = ToolGetPoint(&rootPoint, (Rect *) NULL);
@ -2158,7 +2158,7 @@ CmdCorner(w, cmd)
PaintResultType *resultTbl =
DBStdPaintTbl(cmdPathList.pathlist->pathtype, pNum);
Plane *plane = EditRootDef->cd_planes[pNum];
ui.pu_def = EditRootDef;
ui.pu_pNum = pNum;
@ -2204,7 +2204,7 @@ CmdCorner(w, cmd)
DBWAreaChanged(EditCellUse->cu_def, &editBox, DBW_ALLWINDOWS, &maskBits);
DBReComputeBbox(EditCellUse->cu_def);
}
/*
* ----------------------------------------------------------------------------
*
@ -2983,7 +2983,7 @@ CmdCrosshair(w, cmd)
DBWSetCrosshair(w, &pos);
}
/*
* ----------------------------------------------------------------------------
*
@ -3017,7 +3017,7 @@ CmdDelete(w, cmd)
badusage:
TxError("Usage: %s\n", cmd->tx_argv[0]);
}
/*
* ----------------------------------------------------------------------------
*
@ -3066,16 +3066,16 @@ CmdDown(w, cmd)
* only in windows where the edit cell is displayed differently from
* other cells.
*/
GeoTransRect(&EditToRootTransform, &(EditCellUse->cu_def->cd_bbox), &area);
(void) WindSearch(DBWclientID, (ClientData) NULL,
(Rect *) NULL, cmdEditRedisplayFunc, (ClientData) &area);
/* Use the position of the point to select one of the currently-selected
* cells (if there are more than one). If worst comes to worst, just
* select any selected cell.
*/
(void) ToolGetPoint((Point *) NULL, &pointArea);
cmdFoundNewDown = FALSE;
(void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL,
@ -3131,7 +3131,7 @@ cmdDownEnumFunc(selUse, use, transform, area)
if (!GEO_OVERLAP(&useArea, &use->cu_bbox)) return 0;
return 1;
}
/*
* ----------------------------------------------------------------------------
*
@ -3199,7 +3199,7 @@ CmdDrc(w, cmd)
#endif
static char *cmdDrcOption[] =
{
{
"*flatcheck check box area by flattening",
"*halo [d] limit error checking to areas of d units",
"*showint radius show interaction area under box",
@ -3273,7 +3273,7 @@ CmdDrc(w, cmd)
rootUse = (CellUse *) window->w_surfaceID;
DRCFlatCheck(rootUse, &rootArea);
break;
case SHOWINT:
if (argc != 3) goto badusage;
radius = cmdParseCoord(w, argv[2], TRUE, FALSE);
@ -3301,7 +3301,7 @@ CmdDrc(w, cmd)
else
DRCSetStyle(argv[2]);
break;
case CATCHUP:
DRCCatchUp();
break;
@ -3312,7 +3312,7 @@ CmdDrc(w, cmd)
rootUse = (CellUse *) window->w_surfaceID;
DRCCheck(rootUse, &rootArea);
break;
case COUNT:
count_total = -1;
if (argc == 3)
@ -3403,7 +3403,7 @@ CmdDrc(w, cmd)
DRCEuclidean = FALSE;
}
break;
case FIND:
if ((window = w) == NULL)
{
@ -3464,7 +3464,7 @@ CmdDrc(w, cmd)
TxPrintf("There are no errors in %s.\n", rootDef->cd_name);
}
break;
case DRC_HALO:
if (argc == 3)
{
@ -3517,7 +3517,7 @@ CmdDrc(w, cmd)
TxPrintf(" %s\n", *msg);
}
break;
case DRC_OFF:
DRCBackGround = DRC_SET_OFF;
#ifdef MAGIC_WRAPPER
@ -3526,7 +3526,7 @@ CmdDrc(w, cmd)
#endif
TxSetPrompt('%'); /* Return prompt to "normal" */
break;
case DRC_ON:
/* Don't allow overriding of DRC_NOT_SET */
if (DRCBackGround == DRC_SET_OFF) DRCBackGround = DRC_SET_ON;
@ -3542,7 +3542,7 @@ CmdDrc(w, cmd)
"off" : "on");
#endif
break;
case PRINTRULES:
if (argc > 3) goto badusage;
if (argc < 3)
@ -3556,11 +3556,11 @@ CmdDrc(w, cmd)
if (fp != stdout)
(void) fclose(fp);
break;
case RULESTATS:
DRCTechRuleStats();
break;
case STATISTICS:
DRCPrintStats();
break;
@ -3605,7 +3605,7 @@ CmdDrc(w, cmd)
}
return;
}
/*
* ----------------------------------------------------------------------------
*
@ -3643,7 +3643,7 @@ CmdDump(w, cmd)
if (cmdDumpParseArgs("dump", w, cmd, &dummy, &scx))
SelectDump(&scx);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letter E.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -44,7 +44,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "extract/extract.h"
#include "select/select.h"
/*
* ----------------------------------------------------------------------------
*
@ -98,7 +98,7 @@ CmdEdit(w, cmd)
* only in windows where the edit cell is displayed differently from
* other cells.
*/
GeoTransRect(&EditToRootTransform, &(usave->cu_def->cd_bbox), &area);
(void) WindSearch(DBWclientID, (ClientData) NULL,
(Rect *) NULL, cmdEditRedisplayFunc, (ClientData) &area);
@ -106,12 +106,12 @@ CmdEdit(w, cmd)
DBWUndoOldEdit(EditCellUse, EditRootDef, &EditToRootTransform,
&RootToEditTransform);
}
/* Use the position of the point to select one of the currently-selected
* cells (if there are more than one). If worst comes to worst, just
* select any selected cell.
*/
(void) ToolGetPoint((Point *) NULL, &pointArea);
cmdFoundNewEdit = FALSE;
@ -231,7 +231,7 @@ cmdEditEnumFunc(selUse, use, transform, area)
/* It overlaps. Now find out which array element it points to,
* and adjust the transforms accordingly.
*/
DBArrayOverlap(use, &useArea, &xlo, &xhi, &ylo, &yhi);
GeoTransTrans(DBGetArrayTransform(use, xlo, ylo), transform,
&EditToRootTransform);
@ -574,7 +574,7 @@ badusage:
}
/*
* ----------------------------------------------------------------------------
*
@ -678,7 +678,7 @@ CmdErase(w, cmd)
* area of interest, then erase all those cells. Continue
* this until all cells have been erased.
*/
scx.scx_use = EditCellUse;
scx.scx_x = scx.scx_y = 0;
scx.scx_area = editRect;
@ -721,13 +721,13 @@ ClientData cdarg; /* Not used. */
/* All this procedure does is to remember cells that are
* found, up to MAXCELLS of them.
*/
if (cmdEraseCount >= MAXCELLS) return 1;
cmdEraseCells[cmdEraseCount] = scx->scx_use;
cmdEraseCount += 1;
return 2;
}
/*
* ----------------------------------------------------------------------------
*
@ -762,7 +762,7 @@ CmdExpand(w, cmd)
CellDef *rootBoxDef;
int cmdExpandFunc(); /* Forward reference. */
if (cmd->tx_argc > 2 || (cmd->tx_argc == 2
if (cmd->tx_argc > 2 || (cmd->tx_argc == 2
&& (strncmp(cmd->tx_argv[1], "toggle", strlen(cmd->tx_argv[1])) != 0)))
{
TxError("Usage: %s or %s toggle\n", cmd->tx_argv[0], cmd->tx_argv[0]);
@ -784,7 +784,7 @@ CmdExpand(w, cmd)
/* the cursor box and window to restore the original view. */
d = DBLambda[1];
do
do
{
if (d != DBLambda[1])
{
@ -833,7 +833,7 @@ cmdExpandFunc(use, windowMask)
&DBAllButSpaceBits);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -939,7 +939,7 @@ CmdExtract(w, cmd)
NULL
};
static char *cmdExtCmd[] =
{
{
"all extract root cell and all its children",
"cell name extract selected cell into file \"name\"",
"do [option] enable extractor option",

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters F through I.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -301,7 +301,7 @@ CmdFeedback(w, cmd)
fpargs.style = style;
fpargs.text = cmd->tx_argv[2];
for (i = 0, j = pstart; i < points; i++)
for (i = 0, j = pstart; i < points; i++)
{
plist[i].p_x = cmdScaleCoord(w, cmd->tx_argv[j++],
FALSE, TRUE, FEEDMAGNIFY);
@ -347,7 +347,7 @@ CmdFeedback(w, cmd)
}
}
freeMagic(plist);
}
}
}
else
{
@ -357,7 +357,7 @@ CmdFeedback(w, cmd)
DBWFeedbackAdd(&box, cmd->tx_argv[2], rootDef, 1, style);
}
break;
case CLEAR:
if (cmd->tx_argc == 3)
DBWFeedbackClear(cmd->tx_argv[2]);
@ -367,12 +367,12 @@ CmdFeedback(w, cmd)
goto badusage;
nth = 0;
break;
case COUNT:
if (cmd->tx_argc != 2) goto badusage;
TxPrintf("There are %d feedback areas.\n", DBWFeedbackCount);
break;
case FIND:
if (cmd->tx_argc > 3) goto badusage;
if (DBWFeedbackCount == 0)
@ -400,7 +400,7 @@ CmdFeedback(w, cmd)
ToolMoveCorner(TOOL_TR, &box.r_ur, FALSE, rootDef);
TxPrintf("Feedback #%d: %s\n", nth, text);
break;
case FEED_HELP:
if (cmd->tx_argc > 2) goto badusage;
TxPrintf("Feedback commands have the form \"feedback option\",\n");
@ -408,7 +408,7 @@ CmdFeedback(w, cmd)
for (msg = cmdFeedbackOptions; *msg != NULL; msg++)
TxPrintf("%s\n", *msg);
break;
case SAVE:
if (cmd->tx_argc != 3) goto badusage;
f = PaOpen(cmd->tx_argv[2], "w", (char *) NULL, ".",
@ -446,7 +446,7 @@ CmdFeedback(w, cmd)
}
(void) fclose(f);
break;
case WHY:
if (cmd->tx_argc > 2) goto badusage;
w = ToolGetBoxWindow(&box, (int *) NULL);
@ -469,7 +469,7 @@ CmdFeedback(w, cmd)
break;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -479,7 +479,7 @@ CmdFeedback(w, cmd)
* of the box, and paint it across to the other side of the box. Can
* operate in any of four directions.
*
* Usage:
* Usage:
* fill direction [layers]
*
* Results:
@ -629,7 +629,7 @@ cmdFillFunc(tile, cxp)
cmdFillList = cfa;
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -672,12 +672,12 @@ CmdFindBox(w, cmd)
if (boxDef != (((CellUse *) w->w_surfaceID)->cu_def))
{
TxError("The box is not in the same coordinate %s",
TxError("The box is not in the same coordinate %s",
"system as the window.\n");
return;
};
if (cmd->tx_argc == 1)
if (cmd->tx_argc == 1)
{
/* center view on box */
Point rootPoint;
@ -721,7 +721,7 @@ CmdFindBox(w, cmd)
usage:
TxError("Usage: findbox [zoom]\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -743,7 +743,7 @@ usage:
* ----------------------------------------------------------------------------
*/
int cmdFindLabelFunc(rect, name, label, cdarg)
int cmdFindLabelFunc(rect, name, label, cdarg)
Rect *rect;
char *name;
Label *label;
@ -785,7 +785,7 @@ CmdFindLabel(w, cmd)
if (boxDef != (((CellUse *) w->w_surfaceID)->cu_def))
{
TxError("The box is not in the same coordinate %s",
TxError("The box is not in the same coordinate %s",
"system as the window.\n");
return;
};
@ -814,9 +814,9 @@ CmdFindLabel(w, cmd)
found = DBSrLabelLoc(labUse, labname, cmdFindLabelFunc,
(ClientData) &cmdFindLabelRect);
if (found) {
if (cmdFindLabelRect.r_xbot == cmdFindLabelRect.r_xtop)
if (cmdFindLabelRect.r_xbot == cmdFindLabelRect.r_xtop)
cmdFindLabelRect.r_xtop++;
if (cmdFindLabelRect.r_ybot == cmdFindLabelRect.r_ytop)
if (cmdFindLabelRect.r_ybot == cmdFindLabelRect.r_ytop)
cmdFindLabelRect.r_ytop++;
ToolMoveBox(TOOL_BL,&cmdFindLabelRect.r_ll,FALSE,labUse->cu_def);
ToolMoveCorner(TOOL_TR,&cmdFindLabelRect.r_ur,FALSE,labUse->cu_def);
@ -856,7 +856,7 @@ dbListLabels(scx, label, tpath, cdarg)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -927,7 +927,7 @@ CmdFlush(w, cmd)
TxPrintf("[Flushed]\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -1015,7 +1015,7 @@ CmdGetcell(w, cmd)
}
#ifndef NO_SIM_MODULE
/*
* ----------------------------------------------------------------------------
*
@ -1052,10 +1052,10 @@ CmdGetnode(w, cmd)
/* check arguments to command */
switch (cmd->tx_argc) {
case 1 :
case 1 :
break;
case 2 :
case 2 :
if (strcmp("abort", cmd->tx_argv[1]) == 0) {
if (!SimInitGetnode) {
HashKill(&SimGetnodeTbl);
@ -1082,7 +1082,7 @@ CmdGetnode(w, cmd)
}
break;
case 3 :
case 3 :
if (strcmp("alias", cmd->tx_argv[1]) == 0) {
if (strcmp("on", cmd->tx_argv[2]) == 0) {
if (!SimGetnodeAlias) {
@ -1159,7 +1159,7 @@ badusage:
TxError(" or: getnode fast\n");
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -1242,9 +1242,9 @@ CmdGrid(w, cmd)
crec->dbw_gridRect.r_xbot, crec->dbw_gridRect.r_ybot,
crec->dbw_gridRect.r_xtop, crec->dbw_gridRect.r_ytop);
Tcl_SetResult(magicinterp, boxvalues, TCL_DYNAMIC);
#else
TxPrintf("Grid unit box is (%d, %d) to (%d, %d)\n",
TxPrintf("Grid unit box is (%d, %d) to (%d, %d)\n",
crec->dbw_gridRect.r_xbot, crec->dbw_gridRect.r_ybot,
crec->dbw_gridRect.r_xtop, crec->dbw_gridRect.r_ytop);
#endif
@ -1256,7 +1256,7 @@ CmdGrid(w, cmd)
Tcl_SetObjResult(magicinterp,
Tcl_NewBooleanObj(crec->dbw_flags & DBW_GRID));
#else
TxPrintf("Grid is %s\n",
TxPrintf("Grid is %s\n",
(crec->dbw_flags & DBW_GRID) ? "on" : "off");
#endif
return;
@ -1417,7 +1417,7 @@ CmdHistory(w, cmd)
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -1545,7 +1545,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found)
{
if (warn_not_found)
TxError("Couldn't find use %s\n", s);
return TT_SPACE;
return TT_SPACE;
}
GeoTransTrans(DBGetArrayTransform(use, scx2.scx_x, scx2.scx_y),
&use->cu_transform, &tmp);
@ -1570,7 +1570,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found)
bool isNeg = FALSE;
/* The characters up to the leading '_' should match one of the */
/* "short names" for a plane in this technology. */
/* "short names" for a plane in this technology. */
*xstr = '\0';
for (pnum = PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++)
@ -1604,7 +1604,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found)
localrect.r_ybot = ypos;
localrect.r_xtop = xpos + 1;
localrect.r_ytop = ypos + 1;
/* TxPrintf("Node is on the plane \"%s\"\n",
/* TxPrintf("Node is on the plane \"%s\"\n",
DBPlaneLongNameTbl[pnum]); */
locvalid = TRUE;
}
@ -1635,7 +1635,7 @@ CmdFindNetProc(nodename, use, rect, warn_not_found)
Plane *plane = targetdef->cd_planes[pnum];
ttype = TT_SPACE; /* revert to space in case of failure */
/* Find the tile type of the tile at the specified point which */
/* exists on the plane pnum. */
@ -1708,7 +1708,7 @@ CmdGoto(w, cmd)
int locargc;
bool nocomplain = FALSE;
TileType ttype;
windCheckOnlyWindow(&w, DBWclientID);
if ((w == (MagWindow *) NULL) || (w->w_client != DBWclientID))
{
@ -1740,7 +1740,7 @@ CmdGoto(w, cmd)
ToolMoveCorner(TOOL_TR, &rect.r_ur, FALSE, use->cu_def);
/* Return the tile type so we know what we're looking at if there */
/* are multiple layers drawn at the indicated point. */
/* are multiple layers drawn at the indicated point. */
#ifdef MAGIC_WRAPPER
Tcl_SetResult(magicinterp, DBTypeLongName(ttype), NULL);
@ -1762,8 +1762,8 @@ findTile(tile, rtype)
{
TileType ttype;
if (IsSplit(tile))
{
if (IsSplit(tile))
{
if (SplitSide(tile))
ttype = SplitRightType(tile);
else
@ -1776,7 +1776,7 @@ findTile(tile, rtype)
}
/*
* The following are from DBcellcopy.c; slightly modified for present
* The following are from DBcellcopy.c; slightly modified for present
* purposes.
*/
@ -1786,13 +1786,13 @@ void
FlatCopyAllLabels(scx, mask, xMask, targetUse)
SearchContext *scx;
TileTypeBitMask *mask;
int xMask;
int xMask;
CellUse *targetUse;
{
int flatCopyAllLabels();
char pathstring[FLATTERMSIZE];
TerminalPath tpath;
pathstring[0] = '\0';
tpath.tp_first = tpath.tp_next = pathstring;
tpath.tp_last = pathstring + FLATTERMSIZE;
@ -1880,7 +1880,7 @@ CmdFlatten(w, cmd)
CellUse *newuse;
SearchContext scx;
CellUse *flatDestUse;
destname = cmd->tx_argv[cmd->tx_argc - 1];
xMask = CU_DESCEND_ALL;
dolabels = TRUE;
@ -1953,7 +1953,7 @@ CmdFlatten(w, cmd)
newuse->cu_expandMask = CU_DESCEND_SPECIAL;
UndoDisable();
flatDestUse = newuse;
if (EditCellUse)
scx.scx_use = EditCellUse;
else
@ -1975,7 +1975,7 @@ CmdFlatten(w, cmd)
if (xMask != CU_DESCEND_ALL)
DBCellCopyAllCells(&scx, xMask, flatDestUse, (Rect *)NULL);
UndoEnable();
}

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters L through Q.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -50,7 +50,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
void CmdPaintEraseButton();
/*
* ----------------------------------------------------------------------------
*
@ -125,7 +125,7 @@ CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type)
DBWLabelChanged(EditCellUse->cu_def, lab, DBW_ALLWINDOWS);
lab->lab_rect = tmpArea;
}
/*
* ----------------------------------------------------------------------------
@ -281,7 +281,7 @@ CmdLabel(w, cmd)
pos = GeoTransPos(&RootToEditTransform, pos);
}
}
/*
* Find and check validity of type parameter. Accept prefix "-" on
* layer as an indication of a "sticky" label (label is fixed to
@ -309,7 +309,7 @@ CmdLabel(w, cmd)
CmdLabelProc(p, font, size, rotate, offx, offy, pos, sticky, type);
}
/*
* ----------------------------------------------------------------------------
*
@ -627,7 +627,7 @@ CmdMove(w, cmd)
/* Use the displacement between the box lower-left corner and
* the point as the transform.
*/
MagWindow *window;
window = ToolGetPoint(&rootPoint, (Rect *) NULL);
@ -656,7 +656,7 @@ moveToPoint:
DBWSetBox(rootDef, &newBox);
}
}
if (doOrigin)
{
DBMoveCell(rootDef, t.t_c, t.t_f);
@ -686,7 +686,7 @@ moveToPoint:
else
SelectTransform(&t);
}
/*
* ----------------------------------------------------------------------------
*
@ -758,7 +758,7 @@ CmdPaint(w, cmd)
if (DRCBackGround)
DRCCheckThis (EditCellUse->cu_def, TT_CHECKPAINT, &editRect);
}
/*
* ----------------------------------------------------------------------------
*
@ -796,7 +796,7 @@ CmdPaintEraseButton(w, butPoint, isPaint)
WindPointToSurface(w, butPoint, (Point *) NULL, &rootRect);
DBSeeTypesAll(((CellUse *)w->w_surfaceID), &rootRect,
DBSeeTypesAll(((CellUse *)w->w_surfaceID), &rootRect,
crec->dbw_bitmask, &mask);
TTMaskAndMask(&mask, &DBActiveLayerBits);
TTMaskAndMask(&mask, &crec->dbw_visibleLayers);
@ -967,7 +967,7 @@ CmdPath(w, cmd)
(void) StrDup(pathptr, srcptr);
}
return;
usage:
TxError("Usage: %s [search|cell|sys] [[+]path]\n", cmd->tx_argv[0]);
}
@ -1116,7 +1116,7 @@ cmdPortLabelFunc2(scx, label, tpath, cdata)
/* */
/* If "port" is true, then search only for labels that are ports. */
/* If "unique" is true, then return a label only if exactly one label */
/* is found in the edit box. */
/* is found in the edit box. */
/*----------------------------------------------------------------------*/
Label *
@ -1190,7 +1190,7 @@ portFindLabel(editDef, port, unique, nonEdit)
if (lab != NULL)
if (nonEdit) *nonEdit = TRUE;
}
return lab;
}
/*
@ -1244,7 +1244,7 @@ portFindLabel(editDef, port, unique, nonEdit)
#define PORT_MAKEALL 8
#define PORT_NAME 9
#define PORT_REMOVE 10
#define PORT_HELP 11
#define PORT_HELP 11
void
CmdPort(w, cmd)
@ -1656,7 +1656,7 @@ portWrongNumArgs:
}
return;
}
parseindex:
if ((option != PORT_MAKEALL) && (lab->lab_flags & PORT_DIR_MASK))
@ -1717,7 +1717,7 @@ parseindex:
break;
}
else if ((sl->lab_flags & PORT_NUM_MASK) > idx)
idx = (sl->lab_flags & PORT_NUM_MASK);
idx = (sl->lab_flags & PORT_NUM_MASK);
}
}
idx++;
@ -1837,7 +1837,7 @@ CmdDoProperty(def, cmd, argstart)
char *value;
bool propfound;
int locargc = cmd->tx_argc - argstart + 1;
if (locargc == 1)
{
/* print all properties and their values */
@ -1872,7 +1872,7 @@ CmdDoProperty(def, cmd, argstart)
DBPropPut(def, cmd->tx_argv[argstart], value);
}
def->cd_flags |= (CDMODIFIED | CDGETNEWSTAMP);
}
}
else
{
TxError("Usage: property [name] [value]\n");
@ -1951,7 +1951,7 @@ printPropertiesFunc(name, value)
}
Tcl_AppendElement(magicinterp, keyvalue);
freeMagic(keyvalue);
#else
TxPrintf("%s = %s\n", name, value);
#endif
@ -1992,7 +1992,7 @@ CmdNetlist(w, cmd)
char **msg, *lastargv;
Point cursor;
static char *cmdNetlistOption[] =
{
{
"help print this help information",
"select select the net nearest the cursor",
"join join current net and net containing terminal nearest the cursor",

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters R through S.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -53,7 +53,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
extern void DisplayWindow();
#if !defined(NO_SIM_MODULE) && defined(RSIM_MODULE)
/*
* ----------------------------------------------------------------------------
@ -70,7 +70,7 @@ extern void DisplayWindow();
*
* ----------------------------------------------------------------------------
*/
void
CmdRsim(w, cmd)
MagWindow *w;
@ -99,7 +99,7 @@ CmdRsim(w, cmd)
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -162,7 +162,7 @@ CmdSave(w, cmd)
}
else cmdSaveCell(locDef, (char *) NULL, FALSE, TRUE);
}
/*
* ----------------------------------------------------------------------------
@ -223,7 +223,7 @@ CmdScaleGrid(w, cmd)
else
goto scalegridusage;
}
else
else
{
if (!StrIsInt(cmd->tx_argv[2]))
goto scalegridusage;
@ -469,7 +469,7 @@ CmdSee(w, cmd)
return;
}
/*
* ----------------------------------------------------------------------------
*
@ -514,7 +514,7 @@ cmdSelectArea(layers, less)
* no problem. If it's in more than window, the cursor must
* disambiguate the windows.
*/
xMask = ((DBWclientRec *) window->w_clientData)->dbw_bitmask;
if ((windowMask & ~xMask) != 0)
{
@ -534,7 +534,7 @@ cmdSelectArea(layers, less)
TTMaskClearType(&mask, TT_SPACE);
}
else return;
if (less)
{
(void) SelRemoveArea(&scx.scx_area, &mask);
@ -546,7 +546,7 @@ cmdSelectArea(layers, less)
crec = (DBWclientRec *) window->w_clientData;
SelectArea(&scx, &mask, crec->dbw_bitmask);
}
/*
* ----------------------------------------------------------------------------
*
@ -591,7 +591,7 @@ cmdSelectVisible(layers, less)
* no problem. If it's in more than window, the cursor must
* disambiguate the windows.
*/
xMask = ((DBWclientRec *) window->w_clientData)->dbw_bitmask;
if ((windowMask & ~xMask) != 0)
{
@ -611,7 +611,7 @@ cmdSelectVisible(layers, less)
TTMaskClearType(&mask, TT_SPACE);
}
else return;
if (less)
{
(void) SelRemoveArea(&scx.scx_area, &mask);
@ -631,7 +631,7 @@ cmdSelectVisible(layers, less)
}
SelectArea(&scx, &mask, crec->dbw_bitmask);
}
/*
* ----------------------------------------------------------------------------
*
@ -776,7 +776,7 @@ CmdSelect(w, cmd)
#ifdef MAGIC_WRAPPER
char *tclstr;
#endif
/* How close two clicks must be to be considered the same point: */
#define MARGIN 2
@ -793,7 +793,7 @@ CmdSelect(w, cmd)
* the argument list and set the "more" flag. Similarly for options
* "less", "nocycle", "top", and "cell".
*/
if (cmd->tx_argc >= 2)
{
int arg1len = strlen(cmd->tx_argv[1]);
@ -831,7 +831,7 @@ CmdSelect(w, cmd)
cmd->tx_argc--;
}
else if (!strncmp(cmd->tx_argv[1], "top", arg1len))
else if (!strncmp(cmd->tx_argv[1], "top", arg1len))
{
if ((cmd->tx_argc >= 3) && !strncmp(cmd->tx_argv[2],
"cell", strlen(cmd->tx_argv[2])))
@ -897,7 +897,7 @@ CmdSelect(w, cmd)
cmdSelectArea(optionArgs[1], less);
else cmdSelectArea("*,label,subcell", less);
return;
/*--------------------------------------------------------------------
* Select everything under the box, perhaps looking only at
* particular layers, but only if its visible.
@ -911,7 +911,7 @@ CmdSelect(w, cmd)
cmdSelectVisible(optionArgs[1], less);
else cmdSelectVisible("*,label,subcell", less);
return;
/*--------------------------------------------------------------------
* Clear out all of the material in the selection.
*--------------------------------------------------------------------
@ -921,7 +921,7 @@ CmdSelect(w, cmd)
if ((more) || (less) || (cmd->tx_argc > 2)) goto usageError;
SelectClear();
return;
/*--------------------------------------------------------------------
* Print out help information.
*--------------------------------------------------------------------
@ -1080,7 +1080,7 @@ CmdSelect(w, cmd)
GeoTransRect(&SelectUse->cu_transform, &SelectDef->cd_bbox, &selarea);
DBWHLRedraw(SelectRootDef, &selarea, FALSE);
break;
case SEL_BOX: case SEL_CHUNK: case SEL_REGION: case SEL_NET:
if (cmd->tx_argc > 3) goto usageError;
if (cmd->tx_argc == 3)
@ -1156,7 +1156,7 @@ Okay:
* instance followed by selecting an instance that was occupying the
* same space WILL cause a crash).
*/
if (!GEO_ENCLOSE(&cmd->tx_p, &lastArea)
|| ((lastCommand + 1) != TxCommandNumber))
{
@ -1185,7 +1185,7 @@ Okay:
* box/cursor to begin the selection
*/
TileTypeBitMask uMask;
if (CmdParseLayers (optionArgs[1], &uMask))
{
if (TTMaskEqual (&uMask, &DBSpaceBits))
@ -1353,7 +1353,7 @@ Okay:
* and select it. In this case, defeat all of the "multiple
* click" code.
*/
if ((cmd->tx_argc == 3) && (optionArgs == &cmd->tx_argv[2]) &&
(more == FALSE) && (less == FALSE))
{
@ -1399,7 +1399,7 @@ Okay:
lessCellCycle = less;
use = DBSelectCell(scx.scx_use, lastUse, &lastIndices,
&scx.scx_area, crec->dbw_bitmask, &trans, &p, &tpath);
/* Use the window's root cell if nothing else is found. */
if (use == NULL)
@ -1855,7 +1855,7 @@ CmdSetLabel(w, cmd)
TxPrintf("\n");
#endif
break;
case SETLABEL_TEXT:
if (EditCellUse)
{
@ -1899,7 +1899,7 @@ CmdSetLabel(w, cmd)
if (font < -1) break;
}
}
if (EditCellUse)
{
SelEnumLabels(&DBAllTypeBits, TRUE, (bool *)NULL,
@ -1957,7 +1957,7 @@ CmdSetLabel(w, cmd)
{
offset.p_x = cmdScaleCoord(w, cmd->tx_argv[2], TRUE, TRUE, 8);
offset.p_y = cmdScaleCoord(w, cmd->tx_argv[3], TRUE, FALSE, 8);
}
}
if (EditCellUse)
{
SelEnumLabels(&DBAllTypeBits, TRUE, (bool *)NULL,
@ -2072,7 +2072,7 @@ CmdSideways(w, cmd)
* y-axis, then move it back so its lower-left corner is in
* the same place that it used to be.
*/
GeoTransRect(&GeoSidewaysTransform, &SelectDef->cd_bbox, &bbox);
GeoTranslateTrans(&GeoSidewaysTransform,
SelectDef->cd_bbox.r_xbot - bbox.r_xbot,
@ -2083,7 +2083,7 @@ CmdSideways(w, cmd)
/* Flip the box, if it exists and is in the same window as the
* selection.
*/
if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef))
{
Rect newBox;
@ -2094,7 +2094,7 @@ CmdSideways(w, cmd)
return;
}
/*
* ----------------------------------------------------------------------------
*
@ -2137,7 +2137,7 @@ CmdShell(w, cmd)
freeMagic(command);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -2190,7 +2190,7 @@ CmdSgraph(w, cmd)
*
* Results:
* Rsim is forked from Magic.
*
*
* Side effects:
* None.
*
@ -2227,7 +2227,7 @@ CmdStartRsim(w, cmd)
}
SimConnectRsim(TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -2241,7 +2241,7 @@ CmdStartRsim(w, cmd)
* Side effects:
* None.
*
* ----------------------------------------------------------------------------
* ----------------------------------------------------------------------------
*/
void
@ -2304,7 +2304,7 @@ CmdSimCmd(w, cmd)
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -2365,7 +2365,7 @@ CmdSnap(w, cmd)
printit:
if (n == SNAP_LIST) /* list */
#ifdef MAGIC_WRAPPER
Tcl_SetResult(magicinterp,
Tcl_SetResult(magicinterp,
(DBWSnapToGrid == DBW_SNAP_INTERNAL) ? "internal" :
((DBWSnapToGrid == DBW_SNAP_LAMBDA) ? "lambda" : "user"),
TCL_VOLATILE);
@ -2379,7 +2379,7 @@ printit:
((DBWSnapToGrid == DBW_SNAP_LAMBDA) ? "lambda" : "user"));
}
/*
* ----------------------------------------------------------------------------
@ -2563,7 +2563,7 @@ CmdSplitErase(w, cmd)
DRCCheckThis (EditCellUse->cu_def, TT_CHECKPAINT, &editRect);
}
/*
* ----------------------------------------------------------------------------
*
@ -2672,7 +2672,7 @@ CmdStretch(w, cmd)
/* Use the displacement between the box lower-left corner and
* the point as the transform. Round off to a Manhattan distance.
*/
Point rootPoint;
MagWindow *window;
int absX, absY;
@ -2705,6 +2705,6 @@ CmdStretch(w, cmd)
GeoTransRect(&t, &rootBox, &newBox);
DBWSetBox(rootDef, &newBox);
}
SelectStretch(xdelta, ydelta);
}

View File

@ -4,16 +4,16 @@
* The functions in this file are local to the commands module
* and not intended to be used by its clients.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -262,7 +262,7 @@ CmdInit()
CmdYMAllButSpace = DBAllButSpaceBits;
TTMaskClearType(&CmdYMAllButSpace, L_CELL);
}
/*
* ----------------------------------------------------------------------------
*
@ -326,7 +326,7 @@ cmdFlushCell(def)
&parentUse->cu_bbox);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -443,7 +443,7 @@ CmdParseLayers(s, mask)
|| (window->w_client != DBWclientID))
return (FALSE);
crec = (DBWclientRec *) window->w_clientData;
DBSeeTypesAll(((CellUse *)window->w_surfaceID),
DBSeeTypesAll(((CellUse *)window->w_surfaceID),
&rootRect, crec->dbw_bitmask, &newmask);
TTMaskAndMask(&newmask, &crec->dbw_visibleLayers);
tempmask = DBAllButSpaceAndDRCBits;
@ -512,7 +512,7 @@ printTypes:
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -551,7 +551,7 @@ cmdMaskToType(mask)
return (TT_SPACE);
return (type);
}
/*
* ----------------------------------------------------------------------------
*
@ -583,7 +583,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename)
* saved. May be NULL, in which case the name from
* the CellDef is taken.
*/
bool noninteractive;/* If true, try hard but don't ask the user
bool noninteractive;/* If true, try hard but don't ask the user
* questions.
*/
bool tryRename; /* We should rename the cell to the name of the
@ -602,7 +602,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename)
* cell changes to the name of the file in which it was
* saved.
*/
if (strcmp(cellDef->cd_name, UNNAMED) == 0)
{
if (newName == NULL)
@ -660,7 +660,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename)
* We want to find all windows for which this is
* the root cell and update their captions.
*/
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
cmdSaveWindSet, (ClientData) cellDef);
}
@ -669,7 +669,7 @@ cleanup:
freeMagic(fileName);
return;
}
/*
* ----------------------------------------------------------------------------
*
@ -773,7 +773,7 @@ again:
}
return (returnname);
}
/*
* ----------------------------------------------------------------------------
*
@ -814,7 +814,7 @@ cmdSaveWindSet(window, def)
WindCaption(window, caption);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -860,10 +860,10 @@ CmdSetWindCaption(newEditUse, rootDef)
newEditDef = (newEditUse) ? newEditUse->cu_def : NULL;
newRootDef = rootDef;
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
cmdWindSet, (ClientData) 0);
}
/*
* ----------------------------------------------------------------------------
*
@ -901,7 +901,7 @@ cmdWindSet(window)
if (wDef != newRootDef)
(void) sprintf(caption, "%s [NOT BEING EDITED]", wDef->cd_name);
else {
(void) sprintf(caption, "%s EDITING %s", wDef->cd_name,
(void) sprintf(caption, "%s EDITING %s", wDef->cd_name,
newEditDef->cd_name);
#ifdef SCHEME_INTERPRETER
/* Add a binding to scheme variable "edit-cell" */
@ -914,7 +914,7 @@ cmdWindSet(window)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -951,7 +951,7 @@ CmdGetRootPoint(point, rect)
return (window);
}
/*
* ----------------------------------------------------------------------------
*
@ -991,7 +991,7 @@ CmdGetEditPoint(point, rect)
return (window);
}
/*
* ----------------------------------------------------------------------------
*
@ -1027,7 +1027,7 @@ CmdWarnWrite()
prompt = TxPrintString("%d Magic cell%s been modified.\n Do you"
" want to exit magic and lose %s? ", count,
count == 1 ? " has" : "s have",
count == 1 ? "it" : "them");
count == 1 ? "it" : "them");
code = TxDialog(prompt, yesno, 0);
return (code) ? TRUE : FALSE;
}
@ -1041,12 +1041,12 @@ cmdWarnWriteFunc(cellDef, pcount)
(*pcount)++;
return 0;
}
/*
* ----------------------------------------------------------------------------
* cmdExpandOneLevel --
*
* Expand (unexpand) a cell, and unexpand all of its children. This is
* Expand (unexpand) a cell, and unexpand all of its children. This is
* called by commands such as getcell, expand current cell, and load.
* Don't bother to unexpand children if we are unexpanding this cell.
*
@ -1082,7 +1082,7 @@ cmdExpand1func(cu, bitmask)
DBExpand(cu, (int) bitmask, FALSE);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1134,7 +1134,7 @@ cmdGetSelFunc(selUse, realUse, transform, pResult)
*cmdSelTrans = *transform;
return 1; /* Skip any other selected cells. */
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Commands with names beginning with the letters T through Z.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -85,7 +85,7 @@ checkForPaintFunc(cellDef, arg)
{
int numPlanes = *((int *)arg);
int pNum, result;
if (cellDef->cd_flags & CDINTERNAL) return 0;
for (pNum = PL_SELECTBASE; pNum < numPlanes; pNum++)
@ -158,7 +158,7 @@ CmdCheckForPaintFunc()
#define TECH_LAYERS 7
#define TECH_DRC 8
#define TECH_LOCK 9
#define TECH_UNLOCK 10
#define TECH_UNLOCK 10
#define TECH_REVERT 11
void
@ -177,14 +177,14 @@ CmdTech(w, cmd)
{ "no", "yes", 0 };
static char *cmdTechOption[] =
{
{
"load filename [-noprompt][-[no]override]\n\
Load a new technology",
"help Display techinfo command options",
"name Show current technology name",
"filename Show current technology filename",
"version Show current technology version",
"lambda Show internal units per lambda",
"lambda Show internal units per lambda",
"planes Show defined planes",
"layers [<layer...>] Show defined layers",
"drc <rule> <layer...> Query DRC ruleset",
@ -451,7 +451,7 @@ CmdTech(w, cmd)
if (!strncmp(cmd->tx_argv[2], "width", 5))
{
tresult = DRCGetDefaultLayerWidth(t1);
#ifdef MAGIC_WRAPPER
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult));
#else
TxPrintf("Minimum width is %d\n", tresult);
@ -470,7 +470,7 @@ CmdTech(w, cmd)
else
t2 = t1;
tresult = DRCGetDefaultLayerSpacing(t1, t2);
#ifdef MAGIC_WRAPPER
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult));
#else
TxPrintf("Minimum spacing is %d\n", tresult);
@ -493,7 +493,7 @@ CmdTech(w, cmd)
}
tresult = DRCGetDefaultLayerSurround(t1, t2);
#ifdef MAGIC_WRAPPER
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewIntObj(tresult));
#else
TxPrintf("Minimum surround is %d\n", tresult);
@ -572,7 +572,7 @@ CmdTech(w, cmd)
#endif
break;
}
if (!TechLoad(cmd->tx_argv[2], 0))
{
#ifdef MAGIC_WRAPPER
@ -647,7 +647,7 @@ CmdTool(w, cmd)
DBWPrintButtonDoc();
else (void) DBWChangeButtonHandler(cmd->tx_argv[1]);
}
/*
* ----------------------------------------------------------------------------
*
@ -682,7 +682,7 @@ CmdUnexpand(w, cmd)
TxError("Usage: %s\n", cmd->tx_argv[0]);
return;
}
windCheckOnlyWindow(&w, DBWclientID);
if (w == (MagWindow *) NULL)
{
@ -716,7 +716,7 @@ cmdUnexpandFunc(use, windowMask)
(TileTypeBitMask *) NULL);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -736,7 +736,7 @@ cmdUnexpandFunc(use, windowMask)
*
* ----------------------------------------------------------------------------
*/
void
CmdUpsidedown(w, cmd)
MagWindow *w;
@ -752,12 +752,12 @@ CmdUpsidedown(w, cmd)
return;
}
if (!ToolGetEditBox((Rect *)NULL)) return;
/* To flip the selection upside down, first flip it around the
* x-axis, then move it back so its lower-left corner is in
* the same place that it used to be.
*/
GeoTransRect(&GeoUpsideDownTransform, &SelectDef->cd_bbox, &bbox);
GeoTranslateTrans(&GeoUpsideDownTransform,
SelectDef->cd_bbox.r_xbot - bbox.r_xbot,
@ -768,7 +768,7 @@ CmdUpsidedown(w, cmd)
/* Flip the box, if it exists and is in the same window as the
* selection.
*/
if (ToolGetBox(&rootDef, &rootBox) && (rootDef == SelectRootDef))
{
Rect newBox;
@ -888,7 +888,7 @@ CmdWhat(w, cmd)
extern int cmdWhatLabelPreFunc(), orderLabelFunc();
locargc = cmd->tx_argc;
#ifdef MAGIC_WRAPPER
if ((locargc == 2) && !strncmp(cmd->tx_argv[locargc - 1], "-list", 5))
{
@ -898,7 +898,7 @@ CmdWhat(w, cmd)
paintobj = Tcl_NewListObj(0, NULL);
labelobj = Tcl_NewListObj(0, NULL);
cellobj = Tcl_NewListObj(0, NULL);
}
}
if (locargc > 1)
{
TxError("Usage: what [-list]\n");
@ -999,7 +999,7 @@ CmdWhat(w, cmd)
moreLabelEntries = 0;
labelEntryCount = 0;
labelBlockTop = NULL;
labelBlockTop = NULL;
(void) SelEnumLabels(&DBAllTypeBits, FALSE, (bool *) NULL,
cmdWhatLabelPreFunc, (ClientData) &foundAny);
foundAny = FALSE;
@ -1121,7 +1121,7 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny)
labelEntry = &labelBlockTop[labelEntryCount];
moreLabelEntries = 100;
}
/* store the pointers for sorting later */
/* store the pointers for sorting later */
labelEntry->lab_type = label->lab_type;
labelEntry->lab_text = label->lab_text;
if (!cellUse->cu_id)
@ -1136,7 +1136,7 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny)
labelEntryCount++;
return 0;
}
int
cmdWhatLabelFunc(entry, foundAny)
@ -1176,13 +1176,13 @@ cmdWhatLabelFunc(entry, foundAny)
if (counts > 1)
TxPrintf(" (%i instances)", counts);
TxPrintf("\n \"%s\" is attached to %s in cell %s %s", entry->lab_text,
DBTypeLongName(entry->lab_type),
DBTypeLongName(entry->lab_type),
(isDef) ? "def" : "use", entry->cell_name);
last_type = entry->lab_type;
last_cell = entry->cell_name;
last_name = entry->lab_text;
counts = 1;
} else
} else
counts++;
return counts;
}
@ -1308,7 +1308,7 @@ CmdWire(w, cmd)
#endif
static char *cmdWireOption[] =
{
{
"decrement layer|width decrement the wire layer or width",
"help print this help information",
"horizontal add a new horizontal wire leg",
@ -1434,11 +1434,11 @@ CmdWire(w, cmd)
TxPrintf(" %s\n", *msg);
}
return;
case HORIZONTAL:
WireAddLeg((Rect *) NULL, (Point *) NULL, WIRE_HORIZONTAL);
return;
case LEG:
WireAddLeg((Rect *) NULL, (Point *) NULL, WIRE_CHOOSE);
return;
@ -1639,7 +1639,7 @@ CmdWire(w, cmd)
if (*xptr == '\0' || *yptr == '\0')
{
TxError("Bad coordinate pair at %s line %d\n",
cmd->tx_argv[4], i + 1);
cmd->tx_argv[4], i + 1);
freeMagic(plist);
return;
}
@ -1701,7 +1701,7 @@ CmdWire(w, cmd)
break;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -1832,7 +1832,7 @@ cmdWriteallFunc(def, cmd)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1929,7 +1929,7 @@ CmdXor(w, cmd)
void (*curPlaneSave)();
int p, t, h;
destname = cmd->tx_argv[cmd->tx_argc - 1];
xMask = CU_DESCEND_ALL;
dolabels = TRUE;
@ -1986,7 +1986,7 @@ CmdXor(w, cmd)
DBSetTrans(newuse, &GeoIdentityTransform);
newuse->cu_expandMask = CU_DESCEND_SPECIAL;
flatDestUse = newuse;
if (EditCellUse)
scx.scx_use = EditCellUse;
else
@ -2028,7 +2028,7 @@ CmdXor(w, cmd)
if (xMask != CU_DESCEND_ALL)
DBCellCopyAllCells(&scx, xMask, flatDestUse, (Rect *)NULL);
DBNewPaintTable(curPaintSave);
DBNewPaintPlane(curPlaneSave);

View File

@ -6,16 +6,16 @@
* These commands are not intended to be used by the ordinary magic
* user, but are provided for the benefit of system maintainers/implementors.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -52,7 +52,7 @@ extern void cmdPsearchStats();
void cmdStatsHier(CellDef *, int, CellDef *);
/*
* ----------------------------------------------------------------------------
*
@ -155,7 +155,7 @@ CmdCoord(w, cmd)
editRect.r_xtop, editRect.r_ytop);
TxPrintf("\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -185,7 +185,7 @@ CmdExtractTest(w, cmd)
}
#endif
/*
* ----------------------------------------------------------------------------
*
@ -397,7 +397,7 @@ CmdShowtech(w, cmd)
(void) fclose(outf);
}
/*
* ----------------------------------------------------------------------------
*
@ -721,7 +721,7 @@ cmdStatsOutput(def, cc)
freeMagic((char *) ci);
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -826,7 +826,7 @@ cmdPsearchStats(str, tl, td, count)
ups = us / count;
TxPrintf("%s: %d searches, %d us/search [%s]\n", str, count, ups, rstatp);
}
/*
* ----------------------------------------------------------------------------
*
@ -914,7 +914,7 @@ CmdTsearch(w, cmd)
if (!TTMaskEqual(&mask, &DBZeroTypeBits))
numTilesFound = 0;
for (i = 0; i < count; i++)
{
/*****
@ -977,7 +977,7 @@ cmdTsrFunc(tp)
numTilesFound++;
return 0;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Definitions for the commands module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* Needs to include: tiles.h, database.h

View File

@ -3,16 +3,16 @@
*
* Computation of boundaries of a database tile plane.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -25,7 +25,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/geometry.h"
#include "database/database.h"
#include "tiles/tile.h"
typedef struct dbcellboundstruct
{
@ -49,7 +49,7 @@ DBBoundCellPlane(def, extended, rect)
DBCellBoundStruct cbs;
int dbCellBoundFunc();
Plane *plane;
filter.tf_func = NULL;
filter.tf_arg = (ClientData)&cbs;
@ -171,7 +171,7 @@ DBBoundPlane(plane, rect)
return (TRUE);
}
/*
* --------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Place and Delete subcells
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -37,7 +37,7 @@ int placeCellFunc();
int deleteCellFunc();
Tile * clipCellTile();
void dupTileBody();
void cellTileMerge();
void cellTileMerge();
bool ctbListMatch();
void freeCTBList();
@ -70,7 +70,7 @@ dbInstanceUnplace(CellUse *use)
}
/*
* ----------------------------------------------------------------------------
*
@ -113,7 +113,7 @@ DBCellFindDup(use, parent)
return dupUse;
}
/*
* ----------------------------------------------------------------------------
*
@ -161,7 +161,7 @@ DBPlaceCell (use, def)
DBUndoCellUse(use, UNDO_CELL_PLACE);
SigEnableInterrupts();
}
/*
* ----------------------------------------------------------------------------
* DBDeleteCell --

View File

@ -4,16 +4,16 @@
* Procedures for calculating and changing cell bounding boxes,
* and for manipulating arrays of cells.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -34,7 +34,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "dbwind/dbwind.h"
#include "utils/undo.h"
/*
*-----------------------------------------------------------------------------
*
@ -105,7 +105,7 @@ DBPrintUseId(scx, name, size, display_only)
return (sp);
}
/*
* ----------------------------------------------------------------------------
*
@ -143,7 +143,7 @@ DBCellClearAvail(cellDef)
{
cellDef->cd_flags &= ~(CDNOTFOUND|CDAVAILABLE);
}
/*
* ----------------------------------------------------------------------------
*
@ -185,7 +185,7 @@ DBCellSetModified(cellDef, ismod)
if (ismod)
cellDef->cd_flags |= CDMODIFIED|CDGETNEWSTAMP;
}
/*
* ----------------------------------------------------------------------------
*
@ -253,7 +253,7 @@ DBComputeUseBbox(use)
GeoTransRect(&use->cu_transform, &childRect, &use->cu_bbox);
GeoTransRect(&use->cu_transform, &childExtend, &use->cu_extended);
}
/*
* ----------------------------------------------------------------------------
*
@ -276,7 +276,7 @@ DBIsChild(cu1, cu2)
{
return (cu1->cu_parent == cu2->cu_def);
}
/*
* ----------------------------------------------------------------------------
*
@ -305,7 +305,7 @@ DBSetArray(fromCellUse, toCellUse)
toCellUse->cu_xsep = fromCellUse->cu_xsep;
toCellUse->cu_ysep = fromCellUse->cu_ysep;
}
/*
* ----------------------------------------------------------------------------
*
@ -330,7 +330,7 @@ DBSetTrans(cellUse, trans)
cellUse->cu_transform = *trans;
DBComputeUseBbox(cellUse);
}
/*
* ----------------------------------------------------------------------------
*
@ -389,7 +389,7 @@ DBMakeArray(cellUse, rootToCell, xlo, ylo, xhi, yhi, xsep, ysep)
DBComputeUseBbox(cellUse);
}
/*
* ----------------------------------------------------------------------------
*
@ -483,7 +483,7 @@ DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi)
* The intent is that "outlo" will be the smaller of the two
* coordinates, and "outhi" the larger.
*/
/* Even though it should never happen, handle zero spacings
* gracefully.
*/
@ -545,7 +545,7 @@ DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi)
*pyhi = outyhi;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -765,7 +765,7 @@ dbReComputeBboxFunc(cellDef, boundProc, recurseProc)
if ((last != NULL) && (parent != NULL)) (*recurseProc)(parent);
UndoEnable();
}
/*
* ----------------------------------------------------------------------------
*
@ -812,7 +812,7 @@ DBComputeArrayArea(area, cellUse, x, y, prect)
prect->r_ybot = area->r_ybot + ydelta;
prect->r_ytop = area->r_ytop + ydelta;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Cell copying (yank and stuff)
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -169,7 +169,7 @@ DBPaintPlaneXor(def, pNum, type, area, undo)
*
* This function calls DBPaintPlane, but first checks if the type
* being painted is an active layer. If the type is a contact,
* then the residues are checked to see if they are active layers.
* then the residues are checked to see if they are active layers.
* Painting proceeds accordingly.
*
* ----------------------------------------------------------------------------
@ -246,7 +246,7 @@ DBCellCopyManhattanPaint(scx, mask, xMask, targetUse)
(void) DBTreeSrTiles(scx, mask, xMask, dbCopyManhattanPaint, (ClientData) &arg);
}
/*
*-----------------------------------------------------------------------------
*
@ -289,7 +289,7 @@ DBCellCopyAllPaint(scx, mask, xMask, targetUse)
DBTreeSrTiles(scx, &locMask, xMask, dbCopyAllPaint, (ClientData) &arg);
}
/*
*-----------------------------------------------------------------------------
*
@ -332,7 +332,7 @@ DBCellCopyAllLabels(scx, mask, xMask, targetUse, pArea)
/* DBTeeSrLabels finds all the labels that we want plus some more.
* We'll filter out the ones that we don't need.
*/
arg.cla_targetUse = targetUse;
arg.cla_bbox = pArea;
if (pArea != NULL)
@ -387,7 +387,7 @@ dbCopyAllLabels(scx, lab, tpath, arg)
}
return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -447,7 +447,7 @@ DBCellCopyPaint(scx, mask, xMask, targetUse)
mask, dbCopyAllPaint, (ClientData) &cxp);
}
}
/*
*-----------------------------------------------------------------------------
*
@ -456,7 +456,7 @@ DBCellCopyPaint(scx, mask, xMask, targetUse)
* Copy labels from scx->scx_use to targetUse, transforming according to
* the transform in scx. Only labels attached to layers of the types
* specified by mask are copied. If mask contains the L_LABEL bit, then
* all labels are copied regardless of their layer. The area copied is
* all labels are copied regardless of their layer. The area copied is
* determined by GEO_LABEL_IN_AREA.
*
* Results:
@ -573,7 +573,7 @@ dbCopyManhattanPaint(tile, cxp)
return (0);
}
/***
*** Filter function for paint
***/
@ -601,7 +601,7 @@ dbCopyAllPaint(tile, cxp)
bool splittile = FALSE;
TileType dinfo = 0;
if (IsSplit(tile))
{
splittile = TRUE;
@ -667,7 +667,7 @@ dbCopyAllPaint(tile, cxp)
int np, i, j;
GrClipTriangle(&targetRect, &arg->caa_rect, TRUE, dinfo, points, &np);
if (np == 0)
return(0);
@ -756,7 +756,7 @@ splitdone:
return (0);
}
/*
*-----------------------------------------------------------------------------
*
@ -816,7 +816,7 @@ DBCellCopyAllCells(scx, xMask, targetUse, pArea)
(void) DBTreeSrCells(scx, xMask, dbCellCopyCellsFunc, (ClientData) &arg);
}
/*
*-----------------------------------------------------------------------------
*
@ -866,7 +866,7 @@ DBCellCopyCells(scx, targetUse, pArea)
(void) DBCellSrArea(scx, dbCellCopyCellsFunc, (ClientData) &arg);
}
/*
*-----------------------------------------------------------------------------
*
@ -963,7 +963,7 @@ dbCellCopyCellsFunc(scx, arg)
}
return 2;
}
/*
* ----------------------------------------------------------------------------
*
@ -993,7 +993,7 @@ DBNewPaintTable(newTable))[NT][NT]
if (newTable) dbCurPaintTbl = newTable;
return oldTable;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* CellUse/CellDef creation, deletion, naming.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -158,7 +158,7 @@ DBEnumerateTypes(rMask)
HashSearch hs;
HashEntry *entry;
CellDef *cellDef;
TTMaskZero(rMask);
HashStartSearch(&hs);
while ((entry = HashNext(&dbCellDefTable, &hs)) != NULL)
@ -250,7 +250,7 @@ DBCellDelete(cellname, force)
DBUndoReset(celldef);
/* If we're destroying "UNNAMED", then we want to rename it first */
/* so that WindUnload() will create a new one. */
/* so that WindUnload() will create a new one. */
if (!strcmp(cellname, UNNAMED))
DBCellRename(cellname, "__UNNAMED__");
@ -281,7 +281,7 @@ DBCellDelete(cellname, force)
}
/*
* ----------------------------------------------------------------------------
*
@ -317,7 +317,7 @@ DBCellInit()
*
* ----------------------------------------------------------------------------
*/
char *
dbGetUseName(celluse)
CellUse *celluse;
@ -355,7 +355,7 @@ dbGetUseName(celluse)
newsize += strlen(ybuf);
}
}
newID = (char *)mallocMagic(newsize);
strcpy(newID, useID);
if (isx || isy)
@ -369,7 +369,7 @@ dbGetUseName(celluse)
return (newID);
}
/*
* ----------------------------------------------------------------------------
*
@ -559,7 +559,7 @@ dbCellPrintInfo(StartDef, who, dolist)
} /* endswitch */
}
/*
* ----------------------------------------------------------------------------
@ -630,7 +630,7 @@ DBCellPrint(CellName, who, dolist)
HashEntry *entry;
CellDef *celldef;
CellUse *celluse;
if (!dolist)
{
switch (who)
@ -963,7 +963,7 @@ dbUsePrintInfo(StartUse, who, dolist)
* if it is not a hierarchical name; otherwise, if it is a
* hierarchical name, the instance before the last '/' is mapped
* to its cellDef, and that cellDef is searched for the indicated
* instance.
* instance.
*
* ----------------------------------------------------------------------------
*/
@ -982,14 +982,14 @@ DBUsePrint(CellName, who, dolist)
char *lasthier;
int dbCellUsePrintFunc();
if ((CellName != NULL) && ((lasthier = strrchr(CellName, '/')) != NULL))
{
char *prevhier;
*lasthier = '\0';
prevhier = strrchr(CellName, '/');
if (prevhier == NULL)
prevhier = CellName;
prevhier = CellName;
else
prevhier++;
@ -1155,7 +1155,7 @@ DBLockUse(UseName, bval)
CellUse *celluse;
int dbUseLockFunc();
/*
*
* Check to see if a cell name was specified. If not,
@ -1225,7 +1225,7 @@ DBCellLookDef(cellName)
return ((CellDef *) HashGetValue(entry));
}
/*
* ----------------------------------------------------------------------------
*
@ -1273,14 +1273,14 @@ DBCellNewDef(cellName)
HashSetValue(entry, (ClientData) cellDef);
cellDef->cd_name = StrDup((char **) NULL, cellName);
/* Strip any .mag extension off of the cell name */
/* Strip any .mag extension off of the cell name */
dotptr = strrchr(cellDef->cd_name, '.');
if (dotptr && !strcmp(dotptr, ".mag")) *dotptr = '\0';
cellDef->cd_file = NULL;
return (cellDef);
}
/*
* ----------------------------------------------------------------------------
*
@ -1339,7 +1339,7 @@ DBCellDefAlloc()
return (cellDef);
}
/*
* ----------------------------------------------------------------------------
*
@ -1387,7 +1387,7 @@ DBCellNewUse(cellDef, useName)
/* Initial client field */
/* (commands can use this field for whatever
* they like, but should restore its value to CLIENTDEFAULT before exiting.)
* they like, but should restore its value to CLIENTDEFAULT before exiting.)
*/
cellUse->cu_client = (ClientData) CLIENTDEFAULT;
@ -1395,7 +1395,7 @@ DBCellNewUse(cellDef, useName)
DBComputeUseBbox(cellUse);
return (cellUse);
}
/*
* ----------------------------------------------------------------------------
*
@ -1440,7 +1440,7 @@ DBCellRenameDef(cellDef, newName)
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -1483,7 +1483,7 @@ DBCellDeleteDef(cellDef)
DBCellDefFree(cellDef);
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1541,7 +1541,7 @@ DBCellDefFree(cellDef)
freeMagic((char *) cellDef);
}
/*
* ----------------------------------------------------------------------------
*
@ -1598,7 +1598,7 @@ DBCellDeleteUse(cellUse)
freeMagic((char *) cellUse);
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -1632,7 +1632,7 @@ DBCellSrDefs(pattern, func, cdata)
int pattern; /* Used for selecting cell definitions. If any
* of the bits in the pattern are in a def->cd_flags,
* or if pattern is 0, the user-supplied function
* is invoked.
* is invoked.
*/
int (*func)(); /* Function to be applied to each matching CellDef */
ClientData cdata; /* Client data also passed to function */
@ -1653,7 +1653,7 @@ DBCellSrDefs(pattern, func, cdata)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1710,7 +1710,7 @@ DBLinkCell(use, parentDef)
lastName = strrchr(use->cu_def->cd_name, '/');
if (lastName == NULL) lastName = use->cu_def->cd_name;
else lastName++;
/* This search must not be interrupted */
SigDisableInterrupts();
(void) DBCellEnum(parentDef, dbLinkFunc, (ClientData) lastName);
@ -1773,7 +1773,7 @@ dbLinkFunc(cellUse, defname)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1818,7 +1818,7 @@ DBReLinkCell(cellUse, newName)
if (UndoIsEnabled()) DBUndoCellUse(cellUse, UNDO_CELL_SETID);
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -1843,7 +1843,7 @@ DBFindUse(id, parentDef)
{
HashEntry *he;
char *delimit;
/* Sanity checks */
if (id == NULL) return NULL;
if (parentDef == NULL) return NULL;
@ -1858,7 +1858,7 @@ DBFindUse(id, parentDef)
return (CellUse *) HashGetValue(he);
}
/*
* ----------------------------------------------------------------------------
*
@ -1902,7 +1902,7 @@ DBGenerateUniqueIds(def, warn)
HashKill(&dbUniqueDefTable);
HashKill(&dbUniqueNameTable);
}
/*
* ----------------------------------------------------------------------------
*
@ -1944,7 +1944,7 @@ dbFindNamesFunc(use, parentDef)
}
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -2007,7 +2007,7 @@ setHash:
DBSetUseIdHash(use, parentDef);
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -2035,7 +2035,7 @@ DBSetUseIdHash(use, parentDef)
he = HashFind(&parentDef->cd_idHash, use->cu_id);
HashSetValue(he, (ClientData) use);
}
/*
* ----------------------------------------------------------------------------
*
@ -2064,7 +2064,7 @@ DBUnLinkCell(use, parentDef)
HashSetValue(he, (ClientData) NULL);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Cell selection.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -55,7 +55,7 @@ struct selectArg
/* Forward declarations */
int dbSelectCellSr();
/*
* ----------------------------------------------------------------------------
*
@ -251,7 +251,7 @@ dbSelectCellSr(scx, arg)
/* compute lastArea (using long long to avoid overflow). */
{
int xDiff, yDiff;
xDiff = pbx->r_xtop - pbx->r_xbot;
yDiff = pbx->r_ytop - pbx->r_ybot;
/* BY NP */
@ -281,7 +281,7 @@ dbSelectCellSr(scx, arg)
n = arg->csa_bestpath->tp_last - arg->csa_bestpath->tp_next;
strncpy(arg->csa_bestpath->tp_next, cpath->tp_first, n);
arg->csa_bestpath->tp_next[n] = '\0';
/* Pop last component of current path */
cpath->tp_next = savenext;
*savenext = '\0';
@ -308,7 +308,7 @@ dbSelectCellSr(scx, arg)
/* compute bestArea (using long long to avoid overflow). */
{
int xDiff, yDiff;
xDiff = pbx->r_xtop - pbx->r_xbot;
yDiff = pbx->r_ytop - pbx->r_ybot;
bestArea = (dlong)xDiff * (dlong)yDiff;

View File

@ -3,16 +3,16 @@
*
* Area searching which spans cell boundaries.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -276,7 +276,7 @@ dbCellPlaneSrFunc(scx, fp)
return 1;
else return 0;
}
/*
*-----------------------------------------------------------------------------
@ -395,7 +395,7 @@ dbCellUniqueTileSrFunc(scx, fp)
else return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -500,7 +500,7 @@ DBNoTreeSrTiles(scx, mask, xMask, func, cdarg)
return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -595,7 +595,7 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg)
/* For non-manhattan searches, label must be in or */
/* touch the triangle. (to-do: needs a proper */
/* insideness test) */
if (flags & TF_LABEL_ATTACH_CORNER)
{
Rect r1 = *r;
@ -652,7 +652,7 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg)
* instead of just TOUCH. Be careful when expanding: can't expand
* any coordinate past infinity.
*/
scx2 = *scx;
if (scx2.scx_area.r_xbot > TiPlaneRect.r_xbot) scx2.scx_area.r_xbot -= 1;
if (scx2.scx_area.r_ybot > TiPlaneRect.r_ybot) scx2.scx_area.r_ybot -= 1;
@ -691,7 +691,7 @@ dbCellLabelSrFunc(scx, fp)
bool dereference = (def->cd_flags & CDDEREFERENCE) ? TRUE : FALSE;
if (!DBCellRead(def, (char *) NULL, TRUE, dereference, NULL)) return 0;
}
if (fp->tf_tpath != (TerminalPath *) NULL)
{
TerminalPath *tp = fp->tf_tpath;
@ -741,7 +741,7 @@ cleanup:
return (result);
}
/*
*-----------------------------------------------------------------------------
*
@ -862,7 +862,7 @@ dbTreeCellSrFunc(scx, fp)
}
return result;
}
/*
*-----------------------------------------------------------------------------
*
@ -1006,7 +1006,7 @@ DBSrRoots(baseDef, transform, func, cdarg)
}
return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -1045,7 +1045,7 @@ DBIsAncestor(cellDef1, cellDef2)
}
return (FALSE);
}
/*
*-----------------------------------------------------------------------------
*
@ -1113,13 +1113,13 @@ DBCellSrArea(scx, func, cdarg)
if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, dereference, NULL))
return 0;
}
if (DBSrCellPlaneArea(scx->scx_use->cu_def->cd_cellPlane,
&scx->scx_area, dbCellSrFunc, (ClientData) &context))
return 1;
return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -1191,7 +1191,7 @@ dbCellSrFunc(use, cxp)
return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -1243,7 +1243,7 @@ DBCellEnum(cellDef, func, cdarg)
return 1;
else return 0;
}
/*
*-----------------------------------------------------------------------------
*
@ -1506,7 +1506,7 @@ DBScaleEverything(scalen, scaled)
SigDisableInterrupts();
lhead = NULL;
(void) DBCellSrDefs(0, dbCellDefEnumFunc, (ClientData) &lhead);
(void) DBCellSrDefs(0, dbCellDefEnumFunc, (ClientData) &lhead);
/* Apply scaling function to each CellDef */
@ -1895,7 +1895,7 @@ dbScaleCell(cellDef, scalen, scaled)
DBScalePoint(&lab->lab_bbox.r_ll, scalen, scaled);
DBScalePoint(&lab->lab_bbox.r_ur, scalen, scaled);
for (i = 0; i < 4; i++)
DBScalePoint(&lab->lab_corners[i], scalen, scaled);
}
@ -1962,7 +1962,7 @@ dbCellDefEnumFunc(cellDef, arg)
lcd->cellDef = cellDef;
lcd->cd_next = (*arg);
(*arg) = lcd;
return 0;
}
@ -1989,7 +1989,7 @@ dbCellUseEnumFunc(cellUse, arg)
lcu->cellUse = cellUse;
lcu->cu_next = (*arg);
(*arg) = lcu;
return 0;
}
@ -2024,11 +2024,11 @@ DBMoveCell(cellDef, origx, origy)
Plane *newplane;
BPlane *cellPlane, *cellPlaneOrig;
/* Unlike dbScaleCell(), this routine is only run on valid edit defs */
/* Unlike dbScaleCell(), this routine is only run on valid edit defs */
cellDef->cd_flags |= CDBOXESCHANGED;
/* Enumerate all unique cell uses, and move their position in the */
/* Enumerate all unique cell uses, and move their position in the */
/* bounding box and transform. */
luhead = NULL;

View File

@ -3,16 +3,16 @@
*
* Low-level support for cell operations.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -130,11 +130,11 @@ DBCellCopyDefBody(sourceDef, destDef)
destDef->cd_idHash = sourceDef->cd_idHash;
for (i = 0; i < MAXPLANES; i++)
destDef->cd_planes[i] = sourceDef->cd_planes[i];
/* Be careful to update parent pointers in the children of dest.
* Don't allow interrupts to wreck this.
*/
SigDisableInterrupts();
(void) DBSrCellPlaneArea(destDef->cd_cellPlane,
&TiPlaneRect, dbCopyDefFunc, (ClientData) destDef);
@ -150,7 +150,7 @@ dbCopyDefFunc(use, def)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -220,7 +220,7 @@ DBCellClearDef(cellDef)
SigEnableInterrupts();
}
/*
* ----------------------------------------------------------------------------
@ -255,7 +255,7 @@ DBClearPaintPlane(plane)
TiSetBody(newCenterTile, TT_SPACE);
dbSetPlaneTile(plane, newCenterTile);
}
/*
* ----------------------------------------------------------------------------
*
@ -300,7 +300,7 @@ dbSetPlaneTile(plane, newCenterTile)
LEFT(newCenterTile) = TiPlaneRect.r_xbot;
BOTTOM(newCenterTile) = TiPlaneRect.r_ybot;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -6,16 +6,16 @@
* and one that operates hierarchically, across cell boundaries
* (DBTreeCopyConnect).
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -47,7 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
* of information that must be passed through multiple
* levels of search function (used by dbSrConnectFunc).
*/
struct conSrArg
{
CellDef *csa_def; /* Definition being searched. */
@ -67,7 +67,7 @@ struct conSrArg
* of information that must be passed through multiple
* levels of search function (used by dbcConnectFunc).
*/
typedef struct
{
Rect area; /* Area to process */
@ -117,7 +117,7 @@ DBTransformDiagonal(oldtype, trans)
{
TileType dinfo;
int o1, o2, o3, dir, side;
o1 = ((trans->t_e > 0) || (trans->t_d > 0)) ? 1 : 0;
o2 = ((trans->t_a > 0) || (trans->t_b > 0)) ? 1 : 0;
o3 = (trans->t_a != 0) ? 1 : 0;
@ -169,7 +169,7 @@ DBInvTransformDiagonal(oldtype, trans)
return dinfo;
}
/*
* ----------------------------------------------------------------------------
*
@ -201,7 +201,7 @@ DBInvTransformDiagonal(oldtype, trans)
* 1 then the search is aborted.
*
* *** WARNING ***
*
*
* Func should not modify any paint during the search, since this
* will mess up pointers kept by these procedures and likely cause
* a core-dump.
@ -262,7 +262,7 @@ DBSrConnect(def, startArea, mask, connect, bounds, func, clientData)
if (startTile == NULL) return 0;
/* The following lets us call DBSrConnect recursively */
else if (startTile->ti_client == (ClientData)1) return 0;
/* Pass 1. During this pass the client function gets called. */
@ -353,7 +353,7 @@ DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData)
if (startTile == NULL) return 0;
/* The following lets us call DBSrConnect recursively */
else if (startTile->ti_client == (ClientData)1) return 0;
/* Pass 1. During this pass the client function gets called. */
@ -367,7 +367,7 @@ DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData)
return result;
}
/*
* ----------------------------------------------------------------------------
*
@ -442,7 +442,7 @@ dbSrConnectFunc(tile, csa)
* connected tiles. For each one found, call ourselves
* recursively.
*/
if (IsSplit(tile))
{
if (SplitSide(tile))
@ -575,7 +575,7 @@ donesides:
/* Lastly, check to see if this tile connects to anything on
* other planes. If so, search those planes.
*/
planes = DBConnPlanes[loctype];
planes &= ~(PlaneNumToMaskBit(csa->csa_plane));
if (planes != 0)
@ -606,7 +606,7 @@ donesides:
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -632,11 +632,11 @@ int
dbcUnconnectFunc(tile, clientData)
Tile *tile; /* Current tile */
ClientData clientData; /* Unused. */
{
return 1;
}
/*
* ----------------------------------------------------------------------------
@ -786,7 +786,7 @@ dbcConnectLabelFunc(scx, lab, tpath, csa2)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -852,7 +852,7 @@ dbcConnectFunc(tile, cx)
/* Clip the current area down to something that overlaps the
* area of interest.
*/
csa2 = (struct conSrArg2 *)cx->tc_filter->tf_arg;
GeoClip(&newarea, csa2->csa2_bounds);
if (GEO_RECTNULL(&newarea)) return 0;
@ -868,7 +868,7 @@ dbcConnectFunc(tile, cx)
* If so, then there's no need to process the current area,
* since any processing that is needed was already done before.
*/
connectMask = &csa2->csa2_connect[loctype];
/* In the case of contact bits, the types underneath
@ -920,7 +920,7 @@ dbcConnectFunc(tile, cx)
*/
/* Only extend those sides bordering the diagonal tile */
if (dinfo & TT_DIAGONAL)
{
if (dinfo & TT_SIDE) /* right */
@ -967,7 +967,7 @@ dbcConnectFunc(tile, cx)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1106,6 +1106,6 @@ DBTreeCopyConnect(scx, mask, xMask, connect, area, doLabels, destUse)
/* Recompute the bounding box of the destination and record its area
* for redisplay.
*/
DBReComputeBbox(destUse->cu_def);
}

View File

@ -4,16 +4,16 @@
* Functions to compute statistics on the paint of
* a tree of cells.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "database/database.h"
#include "database/databaseInt.h"
/*
* ----------------------------------------------------------------------------
*
@ -50,7 +50,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
* cell graph; if it returns 0 then the subcells of 'def' are visited;
* if it returns 1 then the subcells are not visited.
*
* int
* int
* hiercount(parent, uses, child, cdata)
* CellDef *parent, *child;
* int uses; /# Scale factor: number of times child

View File

@ -3,16 +3,16 @@
*
* Expansion and unexpansion of cells
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -44,7 +44,7 @@ struct expandArg
*/
ClientData ea_arg; /* Argument to pass to func. */
};
/*
* ----------------------------------------------------------------------------
*
@ -96,7 +96,7 @@ DBExpand(cellUse, expandMask, expandFlag)
else
cellUse->cu_expandMask &= ~expandMask;
}
/*
* ----------------------------------------------------------------------------
*
@ -265,7 +265,7 @@ dbUnexpandFunc(scx, arg)
return 1;
return 2;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Reading and writing of cells
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -92,7 +92,7 @@ bool dbReadUse();
/*
* ----------------------------------------------------------------------------
*
* file_is_not_writeable --
* file_is_not_writeable --
*
* Check to see if file is not writeable. (wen-king@cs.caltech.edu)
* Modified to deal with changed semantics of access() (rajit@cs.caltech.edu)
@ -205,7 +205,7 @@ file_is_not_writeable(name)
* the direction of the corner made by the right triangle.
* If the split tile contains more than one type, separate entries
* are output for each.
*
*
* 6. Zero or more groups of lines describing cell uses. Each group
* is of the form
* use <filename> <id> [<path>]
@ -345,7 +345,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
}
if (dbFgets(line, sizeof line, f) == NULL)
goto badfile;
if (line[0] == 'm')
{
if (!strncmp(line, "magscale", 8))
@ -356,13 +356,13 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
n = d = 1;
}
}
/* For backward compatibility, accept (and throw away) lines
* whose first word is "maxlabscale".
*/
else if (!strncmp(line, "maxlabscale", 11))
TxError("Deprecated keyword \"maxlabscale\" in input file.\n");
else
else
TxError("Expected magscale but got: %s", line);
if (dbFgets(line, sizeof line, f) == NULL)
goto badfile;
@ -409,9 +409,9 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
}
if (n > 1)
{
TxPrintf("Scaled magic input cell %s geometry by factor of %d",
TxPrintf("Scaled magic input cell %s geometry by factor of %d",
cellDef->cd_name, n);
if (d > 1)
if (d > 1)
{
TxPrintf("/ %d\n", d);
TxError("Warning: Geometry may be lost because internal grid"
@ -481,7 +481,7 @@ dbCellReadDef(f, cellDef, name, ignoreTech, dereference)
/*
* Record presence of material in cell.
*/
if (DBPlane(type) > 0)
{
if (type < DBNumUserLayers)
@ -520,7 +520,7 @@ nextrect:
((((dir & 0x2) >> 1) ^ (dir & 0x1)) ?
TT_DIRECTION : 0);
}
else
else
{
dinfo = 0;
if (!GetRect(f, 4, rp, n, d)) goto badfile;
@ -659,7 +659,7 @@ badfile:
* If DBbackupFile is non-NULL, then memory is freed, and the backup
* file is removed from the filesystem temp directory. Otherwise,
* nothing happens.
*
*
* ----------------------------------------------------------------------------
*/
@ -755,8 +755,8 @@ DBFileRecovery(filename)
recent = sbuf.st_ctime;
DBbackupFile = StrDup(&DBbackupFile, tempname);
}
}
}
}
}
}
closedir(cwd);
}
@ -1178,7 +1178,7 @@ DBTestOpen(name, fullPath)
return FALSE;
}
/*
* ----------------------------------------------------------------------------
*
@ -1490,7 +1490,7 @@ badTransform:
StrDup(&subCellDef->cd_file, path);
}
}
subCellUse = DBCellNewUse(subCellDef, (useid[0]) ?
((locked) ? useid + 1 : useid) : (char *) NULL);
@ -1539,7 +1539,7 @@ nextLine:
return (dbFgets(line, len, f) != NULL);
}
/*
* ----------------------------------------------------------------------------
*
@ -2147,7 +2147,7 @@ nextlabel:
return (TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -2259,7 +2259,7 @@ DBCellFindScale(cellDef)
}
/* Finally, cell uses */
if (DBCellEnum(cellDef, dbFindCellGCFFunc, (ClientData) &ggcf))
return 1;
@ -2283,7 +2283,7 @@ dbFindGCFFunc(tile, ggcf)
*ggcf = FindGCF(r.r_ytop, *ggcf);
if (r.r_ybot % (*ggcf) != 0)
*ggcf = FindGCF(r.r_ybot, *ggcf);
return (*ggcf == 1) ? 1 : 0;
}
@ -2326,7 +2326,7 @@ dbFindCellGCFFunc(cellUse, ggcf)
return (*ggcf == 1) ? 1 : 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -2552,7 +2552,7 @@ DBCellWriteFile(cellDef, f)
}
}
strcat(lstring, "\n");
FPRINTF(f, lstring);
FPRINTF(f, lstring);
}
}
}
@ -2658,7 +2658,7 @@ dbWritePropFunc(key, value, cdata)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -2668,7 +2668,7 @@ dbWritePropFunc(key, value, cdata)
* Mark the cell as having been written out. Before calling this
* procedure, the caller should make sure that timestamps have been
* updated where appropriate.
*
*
* This code is fairly tricky to ensure that we never destroy the
* original contents of a cell in the event of an I/O error. We
* try the following approaches in order.
@ -2845,7 +2845,7 @@ DBCellWrite(cellDef, fileName)
close(cellDef->cd_fd);
cellDef->cd_fd = -1;
}
#endif
#endif
/*
* The temp file is in good shape -- rename it to the real name,
@ -2871,7 +2871,7 @@ DBCellWrite(cellDef, fileName)
/* Re-aquire the lock on the new file by opening it. */
DBCellRead(cellDef, NULL, TRUE, dereference, NULL);
}
#endif
#endif
}
else if (exists)
@ -2974,7 +2974,7 @@ cleanup:
freeMagic(tmpname);
return result;
}
/*
* ----------------------------------------------------------------------------
*
@ -3007,8 +3007,8 @@ dbWritePaintFunc(tile, cdarg)
int dir;
if (IsSplit(tile))
{
if (IsSplit(tile))
{
lMask = DBResidueMask(SplitLeftType(tile));
rMask = DBResidueMask(SplitRightType(tile));
@ -3062,7 +3062,7 @@ dbWritePaintFunc(tile, cdarg)
FPRINTR(arg->wa_file,pstring);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -3205,7 +3205,7 @@ dbWriteCellFunc(cellUse, cdarg)
FPRINTR(arg->wa_file,cstring)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -3382,7 +3382,7 @@ dbWriteBackupFunc(def, f)
if (name == NULL) name = def->cd_name;
fprintf(f, "file %s\n", name);
/* Save/restore flags such that the crash recovery file write does */
/* *not* clear the CDMODIFIED, et al., bits */

View File

@ -3,16 +3,16 @@
*
* Label manipulation primitives.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -73,11 +73,11 @@ DBIsSubcircuit(cellDef)
for (lab = cellDef->cd_labels; lab != NULL; lab = lab->lab_next)
if (lab->lab_flags & PORT_DIR_MASK)
return TRUE;
return FALSE;
}
/*
* ----------------------------------------------------------------------------
*
@ -156,7 +156,7 @@ DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags)
* from the boundary, so it won't stick out past the edge of
* the cell boundary.
*/
#define BORDER 5
if (align < 0)
{
@ -224,15 +224,15 @@ DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags)
cellDef->cd_flags |= CDMODIFIED|CDGETNEWSTAMP;
return lab;
}
/*
* ----------------------------------------------------------------------------
*
* DBEraseLabel --
*
* Delete labels attached to tiles of the indicated types that
* are in the given area (as determined by the macro GEO_LABEL_IN_AREA).
* If this procedure is called as part of a command that also modifies paint,
* are in the given area (as determined by the macro GEO_LABEL_IN_AREA).
* If this procedure is called as part of a command that also modifies paint,
* then the paint modifications should be done BEFORE calling here.
*
* Results:
@ -422,7 +422,7 @@ DBEraseLabelsByContent(def, rect, type, text)
else goto nextCheck;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -483,7 +483,7 @@ DBEraseLabelsByFunction(def, func)
else goto nextCheck;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -525,7 +525,7 @@ DBReOrientLabel(cellDef, area, newPos)
}
}
}
/*
* ----------------------------------------------------------------------------
*
@ -560,7 +560,7 @@ DBAdjustLabels(def, area)
/* First, find each label that crosses the area we're
* interested in.
*/
for (lab = def->cd_labels; lab != NULL; lab = lab->lab_next)
{
if (!GEO_TOUCH(&lab->lab_rect, area)) continue;
@ -583,7 +583,7 @@ DBAdjustLabels(def, area)
/*
* Extended version of DBAdjustLabels. If noreconnect==0,
* Extended version of DBAdjustLabels. If noreconnect==0,
* this is supposed to be the same as DBAdjustlabels() above.
*/
void
@ -601,7 +601,7 @@ DBAdjustLabelsNew(def, area, noreconnect)
/* First, find each label that crosses the area we're
* interested in.
*/
labPrev = NULL;
lab = def->cd_labels;
while (lab != NULL)
@ -614,15 +614,15 @@ DBAdjustLabelsNew(def, area, noreconnect)
newType = DBPickLabelLayer(def, lab, locnoreconnect);
if (newType == lab->lab_type) {
goto nextLab;
}
}
if(newType < 0 && !(lab->lab_flags & LABEL_STICKY)) {
TxPrintf("Deleting ambiguous-layer label \"%s\" from %s in cell %s.\n",
lab->lab_text, DBTypeLongName(lab->lab_type),
def->cd_name);
if (labPrev == NULL)
def->cd_labels = lab->lab_next;
else
else
labPrev->lab_next = lab->lab_next;
if (def->cd_lastLabel == lab)
def->cd_lastLabel = labPrev;
@ -643,7 +643,7 @@ DBAdjustLabelsNew(def, area, noreconnect)
DBUndoPutLabel(def, lab);
modified = TRUE;
}
nextLab:
nextLab:
labPrev = lab;
lab = lab->lab_next;
}
@ -651,7 +651,7 @@ DBAdjustLabelsNew(def, area, noreconnect)
if (modified) DBCellSetModified(def, TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -726,7 +726,7 @@ DBPickLabelLayer(def, lab, noreconnect)
* left and one on the right. For each side, compute
* the type arrays separately. Then merge them together.
*/
check1 = lab->lab_rect;
check2 = lab->lab_rect;
check1.r_xbot -= 1;
@ -759,7 +759,7 @@ DBPickLabelLayer(def, lab, noreconnect)
* top and one on the bottom. Use the code from above
* to handle.
*/
check1 = lab->lab_rect;
check2 = lab->lab_rect;
check1.r_ybot -= 1;
@ -771,7 +771,7 @@ DBPickLabelLayer(def, lab, noreconnect)
/* This is a rectangular label. Same thing as for line labels,
* except there's only one area to search.
*/
types[0] = DBAllButSpaceAndDRCBits;
types[1] = DBAllButSpaceAndDRCBits;
TTMaskZero(&types[2]);
@ -804,11 +804,11 @@ DBPickLabelLayer(def, lab, noreconnect)
* the criteria above. This avoids weirdnesses caused by declaring
* types out of order in the techfile.
*/
if (TTMaskHasType(&types[0], lab->lab_type)) return lab->lab_type;
plane = DBPlane(lab->lab_type);
choice1 = choice2 = choice3 = choice4 = choice5 = choice6 = TT_SPACE;
for (j = PL_SELECTBASE; j < DBNumPlanes; j++)
{
for (i = TT_SELECTBASE; i < DBNumUserLayers; i += 1)
@ -874,7 +874,7 @@ DBPickLabelLayer(def, lab, noreconnect)
else if (noreconnect) {
#ifdef notdef
TxPrintf("DBPickLabelLayer \"%s\" (on %s at %d,%d) choice4=%s choice5=%s choice6=%s.\n",
lab->lab_text,
lab->lab_text,
DBTypeLongName(lab->lab_type),
lab->lab_rect.r_xbot,
lab->lab_rect.r_ytop,
@ -905,7 +905,7 @@ dbPickFunc1(tile, mask)
{
TileType type;
if (IsSplit(tile))
if (IsSplit(tile))
type = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile);
else
type = TiGetType(tile);
@ -932,7 +932,7 @@ dbPickFunc2(tile, mask)
TileType type;
TileTypeBitMask tmp, *rMask;
if (IsSplit(tile))
if (IsSplit(tile))
type = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile);
else
type = TiGetType(tile);
@ -1005,7 +1005,7 @@ DBFontInitCurves()
*
* Note: This routine does not take into account the curvature, and therefore
* does not optimize for the minimum number of line segments needed to
* represent the curve within a fixed margin of error.
* represent the curve within a fixed margin of error.
*
* ----------------------------------------------------------------------------
*/
@ -1046,7 +1046,7 @@ CalcBezierPoints(fp, bp)
newPath->fp_point.p_x = tmpx;
newPath->fp_point.p_y = tmpy;
curPath->fp_next = newPath;
curPath = newPath;
curPath = newPath;
}
}
@ -1115,7 +1115,7 @@ dbGetToken(ff)
* units of (database / 8) for a finer resolution, and measured
* relative to the label rectangle's origin so we don't run out of
* bits in computing the corner positions.
*
*
* This routine needs to be run whenever a font label changes
* properties (including when the font label is created).
*
@ -1550,7 +1550,7 @@ DBLoadFont(fontfile, scale)
/* If the first and last points are the same, remove the last one */
if (!GEO_SAMEPOINT(curPath->fp_point, pathStart->fp_point))
newChar->fc_numpoints++;
newChar->fc_points = (Point *)mallocMagic(i * sizeof(Point));
newChar->fc_next = NULL;
for (i = 0, curPath = pathStart; i < newChar->fc_numpoints;

View File

@ -3,16 +3,16 @@
*
* Label searching primitives.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -64,7 +64,7 @@ typedef struct {
extern void DBTreeFindUse();
bool dbParseArray();
/*
* ----------------------------------------------------------------------------
*
@ -140,7 +140,7 @@ DBSearchLabel(scx, mask, xMask, pattern, func, cdarg)
return 1;
else return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -174,7 +174,7 @@ dbSrLabelFunc(scx, label, tpath, labsr)
return 1;
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -253,7 +253,7 @@ DBSrLabelLoc(rootUse, name, func, cdarg)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -353,7 +353,7 @@ DBTreeFindUse(name, use, scx)
scx->scx_use = use;
}
/*
* ----------------------------------------------------------------------------
*
@ -473,7 +473,7 @@ dbParseArray(cp, use, scx)
scx->scx_trans = trans2;
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -549,11 +549,11 @@ DBNearestLabel(cellUse, area, point, xMask, labelArea, labelName, length)
dbNearestLabelFunc, (ClientData) &funcData);
if (name) freeMagic(name);
if (!funcData.nld_gotLabel) return FALSE;
else return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -610,6 +610,6 @@ dbNearestLabelFunc(scx, label, tpath, funcData)
}
*dst = 0;
}
return 0;
}

View File

@ -6,16 +6,16 @@
* The basic outer loop is a non-recursive area enumeration, and
* the inner loop attempts to avoid merging as much as possible.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -144,7 +144,7 @@ int dbPaintDebug = 0;
} \
}
/*
* ----------------------------------------------------------------------------
@ -640,7 +640,7 @@ done:
/* Now unmark the processed tiles with the same search algorithm */
/* Expand the area by one to catch tiles that were clipped at */
/* the area boundary. */
area->r_xbot -= 1;
area->r_ybot -= 1;
area->r_xtop += 1;
@ -1063,7 +1063,7 @@ nmenum:
while (BOTTOM(tile) > TOP(tp))
tp = RT(tp);
if ((RIGHT(tp) != LEFT(tile)) || (BOTTOM(tile) != TOP(tp)))
break;
break;
}
else
{
@ -1200,7 +1200,7 @@ nmenum:
/* Announce merge to undo system */
if (undo && UndoIsEnabled())
dbJoinUndo(tile, RIGHT(tile), undo);
dbJoinUndo(tile, RIGHT(tile), undo);
/* All's clear to merge. Again, walk down from tile */
tp2 = LB(tile);
@ -1263,7 +1263,7 @@ nmenum:
tp = tp2;
tp2 = RT(tp2);
}
/* Merge tp and tile */
/* Merge tp and tile */
TiJoinX(tile, tp, plane);
TiSetBody(tile, ttype);
}
@ -1321,7 +1321,7 @@ nmdone:
* return -1.
*
* This routine is called only from DBNMPaintPlane().
*
*
* Results:
* Returns the new type to be painted, or -1 if the result can
* only be generated by quartering the original tile.
@ -1397,7 +1397,7 @@ DBDiagonalProc(oldtype, cdata)
newtype = new_n; /* Turned back into a rectangle */
return newtype;
}
else
else
{
newtype = new_w | (new_e << 14);
newtype |= (TT_DIAGONAL | TT_DIRECTION);
@ -1416,8 +1416,8 @@ DBDiagonalProc(oldtype, cdata)
newtype |= TT_SIDE;
return newtype;
}
}
typedef struct
{
Rect *area; /* An area to be painted with a triangle */
@ -1835,11 +1835,11 @@ dbMarkClient(tile, clip)
tile->ti_client = (ClientData)CLIENTDEFAULT;
}
/*
* ----------------------------------------------------------------------------
*
* dbPaintMerge --
* dbPaintMerge --
*
* The tile 'tp' is to be changed to type 'newtype'. To maintain
* maximal horizontal strips, it may be necessary to merge the new
@ -2030,7 +2030,7 @@ dbPaintMerge(tile, newType, area, plane, mergeFlags, undo, mark)
return (tile);
}
/*
* ----------------------------------------------------------------------------
*
@ -2331,11 +2331,11 @@ paintdone:
done:
plane->pl_hint = tile;
}
/*
* ----------------------------------------------------------------------------
*
* dbMergeType --
* dbMergeType --
*
* The tile 'tp' is to be changed to type 'newtype'. To maintain
* maximal horizontal strips, it may be necessary to merge the new
@ -2520,7 +2520,7 @@ dbMergeType(tile, newType, plane, mergeFlags, undo, client)
return (tile);
}
/*
* ----------------------------------------------------------------------------
*
@ -2794,11 +2794,11 @@ paintdone:
done:
plane->pl_hint = tile;
}
/*
* ----------------------------------------------------------------------------
*
* dbPaintMergeVert --
* dbPaintMergeVert --
*
* The tile 'tp' is to be changed to type 'newtype'. To maintain
* maximal vertical strips, it may be necessary to merge the new
@ -2979,12 +2979,12 @@ dbPaintMergeVert(tile, newType, plane, mergeFlags, undo)
return (tile);
}
#ifdef PAINTDEBUG
/*
* ----------------------------------------------------------------------------
*
* dbPaintShowTile --
* dbPaintShowTile --
*
* Show the tile 'tp' in the cell undo->pu_def in a highlighted style,
* then print a message, wait for more, and erase the highlights.
@ -3064,7 +3064,7 @@ TiNMSplitY(oldtile, newtile, y, dir, undo)
Tile *newxtop, *newxbot;
Rect r;
height = TOP(*oldtile) - BOTTOM(*oldtile);
height = TOP(*oldtile) - BOTTOM(*oldtile);
tmpdx = (long)(y - BOTTOM(*oldtile)) * (long)(RIGHT(*oldtile) - LEFT(*oldtile));
haschanged = (x = (tmpdx % (long)height) << 1) ? ((undo) ? TRUE : FALSE) : FALSE;
x = (x >= height) ? 1 : 0;

View File

@ -3,16 +3,16 @@
*
* More paint and erase primitives
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -29,7 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/hash.h"
#include "database/database.h"
#include "database/databaseInt.h"
/*
* ----------------------------------------------------------------------------
* DBPaint --
@ -134,7 +134,7 @@ dbResolveImages(tile, cellDef)
return 0;
}
/*
* ----------------------------------------------------------------------------
* DBErase --
@ -166,7 +166,7 @@ DBErase (cellDef, rect, type)
if (GEO_SAMERECT(*rect, TiPlaneRect))
allPlane = TRUE;
else
else
GEO_EXPAND(rect, 1, &brect);
if (type & TT_DIAGONAL)
@ -207,7 +207,7 @@ DBErase (cellDef, rect, type)
}
}
}
/*
* ----------------------------------------------------------------------------
* DBPaintMask --
@ -280,7 +280,7 @@ DBPaintValid(cellDef, rect, mask, dinfo)
/* If any residue of a contact is not in the active layers */
/* list, then paint only the valid residue layers. */
for (t = TT_SELECTBASE; t < DBNumUserLayers; t++)
if (TTMaskHasType(&mmask, t))
if (DBIsContact(t))
@ -379,7 +379,7 @@ DBEraseValid(cellDef, rect, mask, dinfo)
/* If any residue of a contact is not in the active layers */
/* list, then erase the contact in multiple passes. */
for (t = TT_SELECTBASE; t < DBNumUserLayers; t++)
if (TTMaskHasType(&mmask, t))
if (DBIsContact(t))

View File

@ -6,16 +6,16 @@
* CellDef. Maybe in the future properties will be added to other database
* objects.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -31,7 +31,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "database/database.h"
#include "utils/malloc.h"
/* ----------------------------------------------------------------------------
*
*DBPropPut --
@ -48,8 +48,8 @@ void
DBPropPut(cellDef, name, value)
CellDef *cellDef; /* Pointer to definition of cell. */
char *name; /* The name of the property desired. */
ClientData value; /* MUST point to a malloc'ed structure, or NULL.
* This will be freed when the CellDef is freed.
ClientData value; /* MUST point to a malloc'ed structure, or NULL.
* This will be freed when the CellDef is freed.
*/
{
@ -60,7 +60,7 @@ DBPropPut(cellDef, name, value)
/* Honor the NOEDIT flag */
if (cellDef->cd_flags & CDNOEDIT) return;
if (cellDef->cd_props == (ClientData) NULL)
if (cellDef->cd_props == (ClientData) NULL)
{
cellDef->cd_props = (ClientData) mallocMagic(sizeof(HashTable));
HashInit( (HashTable *) cellDef->cd_props, 8, 0);
@ -75,7 +75,7 @@ DBPropPut(cellDef, name, value)
else
cellDef->cd_flags |= CDFIXEDBBOX;
}
entry = HashFind(htab, name);
oldvalue = (char *)HashGetValue(entry);
if (oldvalue != NULL) freeMagic(oldvalue);
@ -84,7 +84,7 @@ DBPropPut(cellDef, name, value)
else
HashSetValue(entry, value);
}
/* ----------------------------------------------------------------------------
*
* DBPropGet --
@ -127,7 +127,7 @@ done:
if (found != (bool *) NULL) *found = haveit;
return result;
}
/* ----------------------------------------------------------------------------
*
* DBPropEnum --
@ -153,7 +153,7 @@ DBPropEnum(cellDef, func, cdata)
* ClientData value;
* ClientData cdata;
* {
* -- return 0 to continue,
* -- return 0 to continue,
* -- nonzero to abort.
* return result;
* }
@ -178,7 +178,7 @@ DBPropEnum(cellDef, func, cdata)
return 0;
}
/* ----------------------------------------------------------------------------
*
* DBPropClearAll --

View File

@ -9,16 +9,16 @@
* case when it is a contact.
* Type -- TileType stored in a tile
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -63,7 +63,7 @@ void dbTechMatchResidues();
void dbTechAddStackedContacts();
int dbTechAddOneStackedContact();
/*
* ----------------------------------------------------------------------------
*
@ -98,7 +98,7 @@ DBTechInitContact()
dbNumContacts = 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -155,7 +155,7 @@ DBTechInitContact()
* syntax as the "contact" statement but describe a composite
* image such as a transistor or capacitor formed by layers on
* different planes.
*
*
* Results:
* FALSE on error, TRUE if successful.
*
@ -404,7 +404,7 @@ dbTechAddOneStackedContact(type1, type2)
/* The home plane of the contact is the plane of the */
/* first shared residue found. */
for (sres = TT_TECHDEPBASE; sres < DBNumUserLayers; sres++)
if (TTMaskHasType(&ttshared, sres))
{
@ -489,7 +489,7 @@ DBMaskAddStacking(mask)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -540,7 +540,7 @@ dbTechContactResidues(argc, argv, contactType)
DBTypeLongName(residueType));
return -1;
}
/*
* Make sure the residue is on the same or an adjacent plane
* to the contact's home type.
@ -596,9 +596,9 @@ dbTechContactResidues(argc, argv, contactType)
/* Ignore self */
TTMaskClearType(&mmask, contactType);
if (!TTMaskEqual(&mmask, &DBZeroTypeBits))
{
{
TxPrintf("Contact residues for %s identical to those for ",
DBTypeLongName(contactType));
@ -607,7 +607,7 @@ dbTechContactResidues(argc, argv, contactType)
TxPrintf("%s ", DBTypeLongName(imageType));
TxPrintf("\n");
}
}
/* All clear to set the residue bitmask for this contact type */

View File

@ -6,16 +6,16 @@
* of the general-purpose exported TileTypeBitMasks, and
* the "connect" section.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -80,7 +80,7 @@ DBTechInit()
/* Initialization of bezier coefficients for font vectors */
DBFontInitCurves();
}
/*
* ----------------------------------------------------------------------------
@ -115,7 +115,7 @@ DBTechSetTech(sectionName, argc, argv)
{
if (StrIsInt(argv[1]))
{
TechFormatVersion = atoi(argv[1]);
TechFormatVersion = atoi(argv[1]);
return TRUE;
}
else
@ -139,7 +139,7 @@ DBTechSetTech(sectionName, argc, argv)
* DBTechInitVersion --
*
* Clean up memory allocated by the "version" section
*
*
* ----------------------------------------------------------------------------
*/
@ -209,7 +209,7 @@ usage:
TechError("Badly formed version line\nUsage: {version text}|{description text}\n");
return FALSE;
}
/*
* ----------------------------------------------------------------------------
*
@ -238,7 +238,7 @@ DBTechInitConnect()
DBAllConnPlanes[i] = 0;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -287,7 +287,7 @@ DBTechAddConnect(sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -6,16 +6,16 @@
* DB*ShortName(), * the procedures in this file MUST be called
* after DBTechFinalType() has been called.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -39,7 +39,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "textio/textio.h"
#include "utils/malloc.h"
/*
* ----------------------------------------------------------------------------
*
@ -203,7 +203,7 @@ DBTechNameTypes(typename, bitmask)
return (type < DBNumUserLayers) ? type : -2;
}
/*
* ----------------------------------------------------------------------------
*
@ -267,7 +267,7 @@ DBTechNamePlane(planename)
{
return ((spointertype) dbTechNameLookup(planename, &dbPlaneNameLists));
}
/*
* ----------------------------------------------------------------------------
*
@ -304,7 +304,7 @@ DBTechNoisyNamePlane(planename)
return (pNum);
}
/*
* ----------------------------------------------------------------------------
*
@ -365,7 +365,7 @@ DBPlaneShortName(pNum)
return (DBPlaneLongNameTbl[pNum]);
return ("???");
}
/*
* ----------------------------------------------------------------------------
*
@ -409,7 +409,7 @@ DBTechTypesToPlanes(mask)
retMask = planeMask & noCellMask;
return retMask;
}
/*
* ----------------------------------------------------------------------------
@ -453,7 +453,7 @@ DBTechPrintTypes(mask, dolist)
{
if (((TileType)(spointertype) p->sn_value) == i)
{
if (dolist)
if (dolist)
{
if (firstname) keepname = p->sn_name;
else if (strlen(p->sn_name) > strlen(keepname))
@ -505,7 +505,7 @@ DBTechPrintTypes(mask, dolist)
{
if (((TileType)(spointertype) p->sn_value) == dtp->dt_type)
{
if (dolist)
if (dolist)
{
if (firstname) keepname = p->sn_name;
else if (strlen(p->sn_name) > strlen(keepname))
@ -547,7 +547,7 @@ DBTechPrintTypes(mask, dolist)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -761,7 +761,7 @@ DBTechNameMask0(layers, mask, noisy)
}
else
{
TileType t;
TileType t;
for (t = TT_TECHDEPBASE; t < DBNumUserLayers; t++)
if (TTMaskHasType(&m2, t))

View File

@ -4,16 +4,16 @@
* Creation of tile and plane types and their names.
* Lookup procedures are in DBtechname.c
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -66,7 +66,7 @@ TileTypeBitMask DBUserLayerBits;
TileTypeBitMask DBActiveLayerBits; /* Layers that are locked */
TileTypeBitMask DBTechActiveLayerBits; /* Layers marked locked in the techfile */
/* Table of default, builtin planes */
DefaultPlane dbTechDefaultPlanes[] =
{
@ -97,7 +97,7 @@ DefaultType dbTechDefaultTypes[] =
/* Forward declarations */
char *dbTechNameAdd();
NameList *dbTechNameAddOne();
/*
* ----------------------------------------------------------------------------
*
@ -152,7 +152,7 @@ DBTechInitPlane()
DBNumPlanes = PL_TECHDEPBASE;
}
/*
* ----------------------------------------------------------------------------
@ -394,7 +394,7 @@ DBTechAddAlias(sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -479,7 +479,7 @@ DBTechAddType(sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
@ -625,7 +625,7 @@ dbTechNameLookupExact(str, table)
return ((ClientData) -2);
}
/*
* ----------------------------------------------------------------------------
*
@ -708,7 +708,7 @@ dbTechNameLookup(str, table)
/*NOTREACHED*/
}
/*
* ----------------------------------------------------------------------------
*
@ -774,7 +774,7 @@ dbTechNameAdd(name, cdata, ptable, alias)
primary->sn_primary = TRUE;
return (first);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -5,16 +5,16 @@
* This includes area searching and all other primitives that
* need to know what lives in a tile body.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -133,7 +133,7 @@ nm_enum:
if (SigInterruptPending)
return (1);
/* Check if the tile is in the (nonmanhattan) area, and continue */
/* Check if the tile is in the (nonmanhattan) area, and continue */
/* the tile enumeration if it is not. */
/* Watch for calculations involving (M)INFINITY in tile (tp)! */
@ -200,7 +200,7 @@ nm_enum:
/* Ignore sub-integer slivers */
if (f4 != DLONG_MAX) f4 -= rmax;
if (f3 != DLONG_MAX) f3 += rmax;
if (ttype & TT_DIRECTION)
{
if ((f2 < f3) && (f1 > f4))
@ -219,7 +219,7 @@ nm_enum:
/* Ignore sub-integer slivers */
if (f4 != DLONG_MAX) f4 += rmax;
if (f3 != DLONG_MAX) f3 -= rmax;
if (ttype & TT_DIRECTION)
{
if ((f2 > f3) && (f1 < f4))
@ -289,12 +289,12 @@ enum_next:
tp = tpnew;
goto nm_enum;
}
}
}
/* Each iteration returns one tile further to the left */
while (LEFT(tp) > rect->r_xbot)
{
if (BOTTOM(tp) <= rect->r_ybot)
if (BOTTOM(tp) <= rect->r_ybot)
return (0);
tpnew = LB(tp);
tp = BL(tp);
@ -312,7 +312,7 @@ enum_next:
return (0);
}
/*
* --------------------------------------------------------------------
*
@ -448,12 +448,12 @@ enumerate:
tp = tpnew;
goto enumerate;
}
}
}
/* Each iteration returns one tile further to the left */
while (LEFT(tp) > rect->r_xbot)
{
if (BOTTOM(tp) <= rect->r_ybot)
if (BOTTOM(tp) <= rect->r_ybot)
return (0);
tpnew = LB(tp);
tp = BL(tp);
@ -471,7 +471,7 @@ enumerate:
return (0);
}
/*
* --------------------------------------------------------------------
*
@ -633,7 +633,7 @@ enumerate:
}
return (0);
}
/*
* --------------------------------------------------------------------
*
@ -700,7 +700,7 @@ enumerate:
/* Nothing */;
}
}
/*
* --------------------------------------------------------------------
*
@ -717,14 +717,14 @@ enumerate:
* None.
*
* Side effects:
* Deallocates a lot of memory.
* Deallocates a lot of memory.
*
* *** WARNING ***
*
* This procedure uses a carfully constructed non-recursive area
* This procedure uses a carfully constructed non-recursive area
* enumeration algorithm. Care is taken to not access a tile that has
* been deallocated. The only exception is for a tile that has just been
* passed to free(), but no more calls to free() or malloc() have been made.
* passed to free(), but no more calls to free() or malloc() have been made.
* Magic's malloc allows this.
*
* --------------------------------------------------------------------
@ -762,7 +762,7 @@ enumerate:
/* Each iteration returns one tile further to the right */
while (RIGHT(tp) < rect->r_xtop)
{
TiFree(tp);
TiFree(tp);
tpnew = RT(tp);
tp = TR(tp);
if (CLIP_TOP(tpnew) <= CLIP_TOP(tp) && BOTTOM(tpnew) < rect->r_ytop)
@ -772,7 +772,7 @@ enumerate:
}
}
TiFree(tp);
TiFree(tp);
/* At right edge -- walk up to next tile along the right edge */
tp = RT(tp);
if (BOTTOM(tp) < rect->r_ytop) {
@ -780,7 +780,7 @@ enumerate:
}
}
}
/*
* --------------------------------------------------------------------
*
@ -793,7 +793,7 @@ enumerate:
* None.
*
* Side effects:
* Deallocates a lot of memory.
* Deallocates a lot of memory.
*
* --------------------------------------------------------------------
*/
@ -844,7 +844,7 @@ int dbDeleteCellUse(CellUse *use, ClientData arg)
if (defuses == use)
{
if (lastuse)
lastuse->cu_nextuse = defuses->cu_nextuse;
lastuse->cu_nextuse = defuses->cu_nextuse;
else
use->cu_def->cd_parents = defuses->cu_nextuse;
defuses->cu_nextuse = (CellUse *)NULL;
@ -858,7 +858,7 @@ int dbDeleteCellUse(CellUse *use, ClientData arg)
return 0;
}
/*
* --------------------------------------------------------------------
*
@ -966,7 +966,7 @@ dbCheckMaxHFunc(tile, dbc)
return (0);
}
/*
* --------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
* Provides routines to help manage the timestamps stored in
* cell definitions.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -84,7 +84,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
int timestamp;
/*
* ----------------------------------------------------------------------------
* DBFixMismatch --
@ -188,7 +188,7 @@ DBFixMismatch()
if (redisplay) WindAreaChanged((MagWindow *) NULL, (Rect *) NULL);
}
/*
* ----------------------------------------------------------------------------
* DBUpdateStamps --
@ -252,11 +252,11 @@ dbStampFunc(cellDef)
return 0;
}
/*
* ----------------------------------------------------------------------------
* DBStampMismatch --
*
*
* This routine is invoked when a mismatch is discovered for a
* cell. The parameter wrongArea tells what the cell's bounding
* box used to be (but the timestamp mismatch means this was

View File

@ -3,16 +3,16 @@
*
* Management of composition rules and the paint/erase tables.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -64,7 +64,7 @@ extern void dbTechBitTypeInit();
bool dbTechAddPaintErase();
bool dbTechSaveCompose();
/*
* ----------------------------------------------------------------------------
*
@ -108,7 +108,7 @@ DBTechInitCompose()
stype = dtype = &(DBEraseResultTbl[0][0][0]);
for (ps = 0; ps < TT_MAXTYPES; ps++)
*dtype++ = (PaintResultType)ps;
*dtype++ = (PaintResultType)ps;
for (ps = 1; ps < PL_MAXTYPES * TT_MAXTYPES; ps++)
{
memcpy((void *)dtype, (void *)stype, (size_t)TT_MAXTYPES
@ -245,7 +245,7 @@ DBTechInitCompose()
for (s = 0; s < DBNumTypes; s++) DBSpecialResultTbl[s] = TT_CHECKSUBCELL;
}
/*
* ----------------------------------------------------------------------------
*
@ -258,7 +258,7 @@ DBTechInitCompose()
*
* bitToType[i] and bitToType[j] combine to yield bitToType[i | j]
*
* Also (unless composeFlag is set) erasing bitToType[j] from bitToType[i]
* Also (unless composeFlag is set) erasing bitToType[j] from bitToType[i]
* gives bitToType[i & (~j)],
* i.e., it clears all of the j-type material out of the i-type material.
* The bitToType[k] for which k's binary representation has only a single
@ -302,7 +302,7 @@ dbTechBitTypeInit(bitToType, n, pNum, composeFlag)
}
}
/* Returns nonzero if exactly one bit set */
/* Returns nonzero if exactly one bit set */
int
dbIsPrimary(n)
@ -320,8 +320,8 @@ dbIsPrimary(n)
return (bitCount==1);
}
/*
* ----------------------------------------------------------------------------
*
@ -440,7 +440,7 @@ DBTechAddCompose(sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -520,7 +520,7 @@ dbTechSaveCompose(ruleType, t, argc, argv)
return TRUE;
}
#if 0 /* deprecated function (5/11/04) */
/*
@ -571,7 +571,7 @@ dbTechCheckImages(t, r, s)
}
#endif /* 0 */
/*
* ----------------------------------------------------------------------------
*
@ -682,7 +682,7 @@ dbTechAddPaintErase(type, sectionName, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -733,7 +733,7 @@ dbTechCheckPaint(where)
}
}
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Default composition rules.
* Pretty complicated, unfortunately, so it's in a separate file.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -57,7 +57,7 @@ extern void dbComposeSavedRules();
extern void dbComposeCompose();
extern void dbComposeDecompose();
/*
* ----------------------------------------------------------------------------
*
@ -123,7 +123,7 @@ DBTechFinalCompose()
/* dbTechPrintPaint("DBTechFinalCompose", TRUE, FALSE); */
/* dbTechPrintPaint("DBTechFinalCompose", FALSE, FALSE); */
}
/*
* ----------------------------------------------------------------------------
*
@ -222,7 +222,7 @@ dbComposePaintAllImages()
}
}
/*
* ----------------------------------------------------------------------------
*
@ -340,7 +340,7 @@ dbComposeContacts()
}
}
/*
* ----------------------------------------------------------------------------
* dbComposePaintContact --
@ -550,7 +550,7 @@ dbComposePaintContact(lpImage, lpPaint)
* ----------------------------------------------------------------------------
*/
bool
bool
dbComposeSubsetResidues(lpImage, lpErase, outMask)
LayerInfo *lpImage, *lpErase;
TileTypeBitMask *outMask;
@ -613,7 +613,7 @@ dbComposeSubsetResidues(lpImage, lpErase, outMask)
return rval;
}
/*
* ----------------------------------------------------------------------------
* dbComposeEraseContact --
@ -645,7 +645,7 @@ dbComposeEraseContact(lpImage, lpErase)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
if (PlaneMaskHasPlane(lpErase->l_pmask, pNum))
if ((lpImage->l_type < DBNumUserLayers)
|| (pNum == DBPlane(lpImage->l_type)))
|| (pNum == DBPlane(lpImage->l_type)))
SETERASE(lpImage->l_type, lpErase->l_type, pNum, TT_SPACE);
/* Erasing self should always leave space; otherwise */
@ -700,7 +700,7 @@ dbComposeEraseContact(lpImage, lpErase)
itype = DBPlaneToResidue(lpImage->l_type, pNum);
SETERASE(lpImage->l_type, lpErase->l_type, pNum, itype);
}
}
/* Diagnostic (to be removed or commented out) */
@ -828,7 +828,7 @@ dbComposeSavedRules()
rule = &dbSavedRules[n];
lpContact = &dbLayerInfo[rule->r_result];
imageType = lpContact->l_type;
for (pair = rule->r_pairs; pair < &rule->r_pairs[rule->r_npairs];
pair++)
{
@ -842,7 +842,7 @@ dbComposeSavedRules()
}
}
}
/*
* ----------------------------------------------------------------------------
* dbComposeDecompose --
@ -886,7 +886,7 @@ dbComposeDecompose(imageType, componentType, remainingType)
dbSetEraseEntry(imageType, componentType, pNum, resultType);
TTMaskSetType(&dbNotDefaultEraseTbl[imageType], componentType);
}
/*
* ----------------------------------------------------------------------------
* dbComposeCompose --

View File

@ -3,16 +3,16 @@
*
* Interface to the undo package for the database.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -107,7 +107,7 @@ bool dbUndoUndid;
extern void dbUndoEdit();
/*
* ----------------------------------------------------------------------------
*
@ -204,7 +204,7 @@ DBUndoReset(celldef)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -229,7 +229,7 @@ dbUndoInit()
dbUndoAreaChanged.r_xbot = dbUndoAreaChanged.r_xtop = 0;
dbUndoAreaChanged.r_ybot = dbUndoAreaChanged.r_ytop = 0;
}
/*
* ============================================================================
*
@ -413,7 +413,7 @@ endPaintBack:
(void) GeoInclude(&up->pue_rect, &dbUndoAreaChanged);
(void) DRCCheckThis(dbUndoLastCell, TT_CHECKPAINT, &up->pue_rect);
}
/*
* ============================================================================
*
@ -485,7 +485,7 @@ DBUndoPutLabel(cellDef, lab)
lup->lue_offset = lab->lab_offset;
strcpy(lup->lue_text, lab->lab_text);
}
/*
* ----------------------------------------------------------------------------
*
@ -528,7 +528,7 @@ DBUndoEraseLabel(cellDef, lab)
lup->lue_offset = lab->lab_offset;
strcpy(lup->lue_text, lab->lab_text);
}
/*
* ----------------------------------------------------------------------------
*
@ -585,7 +585,7 @@ dbUndoLabelBack(up)
if (up->lue_type == TT_SPACE)
dbUndoUndid = TRUE;
}
/*
* ============================================================================
*
@ -670,7 +670,7 @@ DBUndoCellUse(use, action)
up->cue_flags = use->cu_flags;
strcpy(up->cue_id, use->cu_id);
}
/*
* ----------------------------------------------------------------------------
*
@ -703,7 +703,7 @@ dbUndoCellForw(up)
use->cu_expandMask = up->cue_expandMask;
use->cu_bbox = up->cue_bbox;
use->cu_extended = up->cue_extended;
use->cu_flags = up->cue_flags;
use->cu_flags = up->cue_flags;
use->cu_id = StrDup((char **) NULL, up->cue_id);
(void) DBLinkCell(use, up->cue_parent);
DBPlaceCell(use, up->cue_parent);
@ -747,7 +747,7 @@ dbUndoCellForw(up)
freeMagic(use->cu_id);
use->cu_id = (char *) NULL;
break;
case UNDO_CELL_LOCKDOWN:
use = findUse(up, TRUE);
use->cu_flags = up->cue_flags;
@ -772,7 +772,7 @@ dbUndoCellBack(up)
use->cu_expandMask = up->cue_expandMask;
use->cu_bbox = up->cue_bbox;
use->cu_extended = up->cue_extended;
use->cu_flags = up->cue_flags;
use->cu_flags = up->cue_flags;
use->cu_id = StrDup((char **) NULL, up->cue_id);
SigDisableInterrupts ();
(void) DBLinkCell(use, up->cue_parent);
@ -827,7 +827,7 @@ dbUndoCellBack(up)
break;
}
}
/*
* ----------------------------------------------------------------------------
*
@ -848,7 +848,7 @@ dbUndoCellBack(up)
*
* ----------------------------------------------------------------------------
*/
CellUse *
findUse(up, matchName)
cellUE *up;
@ -874,7 +874,7 @@ findUse(up, matchName)
ASSERT(FALSE, "findUse: use == NULL");
return (CellUse *) NULL;
}
/*
* ============================================================================
*
@ -941,7 +941,7 @@ dbUndoEdit(new)
strcpy(up->eue_name, new->cd_name);
dbUndoLastCell = new;
}
/*
* ----------------------------------------------------------------------------
*
@ -968,7 +968,7 @@ dbUndoOpenCell(eup)
ASSERT(newDef != (CellDef *) NULL, "dbUndoOpenCell");
dbUndoLastCell = newDef;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* Definitions internal to the database module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* Needs to include: magic.h, tile.h, database.h
@ -139,7 +139,7 @@ extern DefaultType dbTechDefaultTypes[]; /* Builtin types */
* be painted with the type when that contact is painted over empty
* space.
*
* The LayerInfo structure is used primarily to store information about
* The LayerInfo structure is used primarily to store information about
* the various types of contacts, although it contains degenerate information
* about non-contact types as well.
*/
@ -149,7 +149,7 @@ typedef struct
TileType l_type; /* Back-index into dbLayerInfo[] */
bool l_isContact; /* TRUE if this layer has images */
/* Residues of this contact on its contacted planes. */
/* Residues of this contact on its contacted planes. */
TileTypeBitMask l_residues;
/* Mask of connected planes, including this one */

View File

@ -26,7 +26,7 @@ typedef struct fontchar
Point *fc_points;
FontCharPtr fc_next;
} FontChar;
typedef struct
{
char *mf_name;

View File

@ -7,16 +7,16 @@
* between them. This file also provides the default button handler,
* which is used to move the box.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -71,7 +71,7 @@ void (*DBWButtonCurrentProc)();
static int buttonCorner = TOOL_ILG; /* Nearest corner when button went
* down.
*/
/*
* ----------------------------------------------------------------------------
*
@ -91,7 +91,7 @@ static int buttonCorner = TOOL_ILG; /* Nearest corner when button went
* a call to DBWChangeButtonHandler) each button press or release
* in a layout window causes proc to be invoked as follows:
*
* int
* int
* proc(w, cmd)
* MagWindow *w;
* TxCommand *cmd;
@ -138,7 +138,7 @@ DBWAddButtonHandler(name, proc, cursor, doc)
TxError(" table. Get your Magic wizard to increase the size of\n");
TxError(" MAXBUTTONHANDLERS in DBWbuttons.c\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -235,7 +235,7 @@ DBWChangeButtonHandler(name)
DBWButtonCurrentProc = dbwButtonProcs[dbwButtonCurrentIndex];
return oldName;
}
/*
* ----------------------------------------------------------------------------
*
@ -260,7 +260,7 @@ DBWPrintButtonDoc()
TxPrintf("%s", dbwButtonDoc[dbwButtonCurrentIndex]);
}
/*
* ----------------------------------------------------------------------------
* dbwButtonSetCursor --
@ -312,7 +312,7 @@ dbwButtonSetCursor(button, corner)
}
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -3,16 +3,16 @@
*
* This file contains the dispatch tables for layout commands.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -134,7 +134,7 @@ extern void CmdAutoLef();
/*
* Wrapper commands for ext2spice and ext2sim
*/
*/
#ifdef MAGIC_WRAPPER
#ifdef EXT2SIM_AUTO
@ -158,7 +158,7 @@ extern void CmdHistory();
#endif
/*
* Commands only in the Lawrence Livermore Version
* Commands only in the Lawrence Livermore Version
*/
#ifdef LLNL
@ -264,10 +264,10 @@ DBWInitCommands()
"crash save|recover [file]\n"
" recover the crash file \"file\", or the first\n"
" crash file discovered.",
CmdCrash, FALSE);
CmdCrash, FALSE);
WindAddCommand(DBWclientID,
"crosshair x y | off enable and move or disable the screen crosshair",
CmdCrosshair, FALSE);
CmdCrosshair, FALSE);
WindAddCommand(DBWclientID,
"delete delete everything in selection",
CmdDelete, FALSE);
@ -500,7 +500,7 @@ DBWInitCommands()
WindAddCommand(DBWclientID,
"spliterase dir [layer] erase layers from diagonal corner dir of the\n\
edit box",
CmdSplitErase, FALSE);
CmdSplitErase, FALSE);
#ifdef MAGIC_WRAPPER
/* Add the Tcl commands for exttospice, exttosim, and aliases ext2spice, ext2sim */
@ -586,7 +586,7 @@ DBWInitCommands()
WindAddCommand(DBWclientID,
"plot type [args] hardcopy plotting; type \"plot help\"\n\
for information on types and args",
CmdPlot, FALSE);
CmdPlot, FALSE);
#endif
#ifdef PLOT_AUTO

View File

@ -5,16 +5,16 @@
* It saves up information about what is to be redisplayed, then
* does all of the redisplay at a convenient time.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -77,7 +77,7 @@ static Transform dbwWatchTrans; /* Transform to root coords for watch tiles. */
static int dbwWatchDemo; /* TRUE means use "demo" style for watch
* tile display.
*/
static int dbwSeeTypes; /* TRUE means use tile type instead of
static int dbwSeeTypes; /* TRUE means use tile type instead of
pointer value for watch display.
*/
static Rect dbwMinBBox; /* If bounding boxes aren't at least this
@ -129,7 +129,7 @@ extern int dbwTileFunc(), dbwWatchFunc(), dbwLabelFunc();
extern int dbwPaintFunc(), dbwBBoxFunc();
extern int dbwWindowFunc(), dbwChangedFunc();
/*
* ----------------------------------------------------------------------------
* DBWredisplay --
@ -157,7 +157,7 @@ DBWredisplay(w, rootArea, clipArea)
Rect *rootArea; /* The area that must be redisplayed, in
* root cell coordinates.
*/
Rect *clipArea; /* The screen area that we should clip to
Rect *clipArea; /* The screen area that we should clip to
*/
{
int i;
@ -170,7 +170,7 @@ DBWredisplay(w, rootArea, clipArea)
TileTypeBitMask layers, rmask;
/*
TxPrintf("Root area (%d, %d) (%d, %d) redisplay.\n",
TxPrintf("Root area (%d, %d) (%d, %d) redisplay.\n",
rootArea->r_xbot, rootArea->r_ybot,
rootArea->r_xtop, rootArea->r_ytop);
*/
@ -187,7 +187,7 @@ DBWredisplay(w, rootArea, clipArea)
* the area without overlapping it. Without the round-up, there
* will be occasional (in fact, frequent), one-pixel wide slivers.
*/
largerArea = *rootArea;
largerArea.r_xbot -= 1;
largerArea.r_ybot -= 1;
@ -198,7 +198,7 @@ DBWredisplay(w, rootArea, clipArea)
cellDef = ((CellUse *)w->w_surfaceID)->cu_def;
pixelsPerLambda = w->w_scale / SUBPIXEL;
lambdasPerPixel = (SUBPIXEL / w->w_scale) + 1;
lambdasPerPixel = (SUBPIXEL / w->w_scale) + 1;
if ((crec->dbw_origin.p_x != w->w_origin.p_x)
|| (crec->dbw_origin.p_y != w->w_origin.p_y)
@ -212,7 +212,7 @@ DBWredisplay(w, rootArea, clipArea)
* so update measurements on label size in this window.
* Also, pick a size for labels based on the scale in
* half the window: the idea is to make the labels about
* half the height of typical wires.
* half the height of typical wires.
*/
int halfWireWidth;
Rect text;
@ -253,13 +253,13 @@ DBWredisplay(w, rootArea, clipArea)
(void) GeoInclude(&GrCrossRect, &crec->dbw_expandAmounts);
if (pixelsPerLambda > 0)
{
labelArea.r_xtop -=
labelArea.r_xtop -=
ceilDiv(crec->dbw_expandAmounts.r_xbot, pixelsPerLambda);
labelArea.r_ytop -=
labelArea.r_ytop -=
ceilDiv(crec->dbw_expandAmounts.r_ybot, pixelsPerLambda);
labelArea.r_xbot -=
labelArea.r_xbot -=
ceilDiv(crec->dbw_expandAmounts.r_xtop, pixelsPerLambda);
labelArea.r_ybot -=
labelArea.r_ybot -=
ceilDiv(crec->dbw_expandAmounts.r_ytop, pixelsPerLambda);
}
else
@ -295,7 +295,7 @@ DBWredisplay(w, rootArea, clipArea)
* information about the edit cell so we can identify it during
* the action routines.
*/
if (cellDef == EditRootDef)
{
editDef = EditCellUse->cu_def;
@ -334,8 +334,8 @@ DBWredisplay(w, rootArea, clipArea)
TileType t, s;
TileTypeBitMask *rMask;
/* For each contact type, if the contact is not visible, */
/* display any of its residue layers that are visible. */
/* For each contact type, if the contact is not visible, */
/* display any of its residue layers that are visible. */
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
if (DBIsContact(t))
@ -378,7 +378,7 @@ DBWredisplay(w, rootArea, clipArea)
if (GrFreeBackingStorePtr != NULL)
(*GrFreeBackingStorePtr)(w);
}
if (dbwIsLocked)
{
GrUnlock(w);
@ -407,14 +407,14 @@ DBWredisplay(w, rootArea, clipArea)
scontext.scx_area = labelArea;
/* make sure that we are searching an area, not just a point */
scontext.scx_area.r_xtop = MAX(scontext.scx_area.r_xtop,
scontext.scx_area.r_xtop = MAX(scontext.scx_area.r_xtop,
scontext.scx_area.r_xbot + 1);
scontext.scx_area.r_ytop = MAX(scontext.scx_area.r_ytop,
scontext.scx_area.r_ytop = MAX(scontext.scx_area.r_ytop,
scontext.scx_area.r_ybot + 1);
dbwLabelSize = crec->dbw_labelSize;
dbwExpandAmounts = &crec->dbw_expandAmounts;
GrClipTo(&GrScreenRect);
/* Set style information beforehand */
GrSetStuff(STYLE_LABEL);
(void) DBTreeSrLabels(&scontext, &DBAllTypeBits, bitMask,
@ -422,7 +422,7 @@ DBWredisplay(w, rootArea, clipArea)
dbwLabelFunc, (ClientData) NULL);
GrClipTo(&rootClip);
}
/* Next, display the bounding boxes that are visible. Before doing
* this, calculate the area occupied by the text "BBB". A cell won't
* get its id or name displayed unless its bbox is at least this
@ -472,14 +472,14 @@ DBWredisplay(w, rootArea, clipArea)
gridRect.r_xtop = gridRect.r_xbot + w->w_scale*width;
gridRect.r_ytop = gridRect.r_ybot + w->w_scale*height;
GrClipBox(&gridRect, STYLE_GRID);
/* Redisplay a little square around the origin for the edit cell
* (if the edit cell is in this window). Make the origin 4 pixels
* across, but don't display it unless this is less than two lambda
* units. That way, we always know how much to redisplay (in lambda
* units), when the edit cell changes.
*/
if (editDef != NULL)
{
Rect r, r2;
@ -502,7 +502,7 @@ DBWredisplay(w, rootArea, clipArea)
/* If there is a tile plane being "watched", redisplay
* its structure.
*/
if (crec->dbw_watchPlane >= 0)
{
Transform toCell;
@ -549,7 +549,7 @@ DBWredisplay(w, rootArea, clipArea)
if (GrPutBackingStorePtr != NULL)
(*GrPutBackingStorePtr)(w, &rootClip);
}
/*
* ----------------------------------------------------------------------------
*
@ -620,7 +620,7 @@ dbwPaintFunc(tile, cxp)
/* If this isn't the edit cell, add 64 to the display style
* to be used.
*/
if (!dbwAllSame && ((editDef != scx->scx_use->cu_def)
|| (scx->scx_trans.t_a != editTrans.t_a)
|| (scx->scx_trans.t_b != editTrans.t_b)
@ -652,7 +652,7 @@ dbwPaintFunc(tile, cxp)
GrBox(dbwWindow, &scx->scx_trans, tile);
return 0;
}
/*
* ----------------------------------------------------------------------------
@ -699,7 +699,7 @@ DBWDrawLabel(label, rect, pos, style, labelSize, sizeBox)
{
Point p;
Rect location;
char *text = label->lab_text;
char *text = label->lab_text;
int result;
if (style >= 0) GrSetStuff(style);
@ -899,7 +899,7 @@ DBWDrawFontLabel(label, window, trans, style)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -950,7 +950,7 @@ dbwLabelFunc(scx, label, tpath)
disStyle = newStyle;
GrSetStuff(newStyle);
}
if (label->lab_font < 0)
{
screenPos = GeoTransPos(&scx->scx_trans, label->lab_just);
@ -991,7 +991,7 @@ dbwLabelFunc(scx, label, tpath)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1043,7 +1043,7 @@ dbwBBoxFunc(scx)
GR_TEXT_LARGE, TRUE, &r, (Rect *)NULL);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1097,7 +1097,7 @@ dbwTileFunc(tile)
GeoClipPoint(&pLL, &rootClip);
GeoClipPoint(&pUR, &rootClip);
if (dbwSeeTypes)
{
(void) sprintf(string, "%s",DBTypeShortName(TiGetType(tile)));
@ -1106,14 +1106,14 @@ dbwTileFunc(tile)
{
(void) sprintf(string, "%p", tile);
}
GeoClip(&r2, &rootClip);
p.p_x = (r2.r_xbot + r2.r_xtop)/2;
p.p_y = (r2.r_ybot + r2.r_ytop)/2;
if (!dbwWatchDemo || dbwSeeTypes)
GrPutText(string, STYLE_DRAWTILE, &p, GEO_CENTER,
GR_TEXT_LARGE, FALSE, &r2, (Rect *) NULL);
#define XYOFFSET 12
for (i=0; i<4; i++)
@ -1253,7 +1253,7 @@ dbwTileFunc(tile)
return 0;
}
/*
* ----------------------------------------------------------------------------
* DBWAreaChanged --
@ -1309,7 +1309,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
|| (defArea->r_ybot == defArea->r_ytop)) return;
/**
TxPrintf("Cell %s, area (%d, %d) (%d, %d) changed, mask %d.\n",
TxPrintf("Cell %s, area (%d, %d) (%d, %d) changed, mask %d.\n",
cellDef->cd_name, defArea->r_xbot, defArea->r_ybot,
defArea->r_xtop, defArea->r_ytop, expandMask);
**/
@ -1321,7 +1321,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
/* First, translate the area back up through the hierarchy to
* cells that are roots of windows.
*/
for (use = cellDef->cd_parents; use != NULL; use = use->cu_nextuse)
{
/* We're only interested in a use if it's expanded in one of
@ -1329,7 +1329,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
* AND of the old one and the windows in which this use is
* expanded.
*/
newMask = expandMask & use->cu_expandMask;
if (newMask == 0) continue;
@ -1349,7 +1349,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
* translate the area back into the coordinates of the parent
* and invoke ourselves recursively.
*/
if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi))
{
GeoTransRect(&use->cu_transform, defArea, &newArea);
@ -1406,7 +1406,7 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
SigEnableInterrupts();
}
/*
* ----------------------------------------------------------------------------
*
@ -1439,7 +1439,7 @@ dbwChangedFunc(w, area)
/* If none of the layers being redisplayed is visible in this
* window, then there's no need to do anything.
*/
if (dbwLayersChanged != NULL)
{
TTMaskAndMask3(&tmp, dbwLayersChanged, &crec->dbw_visibleLayers);
@ -1455,7 +1455,7 @@ dbwChangedFunc(w, area)
* to account for labels that are rooted in the given area but
* stick out past it.
*/
if (dbwLayersChanged == NULL)
{
screenArea.r_xbot += crec->dbw_expandAmounts.r_xbot;
@ -1481,7 +1481,7 @@ dbwChangedFunc(w, area)
else WindAreaChanged(w, &screenArea);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -1522,7 +1522,7 @@ DBWLabelChanged(cellDef, lab, mask)
/* This procedure is basically the same as DBWAreaChanged, so
* see that procedure for documentation on how this all works.
*/
saveArea = lab->lab_rect;
savePos = lab->lab_just;
@ -1609,13 +1609,13 @@ dbwLabelChangedFunc(w, lab)
WindAreaChanged(w, &screenArea);
return 0;
}
/*
* Technology initialization for the display module.
*/
global TileTypeBitMask *DBWStyleToTypesTbl = NULL;
/*
* ----------------------------------------------------------------------------
* DBWTechInitStyles --
@ -1646,11 +1646,11 @@ DBWTechInitStyles()
DBWStyleToTypesTbl = (TileTypeBitMask *)mallocMagic(DBWNumStyles *
sizeof(TileTypeBitMask));
for (i = 0; i < DBWNumStyles; i++)
TTMaskZero(DBWStyleToTypesTbl + i);
}
/*
* ----------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@
* and arcs). These operate very similarly to feedback regions,
* in that they are persistant until destroyed, and do not
* interact with the layout in any way.
*
*
* Copyright (C) 2003 Open Circuit Design, Inc., for MultiGiG, Ltd.
*/
@ -45,7 +45,7 @@ typedef struct _style
int style;
styleptr next;
} stylestruct;
/* Each element is stored in a record that looks like this: */
typedef struct _element
@ -183,7 +183,7 @@ DBWPrintElements(cellDef, flagmask, reducer)
/* These must match the order of text sizes in graphics/graphics.h */
static char *textSizes[] = {"small", "medium", "large", "xlarge",
"default", NULL};
"default", NULL};
/* These must match the order of element type definitions above! */
char *etypes[] = {"rectangle", "line", "text"};
@ -194,7 +194,7 @@ DBWPrintElements(cellDef, flagmask, reducer)
if (elem = (DBWElement *)HashGetValue(he))
{
if ((elem->rootDef == cellDef) && (elem->flags & flagmask))
{
{
/* print element type */
AppendString(&rstr, etypes[elem->type], " ");
/* print element name */
@ -300,7 +300,7 @@ DBWScaleElements(n, d)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -497,7 +497,7 @@ dbwElementUndraw(mw, elem)
if (mw == NULL) return; /* No window; can't undraw */
windowRoot = ((CellUse *) (mw->w_surfaceID))->cu_def;
GrLock(mw, TRUE);
/* Deal with half-point-offset flags for the line element */
@ -541,7 +541,7 @@ dbwElementUndraw(mw, elem)
GrUnlock(mw, TRUE);
}
/*
* ----------------------------------------------------------------------------
*
@ -693,7 +693,7 @@ DBWElementInbox(area)
#endif
}
/*
* ----------------------------------------------------------------------------
*
@ -735,7 +735,7 @@ DBWElementAdd(w, name, area, cellDef, style)
* transform the area. If the root isn't an ancestor, just
* return.
*/
if (!DBSrRoots(cellDef, &GeoIdentityTransform,
dbwelemGetTransform, (ClientData) &transform))
if (w != NULL)
@ -744,7 +744,7 @@ DBWElementAdd(w, name, area, cellDef, style)
/* SigInterruptPending screws up DBSrRoots */
if (SigInterruptPending)
return NULL;
/* If there is already an entry by this name, delete it */
DBWElementDelete(w, name);
@ -816,7 +816,7 @@ DBWElementAddText(w, name, x, y, text, cellDef, style)
{
DBWElement *elem;
Rect area;
area.r_xbot = x;
area.r_xtop = x;
area.r_ybot = y;
@ -888,11 +888,11 @@ DBWElementText(MagWindow *w, char *ename, char *text)
HashEntry *entry;
entry = HashFind(&elementTable, ename);
if (entry == NULL)
if (entry == NULL)
{
TxError("No such element %s\n", ename);
return;
}
}
elem = (DBWElement *)HashGetValue(entry);
if (elem == NULL) return;
@ -947,15 +947,15 @@ DBWElementParseFlags(MagWindow *w, char *ename, char *flagstr)
"arrowleft", "arrowbottom", "arrowright", "arrowtop",
"plainleft", "plainbottom", "plainright", "plaintop", NULL};
static char *textSizes[] = {"small", "medium", "large", "xlarge",
"default", NULL};
static char *genFlags[] = {"persistent", "temporary", NULL};
"default", NULL};
static char *genFlags[] = {"persistent", "temporary", NULL};
entry = HashFind(&elementTable, ename);
if (entry == NULL)
{
TxError("No such element %s\n", ename);
return;
}
}
elem = (DBWElement *)HashGetValue(entry);
if (elem == NULL) return;
@ -1096,7 +1096,7 @@ DBWElementStyle(MagWindow *w, char *ename, int style, bool add)
{
TxError("No such element %s\n", ename);
return;
}
}
elem = (DBWElement *)HashGetValue(entry);
if (elem == NULL) return;
@ -1124,7 +1124,7 @@ DBWElementStyle(MagWindow *w, char *ename, int style, bool add)
/* add style */
for (sptr = elem->stylelist; sptr != NULL && sptr->next != NULL;
sptr = sptr->next);
newstyle = (styleptr)mallocMagic(sizeof(stylestruct));
newstyle->style = style;
newstyle->next = NULL;
@ -1202,7 +1202,7 @@ DBWElementPos(MagWindow *w, char *ename, Rect *crect)
{
TxError("No such element %s\n", ename);
return;
}
}
elem = (DBWElement *)HashGetValue(entry);
if (elem == NULL) return;

View File

@ -7,16 +7,16 @@
* Feedback is used for things like displaying CIF, and for errors
* in CIF-generation and routing.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -47,7 +47,7 @@ typedef struct rcstring
int refcount;
char *string;
} RCString;
/* Each feedback area is stored in a record that looks like this: */
@ -91,7 +91,7 @@ static CellDef *dbwfbRootDef; /* To pass root cell definition from
* DBWFeedbackAdd.
*/
/*
* ----------------------------------------------------------------------------
*
@ -139,7 +139,7 @@ DBWFeedbackRedraw(window, plane)
{
/* We expect that most of the feedbacks will have the same
* style and scale, so compute information with the current
* values, and recompute only when the values change.
* values, and recompute only when the values change.
*/
if (fb->fb_scale != curScale)
{
@ -205,7 +205,7 @@ DBWFeedbackRedraw(window, plane)
newStyle = fb->fb_style & (TT_LEFTMASK | TT_RIGHTMASK);
/* Another little trick: when the feedback area is very small ("very
/* Another little trick: when the feedback area is very small ("very
* small" is a hand-tuned constant), change all stippled styles to
* solid.
* (The usefulness of this trick is questionable, as it generally
@ -250,7 +250,7 @@ dbwFeedbackAlways1()
{
return 1;
}
/*
* ----------------------------------------------------------------------------
*
@ -410,7 +410,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
* transform the area. If the root isn't an ancestor, just
* return.
*/
if (!DBSrRoots(cellDef, &GeoIdentityTransform,
dbwfbGetTransform, (ClientData) &transform)) return;
@ -422,7 +422,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
* this transform are in Magic coordinates, not feedback
* coordinates. Scale them into feedback coordinates.
*/
transform.t_c *= scaleFactor;
transform.t_f *= scaleFactor;
GeoTransRect(&transform, area, &tmp2);
@ -432,7 +432,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
* not, make a new array, copy the old to the new, then delete
* the old array. Use memcpy() to make sure this happens very fast.
*/
if (DBWFeedbackCount == dbwfbSize)
{
Feedback *new;
@ -545,7 +545,7 @@ dbwFeedbackInit()
DBWHLAddClient(DBWFeedbackRedraw);
}
/*
* ----------------------------------------------------------------------------
*
@ -594,7 +594,7 @@ DBWFeedbackShow()
DBWHLRedraw(currentRoot, &area, FALSE);
dbwfbNextToShow = DBWFeedbackCount;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -6,16 +6,16 @@
* to display so that when one of them updates its highlights
* it doesn't trash the others' highlights.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -47,7 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#define MAXCLIENTS 10
static int (*(dbwhlClients[MAXCLIENTS]))();
/*
* ----------------------------------------------------------------------------
*
@ -57,7 +57,7 @@ static int (*(dbwhlClients[MAXCLIENTS]))();
* that are displaying highlights. The redisplay procedure
* passed in by the client will be invoked in the following
* way:
* int
* int
* redisplayProc(window, plane)
* MagWindow *window;
* Plane *plane;
@ -98,7 +98,7 @@ DBWHLAddClient(redisplayProc)
TxError("Magic error: ran out of space in highlight client table.\n");
TxError("Tell your system maintainer to enlarge the table.\n");
}
/*
* ----------------------------------------------------------------------------
*
@ -135,7 +135,7 @@ DBWHLRemoveClient(redisplayProc)
}
ASSERT(FALSE, "DBWHLRemoveClient");
}
/*
* ----------------------------------------------------------------------------
*
@ -194,7 +194,7 @@ DBWHLRedraw(rootDef, area, erase)
* directions so that we're certain to have non-zero area.
* Otherwise the various search procedures have big troubles.
*/
ourArea = *area;
if (ourArea.r_xbot >= ourArea.r_xtop)
{
@ -259,13 +259,13 @@ dbwhlRedrawFunc(window, area)
* an attempt is made to redraw into an obscured or unmapped
* window.
*/
if (((GrGetBackingStorePtr == NULL) &&
((GrStyleTable[STYLE_ERASEHIGHLIGHTS].mask &
GrStyleTable[STYLE_ERASEALLBUTTOOLS].mask) != 0)) ||
((GrGetBackingStorePtr != NULL) &&
window->w_backingStore == (ClientData)NULL))
{
DBWAreaChanged(dbwhlDef, area, crec->dbw_bitmask,
(TileTypeBitMask *) NULL);
@ -277,7 +277,7 @@ dbwhlRedrawFunc(window, area)
DBStdPaintTbl(TT_ERROR_P, PL_DRC_ERROR),
(PaintUndoInfo *) NULL);
}
/* The area whose highlights must be redrawn is the area erased, but
* it must be expanded again to include the fact that we may have
* just erased a piece of a label that stuck out from some other point.
@ -286,7 +286,7 @@ dbwhlRedrawFunc(window, area)
* eliminate edge effects: all impacted highlights are now guaranteed
* to OVERLAP an area in dbwhlRedrawPlane, not just touch.
*/
erase.r_xbot -= expand.r_xtop;
erase.r_ybot -= expand.r_ytop;
erase.r_xtop -= expand.r_xbot;
@ -364,15 +364,15 @@ DBWHLRedrawWind(window)
int i;
DBWclientRec *crec;
extern int dbwhlEraseFunc(); /* Forward reference. */
GrLock(window, TRUE);
crec = (DBWclientRec *) window->w_clientData;
/* First erase, then redraw: */
(void) DBSrPaintArea((Tile *) NULL, crec->dbw_hlErase, &TiPlaneRect,
&DBAllButSpaceBits, dbwhlEraseFunc, (ClientData)window);
/* Now call each client to redraw its own stuff. */
for (i = 0; i < MAXCLIENTS; i += 1)
@ -413,7 +413,7 @@ dbwhlEraseFunc(tile, window)
if (needErase) GrClipBox(&area, STYLE_ERASEHIGHLIGHTS);
return 0;
}
/*
* ----------------------------------------------------------------------------
* DBWHLUpdate --

View File

@ -4,16 +4,16 @@
* Procedures to interface the database with the window package
* for the purposes of window creation, deletion, and modification.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -58,13 +58,13 @@ extern void DBWredisplay(); /* Defined in DBWdisplay.c */
*/
static int (*dbwButtonHandler)() = NULL;
/*
* ----------------------------------------------------------------------------
*
* DBWcreate
*
* A new window has been created, create and initialize the needed
* A new window has been created, create and initialize the needed
* structures.
*
* Results:
@ -95,7 +95,7 @@ DBWcreate(window, argc, argv)
*/
newBitMask = (dbwBitMask + 1) | dbwBitMask;
if (newBitMask > MAX_BITMASK)
if (newBitMask > MAX_BITMASK)
return FALSE;
bitMask = newBitMask ^ dbwBitMask;
dbwBitMask = newBitMask;
@ -135,7 +135,7 @@ DBWcreate(window, argc, argv)
/* Zoom in on the box, leaving a 10% border or at least 2 units
* on each side.
*/
expand = (box.r_xtop - box.r_xbot)/20;
if (expand < 2) expand = 2;
box.r_xtop += expand;
@ -153,7 +153,7 @@ DBWcreate(window, argc, argv)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
* DBWdelete --
@ -184,7 +184,7 @@ DBWdelete(window)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -215,14 +215,14 @@ dbwLoadFunc(w, clientData)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
* DBWreload --
*
* Re-load all windows to contain the named cell as a root.
* This is intended to be called during startup or when restarting a saved
* This is intended to be called during startup or when restarting a saved
* image of Magic.
*
* Results:
@ -252,7 +252,7 @@ dbwReloadFunc(w, name)
DBWloadWindow(w, name, TRUE, FALSE, FALSE);
return (0);
}
/*
* ----------------------------------------------------------------------------
@ -493,7 +493,7 @@ DBWloadWindow(window, name, ignoreTech, expand, dereference)
}
/* enforce a minimum size of 60 and a border of 10% around the sides */
xadd = MAX(0, (60 - (loadBox.r_xtop - loadBox.r_xbot)) / 2) +
xadd = MAX(0, (60 - (loadBox.r_xtop - loadBox.r_xbot)) / 2) +
(loadBox.r_xtop - loadBox.r_xbot + 1) / 10;
yadd = MAX(0, (60 - (loadBox.r_ytop - loadBox.r_ybot)) / 2) +
(loadBox.r_ytop - loadBox.r_ybot + 1) / 10;
@ -541,7 +541,7 @@ UnexpandFunc(use, windowMask)
return 0;
}
/*
* ----------------------------------------------------------------------------
* DBWexit --
@ -562,7 +562,7 @@ DBWexit()
{
return (CmdWarnWrite() == 1);
}
/*
* ----------------------------------------------------------------------------
*
@ -610,7 +610,7 @@ DBWcommands(w, cmd)
DBFixMismatch();
}
/*
* ----------------------------------------------------------------------------
*
@ -630,7 +630,7 @@ DBWcommands(w, cmd)
* From now on, all button pushes within database windows are
* passed to buttonProc, in the following form:
*
* int
* int
* buttonProc(w, cmd)
* MagWindow *w;
* TxCommand *cmd;
@ -649,7 +649,7 @@ int (*(DBWNewButtonHandler(buttonProc)))()
dbwButtonHandler = buttonProc;
return result;
}
/*
* ----------------------------------------------------------------------------
* DBWupdate--
@ -672,7 +672,7 @@ DBWupdate()
DBWFeedbackShow();
DBWHLUpdate();
}
/*
* ----------------------------------------------------------------------------
* DBWinit --
@ -683,7 +683,7 @@ DBWupdate()
* None.
*
* Side effects:
* A client is added, and an initial empty window is made
* A client is added, and an initial empty window is made
* ----------------------------------------------------------------------------
*/
@ -703,7 +703,7 @@ DBWinit()
" releasing the initial button.\n";
/* Initialize */
DBWclientID = WindAddClient("layout", DBWcreate, DBWdelete,
DBWclientID = WindAddClient("layout", DBWcreate, DBWdelete,
DBWredisplay, DBWcommands, DBWupdate, DBWexit,
(void (*)()) NULL,
(GrGlyph *) NULL);

View File

@ -10,16 +10,16 @@
* to get information about the current tool location and relocate
* the box.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -51,7 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
* root cell def. If the box is placed in one window, it will
* be displayed in all compatible windows. The box may not have
* one corner placed in one window and other corners in
* incompatible windows.
* incompatible windows.
*/
static CellDef *boxRootDef = NULL; /* CellDef for the box */
@ -75,7 +75,7 @@ int DBWSnapToGrid = DBW_SNAP_LAMBDA;
extern int DBWToolDraw();
/*
* ----------------------------------------------------------------------------
*
@ -123,10 +123,10 @@ toolFindPoint(p, rootPoint, rootArea)
if (DBWSnapToGrid != DBW_SNAP_INTERNAL)
ToolSnapToGrid(WindCurrentWindow, rootPoint, rootArea);
return WindCurrentWindow;
}
/*
* ----------------------------------------------------------------------------
* ToolGetPoint --
@ -159,13 +159,13 @@ ToolGetPoint(rootPoint, rootArea)
{
extern TxCommand *WindCurrentCmd;
if (WindCurrentCmd == NULL)
if (WindCurrentCmd == NULL)
return NULL;
else
return toolFindPoint(&WindCurrentCmd->tx_p, rootPoint, rootArea);
}
/*
* ----------------------------------------------------------------------------
* ToolGetBox --
@ -209,7 +209,7 @@ ToolScaleBox(scalen, scaled)
}
/*
* ----------------------------------------------------------------------------
* ToolGetBoxWindow --
@ -257,7 +257,7 @@ ToolGetBoxWindow(rootArea, pMask)
toolMask = 0;
window = NULL;
if (boxRootDef != NULL)
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
(void) WindSearch(DBWclientID, (ClientData) NULL, (Rect *) NULL,
toolWindowSave, (ClientData) &window);
if ((window != NULL) && (rootArea != NULL)) *rootArea = boxRootArea;
if (pMask != NULL) *pMask = toolMask;
@ -278,7 +278,7 @@ toolWindowSave(window, clientData)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -304,12 +304,12 @@ bool
ToolGetEditBox(rect)
Rect *rect;
{
if (boxRootDef == NULL)
if (boxRootDef == NULL)
{
TxError("Box must be present\n");
return FALSE;
}
if (EditRootDef != boxRootDef)
if (EditRootDef != boxRootDef)
{
TxError("The box isn't in a window on the edit cell.\n");
return FALSE;
@ -319,7 +319,7 @@ ToolGetEditBox(rect)
return TRUE;
}
/*
* ----------------------------------------------------------------------------
* ToolGetCorner --
@ -389,7 +389,7 @@ ToolGetCorner(screenPoint)
*
* Side effects:
* Initializes static memory.
*
*
* ----------------------------------------------------------------------------
*/
@ -617,7 +617,7 @@ dbwRecordBoxArea(erase)
DBWHLRedraw(boxRootDef, &side, erase);
}
}
/*
* ----------------------------------------------------------------------------
*
@ -693,7 +693,7 @@ DBWDrawBox(window, plane)
* blob, then don't do the widening. This is to make the box more
* useable when features are very small.
*/
if (((screenArea.r_xtop != screenArea.r_xbot) &&
(screenArea.r_xtop < screenArea.r_xbot + 4))
|| ((screenArea.r_ytop != screenArea.r_ybot) &&
@ -749,7 +749,7 @@ dbwBoxAlways1()
{
return 1;
}
/*
* ----------------------------------------------------------------------------
* DBWSetBox --
@ -789,7 +789,7 @@ DBWSetBox(rootDef, rect)
dbwRecordBoxArea(FALSE);
}
/*
* ----------------------------------------------------------------------------
* ToolMoveBox --
@ -799,7 +799,7 @@ DBWSetBox(rootDef, rect)
* the box corner is snapped to the user's grid (set with the :grid
* command) if DBWSnapToGrid is DBW_SNAP_USER. If DBWSnapToGrid is
* DBW_SNAP_LAMBDA, the box corner is snapped to the nearest integer
* lambda value.
* lambda value.
*
* Results:
* None.
@ -890,7 +890,7 @@ ToolMoveBox(corner, point, screenCoords, rootDef)
DBWSetBox(newDef, &newArea);
}
/*
* ----------------------------------------------------------------------------
* ToolMoveCorner --
@ -963,7 +963,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef)
* current box root def, then just move the whole durned box.
* Also move the whole box if a weird corner is specified.
*/
if ((newDef != oldDef) || (corner < 0) || (corner > TOOL_TL))
{
ToolMoveBox(corner, &p, FALSE, newDef);
@ -996,7 +996,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef)
/* If the movement turned the box inside out, turn it right
* side out again.
*/
if (newArea.r_xbot > newArea.r_xtop)
{
tmp = newArea.r_xtop;
@ -1012,7 +1012,7 @@ ToolMoveCorner(corner, point, screenCoords, rootDef)
DBWSetBox(newDef, &newArea);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Procedures for undoing/redoing operations associated
* with the dbwind module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -84,7 +84,7 @@ typedef struct
Rect bue_newArea;
} BoxUndoEvent;
/*
* ----------------------------------------------------------------------------
*
@ -113,12 +113,12 @@ dbwUndoInit()
dbwUndoIDNewEdit = UndoAddClient(nullProc, nullProc,
(UndoEvent *(*)()) NULL, (int (*)()) NULL, dbwUndoChangeEdit,
nullProc, "change edit cell");
dbwUndoIDBox = UndoAddClient(nullProc, nullProc,
(UndoEvent *(*)()) NULL, (int (*)()) NULL, dbwUndoBoxForw,
dbwUndoBoxBack, "box change");
}
/*
* ----------------------------------------------------------------------------
*
@ -179,7 +179,7 @@ DBWUndoNewEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans)
ep->e_parentDef = editUse->cu_parent;
(void) strcpy(ep->e_useId, useid);
}
/*
* ----------------------------------------------------------------------------
*
@ -244,7 +244,7 @@ dbwUndoChangeEdit(ep)
DBWAreaChanged(EditRootDef, &area, DBW_ALLWINDOWS, &DBAllButSpaceBits);
CmdSetWindCaption(EditCellUse, EditRootDef);
}
/*
* ----------------------------------------------------------------------------
*
@ -278,7 +278,7 @@ DBWUndoBox(oldDef, oldArea, newDef, newArea)
bue->bue_newDef = newDef;
bue->bue_newArea = *newArea;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -4,16 +4,16 @@
* Interface definitions for the 'glue' between the window
* manager and the database.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
*
@ -136,7 +136,7 @@ extern void DBWTechInitStyles();
extern bool DBWTechAddStyle();
extern char *DBWStyleType;
/*
/*
* exported button procedures and variables
*/

View File

@ -6,16 +6,16 @@
* procedures for setting, examining, and testing debugging flags.
* Also measurement code.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*
* rcsid $Header: /usr/cvsroot/magic-8.0/debug/debug.h,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $
@ -41,7 +41,7 @@ struct debugFlag
};
/* A histogram counts of the number of data items in each of
* a number of ranges. It is defined by a low value, a bin size, and
* a number of ranges. It is defined by a low value, a bin size, and
* the number of bins. Items falling in the range hi_lo..hi_lo+n*hi_step-1
* go into hi_data[n], for n=1 to the number of bins. Values outside the
* range are stored in locations 0 and n+1.

View File

@ -5,16 +5,16 @@
* The debugging module provides a standard collection of
* procedures for setting, examining, and testing debugging flags.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
struct debugClient debugClients[MAXDEBUGCLIENTS];
int debugNumClients = 0;
/*
* ----------------------------------------------------------------------------
*
@ -84,7 +84,7 @@ DebugAddClient(name, maxflags)
return ((ClientData) debugNumClients++);
}
/*
* ----------------------------------------------------------------------------
*
@ -137,7 +137,7 @@ DebugAddFlag(clientID, name)
dc->dc_flags[dc->dc_nflags].df_value = FALSE;
return (dc->dc_nflags++);
}
/*
* ----------------------------------------------------------------------------
*
@ -173,7 +173,7 @@ DebugShow(clientID)
TxPrintf("%-5.5s %s\n", dc->dc_flags[n].df_value ? "TRUE" : "FALSE",
dc->dc_flags[n].df_name);
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -2,16 +2,16 @@
*
* Module to collect and print histograms.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/malloc.h"
Histogram * hist_list = (Histogram *) NULL;
/*
* ----------------------------------------------------------------------------
*
@ -63,7 +63,7 @@ histFind(name, ptrKeys)
return(h);
return((Histogram *) NULL);
}
/*
* ----------------------------------------------------------------------------
*
@ -116,7 +116,7 @@ HistCreate(name, ptrKeys, low, step, bins)
new->hi_next=hist_list;
hist_list=new;
}
/*
* ----------------------------------------------------------------------------
*
@ -157,7 +157,7 @@ HistAdd(name, ptrKeys, value)
if(value > h->hi_max)
h->hi_max=value;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -6,16 +6,16 @@
* elements. Note: the routines in this file are NOT generally
* re-entrant.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -58,7 +58,7 @@ static int drcArrayCount; /* Count of number of errors found. */
static void (*drcArrayErrorFunc)(); /* Function to call on violations. */
static ClientData drcArrayClientData; /* Extra parameter to pass to func. */
/*
* ----------------------------------------------------------------------------
*
@ -120,11 +120,11 @@ drcArrayFunc(scx, area)
if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi))
return 2;
/* Set up the client data that will be passed down during
* checks for exact overlaps.
*/
arg.dCD_celldef = DRCdef;
arg.dCD_errors = &drcArrayCount;
arg.dCD_clip = &errorArea;
@ -136,7 +136,7 @@ drcArrayFunc(scx, area)
* of the parend. If the array is 1-dimensional, we set the
* corresponding spacing to an impossibly large distance.
*/
tmp.r_xbot = 0;
tmp.r_ybot = 0;
if (use->cu_xlo == use->cu_xhi)
@ -159,7 +159,7 @@ drcArrayFunc(scx, area)
* Skip some or all of the areas if the cell isn't arrayed in
* that direction or if the instances are widely spaced.
*/
if (ysep < ysize + DRCTechHalo)
{
/* A */
@ -237,10 +237,10 @@ drcArrayFunc(scx, area)
(ClientData) &arg);
}
}
return 2;
}
/*
* ----------------------------------------------------------------------------
* DRCArrayCheck --
@ -308,7 +308,7 @@ DRCArrayCheck(def, area, func, cdarg)
return drcArrayCount;
}
/*
* ----------------------------------------------------------------------------
*
@ -344,7 +344,7 @@ drcArrayYankFunc(use, transform, x, y, yankArea)
(void) DBCellCopyAllPaint(&scx, &DBAllButSpaceBits, 0, DRCuse);
return 0;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -6,16 +6,16 @@
* find all of the rule violations and call a client procedure for
* each one.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -114,11 +114,11 @@ point_to_segment(px, py, s1x, s1y, s2x, s2y)
#define RADIAL_SW 0x2000
#define RADIAL_SE 0x4000
/*
* ----------------------------------------------------------------------------
*
* areaCheck --
* areaCheck --
*
* Call the function passed down from DRCBasicCheck() if the current tile
* violates the rule in the given DRCCookie. If the rule's connectivity
@ -138,7 +138,7 @@ point_to_segment(px, py, s1x, s1y, s2x, s2y)
*/
int
areaCheck(tile, arg)
areaCheck(tile, arg)
Tile *tile;
struct drcClientData *arg;
{
@ -157,7 +157,7 @@ areaCheck(tile, arg)
if ((rect.r_xbot >= rect.r_xtop) || (rect.r_ybot >= rect.r_ytop))
return 0;
/*
/*
* When Euclidean distance checks are enabled, check for error tiles
* outside of the perimeter of the circle in the corner extension area
* that extends "sdist" from the corner of the edge.
@ -173,7 +173,7 @@ areaCheck(tile, arg)
int sqx, sqy;
int sdist = arg->dCD_radial & 0xfff;
long sstest, ssdist = sdist * sdist;
if ((arg->dCD_radial & RADIAL_NW) != 0)
{
if (((sqx = arg->dCD_constraint->r_xbot + sdist
@ -267,7 +267,7 @@ areaCheck(tile, arg)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -350,7 +350,7 @@ DRCBasicCheck (celldef, checkRect, clipRect, function, cdata)
if (arg.dCD_rlist != NULL) freeMagic(arg.dCD_rlist);
return (errors);
}
/*
* ----------------------------------------------------------------------------
*
@ -400,7 +400,7 @@ drcTile (tile, arg)
* overlap between things in adjacent cells. This means that
* there's an automatic violation over the area of the tile.
*/
if (TiGetType(tile) == TT_ERROR_S)
{
TiToRect(tile, &errRect);
@ -592,7 +592,7 @@ drcTile (tile, arg)
{
lr = &mrd->rlist[i];
GeoClip(lr, arg->dCD_clip);
if (!GEO_RECTNULL(lr))
if (!GEO_RECTNULL(lr))
{
(*(arg->dCD_function)) (arg->dCD_celldef,
lr, cptr, arg->dCD_clientData);
@ -622,7 +622,7 @@ drcTile (tile, arg)
}
result = 0;
arg->dCD_radial = 0;
arg->dCD_radial = 0;
arg->dCD_entries = 0;
do {
if (triggered)
@ -973,12 +973,12 @@ checkbottom:
{
lr = &mrd->rlist[i];
GeoClip(lr, arg->dCD_clip);
if (!GEO_RECTNULL(lr))
if (!GEO_RECTNULL(lr))
{
(*(arg->dCD_function)) (arg->dCD_celldef,
lr, cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++;
}
}
}
}
continue;
@ -992,7 +992,7 @@ checkbottom:
}
result = 0;
arg->dCD_radial = 0;
arg->dCD_radial = 0;
arg->dCD_entries = 0;
do {
if (triggered)

View File

@ -2,23 +2,23 @@
* DRCcif.c --
*
******************************************************************************
* Copyright (C) 1989 Digital Equipment Corporation
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. Digital Equipment Corporation
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* Copyright (C) 1989 Digital Equipment Corporation
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. Digital Equipment Corporation
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
****************************************************************************
*
*/
@ -148,7 +148,7 @@ drcCifWarning()
/*
* ----------------------------------------------------------------------------
*
* drcCifWidth -- same this as drcCifWidth, except that it works on
* drcCifWidth -- same this as drcCifWidth, except that it works on
* cif layers
*
* Results:
@ -180,8 +180,8 @@ drcCifWidth(argc, argv)
for (i = 0; i < drcCifStyle->cs_nLayers;i++)
{
CIFLayer *layer = drcCifStyle->cs_layers[i];
if (strcmp(layer->cl_name,layername) == 0)
if (strcmp(layer->cl_name,layername) == 0)
{
thislayer = i;
break;
@ -209,7 +209,7 @@ drcCifWidth(argc, argv)
/*
* ----------------------------------------------------------------------------
*
* drcCifSpacing -- same this as drcSpacing, except that it works on cif
* drcCifSpacing -- same this as drcSpacing, except that it works on cif
* layers.
*
* Results:
@ -240,7 +240,7 @@ drcCifSpacing(argc, argv)
layers[0] = argv[1];
layers[1] = argv[2];
if (drcCifStyle == NULL)
return drcCifWarning();
@ -249,12 +249,12 @@ drcCifSpacing(argc, argv)
for (i = 0; i < drcCifStyle->cs_nLayers;i++)
{
CIFLayer *l = drcCifStyle->cs_layers[i];
if (strcmp(l->cl_name,layers[k]) == 0)
{
layer[k]=i;
break;
}
}
}
if (i == drcCifStyle->cs_nLayers || layer[k] == -1)
{
@ -285,7 +285,7 @@ drcCifSpacing(argc, argv)
TechError("Badly formed drc spacing line\n");
return (0);
}
scalefactor = drcCifStyle->cs_scaleFactor;
centidistance *= drcCifStyle->cs_expander; // BSI
dpnext = drcCifRules[layer[0]][DRC_CIF_SOLID];
@ -301,7 +301,7 @@ drcCifSpacing(argc, argv)
drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits,
&cmask, why, centidistance, DRC_REVERSE, layer[1], 0);
drcCifRules[layer[0]][DRC_CIF_SPACE] = dpnew;
if (needReverse)
{
// This is not so much "reverse" as it is just the
@ -320,7 +320,7 @@ drcCifSpacing(argc, argv)
drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits, &cmask,
why, centidistance, DRC_REVERSE|DRC_BOTHCORNERS, layer[0], 0);
drcCifRules[layer[1]][DRC_CIF_SPACE] = dpnew;
if (layer[0] == layer[1])
{
dpnext = drcCifRules[layer[1]][DRC_CIF_SPACE];
@ -329,7 +329,7 @@ drcCifSpacing(argc, argv)
&cmask, why, centidistance, DRC_REVERSE | DRC_BOTHCORNERS,
layer[0], 0);
drcCifRules[layer[1]][DRC_CIF_SPACE] = dpnew;
dpnext = drcCifRules[layer[0]][DRC_CIF_SPACE];
dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie)));
drcCifAssign(dpnew, centidistance, dpnext, &DBSpaceBits, &cmask,
@ -353,7 +353,7 @@ drcCifSpacing(argc, argv)
why, scalefactor, DRC_FORWARD, layer[1], 0);
drcCifRules[layer[0]][DRC_CIF_SPACE] = dpnew;
}
return ((centidistance+scalefactor-1)/scalefactor);
}
@ -459,7 +459,7 @@ drcCifFinal()
for (i = 0; i != MAXCIFLAYERS; i++)
{
DRCCookie *dp;
for (dp = drcCifRules[i][DRC_CIF_SPACE]; dp; dp = dp->drcc_next)
{
drcCifValid = TRUE;
@ -486,7 +486,7 @@ drcCifFinal()
*
* Side effects:
* Error paint, CIF layer generation, lots of stuff going on.
*
*
* ----------------------------------------------------------------------------
*/
@ -546,11 +546,11 @@ drcCifCheck(arg)
{
for (j = 0; j != 2; j++)
{
for (drcCifCur = drcCifRules[i][j];
for (drcCifCur = drcCifRules[i][j];
drcCifCur; drcCifCur = drcCifCur->drcc_next)
{
TileTypeBitMask *mask;
arg->dCD_plane = i;
DBSrPaintArea((Tile *) NULL, CIFPlanes[i], &cifrect,
(j == DRC_CIF_SOLID) ? &DBSpaceBits : &CIFSolidBits,
@ -868,7 +868,7 @@ drcCifTile (tile, arg)
/* Nothing */;
if (TTMaskHasType(&cptr->drcc_corner, TiGetLeftType(tp)))
{
errRect.r_xtop += cptr->drcc_cdist;
errRect.r_xtop += cptr->drcc_cdist;
if (DRCEuclidean)
arg->dCD_radial |= 0x4000;
}
@ -883,7 +883,7 @@ drcCifTile (tile, arg)
/* Nothing */;
if (TTMaskHasType(&cptr->drcc_corner, TiGetRightType(tp)))
{
errRect.r_xbot -= cptr->drcc_cdist;
errRect.r_xbot -= cptr->drcc_cdist;
if (DRCEuclidean)
arg->dCD_radial |= 0x1000;
}
@ -972,7 +972,7 @@ drcCifTile (tile, arg)
/*
* ----------------------------------------------------------------------------
*
* areaCifCheck --
* areaCifCheck --
*
* Call the function passed down from DRCBasicCheck() if the current tile
* violates the rule in the given DRCCookie. If the rule's connectivity
@ -992,7 +992,7 @@ drcCifTile (tile, arg)
*/
int
areaCifCheck(tile, arg)
areaCifCheck(tile, arg)
Tile *tile;
struct drcClientData *arg;
{
@ -1078,8 +1078,8 @@ drcCifArea(argc, argv)
for (i = 0; i < drcCifStyle->cs_nLayers;i++)
{
CIFLayer *layer = drcCifStyle->cs_layers[i];
if (strcmp(layer->cl_name,layers) == 0)
if (strcmp(layer->cl_name,layers) == 0)
{
thislayer = i;
break;
@ -1140,8 +1140,8 @@ drcCifMaxwidth(argc, argv)
for (i = 0; i < drcCifStyle->cs_nLayers;i++)
{
CIFLayer *layer = drcCifStyle->cs_layers[i];
if (strcmp(layer->cl_name,layers) == 0)
if (strcmp(layer->cl_name,layers) == 0)
{
thislayer = i;
break;
@ -1160,7 +1160,7 @@ drcCifMaxwidth(argc, argv)
TechError("unknown bend option %s\n",bends);
return (0);
}
scalefactor = drcCifStyle->cs_scaleFactor;
centidistance *= drcCifStyle->cs_expander; // BSI
dpnext = drcCifRules[thislayer][DRC_CIF_SPACE];
@ -1177,7 +1177,7 @@ drcCifMaxwidth(argc, argv)
*
* drcCifCheckArea--
*
* checks to see that a collection of cif tiles
* checks to see that a collection of cif tiles
* have more than a minimum area.
*
* Results:
@ -1201,7 +1201,7 @@ drcCheckCifArea(starttile, arg, cptr)
Tile *tile,*tp;
Rect *cliprect = arg->dCD_rect;
int scale = drcCifStyle->cs_scaleFactor;
arg->dCD_cptr = (DRCCookie *)cptr;
if (DRCstack == (Stack *) NULL)
DRCstack = StackNew(64);
@ -1253,7 +1253,7 @@ drcCheckCifArea(starttile, arg, cptr)
arg->dCD_cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++;
}
}
forgetit:
/* reset the tiles */
@ -1327,7 +1327,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
TileTypeBitMask *oktypes = &cptr->drcc_mask;
Tile *tile,*tp;
int scale = drcCifStyle->cs_scaleFactor;
arg->dCD_cptr = (DRCCookie *)cptr;
if (DRCstack == (Stack *) NULL)
DRCstack = StackNew(64);
@ -1363,7 +1363,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
{
tile = (Tile *) STACKPOP(DRCstack);
if (tile->ti_client != (ClientData)DRC_PENDING) continue;
if (boundrect.r_xbot > LEFT(tile)) boundrect.r_xbot = LEFT(tile);
if (boundrect.r_xtop < RIGHT(tile)) boundrect.r_xtop = RIGHT(tile);
if (boundrect.r_ybot > BOTTOM(tile)) boundrect.r_ybot = BOTTOM(tile);
@ -1391,7 +1391,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
}
if (boundrect.r_xtop - boundrect.r_xbot > edgelimit &&
boundrect.r_ytop - boundrect.r_ybot > edgelimit)
boundrect.r_ytop - boundrect.r_ybot > edgelimit)
{
Rect rect;
TiToRect(starttile,&rect);
@ -1407,7 +1407,7 @@ drcCheckCifMaxwidth(starttile,arg,cptr)
(*(arg->dCD_errors))++;
}
}
}
/* reset the tiles */
starttile->ti_client = (ClientData)DRC_UNPROCESSED;

View File

@ -6,16 +6,16 @@
* records areas that need to be rechecked, and provides a
* routine to perform those checks in background.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -46,7 +46,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#ifdef MAGIC_WRAPPER
/* Global variable which indicates that the background checker is
/* Global variable which indicates that the background checker is
* still registered as an idle process.
*/
@ -146,7 +146,7 @@ extern int drcCheckTile();
extern CellDef *DRCErrorDef;
extern TileType DRCErrorType;
/*
* ----------------------------------------------------------------------------
* DRCCheckThis --
@ -268,7 +268,7 @@ DRCCheckThis (celldef, operation, area)
DRCCheckThis (cu->cu_parent, TT_CHECKSUBCELL, &transRect);
}
}
/*
* ----------------------------------------------------------------------------
@ -410,7 +410,7 @@ DRCBreak()
if (DRCHasWork && (DRCStatus == DRC_IN_PROGRESS))
{
UndoEnable();
/* fprintf(stderr, "DRC breaking. . .\n"); fflush(stderr); */
/* As a convenience for debugging DRC stuff, we pretend the DRC
@ -441,7 +441,7 @@ DRCBreak()
* None.
*
* Side effects:
* Modifies the DRC_CHECK and DRC_ERROR planes
* Modifies the DRC_CHECK and DRC_ERROR planes
* of the CellDefs on the DRCPending list.
* ----------------------------------------------------------------------------
*/
@ -550,7 +550,7 @@ checkDone:
#endif
}
/*
* ----------------------------------------------------------------------------
* drcCheckTile --
@ -627,7 +627,7 @@ drcCheckTile(tile, arg)
/* Find the checkerboard square containing the lower-left corner
* of the check tile, then find all check tiles within that square.
*/
DRCstatSquares += 1;
square.r_xbot = (LEFT(tile)/DRCStepSize) * DRCStepSize;
if (square.r_xbot > LEFT(tile)) square.r_xbot -= DRCStepSize;
@ -658,7 +658,7 @@ drcCheckTile(tile, arg)
DBClearPaintPlane(drcDisplayPlane);
(void) DBSrPaintArea((Tile *) NULL, celldef->cd_planes[PL_DRC_ERROR],
&square, &DBAllButSpaceBits, drcXorFunc, (ClientData) NULL);
/* Check #1: recheck the paint of the cell, ignoring subcells. */
DRCErrorType = TT_ERROR_P;
@ -684,7 +684,7 @@ drcCheckTile(tile, arg)
DRCErrorType = TT_ERROR_S;
(void) DRCInteractionCheck(celldef, &square, &erasebox,
drcPaintError, (ClientData) drcTempPlane);
/* Check #3: check for array formation errors in the area. */
DRCErrorType = TT_ERROR_P;
@ -721,7 +721,7 @@ drcCheckTile(tile, arg)
* clip to square and redisplay. If check tiles are being
* displayed, then always redisplay the entire area.
*/
(void) DBSrPaintArea((Tile *) NULL, celldef->cd_planes[PL_DRC_ERROR],
&square, &DBAllButSpaceBits, drcXorFunc, (ClientData) NULL);
if (DBBoundPlane(drcDisplayPlane, &redisplayArea))
@ -771,7 +771,7 @@ drcPutBackFunc(tile, cellDef)
(PaintUndoInfo *) NULL);
return 0;
}
/*
* ----------------------------------------------------------------------------
*

View File

@ -1,7 +1,7 @@
#ifndef lint
static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/drc/DRCextend.c,v 1.6 2010/09/20 21:13:22 tim Exp $";
#endif
#endif
#include <sys/types.h>
#include <stdio.h>
@ -73,7 +73,7 @@ drcCheckAngles(tile, arg, cptr)
/*
*-------------------------------------------------------------------------
*
* drcCheckArea- checks to see that a collection of tiles of a given
* drcCheckArea- checks to see that a collection of tiles of a given
* type have more than a minimum area.
*
* Results: none
@ -97,7 +97,7 @@ drcCheckArea(starttile,arg,cptr)
Rect *cliprect = arg->dCD_rect;
arealimit = cptr->drcc_cdist;
arg->dCD_cptr = cptr;
if (DRCstack == (Stack *) NULL)
DRCstack = StackNew(64);
@ -145,7 +145,7 @@ drcCheckArea(starttile,arg,cptr)
(*(arg->dCD_function)) (arg->dCD_celldef, &rect,
arg->dCD_cptr, arg->dCD_clientData);
/***
DBWAreaChanged(arg->dCD_celldef,&rect, DBW_ALLWINDOWS,
DBWAreaChanged(arg->dCD_celldef,&rect, DBW_ALLWINDOWS,
&DBAllButSpaceBits);
***/
(*(arg->dCD_errors))++;
@ -197,7 +197,7 @@ forgetit:
}
}
/*
*-------------------------------------------------------------------------
*
@ -244,7 +244,7 @@ drcCheckMaxwidth(starttile,arg,cptr)
tile = (Tile *) STACKPOP(DRCstack);
if (tile->ti_client != (ClientData)DRC_PENDING) continue;
tile->ti_client = (ClientData)DRC_PROCESSED;
if (boundrect.r_xbot > LEFT(tile)) boundrect.r_xbot = LEFT(tile);
if (boundrect.r_xtop < RIGHT(tile)) boundrect.r_xtop = RIGHT(tile);
if (boundrect.r_ybot > BOTTOM(tile)) boundrect.r_ybot = BOTTOM(tile);
@ -275,7 +275,7 @@ drcCheckMaxwidth(starttile,arg,cptr)
}
if (boundrect.r_xtop - boundrect.r_xbot > edgelimit &&
boundrect.r_ytop - boundrect.r_ybot > edgelimit)
boundrect.r_ytop - boundrect.r_ybot > edgelimit)
{
Rect rect;
TiToRect(starttile,&rect);
@ -286,7 +286,7 @@ drcCheckMaxwidth(starttile,arg,cptr)
(*(arg->dCD_errors))++;
retval = 1;
}
}
/* reset the tiles */
@ -332,13 +332,13 @@ drcCheckMaxwidth(starttile,arg,cptr)
return retval;
}
/*
*-------------------------------------------------------------------------
*
* drcCheckRectSize-
* drcCheckRectSize-
*
* Checks to see that a collection of tiles of given
* Checks to see that a collection of tiles of given
* types have the proper size (max size and also even or odd size).
*
* Results: none
@ -372,10 +372,10 @@ drcCheckRectSize(starttile, arg, cptr)
*/
arg->dCD_cptr = cptr;
ASSERT(TTMaskHasType(oktypes, TiGetType(starttile)), "drcCheckRectSize");
for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = TR(t))
for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = TR(t))
/* loop has empty body */ ;
errwidth = width = LEFT(t) - LEFT(starttile);
for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = RT(t))
for (t = starttile; TTMaskHasType(oktypes, TiGetType(t)); t = RT(t))
/* loop has empty body */ ;
errheight = height = BOTTOM(t) - BOTTOM(starttile);
ASSERT(width > 0 && height > 0, "drcCheckRectSize");
@ -399,7 +399,7 @@ drcCheckRectSize(starttile, arg, cptr)
arg->dCD_cptr, arg->dCD_clientData);
(*(arg->dCD_errors))++;
}
}
}
@ -462,7 +462,7 @@ drcCanonicalMaxwidth(starttile, dir, arg, cptr)
boundrect = &(mrd->rlist[0]);
mrd->match = CLIENTDEFAULT;
edgelimit = cptr->drcc_dist;
arg->dCD_cptr = cptr;

View File

@ -5,16 +5,16 @@
* command-level. They do things like give information about
* errors and print statistics.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -125,7 +125,7 @@ static int drcTotalVRulesHisto[DRC_MAXRULESHISTO];
static int drcTotalHRulesHisto[DRC_MAXRULESHISTO];
#endif /* DRCRULESHISTO */
/*
* ----------------------------------------------------------------------------
* drcPaintError --
@ -199,7 +199,7 @@ drcSubstitute (cptr)
whylen = strlen(whyptr) + 20 * subscnt;
if (why_out != NULL) freeMagic(why_out);
why_out = (char *)mallocMagic(whylen * sizeof(char));
strcpy(why_out, whyptr);
strcpy(why_out, whyptr);
oscale = CIFGetOutputScale(1000); /* 1000 for conversion to um */
wptr = why_out;
@ -243,7 +243,7 @@ drcSubstitute (cptr)
return why_out;
}
/*
* ----------------------------------------------------------------------------
* drcPrintError --
@ -344,7 +344,7 @@ drcListallError (celldef, rect, cptr, scx)
lobj = (Tcl_Obj *) HashGetValue(h);
if (lobj == NULL)
lobj = Tcl_NewListObj(0, NULL);
pobj = Tcl_NewListObj(0, NULL);
Tcl_ListObjAppendElement(magicinterp, pobj, Tcl_NewIntObj(r.r_xbot));
@ -361,7 +361,7 @@ drcListallError (celldef, rect, cptr, scx)
#define drcListError drcPrintError
#endif
/*
* ----------------------------------------------------------------------------
*
@ -438,7 +438,7 @@ DRCPrintStats()
}
#endif /* DRCRULESHISTO */
}
/*
* ----------------------------------------------------------------------------
*
@ -497,11 +497,11 @@ DRCWhy(dolist, use, area)
/* Delete the error list */
freeMagic(DRCErrorList);
/* Redisplay the DRC yank definition in case anyone is looking
* at it.
*/
DBReComputeBbox(DRCdef);
(void) GeoInclude(&DRCdef->cd_bbox, &box);
DBWAreaChanged(DRCdef, &box, DBW_ALLWINDOWS, &DBAllButSpaceBits);
@ -550,14 +550,14 @@ DRCWhyAll(use, area, fout)
/* Generate results */
robj = Tcl_NewListObj(0, NULL);
HashStartSearch(&hs);
while ((he = HashNext(&DRCErrorTable, &hs)) != (HashEntry *)NULL)
{
lobj = (Tcl_Obj *)HashGetValue(he);
if (lobj != NULL)
{
Tcl_ListObjAppendElement(magicinterp, robj,
Tcl_ListObjAppendElement(magicinterp, robj,
Tcl_NewStringObj((char *)he->h_key.h_name, -1));
Tcl_ListObjAppendElement(magicinterp, robj, lobj);
}
@ -570,7 +570,7 @@ DRCWhyAll(use, area, fout)
/* Redisplay the DRC yank definition in case anyone is looking
* at it.
*/
DBReComputeBbox(DRCdef);
(void) GeoInclude(&DRCdef->cd_bbox, &box);
DBWAreaChanged(DRCdef, &box, DBW_ALLWINDOWS, &DBAllButSpaceBits);
@ -609,14 +609,14 @@ drcWhyFunc(scx, cdarg)
bool dolist = (bool)((pointertype)cdarg);
/* Check paint and interactions in this subcell. */
(void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area,
(dolist) ? drcListError : drcPrintError,
(ClientData) scx);
(void) DRCArrayCheck(def, &scx->scx_area,
(dolist) ? drcListError : drcPrintError,
(ClientData) scx);
/* New behavior: Don't search children, instead propagate errors up. */
/* (void) DBCellSrArea(scx, drcWhyFunc, (ClientData)cdarg); */
@ -633,12 +633,12 @@ drcWhyAllFunc(scx, cdarg)
CellDef *def = scx->scx_use->cu_def;
/* Check paint and interactions in this subcell. */
(void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area,
drcListallError, (ClientData)scx);
(void) DRCArrayCheck(def, &scx->scx_area,
drcListallError, (ClientData)scx);
/* New behavior: Don't search children, instead propagate errors up. */
/* (void) DBCellSrArea(scx, drcWhyAllFunc, (ClientData)cdarg); */
@ -718,12 +718,12 @@ drcCheckFunc(scx, cdarg)
/* As a special performance hack, if the complete cell area is
* handled here, don't bother to look at any more array elements.
*/
if (GEO_SURROUND(&cellArea, &def->cd_bbox))
return 2;
else return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -758,7 +758,7 @@ DRCCount(use, area, recurse)
extern int drcCountFunc();
/* Shouldn't happen? */
if (!(use->cu_def->cd_flags & CDAVAILABLE)) return NULL;
if (!(use->cu_def->cd_flags & CDAVAILABLE)) return NULL;
/* Use a hash table to make sure that we don't output information
* for any cell more than once.
@ -888,7 +888,7 @@ DRCCatchUp()
DRCContinuous();
DRCBackGround = background;
}
/*
* ----------------------------------------------------------------------------
*
@ -928,7 +928,7 @@ DRCFind(use, area, rect, indx)
{
SearchContext scx;
Sindx finddata;
Rect trect;
Rect trect;
int result;
int drcFindFunc();
HashTable defTable;
@ -989,7 +989,7 @@ drcFindFunc(scx, finddata)
finddata->trans = scx->scx_trans;
return 1;
}
/* New behavior: Don't search children, instead propagate errors up. */
/* return DBCellSrArea(scx, drcFindFunc, (ClientData)finddata); */
return 0;

View File

@ -3,16 +3,16 @@
*
* Edge-based design rule checker
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -33,7 +33,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
extern char *maskToPrint();
extern char *DBTypeShortName();
/*
* ----------------------------------------------------------------------------
*
@ -63,7 +63,7 @@ drcGetName(layer, string)
return string;
}
/*
* ----------------------------------------------------------------------------
* DRCPrintRulesTable --

View File

@ -5,16 +5,16 @@
* violations that occur as a result of interactions between
* subcells and either paint or other subcells.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -94,7 +94,7 @@ drcFindOtherCells(use, area)
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -164,7 +164,7 @@ drcSubcellFunc(subUse, propagate)
(void) GeoInclude(&intArea, &drcSubIntArea);
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -188,7 +188,7 @@ drcAlwaysOne()
{
return 1;
}
/*
* ----------------------------------------------------------------------------
*
@ -238,7 +238,7 @@ drcSubCheckPaint(scx, curUse)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -301,13 +301,13 @@ DRCFindInteractions(def, area, radius, interaction)
propagate = FALSE;
(void) DBSrCellPlaneArea(def->cd_cellPlane, &drcSubLookArea,
drcSubcellFunc, (ClientData)(&propagate));
/* If there seems to be an interaction area, make a second pass
* to make sure there's more than one cell with paint in the
* area. This will save us a lot of work where two cells
* have overlapping bounding boxes without overlapping paint.
*/
if (GEO_RECTNULL(&drcSubIntArea)) return FALSE;
use = NULL;
@ -334,13 +334,13 @@ DRCFindInteractions(def, area, radius, interaction)
}
/* OK, no more excuses, there's really an interaction area here. */
*interaction = drcSubIntArea;
GeoClip(interaction, area);
if (GEO_RECTNULL(interaction)) return FALSE;
return TRUE;
}
/*
* ----------------------------------------------------------------------------
*
@ -377,7 +377,7 @@ drcExactOverlapCheck(tile, arg)
(*(arg->dCD_errors))++;
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -416,7 +416,7 @@ drcExactOverlapTile(tile, cxp)
Tile *tp;
Rect r1, r2, r3, rex;
int i;
arg = (struct drcClientData *) cxp->tc_filter->tf_arg;
TiToRect(tile, &r1);
GeoTransRect(&(cxp->tc_scx->scx_trans), &r1, &r2);
@ -505,7 +505,7 @@ drcExactOverlapTile(tile, cxp)
}
return 0;
}
/*
* ----------------------------------------------------------------------------
*
@ -564,7 +564,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
/* Divide the area to be checked up into squares. Process each
* square separately.
*/
x = (area->r_xbot/DRCStepSize) * DRCStepSize;
if (x > area->r_xbot) x -= DRCStepSize;
y = (area->r_ybot/DRCStepSize) * DRCStepSize;
@ -599,7 +599,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
errorSaveType = DRCErrorType;
DRCErrorType = TT_ERROR_P; // Basic check is always ERROR_P
DRCBasicCheck(def, &intArea, &subArea, func, cdarg);
DRCBasicCheck(def, &intArea, &subArea, func, cdarg);
DRCErrorType = errorSaveType;
continue;
}
@ -631,16 +631,16 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
{
subArea.r_ybot = intArea.r_ytop;
GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
/* check below */
if (intArea.r_ybot > eraseClip.r_ybot)
{
subArea.r_ybot = eraseClip.r_ybot;
subArea.r_ytop = intArea.r_ybot;
GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
subArea.r_ytop = intArea.r_ytop;
subArea.r_ybot = intArea.r_ybot;
@ -649,7 +649,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
{
subArea.r_xbot = intArea.r_xtop;
GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
/* check left */
if (intArea.r_xbot > eraseClip.r_xbot)
@ -657,7 +657,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
subArea.r_xtop = intArea.r_xbot;
subArea.r_xbot = eraseClip.r_xbot;
GEO_EXPAND(&subArea, DRCTechHalo, &eraseHalo);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
}
DRCErrorType = errorSaveType;
}
@ -667,7 +667,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
subArea = *erasebox;
GEO_EXPAND(&subArea, DRCTechHalo, &cliparea);
GeoClip(&intArea, &cliparea);
/* Flatten the interaction area. */
DRCstatInteractions += 1;
@ -708,7 +708,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
(void) DBTreeSrUniqueTiles(&scx, &DRCCurStyle->DRCExactOverlapTypes,
0, drcExactOverlapTile, (ClientData) &arg);
}
/* Update count of interaction tiles processed. */
DRCstatIntTiles += DRCstatTiles - oldTiles;

View File

@ -3,16 +3,16 @@
*
* Technology initialization for the DRC module.
*
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
* * Copyright (C) 1985, 1990 Regents of the University of California. *
* * Permission to use, copy, modify, and distribute this *
* * software and its documentation for any purpose and without *
* * fee is hereby granted, provided that the above copyright *
* * notice appear in all copies. The University of California *
* * makes no representations about the suitability of this *
* * software for any purpose. It is provided "as is" without *
* * express or implied warranty. Export of this software outside *
* * of the United States of America may require an export license. *
* *********************************************************************
*/
@ -112,7 +112,7 @@ CoincidentPlanes(typeMask, pmask)
return planes;
}
/*
* ----------------------------------------------------------------------------
@ -428,7 +428,7 @@ drcFindBucket(i, j, distance)
* ----------------------------------------------------------------------------
*
* drcLoadStyle --
*
*
* Re-read the technology file to load the specified technology DRC style
* into structure DRCCurStyle. It incurs a complete reading of the tech
* file on startup and every time the extraction style is changed, but we
@ -469,7 +469,7 @@ drcLoadStyle(stylename)
*
* Side Effects:
* DRC rule database is deleted and regenerated.
*
*
* ----------------------------------------------------------------------------
*/
@ -609,7 +609,7 @@ DRCTechStyleInit()
* get one of the layers, and it doesn't matter which is painted
* on top of which.
*/
for (plane = 0; plane < DBNumPlanes; plane++)
for (i = 0; i < DBNumTypes; i++)
for (j = 0; j < DBNumTypes; j++)
@ -629,7 +629,7 @@ DRCTechStyleInit()
{
DRCCurStyle->DRCPaintTable[plane][i][j] = result;
}
else if ((!TTMaskHasType(&DBLayerTypeMaskTbl[i], result)
&& !TTMaskHasType(&DBLayerTypeMaskTbl[j], result))
|| ((result != DBPaintResultTbl[plane][j][i])
@ -736,7 +736,7 @@ DRCTechLine(sectionName, argc, argv)
/* Remember the 1st variant as the default */
if (saveStyle == NULL) saveStyle = newStyle;
/* Append to end of style list */
if (DRCStyleList == NULL)
DRCStyleList = newStyle;
@ -812,7 +812,7 @@ DRCTechLine(sectionName, argc, argv)
if (DRCStyleList == NULL)
{
char *locargv[2][10] = {"style", "default"};
if (DRCTechLine(sectionName, 2, locargv) == FALSE)
return FALSE;
}
@ -840,7 +840,7 @@ DRCTechLine(sectionName, argc, argv)
int scaleN, scaleD;
if (argc != 2 && argc != 3) goto wrongNumArgs;
scaleN = atof(argv[1]);
if (argc == 3)
@ -1147,7 +1147,7 @@ drcExtend(argc, argv)
ptest = DBTechNoisyNameMask(layers1, &set1);
pMask1 = CoincidentPlanes(&set1, ptest);
if (pMask1 == 0)
{
TechError("All layers in first set for \"extend\" must be on "
@ -1205,7 +1205,7 @@ drcExtend(argc, argv)
dpnew = (DRCCookie *)mallocMagic(sizeof(DRCCookie));
drcAssign(dpnew, distance, dp->drcc_next, &setM, &setZ, why,
0, DRC_REVERSE, plane, plane);
dp->drcc_next = dpnew;
if (exact)
@ -1222,7 +1222,7 @@ drcExtend(argc, argv)
dpnew = (DRCCookie *)mallocMagic(sizeof(DRCCookie));
drcAssign(dpnew, distance, dp->drcc_next, &setN, &setZ, why,
0, DRC_REVERSE | DRC_OUTSIDE, plane, plane);
dp->drcc_next = dpnew;
}
}
@ -1420,7 +1420,7 @@ drcArea(argc, argv)
dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie));
drcAssign(dpnew, horizon, dp->drcc_next, &set, &set, why,
distance, DRC_AREA|DRC_FORWARD, plane, plane);
dp->drcc_next = dpnew;
}
}
@ -1450,7 +1450,7 @@ drcArea(argc, argv)
* maxwidth pmc 4 bend_illegal "poly contact area must be no wider than 4"
* maxwidth trench 4 bend_ok "trench width must be exactly 4"
*
* bend_illegal - means that one_dimension must be distance for any
* bend_illegal - means that one_dimension must be distance for any
* point in the region. This is used for emitters and contacts
* that are rectangular (so we can't generate them with the
* squares command) and some exact width in one direction.
@ -1462,8 +1462,8 @@ drcArea(argc, argv)
* X X XXXXXX
* X X X X
* XXXXX XXXXXX
*
* OK BAD
*
* OK BAD
*
* Results:
* Returns distance.
@ -1544,7 +1544,7 @@ drcMaxwidth(argc, argv)
dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie));
drcAssign(dpnew, distance, dp->drcc_next, &set, &set, why,
distance, DRC_MAXWIDTH | bend, plane, plane);
dp->drcc_next = dpnew;
}
}
@ -1717,7 +1717,7 @@ drcSpacing3(argc, argv)
*
* Side effects:
* Adds rules to the DRC rule table.
*
*
*-------------------------------------------------------------------
*/
@ -1804,10 +1804,10 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
if (touchingok)
{
/* In "touching_ok rules, spacing to set2 is be checked in FORWARD
/* In "touching_ok rules, spacing to set2 is be checked in FORWARD
* direction at edges between set1 and (setR = ~set1 AND ~set2).
*
* In addition, spacing to set1 is checked in FORWARD direction
* In addition, spacing to set1 is checked in FORWARD direction
* at edges between set2 and (setRreverse = ~set1 AND ~set2).
*
* If set1 and set2 are different, above are checked in REVERSE as
@ -1818,7 +1818,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
*/
tmp1 = *set1;
tmp2 = *set2;
tmp2 = *set2;
/* Restrict planes to those that are coincident */
pmask1 &= pmask2;
@ -1836,7 +1836,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
else
{
/* In "touching_illegal" rules, spacing to set2 will be checked
* in FORWARD direction at edges between set1 and (setR=~set1).
* in FORWARD direction at edges between set1 and (setR=~set1).
*
* In addition, spacing to set1 will be checked in FORWARD direction
* at edges between set2 and (setRreverse= ~set2).
@ -1897,7 +1897,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
else if (needtrigger)
{
DRCCookie *dptrig;
/* Create two contiguous spacing rules */
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
@ -1923,12 +1923,12 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
if (needReverse)
{
/* Add check in reverse direction,
/* Add check in reverse direction,
* NOTE: am assuming single plane rule here (since reverse
* rules only used with touching_ok which must be
* rules only used with touching_ok which must be
* single plane)
*/
/* find bucket preceding new one we wish to insert */
dp = drcFindBucket(j, i, distance);
dpnew = (DRCCookie *)mallocMagic(sizeof (DRCCookie));
@ -1951,7 +1951,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
else if (needtrigger)
{
DRCCookie *dptrig;
/* Create two contiguous spacing rules */
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
@ -1968,7 +1968,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
else
{
drcAssign(dpnew,distance,dp->drcc_next,
&tmp1, &tmp2, why, wwidth,
&tmp1, &tmp2, why, wwidth,
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
dp->drcc_next = dpnew;
}
@ -2003,7 +2003,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
if (needtrigger)
{
DRCCookie *dptrig;
/* Create two contiguous spacing rules */
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
@ -2019,7 +2019,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
{
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
why, distance, DRC_FORWARD, plane2, plane);
dp->drcc_next = dpnew;
dp->drcc_next = dpnew;
}
if (needReverse)
@ -2027,19 +2027,19 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
if (needReverse)
{
/* Add check in reverse direction,
/* Add check in reverse direction,
* NOTE: am assuming single plane rule here (since reverse
* rules only used with touching_ok which must be
* rules only used with touching_ok which must be
* single plane)
*/
/* find bucket preceding new one we wish to insert */
dp = drcFindBucket(j, i, distance);
dpnew = (DRCCookie *) mallocMagic(sizeof (DRCCookie));
if (needtrigger)
{
DRCCookie *dptrig;
/* Create two contiguous spacing rules */
drcAssign(dpnew, distance, dp->drcc_next, &tmp1, &tmp2,
@ -2054,7 +2054,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
else
{
drcAssign(dpnew, distance, dp->drcc_next,
&tmp1, &tmp2, why, distance,
&tmp1, &tmp2, why, distance,
DRC_REVERSE | DRC_BOTHCORNERS, plane2, plane);
dp->drcc_next = dpnew;
}
@ -2066,11 +2066,11 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
* are not present just to right of edges with setR on LHS
* and set1 on RHS. This check is necessary to make sure
* that a set1 rectangle doesn't coincide exactly with a
* set2 rectangle.
* set2 rectangle.
* (This check added by Michael Arnold on 4/10/86.)
*/
if (needtrigger) continue;
if (needtrigger) continue;
if (pset = (DBTypesOnSamePlane(i, j) & pmask1))
{
@ -2098,7 +2098,7 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
plane2 = LowestMaskBit(pmask2);
/* filter out checks that are not cross plane */
if (i == TT_SPACE)
if (i == TT_SPACE)
{
if (DBTypeOnPlane(j, plane2))
continue;
@ -2384,7 +2384,7 @@ drcEdge(argc, argv)
ptest = DBTechNoisyNameMask(layers2, &set2);
pMask1 &= CoincidentPlanes(&set2, ptest);
if (pMask1 == 0)
if (pMask1 == 0)
{
TechError("All edges in edge rule must lie in shared planes.\n");
return (0);
@ -2415,7 +2415,7 @@ drcEdge(argc, argv)
ptest = DBTechNoisyNameMask(okTypes, &setM);
pMaskM = CoincidentPlanes(&setM, ptest);
if (pMaskM == 0 || pMaskM == DBTypePlaneMaskTbl[TT_SPACE])
{
/* Technically it should be illegal to specify simply "space"
@ -3066,7 +3066,7 @@ drcNoOverlap(argc, argv)
return (0);
}
/*
* ----------------------------------------------------------------------------
*
@ -3119,9 +3119,9 @@ drcExactOverlap(argc, argv)
* rectangle layers maxwidth [even|odd|any] why
*
* The rule checks to make sure that the region is rectangular and that the
* width and length are even or odd, as specified. These two criteria ensure
* that the squares rule of the cifout section can properly produce via
* holes without misaligning them between cells and without putting the via
* width and length are even or odd, as specified. These two criteria ensure
* that the squares rule of the cifout section can properly produce via
* holes without misaligning them between cells and without putting the via
* holes off grid. The maxwidth is required to make the extent of this rule
* a finite size, so that we can set the DRChalo to something finite.
*
@ -3185,8 +3185,8 @@ drcRectangle(argc, argv)
plane = LowestMaskBit(pset);
/*
* A rule that checks rectangle-ness.
/*
* A rule that checks rectangle-ness.
* left: oktypes, right: other types
* This rule needs to be checked in all 4 directions
*/
@ -3195,21 +3195,21 @@ drcRectangle(argc, argv)
/* Find bucket preceding the new one we wish to insert */
dp = drcFindBucket(i, j, distance);
dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie)));
drcAssign(dpnew, distance, dp->drcc_next,
&nottypes, &DBAllTypeBits, why, distance,
drcAssign(dpnew, distance, dp->drcc_next,
&nottypes, &DBAllTypeBits, why, distance,
DRC_FORWARD, plane, plane);
dp->drcc_next = dpnew;
/* Find bucket preceding the new one we wish to insert */
dp = drcFindBucket(j, i, distance); /* note: j, i not i, j */
dpnew = (DRCCookie *) mallocMagic((unsigned) (sizeof (DRCCookie)));
drcAssign(dpnew, distance, dp->drcc_next,
&nottypes, &DBAllTypeBits, why, distance,
drcAssign(dpnew, distance, dp->drcc_next,
&nottypes, &DBAllTypeBits, why, distance,
DRC_REVERSE, plane, plane);
dp->drcc_next = dpnew;
if (maxwidth > 0) {
/*
/*
* A rule that checks size.
* left: other types, right: oktypes
*/
@ -3222,8 +3222,8 @@ drcRectangle(argc, argv)
dp = dp->drcc_next); /* null body */
dpnew = (DRCCookie *)mallocMagic(sizeof (DRCCookie));
drcAssign(dpnew, distance, dp->drcc_next,
&types, &DBZeroTypeBits, why, even,
drcAssign(dpnew, distance, dp->drcc_next,
&types, &DBZeroTypeBits, why, even,
DRC_RECTSIZE, plane, plane);
dp->drcc_next = dpnew;
}
@ -3525,7 +3525,7 @@ drcTechFinalStyle(style)
/* A reasonable chunk size for design-rule checking is about
* 16 times the maximum design-rule interaction distance. This
* results in a halo overhead of about 27%. If there's no DRC
* results in a halo overhead of about 27%. If there's no DRC
* information at all (TechHalo is zero), just pick any size.
* (Update 1/13/09: "any size" needs a bit of modification,
* because 64 will be way too small for a layout with a small
@ -3554,7 +3554,7 @@ drcTechFinalStyle(style)
dpp = &(style->DRCRulesTbl [i][j]);
dummy = *dpp;
*dpp = dummy->drcc_next;
freeMagic((char *) dummy);
freeMagic((char *) dummy);
}
}
drcCifFinal();
@ -3564,13 +3564,13 @@ drcTechFinalStyle(style)
/* Check for edges that are completely illegal. Where this is the
* case, eliminate all of the edge's rules except one.
*/
for (i = 0; i < DBNumTypes; i++)
{
for (j = 0; j < DBNumTypes; j++)
{
DRCCookie *keep = NULL, *dptest, *dptemp, *dpnew;
for (dp = style->DRCRulesTbl[i][j]; dp != NULL; dp = dp->drcc_next)
{
if (dp->drcc_flags & (DRC_NONSTANDARD || DRC_OUTSIDE)) continue;
@ -3609,7 +3609,7 @@ drcTechFinalStyle(style)
/* This edge is illegal. Throw away all rules except the one
* needed that is always violated.
*/
dptest = style->DRCRulesTbl[i][j];
while (dptest != NULL)
{
@ -3669,7 +3669,7 @@ drcTechFinalStyle(style)
}
else
dptrig = NULL;
/*
* Check following buckets to see if any is a superset.
*/
@ -3754,7 +3754,7 @@ drcTechFinalStyle(style)
}
}
/*
* ----------------------------------------------------------------------------
*
@ -3784,7 +3784,7 @@ DRCTechRuleStats()
/* Count up the total number of edge rules, and histogram them
* by the number of rules per edge.
*/
edgeRules = 0;
overflow = 0;
for (i=0; i<=MAXBIN; i++) counts[i] = 0;
@ -3800,7 +3800,7 @@ DRCTechRuleStats()
if (thisCount <= MAXBIN) counts[thisCount] += 1;
else overflow += 1;
}
/* Print out the results. */
TxPrintf("Total number of rules specifed in tech file: %d\n",

Some files were not shown because too many files have changed in this diff Show More