2483 struct s *MasterDesc;
2484 struct p *Pair,*Path;
2486 struct prpty *PrptyDesc;
2490 long X,
Y,Length,Width;
2513 CDGen(SymbolDesc,GenDesc,&Pointer);
2514 if (Pointer ==
NULL)
2516 CDCall(Pointer,&SymbolName,&NumX,&DX,&NumY,&DY);
2517 if (
Not CDOpen(SymbolName,&MasterDesc,
'w'))
2522 if (
Not CDGenCIF(FileDesc,MasterDesc,SymbolNum,A,B,Program))
2530 if (Program ==
'e') {
2535 fprintf(FileDesc,
"DS %d 1 1;\n",Info);
2537 if (Program ==
'b' Or Program ==
'a')
2538 fprintf(FileDesc,
"( %s );\n",SymbolDesc->
sName);
2539 elif (Program ==
'i')
2540 fprintf(FileDesc,"( 9 %
s );\n",SymbolDesc->sName);
2541 elif (Program == 's')
2542 fprintf(FileDesc,"( Name: %s );\n",SymbolDesc->sName);
2544 fprintf(FileDesc,"9 %s;\n",SymbolDesc->sName);
2548 CDGen(SymbolDesc,GenDesc,&Pointer);
2549 if (Pointer ==
NULL)
2551 CDCall(Pointer,&SymbolName,&NumX,&DX,&NumY,&DY);
2552 if (
Not CDOpen(SymbolName,&MasterDesc,
'w'))
2555 if (
Not CDBB(MasterDesc,(
struct o *)
NULL,&Left,&Bottom,&Right,&Top))
2557 for (i = 1;i <= NumY;++i) {
2558 for (j = 1;j <= NumX;++j) {
2560 if (Program ==
'e') {
2564 fprintf(FileDesc,
"C %d",Info);
2568 CDTGen(&TGen,&Type,&X,&Y);
2570 fprintf(FileDesc,
";\n");
2574 fprintf(FileDesc,"
R %ld %ld",X,Y);
2576 fprintf(FileDesc,
" T %ld %ld",
2577 (X+(j-1)*DX)*A/B,(Y+(i-1)*DY)*A/B);
2581 fprintf(FileDesc," T %ld %ld",X*A/B,Y*A/B);
2583 fprintf(FileDesc,"
MX");
2585 fprintf(FileDesc,"
MY");
2591 if (
CDLayer[Layer-1].lCDFrom) {
2593 fprintf(FileDesc,
"L %d;\n",Layer);
2600 OutputLayer =
False;
2601 if (
Not CDInitGen(SymbolDesc,Layer,-CDINFINITY,-CDINFINITY,
2602 CDINFINITY,CDINFINITY,&GenDesc))
2603 return (
CDError(CDMALLOCFAILED));
2605 CDGen(SymbolDesc,GenDesc,&Pointer);
2606 if (Pointer ==
NULL)
2609 if (Program ==
'e') {
2614 if (!OutputLayer && Type !=
CDLABEL) {
2618 CDBox(Pointer,&Layer,&Length,&Width,&X,&Y);
2619 GenBox(FileDesc,Length*A/B,Width*A/B,X*A/B,Y*A/B,1,0);
2622 CDWire(Pointer,&Layer,&Width,&Path);
2624 fprintf(FileDesc,
"W %d %d %d",Width*A/B,
2625 Path->
pX*A/B,Path->
pY*A/B);
2627 fprintf(FileDesc,
"W %d",Width*A/B);
2629 while (Pair !=
NULL) {
2630 fprintf(FileDesc,
" %ld %ld",Pair->
pX*A/B,Pair->
pY*A/B);
2634 fprintf(FileDesc,
";\n");
2638 fprintf(FileDesc,
"P");
2640 while (Pair !=
NULL) {
2641 fprintf(FileDesc,
" %ld %ld",Pair->
pX*A/B,Pair->
pY*A/B);
2644 fprintf(FileDesc,
";\n");
2647 CDLabel(Pointer,&Layer,&Label,&X,&Y,&Xform);
2648 if (Program ==
'k' Or Program ==
'e')
2649 fprintf(FileDesc,
"94 %s %ld %ld %d;\n",
2650 Label,X*A/B,Y*A/B,(
char)Xform);
2651 elif (Program ==
'b')
2652 fprintf(FileDesc,"94 %s %ld %ld %
d;\n",
2653 Label,X*A/B,Y*A/B,Layer);
2654 elif (Program == '
m') {
2655 fprintf(FileDesc,
"94 %s %ld %ld",Label,X*A/B,Y*A/B);
2656 if (
CDLayer[Layer].lTechnology !=
' ') {
2657 fprintf(FileDesc,
" %c",
CDLayer[Layer].lTechnology);
2659 while (i < 3
And CDLayer[Layer].lMask[i] > 040) {
2660 fprintf(FileDesc,
"%c",
CDLayer[Layer].lMask[i]);
2664 fprintf(FileDesc,
";\n");
void CDLabel(struct o *Pointer, int *Layer, char **Label, long *X, long *Y, char *Xform)
void CDWire(struct o *Pointer, int *Layer, long *Width, struct p **Path)
void CDPolygon(struct o *Pointer, int *Layer, struct p **Path)
void CDInitTGen(struct o *Pointer, struct t **TGen)
struct l CDLayer[CDNUMLAYERS+1]
int CDInitGen(struct s *SymbolDesc, int Layer, long Left, long Bottom, long Right, long Top, struct g **GenDesc)
int CDGenCIF(FILE *FileDesc, struct s *SymbolDesc, int *SymbolNum, long A, long B, char Program)
void CDInfo(struct s *SymbolDesc, struct o *Pointer, int *Info)
void CDTGen(struct t **TGen, char *Type, long *X, long *Y)
void CDSetInfo(struct s *SymbolDesc, struct o *Pointer, int Info)
void CDBox(struct o *Pointer, int *Layer, long *Length, long *Width, long *X, long *Y)
void CDGen(struct s *SymbolDesc, struct g *GenDesc, struct o **Pointer)
void CDType(struct o *Pointer, char *Type)
int CDOpen(char *SymbolName, struct s **SymbolDesc, char Access)
void CDCall(struct o *Pointer, char **SymbolName, int *NumX, long *DX, int *NumY, long *DY)