Updated the revision number to go along with the merge of pull
request #325 from Daryl Miles. Made a few simple style changes to conform to (what is vaguely defined as) the overall programming style for magic (passed down from John Ousterhout).
This commit is contained in:
parent
e119188f23
commit
dba6f99d93
|
|
@ -788,7 +788,7 @@ dbUndoCellBack(up)
|
|||
break;
|
||||
case UNDO_CELL_PLACE:
|
||||
use = findUse(up, TRUE);
|
||||
if(use) {
|
||||
if (use) {
|
||||
DBUnLinkCell(use, up->cue_parent);
|
||||
DBDeleteCell(use);
|
||||
(void) DBCellDeleteUse(use);
|
||||
|
|
@ -806,7 +806,7 @@ dbUndoCellBack(up)
|
|||
*/
|
||||
case UNDO_CELL_CLRID:
|
||||
use = findUse(up, FALSE); /* Find it with a NULL id */
|
||||
if(use) {
|
||||
if (use) {
|
||||
(void) DBReLinkCell(use, up->cue_id);
|
||||
DBWAreaChanged(up->cue_parent, &up->cue_bbox,
|
||||
(int) ~use->cu_expandMask, &DBAllButSpaceBits);
|
||||
|
|
@ -821,7 +821,7 @@ dbUndoCellBack(up)
|
|||
*/
|
||||
case UNDO_CELL_SETID:
|
||||
use = findUse(up, TRUE); /* Find it with current id */
|
||||
if(use) {
|
||||
if (use) {
|
||||
DBUnLinkCell(use, up->cue_parent);
|
||||
freeMagic(use->cu_id);
|
||||
use->cu_id = (char *) NULL;
|
||||
|
|
@ -830,7 +830,7 @@ dbUndoCellBack(up)
|
|||
|
||||
case UNDO_CELL_LOCKDOWN:
|
||||
use = findUse(up, TRUE);
|
||||
if(use) {
|
||||
if (use) {
|
||||
use->cu_flags = up->cue_flags;
|
||||
DBWAreaChanged(up->cue_parent, &up->cue_bbox,
|
||||
(int) ~use->cu_expandMask, &DBAllButSpaceBits);
|
||||
|
|
|
|||
|
|
@ -1078,15 +1078,15 @@ ExtSortTerminals(tran, ll)
|
|||
{
|
||||
p1 = &(tran->tr_termpos[nsd]);
|
||||
p2 = &(tran->tr_termpos[nsd+1]);
|
||||
if( p2->pnum > p1->pnum )
|
||||
if (p2->pnum > p1->pnum)
|
||||
continue;
|
||||
else if( p2->pnum == p1->pnum )
|
||||
else if (p2->pnum == p1->pnum)
|
||||
{
|
||||
if( p2->pt.p_x > p1->pt.p_x )
|
||||
if (p2->pt.p_x > p1->pt.p_x)
|
||||
continue;
|
||||
else if( p2->pt.p_x == p1->pt.p_x && p2->pt.p_y > p1->pt.p_y )
|
||||
else if (p2->pt.p_x == p1->pt.p_x && p2->pt.p_y > p1->pt.p_y)
|
||||
continue;
|
||||
else if( p2->pt.p_x == p1->pt.p_x && p2->pt.p_y == p1->pt.p_y )
|
||||
else if (p2->pt.p_x == p1->pt.p_x && p2->pt.p_y == p1->pt.p_y)
|
||||
{
|
||||
TxPrintf("Extract error: Duplicate tile position, ignoring\n");
|
||||
continue;
|
||||
|
|
@ -3476,17 +3476,17 @@ extTransPerimFunc(bp)
|
|||
|
||||
/* update the region tile position */
|
||||
|
||||
if( DBPlane(TiGetType(otile)) < pos->pnum )
|
||||
if (DBPlane(TiGetType(otile)) < pos->pnum)
|
||||
{
|
||||
pos->pnum = DBPlane(TiGetType(otile));
|
||||
pos->pt = otile->ti_ll;
|
||||
}
|
||||
else if( DBPlane(TiGetType(otile)) == pos->pnum )
|
||||
else if (DBPlane(TiGetType(otile)) == pos->pnum)
|
||||
{
|
||||
if( LEFT(otile) < pos->pt.p_x )
|
||||
if (LEFT(otile) < pos->pt.p_x)
|
||||
pos->pt = otile->ti_ll;
|
||||
else if( LEFT(otile) == pos->pt.p_x &&
|
||||
BOTTOM(otile) < pos->pt.p_y )
|
||||
else if (LEFT(otile) == pos->pt.p_x &&
|
||||
BOTTOM(otile) < pos->pt.p_y)
|
||||
pos->pt.p_y = BOTTOM(otile);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ gaChannelStats(list)
|
|||
clear = NULL;
|
||||
break;
|
||||
}
|
||||
if(tot && clear) {
|
||||
if (tot && clear) {
|
||||
gaPinStats(ch->gcr_tPins, ch->gcr_length, tot, clear);
|
||||
gaPinStats(ch->gcr_bPins, ch->gcr_length, tot, clear);
|
||||
gaPinStats(ch->gcr_lPins, ch->gcr_width, tot, clear);
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ pipehandler()
|
|||
|
||||
entry = HashLookOnly(&grOGLWindowTable, ExposeEvent->window);
|
||||
mw = (entry) ? (MagWindow *)HashGetValue(entry) : 0;
|
||||
if(!mw)
|
||||
if (!mw)
|
||||
break;
|
||||
|
||||
screenRect.r_xbot = ExposeEvent->x;
|
||||
|
|
@ -720,14 +720,16 @@ oglSetDisplay (dispType, outFileName, mouseFileName)
|
|||
grSetCharSizePtr = groglSetCharSize;
|
||||
grFillPolygonPtr = groglFillPolygon;
|
||||
|
||||
if (execFailed) {
|
||||
if (execFailed)
|
||||
{
|
||||
TxError("Execution failed!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TxAdd1InputDevice(fileno(stdin), grOGLWStdin, (ClientData) NULL);
|
||||
|
||||
if(!GrOGLInit()){
|
||||
if (!GrOGLInit())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
GrScreenRect.r_xbot = 0;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ grx11SetWMandC (mask, c)
|
|||
static int oldM = -1;
|
||||
|
||||
c = grPixels[c];
|
||||
if(grDisplay.depth <= 8) {
|
||||
if (grDisplay.depth <= 8) {
|
||||
mask = grPlanes[mask];
|
||||
if (mask == -65) mask = AllPlanes;
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ GrX11Init(dispType)
|
|||
grtemplate.screen = grXscrn;
|
||||
grtemplate.depth = 0;
|
||||
grvisual_get = XGetVisualInfo(grXdpy, VisualScreenMask, &grtemplate, &gritems);
|
||||
if(grvisual_get == NULL)
|
||||
if (grvisual_get == NULL)
|
||||
{
|
||||
TxPrintf("Could not obtain Visual Info from Server %s. "
|
||||
"Will attempt default.\n", getenv("DISPLAY"));
|
||||
|
|
@ -835,7 +835,7 @@ grX11Stdin()
|
|||
entry = HashLookOnly(&grX11WindowTable,grCurrent.window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
grCurrent.mw=w;
|
||||
if(!w)
|
||||
if (!w)
|
||||
break;
|
||||
|
||||
screenRect.r_xbot = ExposeEvent->x;
|
||||
|
|
@ -890,7 +890,7 @@ grX11Stdin()
|
|||
|
||||
entry = HashLookOnly(&grX11WindowTable, VisEvent->window);
|
||||
w = (entry)?(MagWindow *)HashGetValue(entry):0;
|
||||
if(!w)
|
||||
if (!w)
|
||||
break;
|
||||
|
||||
switch(VisEvent->state)
|
||||
|
|
@ -927,7 +927,7 @@ grX11Stdin()
|
|||
exception. Why X11 is generating an event for a non-existent
|
||||
window is another question... ***mdg*** */
|
||||
|
||||
if(w == 0) {printf("CreateNotify: w = %d.\n", w); break;}
|
||||
if (w == 0) {printf("CreateNotify: w = %d.\n", w); break;}
|
||||
SigDisableInterrupts();
|
||||
WindView(w);
|
||||
SigEnableInterrupts();
|
||||
|
|
@ -1183,13 +1183,13 @@ GrX11Create(w, name)
|
|||
grAttributes.border_pixel = BlackPixel(grXdpy,grXscrn);
|
||||
grAttributes.colormap = grXcmap;
|
||||
grDepth = grDisplay.depth;
|
||||
if(grClass == 3) grDepth = 8; /* Needed since grDisplay.depth is reset
|
||||
if (grClass == 3) grDepth = 8; /* Needed since grDisplay.depth is reset
|
||||
to 7 if Pseudocolor */
|
||||
#ifdef HIRESDB
|
||||
TxPrintf("x %d y %d width %d height %d depth %d class %d mask %d\n",
|
||||
x,y,width,height, grDepth, grClass, attribmask);
|
||||
#endif /* HIRESDB */
|
||||
if ( wind = XCreateWindow(grXdpy, XDefaultRootWindow(grXdpy),
|
||||
if (wind = XCreateWindow(grXdpy, XDefaultRootWindow(grXdpy),
|
||||
x, y, width, height, 0, grDepth, InputOutput, grVisual,
|
||||
attribmask, &grAttributes))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ ResEachTile(tile, startpoint)
|
|||
{
|
||||
for (i = 0; i < devptr->exts_deviceSDCount; i++)
|
||||
{
|
||||
if(TTMaskHasType(&(devptr->exts_deviceSDTypes[i]), t1))
|
||||
if (TTMaskHasType(&(devptr->exts_deviceSDTypes[i]), t1))
|
||||
{
|
||||
/* found device */
|
||||
yj = TOP(tile);
|
||||
|
|
|
|||
Loading…
Reference in New Issue