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