mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
Updates from running the fix-ending-whitespace script.
This commit is contained in:
+31
-31
@@ -3,16 +3,16 @@
|
||||
* This file provides routines to make selections by copying
|
||||
* things into a special cell named "__SELECT__".
|
||||
*
|
||||
* *********************************************************************
|
||||
* * 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 @@ CellDef *SelectRootDef = NULL;
|
||||
|
||||
global CellUse *selectLastUse = NULL;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -135,7 +135,7 @@ SelectInit()
|
||||
|
||||
SelUndoInit();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -253,7 +253,7 @@ selClearFunc(scx)
|
||||
else return 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -344,7 +344,7 @@ SelectArea(scx, types, xMask)
|
||||
&DBAllButSpaceBits);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -460,7 +460,7 @@ selFindChunk(plane, wrongTypes, searchArea, containedArea, bestMin,
|
||||
else goto tryY; /* Bad material overlaps containedArea in x. */
|
||||
selFindChunk(plane, wrongTypes, &smaller, containedArea,
|
||||
bestMin, bestMax, bestChunk, level + 1);
|
||||
|
||||
|
||||
|
||||
/* Also try reducing the y-range to see if that works better. */
|
||||
|
||||
@@ -488,7 +488,7 @@ selSplitFunc(tile, cxp)
|
||||
|
||||
if (IsSplit(tile))
|
||||
{
|
||||
TiToRect(tile, &locarea);
|
||||
TiToRect(tile, &locarea);
|
||||
GeoTransRect(&scx->scx_trans, &locarea, area);
|
||||
return 1;
|
||||
}
|
||||
@@ -509,13 +509,13 @@ selChunkFunc(tile, wrong)
|
||||
return 1; /* Abort the search. */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* SelectChunk --
|
||||
*
|
||||
* This procedure selects a single rectangular chunk of
|
||||
* This procedure selects a single rectangular chunk of
|
||||
* homogeneous material.
|
||||
*
|
||||
* Results:
|
||||
@@ -629,7 +629,7 @@ SelectChunk(scx, type, xMask, pArea, less)
|
||||
/* If the chunk is completely inside the area we yanked, then we're
|
||||
* done.
|
||||
*/
|
||||
|
||||
|
||||
if (GEO_SURROUND_STRONG(&newscx.scx_area, &bestChunk)) break;
|
||||
|
||||
/* The chunk extends to the edge of the area. Any place that the
|
||||
@@ -637,7 +637,7 @@ SelectChunk(scx, type, xMask, pArea, less)
|
||||
* Any place it doesn't touch, move the edge in to be just one
|
||||
* unit out from the chunk.
|
||||
*/
|
||||
|
||||
|
||||
width = newscx.scx_area.r_xtop - newscx.scx_area.r_xbot;
|
||||
height = newscx.scx_area.r_ytop - newscx.scx_area.r_ybot;
|
||||
|
||||
@@ -680,7 +680,7 @@ chunkdone:
|
||||
|
||||
if (pArea != NULL) *pArea = bestChunk;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -755,7 +755,7 @@ SelectRegion(scx, type, xMask, pArea, less)
|
||||
/* Now transfer what we found into the main selection cell. Pick
|
||||
* up all the labels that correspond to the selected material.
|
||||
*/
|
||||
|
||||
|
||||
SelRememberForUndo(TRUE, (CellDef *) NULL, (Rect *) NULL);
|
||||
if (less)
|
||||
{
|
||||
@@ -785,7 +785,7 @@ SelectRegion(scx, type, xMask, pArea, less)
|
||||
|
||||
if (pArea != NULL) *pArea = Select2Def->cd_extended;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -859,7 +859,7 @@ SelectNet(scx, type, xMask, pArea, less)
|
||||
/* Now transfer what we found into the main selection cell. Pick
|
||||
* up all the labels that correspond to the selected material.
|
||||
*/
|
||||
|
||||
|
||||
UndoDisable();
|
||||
if (less)
|
||||
{
|
||||
@@ -881,7 +881,7 @@ SelectNet(scx, type, xMask, pArea, less)
|
||||
/* unselect it. */
|
||||
|
||||
SelectUse->cu_flags |= CU_SELECT_NET;
|
||||
UndoEnable();
|
||||
UndoEnable();
|
||||
|
||||
DBReComputeBbox(SelectDef);
|
||||
DBComputeUseBbox(SelectUse);
|
||||
@@ -892,7 +892,7 @@ SelectNet(scx, type, xMask, pArea, less)
|
||||
|
||||
if (pArea != NULL) *pArea = Select2Def->cd_extended;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -1025,7 +1025,7 @@ SelectAndCopy1()
|
||||
/* Just copy the information in Select2Def twice, once into the
|
||||
* edit cell and once into the main selection cell.
|
||||
*/
|
||||
|
||||
|
||||
scx.scx_use = SelectUse;
|
||||
scx.scx_area = SelectUse->cu_bbox;
|
||||
GeoTransTrans(&SelectUse->cu_transform, &RootToEditTransform, &scx.scx_trans);
|
||||
@@ -1081,7 +1081,7 @@ SelectAndCopy2(newSourceDef)
|
||||
/* Just copy the information in Select2Def twice, once into the
|
||||
* edit cell and once into the main selection cell.
|
||||
*/
|
||||
|
||||
|
||||
scx.scx_use = Select2Use;
|
||||
scx.scx_area = Select2Use->cu_bbox;
|
||||
scx.scx_trans = RootToEditTransform;
|
||||
@@ -1113,7 +1113,7 @@ SelectAndCopy2(newSourceDef)
|
||||
* use Select2Def to figure out what areas of what planes to put into
|
||||
* SelectUse, but use the actual tile types from the edit cell.
|
||||
*/
|
||||
|
||||
|
||||
for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++)
|
||||
{
|
||||
(void) DBSrPaintArea((Tile *) NULL, Select2Def->cd_planes[plane],
|
||||
@@ -1139,7 +1139,7 @@ SelectAndCopy2(newSourceDef)
|
||||
|
||||
DBReComputeBbox(SelectDef);
|
||||
DBComputeUseBbox(SelectUse);
|
||||
|
||||
|
||||
/* A little hack here: don't do explicit redisplay of the selection,
|
||||
* or record a very large redisplay area for undo-ing. It's not
|
||||
* necessary since the layout redisplay also redisplays the highlights.
|
||||
@@ -1199,7 +1199,7 @@ selACPaintFunc(tile, plane)
|
||||
* tile and editClip into SelectDef.
|
||||
*
|
||||
* This function is like dbCopyAllPaint() but differs just enough
|
||||
* that a separate function is required. However, much of the code
|
||||
* that a separate function is required. However, much of the code
|
||||
* could be shared between the two functions if it were properly
|
||||
* broken out into subroutines.
|
||||
*/
|
||||
|
||||
+15
-15
@@ -3,16 +3,16 @@
|
||||
* This file provides routines for displaying the current
|
||||
* selection on the screen.
|
||||
*
|
||||
* *********************************************************************
|
||||
* * 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 @@ static CellDef *selDisRoot = NULL; /* Name of a root cell in a window,
|
||||
*/
|
||||
|
||||
static Plane *selRedisplayPlane;
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -102,7 +102,7 @@ SelRedisplay(window, plane)
|
||||
/* Make sure that we've got something to show in the area
|
||||
* being redisplayed.
|
||||
*/
|
||||
|
||||
|
||||
if (((CellUse *) (window->w_surfaceID))->cu_def != selDisRoot) return;
|
||||
displayDef = selDisUse->cu_def;
|
||||
if (!DBBoundPlane(plane, &planeArea)) return;
|
||||
@@ -231,8 +231,8 @@ selRedisplayFunc(tile, window)
|
||||
* of a different type along that border. If the bottom of
|
||||
* the tile is at -infinity, then don't do anything.
|
||||
*/
|
||||
|
||||
if (IsSplit(tile))
|
||||
|
||||
if (IsSplit(tile))
|
||||
{
|
||||
/* By definition, split tiles have a different type on the other */
|
||||
/* side of the split. So always draw a line on the diagonal. */
|
||||
@@ -358,7 +358,7 @@ selRedisplayCellFunc(scx, window)
|
||||
GR_TEXT_LARGE, TRUE, &screen, (Rect *) NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+24
-24
@@ -6,16 +6,16 @@
|
||||
* also in the edit cell. The procedures here are used as basic
|
||||
* building blocks for the selection commands like copy or delete.
|
||||
*
|
||||
* *********************************************************************
|
||||
* * 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 @@ struct searg
|
||||
* selection with a possibly limited number
|
||||
* of named types.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -153,7 +153,7 @@ SelEnumPaint(layers, editOnly, foundNonEdit, func, clientData)
|
||||
* layers. Use the same procedure as "dbCellUniqueTileSrFunc()"
|
||||
* so that contacts are not double-counted.
|
||||
*/
|
||||
|
||||
|
||||
for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++)
|
||||
{
|
||||
arg.sea_plane = plane;
|
||||
@@ -193,7 +193,7 @@ selEnumPFunc1(tile, arg)
|
||||
else
|
||||
loctype = SplitLeftType(tile);
|
||||
}
|
||||
else
|
||||
else
|
||||
loctype = TiGetType(tile);
|
||||
|
||||
if (IsSplit(tile))
|
||||
@@ -204,7 +204,7 @@ selEnumPFunc1(tile, arg)
|
||||
/* If the paint doesn't have to be in the edit cell, life's pretty
|
||||
* simple: just call the client and quit.
|
||||
*/
|
||||
|
||||
|
||||
if (!(arg->sea_flags & SEA_EDIT_ONLY))
|
||||
{
|
||||
if ((*arg->sea_func)(&arg->sea_rect, arg->sea_type, arg->sea_cdarg) != 0)
|
||||
@@ -266,7 +266,7 @@ selEnumPFunc1(tile, arg)
|
||||
|
||||
int
|
||||
selEnumPFunc2(tile, arg)
|
||||
Tile *tile; /* Tile found in the edit cell */
|
||||
Tile *tile; /* Tile found in the edit cell */
|
||||
struct searg *arg; /* Describes our search */
|
||||
{
|
||||
ExtRectList *lr;
|
||||
@@ -368,7 +368,7 @@ selEnumPFunc2(tile, arg)
|
||||
if (!IsSplit(tile))
|
||||
{
|
||||
/* Things get messy here. Clip against the select triangle */
|
||||
/* and decompose the result into rectangles and triangles. */
|
||||
/* and decompose the result into rectangles and triangles. */
|
||||
|
||||
GrClipTriangle(&arg->sea_rect, &lr->r_r, TRUE, arg->sea_type, points, &np);
|
||||
|
||||
@@ -488,7 +488,7 @@ splitdone:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -593,7 +593,7 @@ selEnumCFunc1(scx, arg)
|
||||
* handle it specially: just look for any use that's a top-level
|
||||
* use, then call the client for it.
|
||||
*/
|
||||
|
||||
|
||||
if (scx->scx_use->cu_def == SelectRootDef)
|
||||
{
|
||||
CellUse *parent;
|
||||
@@ -605,7 +605,7 @@ selEnumCFunc1(scx, arg)
|
||||
if (arg->sea_nonEdit != NULL) *(arg->sea_nonEdit) = TRUE;
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
/* Find a top-level use (one with no parent). */
|
||||
|
||||
for (parent = SelectRootDef->cd_parents;
|
||||
@@ -637,7 +637,7 @@ selEnumCFunc1(scx, arg)
|
||||
* we can't use DBTreeSrCells for this, because we don't want to
|
||||
* look at expanded/unexpanded information.
|
||||
*/
|
||||
|
||||
|
||||
scx2.scx_use = &dummy;
|
||||
dummy.cu_def = SelectRootDef;
|
||||
dummy.cu_id = NULL;
|
||||
@@ -711,7 +711,7 @@ selEnumCFunc2(scx, arg)
|
||||
|| (use->cu_array.ar_xsep != selUse->cu_array.ar_xsep)
|
||||
|| (use->cu_array.ar_ysep != selUse->cu_array.ar_ysep))
|
||||
goto checkChildren;
|
||||
|
||||
|
||||
arg->sea_foundUse = use;
|
||||
arg->sea_foundTrans = scx->scx_trans;
|
||||
return 1;
|
||||
@@ -723,7 +723,7 @@ selEnumCFunc2(scx, arg)
|
||||
return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -794,7 +794,7 @@ SelEnumLabels(layers, editOnly, foundNonEdit, func, clientData)
|
||||
if (!TTMaskHasType(layers, selLabel->lab_type)) continue;
|
||||
|
||||
/* Find the label corresponding to this one in the design. */
|
||||
|
||||
|
||||
scx.scx_use = &dummy;
|
||||
dummy.cu_def = SelectRootDef;
|
||||
dummy.cu_id = NULL;
|
||||
@@ -822,7 +822,7 @@ SelEnumLabels(layers, editOnly, foundNonEdit, func, clientData)
|
||||
/* If only edit-cell labels are wanted, check this label's
|
||||
* parentage.
|
||||
*/
|
||||
|
||||
|
||||
if (editOnly && (arg.sea_foundUse->cu_def != EditCellUse->cu_def))
|
||||
{
|
||||
if (foundNonEdit != NULL) *foundNonEdit = TRUE;
|
||||
|
||||
+10
-10
@@ -4,16 +4,16 @@
|
||||
* Contains definitions that are private to the implementation of
|
||||
* the select module. No other module should need anything in here.
|
||||
*
|
||||
* *********************************************************************
|
||||
* * 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
-33
@@ -4,16 +4,16 @@
|
||||
* This file contains top-level procedures to manipulate the selection,
|
||||
* e.g. to delete it, move it, 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. *
|
||||
* *********************************************************************
|
||||
*/
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef struct stretchArea
|
||||
} StretchArea;
|
||||
|
||||
static StretchArea *selStretchList; /* List of areas to paint. */
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -149,12 +149,12 @@ selDelPaintFunc(rect, type)
|
||||
if (type & TT_DIAGONAL)
|
||||
{
|
||||
dinfo = DBTransformDiagonal(type, &RootToEditTransform);
|
||||
TTMaskSetOnlyType(&tmask, type & TT_LEFTMASK);
|
||||
TTMaskSetOnlyType(&tmask, type & TT_LEFTMASK);
|
||||
}
|
||||
else
|
||||
{
|
||||
dinfo = 0;
|
||||
TTMaskSetOnlyType(&tmask, type);
|
||||
TTMaskSetOnlyType(&tmask, type);
|
||||
}
|
||||
|
||||
GeoTransRect(&RootToEditTransform, rect, &editRect);
|
||||
@@ -192,7 +192,7 @@ selDelLabelFunc(label)
|
||||
label->lab_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -665,7 +665,7 @@ donesrch:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@@ -720,7 +720,7 @@ SelectShort(char *lab1, char *lab2)
|
||||
if (srclab == NULL || destlab == NULL) return NULL;
|
||||
|
||||
/* Must be able to find tiles associated with each label */
|
||||
|
||||
|
||||
pmask = DBTypePlaneMaskTbl[srclab->lab_type];
|
||||
for (pnum = PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++)
|
||||
{
|
||||
@@ -759,7 +759,7 @@ SelectShort(char *lab1, char *lab2)
|
||||
return rlist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -900,7 +900,7 @@ selTransLabelFunc(label, cellUse, defTransform, transform)
|
||||
label->lab_text, label->lab_type, label->lab_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -937,7 +937,7 @@ SelectTransform(transform)
|
||||
SelectDelete("modified", TRUE);
|
||||
SelectAndCopy2(EditRootDef);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -1007,7 +1007,7 @@ selExpandFunc(selUse, use, transform, mask)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -1038,7 +1038,7 @@ SelectArray(arrayInfo)
|
||||
* selection, then copy everything back from Select2Def and
|
||||
* select it.
|
||||
*/
|
||||
|
||||
|
||||
UndoDisable();
|
||||
DBCellClearDef(Select2Def);
|
||||
(void) SelEnumPaint(&DBAllButSpaceAndDRCBits, TRUE, (bool *) NULL,
|
||||
@@ -1053,7 +1053,7 @@ SelectArray(arrayInfo)
|
||||
/* Now just delete the selection and recreate it from Select2Def,
|
||||
* copying into the edit cell along the way.
|
||||
*/
|
||||
|
||||
|
||||
SelectDelete("arrayed", TRUE);
|
||||
SelectAndCopy2(EditRootDef);
|
||||
}
|
||||
@@ -1128,11 +1128,11 @@ selArrayCFunc(selUse, use, transform, arrayInfo)
|
||||
DBMakeArray(newUse, &tinv, arrayInfo->ar_xlo,
|
||||
arrayInfo->ar_ylo, arrayInfo->ar_xhi, arrayInfo->ar_yhi,
|
||||
arrayInfo->ar_xsep, arrayInfo->ar_ysep);
|
||||
|
||||
|
||||
/* Set the array's transform so that its lower-left corner is in
|
||||
* the same place that it used to be.
|
||||
*/
|
||||
|
||||
|
||||
GeoInvertTrans(&use->cu_transform, &tinv);
|
||||
GeoTransRect(&tinv, &use->cu_bbox, &tmp);
|
||||
GeoTransRect(transform, &tmp, &oldBbox);
|
||||
@@ -1253,7 +1253,7 @@ SelectStretch(x, y)
|
||||
/* First of all, copy from SelectDef to Select2Def, moving the
|
||||
* selection along the way.
|
||||
*/
|
||||
|
||||
|
||||
GeoTranslateTrans(&GeoIdentityTransform, x, y, &transform);
|
||||
selTransTo2(&transform);
|
||||
|
||||
@@ -1273,7 +1273,7 @@ SelectStretch(x, y)
|
||||
/* Next, delete all the material in front of each piece of paint in
|
||||
* the selection.
|
||||
*/
|
||||
|
||||
|
||||
selStretchX = x;
|
||||
selStretchY = y;
|
||||
for (plane = PL_SELECTBASE; plane < DBNumPlanes; plane++)
|
||||
@@ -1319,7 +1319,7 @@ SelectStretch(x, y)
|
||||
* select it again, and tell DRC and display about what we
|
||||
* changed.
|
||||
*/
|
||||
|
||||
|
||||
SelectAndCopy2(EditRootDef);
|
||||
DBWAreaChanged(EditCellUse->cu_def, &editModified, DBW_ALLWINDOWS,
|
||||
(TileTypeBitMask *) NULL);
|
||||
@@ -1381,7 +1381,7 @@ selStretchEraseFunc(tile, plane)
|
||||
*/
|
||||
|
||||
GeoTransRect(&RootToEditTransform, &area, &editArea);
|
||||
|
||||
|
||||
/* We need to erase all types that interact with "type", *not* all */
|
||||
/* types on "plane", due to the way stacked contacts are handled. */
|
||||
/* Contacts on different planes may stretch across one another */
|
||||
@@ -1430,7 +1430,7 @@ selStretchEraseFunc(tile, plane)
|
||||
*/
|
||||
|
||||
TTMaskZero(&tmpmask);
|
||||
|
||||
|
||||
selStretchEraseTbl[TT_SPACE] = (PaintResultType)TT_SPACE;
|
||||
for (t = TT_SPACE + 1; t < DBNumUserLayers; t++)
|
||||
{
|
||||
@@ -1520,7 +1520,7 @@ selStretchFillFunc(tile, plane)
|
||||
* stretch direction) for space in the selection and non-space in
|
||||
* the edit cell.
|
||||
*/
|
||||
|
||||
|
||||
if (selStretchX > 0)
|
||||
{
|
||||
area.r_xtop = area.r_xbot;
|
||||
@@ -1566,7 +1566,7 @@ selStretchFillFunc(tile, plane)
|
||||
(void) DBSrPaintArea((Tile *) NULL,
|
||||
Select2Def->cd_planes[*plane], &area,
|
||||
&DBSpaceBits, selStretchFillFunc2, (ClientData) &area);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1666,7 +1666,7 @@ selStretchFillFunc3(tile, area)
|
||||
/* Compute the material to be painted. Be careful: for contacts,
|
||||
* must use the master image.
|
||||
*/
|
||||
|
||||
|
||||
if (IsSplit(tile))
|
||||
{
|
||||
if (selStretchX > 0)
|
||||
@@ -1739,7 +1739,7 @@ selStretchFillFunc3(tile, area)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+16
-16
@@ -6,16 +6,16 @@
|
||||
* All this file does is record things to be redisplayed, since
|
||||
* the normal undo package won't handle that.
|
||||
*
|
||||
* *********************************************************************
|
||||
* * 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. *
|
||||
* *********************************************************************
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@ typedef struct
|
||||
|
||||
UndoType SelUndoNetClientID;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -149,7 +149,7 @@ SelUndoInit()
|
||||
if (SelUndoNetClientID < (UndoType) 0)
|
||||
TxError("Couldn't add net selection as an undo client!\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -202,7 +202,7 @@ SelRememberForUndo(before, def, area)
|
||||
* created, so save around its address and fill in the event when
|
||||
* the "after" event is created.
|
||||
*/
|
||||
|
||||
|
||||
if (before)
|
||||
{
|
||||
sue->sue_before = TRUE;
|
||||
@@ -222,7 +222,7 @@ SelRememberForUndo(before, def, area)
|
||||
beforeEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -374,7 +374,7 @@ SelUndoCreateNet(sue)
|
||||
scx.scx_area.r_ybot = sue->sue_startpoint.p_y;
|
||||
scx.scx_area.r_xtop = scx.scx_area.r_xbot + 1;
|
||||
scx.scx_area.r_ytop = scx.scx_area.r_ybot + 1;
|
||||
|
||||
|
||||
// window = CmdGetRootPoint((Point *) NULL, &scx.scx_area);
|
||||
|
||||
window = CmdGetRootPoint((Point *) NULL, (Rect *) NULL);
|
||||
@@ -397,7 +397,7 @@ SelUndoCreateNet(sue)
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
void
|
||||
SelUndoDestroyNet()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "utils/malloc.h"
|
||||
#include "textio/textio.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -50,13 +50,13 @@ selUnselFunc(tile, arg)
|
||||
{
|
||||
TileType type;
|
||||
Rect rect;
|
||||
|
||||
|
||||
if ((type = TiGetType(tile)) >= DBNumUserLayers) return 0;
|
||||
TiToRect(tile, &rect);
|
||||
DBErase(SelectDef, &rect, type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -94,7 +94,7 @@ selRemoveCellFunc(scx, cdarg)
|
||||
if (++selNRemove >= MAXUNSELUSES) return 1;
|
||||
else return 2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -158,7 +158,7 @@ SelRemoveArea(area, mask)
|
||||
while (TRUE)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
selNRemove = 0;
|
||||
(void) DBCellSrArea(&scx, selRemoveCellFunc, (ClientData) &bbox);
|
||||
for (i = 0; i < selNRemove; i++)
|
||||
@@ -183,7 +183,7 @@ SelRemoveArea(area, mask)
|
||||
DBReComputeBbox(SelectDef);
|
||||
DBWAreaChanged(SelectDef, &bbox, DBW_ALLWINDOWS, (TileTypeBitMask *) NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -215,7 +215,7 @@ selRemoveLabelPaintFunc(tile, label)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -286,7 +286,7 @@ SelRemoveSel2()
|
||||
DBEraseLabelsByContent(SelectDef, &label->lab_rect, -1, label->lab_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CellUse *ed_use, *sel_use;
|
||||
@@ -341,7 +341,7 @@ SelRemoveCellSearchFunc(scx, cdarg)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+10
-10
@@ -4,16 +4,16 @@
|
||||
* Contains definitions for things that are exported by the
|
||||
* selection 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. *
|
||||
* *********************************************************************
|
||||
*
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user