- the RDS_GDS_EXPERT_DRIVER environement variable can now be set to
drive GDS II file compatible with Expert layout editor. GDS II file format doesn't permit to store instance names. Expert use a dedicated user attribute (no 120) to store those instance names. - the environement variable RDS_GDS_FIRST_MODEL_MODE can now be set to store rectangles names only for the first/top model of the circuit.
This commit is contained in:
parent
e9e0731be3
commit
2eabb7b659
|
@ -6,7 +6,7 @@
|
||||||
| |
|
| |
|
||||||
| Authors : Pierre Vittet |
|
| Authors : Pierre Vittet |
|
||||||
| Modified by Jacomme Ludovic |
|
| Modified by Jacomme Ludovic |
|
||||||
| Date : 04/07/93 |
|
| Date : 07/06/04 |
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
|
@ -43,7 +43,10 @@
|
||||||
| |
|
| |
|
||||||
\------------------------------------------------------------*/
|
\------------------------------------------------------------*/
|
||||||
|
|
||||||
int FIRST_MODEL;
|
static short FIRST_MODEL;
|
||||||
|
|
||||||
|
static short GDS_EXPERT_DRIVER_MODE = 0;
|
||||||
|
static short GDS_FIRST_MODEL_MODE = 0;
|
||||||
|
|
||||||
/*------------------------------------------------------------\
|
/*------------------------------------------------------------\
|
||||||
| |
|
| |
|
||||||
|
@ -318,8 +321,6 @@ short datatype = 0;
|
||||||
int bool = FALSE;
|
int bool = FALSE;
|
||||||
coord_t tab[6]; /* last one reserved for text */
|
coord_t tab[6]; /* last one reserved for text */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* A connectors is written using a specific layer from now on:
|
/* A connectors is written using a specific layer from now on:
|
||||||
* this implies a simple change of layer */
|
* this implies a simple change of layer */
|
||||||
if ((IsRdsConExter(rect) || IsRdsRefCon (rect)) && !IsRdsVia(rect))
|
if ((IsRdsConExter(rect) || IsRdsRefCon (rect)) && !IsRdsVia(rect))
|
||||||
|
@ -375,9 +376,7 @@ coord_t tab[6]; /* last one reserved for text */
|
||||||
we drive the text: nodes should be sufficients.
|
we drive the text: nodes should be sufficients.
|
||||||
Frederic Petrot: 10/04/96 */
|
Frederic Petrot: 10/04/96 */
|
||||||
/* sauve uniquement les noms du premier model (le pere) 18/04/2002 FW */
|
/* sauve uniquement les noms du premier model (le pere) 18/04/2002 FW */
|
||||||
/* if (FIRST_MODEL && rect->NAME != NULL) { */
|
if (FIRST_MODEL && rect->NAME != NULL) {
|
||||||
if ((IsRdsConExter(rect) || IsRdsRefCon (rect)) && rect->NAME != NULL) {
|
|
||||||
|
|
||||||
/* on a besoin de mettre des crochets autour des index de vecteur
|
/* on a besoin de mettre des crochets autour des index de vecteur
|
||||||
* 26/06/2002 FW */
|
* 26/06/2002 FW */
|
||||||
char *pindex;
|
char *pindex;
|
||||||
|
@ -432,6 +431,7 @@ coord_t tab[6]; /* last one reserved for text */
|
||||||
* SAUVE_INSTANCE
|
* SAUVE_INSTANCE
|
||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pv_sauve_instance( inst, fp )
|
pv_sauve_instance( inst, fp )
|
||||||
rdsins_list *inst;
|
rdsins_list *inst;
|
||||||
|
@ -439,14 +439,16 @@ FILE *fp;
|
||||||
{
|
{
|
||||||
register int numb;
|
register int numb;
|
||||||
hinfo_type infobuf;
|
hinfo_type infobuf;
|
||||||
int bool = FALSE;
|
int bool;
|
||||||
char *gds_angle;
|
char *gds_angle;
|
||||||
short ref_x_axis;
|
short ref_x_axis;
|
||||||
|
short prop_attr;
|
||||||
double rds_angle;
|
double rds_angle;
|
||||||
ushort strans;
|
ushort strans;
|
||||||
|
|
||||||
entete(SREF, 0);
|
entete(SREF, 0);
|
||||||
|
|
||||||
|
bool = FALSE;
|
||||||
numb = strlen(inst->FIGNAME);
|
numb = strlen(inst->FIGNAME);
|
||||||
if ( (numb % 2) != 0 ) {/* Si la longueur du nom est impaire, on la rend paire */
|
if ( (numb % 2) != 0 ) {/* Si la longueur du nom est impaire, on la rend paire */
|
||||||
numb += 1; /* car chaque enregistrement doit comporter un nombre */
|
numb += 1; /* car chaque enregistrement doit comporter un nombre */
|
||||||
|
@ -500,6 +502,33 @@ FILE *fp;
|
||||||
controle(1);
|
controle(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( GDS_EXPERT_DRIVER_MODE )
|
||||||
|
{
|
||||||
|
/* LUDO */
|
||||||
|
entete(PROPATTR,sizeof(ushort));
|
||||||
|
prop_attr = 120;
|
||||||
|
if (islittle()) prop_attr = swaps( prop_attr );
|
||||||
|
numb = fwrite((char *)&prop_attr, sizeof(ushort), 1, fp);
|
||||||
|
controle(1);
|
||||||
|
|
||||||
|
bool = FALSE;
|
||||||
|
numb = strlen(inst->INSNAME);
|
||||||
|
if ( (numb % 2) != 0 ) {/* Si la longueur du nom est impaire, on la rend paire */
|
||||||
|
numb += 1; /* car chaque enregistrement doit comporter un nombre */
|
||||||
|
bool = TRUE; /* pair de caracteres dans un fichier GDS. */
|
||||||
|
}
|
||||||
|
entete(PROPVALUE, numb * sizeof(char));
|
||||||
|
if (fputs(inst->INSNAME, fp) < 0 ) {
|
||||||
|
pv_init_error();
|
||||||
|
pv_error.v_error = ENOSPACE;
|
||||||
|
(void)fclose(fp);
|
||||||
|
pv_give_error("sauve_instance");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
if (bool) cadre;
|
||||||
|
/* END_LUDO */
|
||||||
|
}
|
||||||
|
|
||||||
entete(ENDEL, 0);
|
entete(ENDEL, 0);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -577,7 +606,7 @@ date_type *date;
|
||||||
void gdssaverdsfig( Figure )
|
void gdssaverdsfig( Figure )
|
||||||
|
|
||||||
rdsfig_list *Figure;
|
rdsfig_list *Figure;
|
||||||
{
|
{
|
||||||
int bool = FALSE;
|
int bool = FALSE;
|
||||||
register int numb;
|
register int numb;
|
||||||
register FILE *fp;
|
register FILE *fp;
|
||||||
|
@ -595,6 +624,17 @@ ptype_list *model_list;
|
||||||
* pointeur sur la figure pere a sauver; son nom servira a creer
|
* pointeur sur la figure pere a sauver; son nom servira a creer
|
||||||
* le nom de la librairie GDS (nom interne)
|
* le nom de la librairie GDS (nom interne)
|
||||||
*/
|
*/
|
||||||
|
GDS_FIRST_MODEL_MODE = 0;
|
||||||
|
GDS_EXPERT_DRIVER_MODE = 0;
|
||||||
|
|
||||||
|
if ( getenv( "RDS_GDS_FIRST_MODEL_MODE") ) GDS_FIRST_MODEL_MODE = 1;
|
||||||
|
|
||||||
|
if ( getenv( "RDS_GDS_EXPERT_DRIVER" ) )
|
||||||
|
{
|
||||||
|
GDS_EXPERT_DRIVER_MODE = 1;
|
||||||
|
GDS_FIRST_MODEL_MODE = 0;
|
||||||
|
}
|
||||||
|
|
||||||
model_list = (ptype_list *)reverse((chain_list *)getrdsmodellist(Figure));
|
model_list = (ptype_list *)reverse((chain_list *)getrdsmodellist(Figure));
|
||||||
|
|
||||||
if ( (fp = mbkfopen(Figure->NAME, "gds", "w")) == NULL ) {
|
if ( (fp = mbkfopen(Figure->NAME, "gds", "w")) == NULL ) {
|
||||||
|
@ -691,7 +731,7 @@ ptype_list *model_list;
|
||||||
if (pv_sauve_modele((rdsfig_list *)model_list->DATA, fp, &date) < 0)
|
if (pv_sauve_modele((rdsfig_list *)model_list->DATA, fp, &date) < 0)
|
||||||
EXIT(1);
|
EXIT(1);
|
||||||
model_list = model_list->NEXT;
|
model_list = model_list->NEXT;
|
||||||
FIRST_MODEL = 0;
|
if ( GDS_FIRST_MODEL_MODE ) FIRST_MODEL = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
entete(ENDLIB, 0);
|
entete(ENDLIB, 0);
|
||||||
|
|
Loading…
Reference in New Issue