COPY_UP_SEG now copies all segments of a given name.
This is particularly useful for CXXX layer types Makes two functions static in Shifter to avoid polluting the namespace
This commit is contained in:
parent
76acb2f290
commit
2b647fc29b
|
@ -25,6 +25,11 @@
|
||||||
Author: Frédéric Pétrot
|
Author: Frédéric Pétrot
|
||||||
Date : 1/10/2000
|
Date : 1/10/2000
|
||||||
$Log: dpgen_Shifter.c,v $
|
$Log: dpgen_Shifter.c,v $
|
||||||
|
Revision 1.8 2003/01/31 15:53:39 fred
|
||||||
|
COPY_UP_SEG now copies all segments of a given name.
|
||||||
|
This is particularly useful for CXXX layer types
|
||||||
|
Makes two functions static in Shifter to avoid polluting the namespace
|
||||||
|
|
||||||
Revision 1.7 2002/09/30 16:20:22 czo
|
Revision 1.7 2002/09/30 16:20:22 czo
|
||||||
support/users
|
support/users
|
||||||
|
|
||||||
|
@ -103,7 +108,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static char rcsid[]="$Id: dpgen_Shifter.c,v 1.7 2002/09/30 16:20:22 czo Exp $";
|
static char rcsid[]="$Id: dpgen_Shifter.c,v 1.8 2003/01/31 15:53:39 fred Exp $";
|
||||||
|
|
||||||
|
|
||||||
#include "util_Defs.h"
|
#include "util_Defs.h"
|
||||||
|
@ -111,7 +116,7 @@ static char rcsid[]="$Id: dpgen_Shifter.c,v 1.7 2002/09/30 16:20:22 czo Exp $";
|
||||||
#include "dgn.h"
|
#include "dgn.h"
|
||||||
|
|
||||||
|
|
||||||
int ln2p(int n)
|
static int ln2p(int n)
|
||||||
{
|
{
|
||||||
int i = 0, j = n & 1;
|
int i = 0, j = n & 1;
|
||||||
|
|
||||||
|
@ -125,7 +130,7 @@ int i = 0, j = n & 1;
|
||||||
|
|
||||||
static chain_list *c; /* To free the allocated names */
|
static chain_list *c; /* To free the allocated names */
|
||||||
|
|
||||||
void freestr()
|
static void freestr()
|
||||||
{
|
{
|
||||||
chain_list *cc;
|
chain_list *cc;
|
||||||
for (cc = c; cc; cc = cc->NEXT)
|
for (cc = c; cc; cc = cc->NEXT)
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
#include "mbkgen.h"
|
#include "mbkgen.h"
|
||||||
#define __GENLIB__
|
#define __GENLIB__
|
||||||
#include "mgn.h"
|
#include "mgn.h"
|
||||||
static char rcsid[] = "$Id: genlib.c,v 1.10 2002/09/30 16:20:22 czo Exp $";
|
static char rcsid[] = "$Id: genlib.c,v 1.11 2003/01/31 15:53:39 fred Exp $";
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* global variables used in genlib *
|
* global variables used in genlib *
|
||||||
|
@ -937,6 +937,7 @@ phfig_list *ptnewfig;
|
||||||
phins_list *ptins;
|
phins_list *ptins;
|
||||||
phseg_list *ptseg;
|
phseg_list *ptseg;
|
||||||
long x1, x2, y1, y2;
|
long x1, x2, y1, y2;
|
||||||
|
chain_list *c = NULL;
|
||||||
|
|
||||||
if (WORK_PHFIG == NULL) {
|
if (WORK_PHFIG == NULL) {
|
||||||
(void)fflush(stdout);
|
(void)fflush(stdout);
|
||||||
|
@ -949,10 +950,20 @@ long x1, x2, y1, y2;
|
||||||
locname = namealloc(checkname(locname));
|
locname = namealloc(checkname(locname));
|
||||||
|
|
||||||
for (ptseg = ptnewfig->PHSEG; ptseg; ptseg = ptseg->NEXT) {
|
for (ptseg = ptnewfig->PHSEG; ptseg; ptseg = ptseg->NEXT) {
|
||||||
if (ptseg->NAME == locname)
|
if (ptseg->NAME == locname) {
|
||||||
break;
|
/* create new segment */
|
||||||
|
xyflat(&x1, &y1, ptseg->X1, ptseg->Y1, ptins->XINS, ptins->YINS,
|
||||||
|
ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2,
|
||||||
|
ptins->TRANSF);
|
||||||
|
xyflat(&x2, &y2, ptseg->X2, ptseg->Y2, ptins->XINS, ptins->YINS,
|
||||||
|
ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2,
|
||||||
|
ptins->TRANSF);
|
||||||
|
c = addchain(c, addphseg(WORK_PHFIG, ptseg->LAYER, ptseg->WIDTH,
|
||||||
|
x1, y1, x2, y2, checkname(newname)));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ptseg == NULL) {
|
if (c == NULL) {
|
||||||
(void)fflush(stdout);
|
(void)fflush(stdout);
|
||||||
(void)fputs("*** genlib error ***\nCOPY_UP_SEG impossible :", stderr);
|
(void)fputs("*** genlib error ***\nCOPY_UP_SEG impossible :", stderr);
|
||||||
(void)fprintf(stderr, " segment %s doesn't exist in instance %s\n",
|
(void)fprintf(stderr, " segment %s doesn't exist in instance %s\n",
|
||||||
|
@ -960,17 +971,7 @@ long x1, x2, y1, y2;
|
||||||
EXIT(1);
|
EXIT(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create segment */
|
return addptype(NULL, MBK_SEGMENT, c);
|
||||||
xyflat(&x1, &y1, ptseg->X1, ptseg->Y1, ptins->XINS, ptins->YINS,
|
|
||||||
ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2,
|
|
||||||
ptins->TRANSF);
|
|
||||||
xyflat(&x2, &y2, ptseg->X2, ptseg->Y2, ptins->XINS, ptins->YINS,
|
|
||||||
ptnewfig->XAB1, ptnewfig->YAB1, ptnewfig->XAB2, ptnewfig->YAB2,
|
|
||||||
ptins->TRANSF);
|
|
||||||
return addptype(NULL, MBK_SEGMENT,
|
|
||||||
addchain(NULL,
|
|
||||||
addphseg(WORK_PHFIG, ptseg->LAYER, ptseg->WIDTH,
|
|
||||||
x1, y1, x2, y2, checkname(newname))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue