- port 64 bits

This commit is contained in:
Ludovic Jacomme 2009-06-14 13:52:35 +00:00
parent 0044326bb2
commit 3f1e302fd2
171 changed files with 1669 additions and 1624 deletions

View File

@ -164,8 +164,8 @@ void beh_addtab (head, key_str, ctx_str, field, valu)
struct beden **head;
char *key_str;
char *ctx_str;
int field;
int valu;
long field;
long valu;
{
int found = 0;

View File

@ -60,14 +60,14 @@ extern "C" {
| |
\------------------------------------------------------*/
# define ABL_OR 0
# define ABL_AND 1
# define ABL_XOR 2
# define ABL_NOT 3
# define ABL_NOR 4
# define ABL_NAND 5
# define ABL_NXOR 6
# define ABL_STABLE 7
# define ABL_OR 0L
# define ABL_AND 1L
# define ABL_XOR 2L
# define ABL_NOT 3L
# define ABL_NOR 4L
# define ABL_NAND 5L
# define ABL_NXOR 6L
# define ABL_STABLE 7L
/*------------------------------------------------------\
| |

View File

@ -73,7 +73,7 @@ struct chain *pt_exp;
if (pt_exp->NEXT != NULL)
{
if (((int) ((struct chain *) pt_exp->DATA)->DATA) == ABL_STABLE)
if (((long) ((struct chain *) pt_exp->DATA)->DATA) == ABL_STABLE)
{
name = ((struct chain *) pt_exp->NEXT->DATA)->DATA;
res_chain = addchain (NULL, name);
@ -117,7 +117,7 @@ struct chain *pt_exp;
{
struct chain *res_chain = NULL;
int value ;
long value ;
if (pt_fig->ERRFLG == 0)
{
@ -172,7 +172,7 @@ struct befig *pt_fig;
struct beout *pt_out;
struct bebus *pt_bus;
struct biabl *pt_biabl;
unsigned int count = 0;
unsigned long count = 0;
/* ###------------------------------------------------------### */
/* if there is no error in the current figure ... */

View File

@ -51,6 +51,7 @@
# include "abt.h"
# include <stdio.h>
# include <string.h>
# include "bhl_error.h"
# include "bhl_makbdd.h"
# include "bhl_orderbdd.h"

View File

@ -49,6 +49,7 @@
# include "abt.h"
# include <stdio.h>
# include <string.h>
# include "bhl_error.h"
# include "bhl_orderbdd.h"
@ -257,8 +258,8 @@ static long bhl_sortcompare( ValueArray, Index1, Index2 )
void bhl_orderbdd( BehFigure, AuxFlag, OrderFlag )
befig_list *BehFigure;
int AuxFlag;
int OrderFlag;
long AuxFlag;
long OrderFlag;
{
struct berin *BehRin;
struct beaux *BehAux;

View File

@ -57,8 +57,8 @@ extern "C" {
/* functions */
/* ###------------------------------------------------------### */
extern struct befig *vhdlloadbefig __P((struct befig *pt_befig, char *figname, int trace_mode));
extern void vhdlsavebefig __P((struct befig *pthedbefig, int trace_mode));
extern struct befig *vhdlloadbefig __P((struct befig *pt_befig, char *figname, long trace_mode));
extern void vhdlsavebefig __P((struct befig *pthedbefig, long trace_mode));
#ifdef __cplusplus
}

View File

@ -51,7 +51,7 @@ bvl_name;
struct g_type
{
int VALU;
long VALU;
char FLAG;
};
@ -187,7 +187,7 @@ base_specifier (B|b|O|o|X|x)
}
{letter}(_?{letter_or_digit})* {
int itoken;
long itoken;
itoken = search (yytext);
if (itoken == EMPTYHT)
@ -203,7 +203,7 @@ base_specifier (B|b|O|o|X|x)
}
}
({decimal_literal})|({base}#{based_integer}(\.{based_integer})?#({exponent})?)|({base}:{based_integer}(\.{based_integer})?:({exponent})?) {
yylval.text = mbkalloc ((unsigned int)strlen(yytext)+1);
yylval.text = mbkalloc ((unsigned long)strlen(yytext)+1);
strcpy (yylval.text, yytext);
return (AbstractLit);
}
@ -250,7 +250,7 @@ int yywrap ()
/* called func. : addht, addhtitem, gethtitem, namealloc */
/* ###--------------------------------------------------------------### */
static int search (key)
static long search (key)
char *key;

View File

@ -53,7 +53,7 @@
%}
%union {
int valu;
long valu;
char *text;
bvl_ablstr list;
bvl_name name;
@ -575,7 +575,7 @@ formal_port_element
.signal_kind.
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
/* ###----------------------------------------------### */
@ -599,7 +599,7 @@ formal_port_element
beh_addtab (dic,signame,BVL_MODNAM,BVL_SIGDFN,sigconf);
beh_addtab (dic,signame,BVL_MODNAM,BVL_WMNDFN,$6.LEFT);
beh_addtab (dic,signame,BVL_MODNAM,BVL_WMXDFN,$6.RIGHT);
beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(int)pnt);
beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(long)pnt);
BVL_NM1LST = delchain (BVL_NM1LST, BVL_NM1LST);
}
@ -703,7 +703,7 @@ constant_declaration
constant_VarAsgn__expression
Semicolon_ERR
{
int sigconf;
long sigconf;
if (chkdcl ('C',0,$4.VALU,$4.FLAG,0,$5.FLAG,&sigconf) == 0)
{
@ -731,9 +731,9 @@ signal_declaration
Semicolon_ERR
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
int errflg;
long errflg;
errflg = chkdcl ('S',0,$4.VALU,$4.FLAG,$6,$5.FLAG,&sigconf);
@ -756,7 +756,7 @@ signal_declaration
beh_addtab (dic,signame,BVL_MODNAM,BVL_SIGDFN,sigconf);
beh_addtab (dic,signame,BVL_MODNAM,BVL_WMNDFN,$5.LEFT);
beh_addtab (dic,signame,BVL_MODNAM,BVL_WMXDFN,$5.RIGHT);
beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(int)pnt);
beh_addtab (dic,signame,BVL_MODNAM,BVL_PNTDFN,(long)pnt);
BVL_NM1LST = delchain (BVL_NM1LST,BVL_NM1LST);
}
@ -881,7 +881,7 @@ unlabeled_conditional_signal_assignment
waveform
Semicolon_ERR
{
int i;
long i;
struct beout *beout_pnt;
struct bebus *bebus_pnt;
struct bereg *bereg_pnt;
@ -895,15 +895,15 @@ unlabeled_conditional_signal_assignment
struct bvl_expr expr4;
struct bvl_expr expr5;
struct bvl_expr expr6;
int rev_flg = 0;
int left_bnd;
int right_bnd;
int left;
int right;
int in_bound;
int out_bound;
int sig_width;
int sig_conf;
long rev_flg = 0;
long left_bnd;
long right_bnd;
long left;
long right;
long in_bound;
long out_bound;
long sig_width;
long sig_conf;
expr4 = $5;
@ -1160,7 +1160,7 @@ unlabeled_selected_signal_assignment
...waveform__WHEN__choices..
Semicolon_ERR
{
int i;
long i;
struct beout *beout_pnt;
struct bebus *bebus_pnt;
struct bereg *bereg_pnt;
@ -1168,15 +1168,15 @@ unlabeled_selected_signal_assignment
struct bebux *bebux_pnt;
struct chain *abl_pnt;
struct bvl_expr expr1;
int rev_flg = 0;
int left_bnd;
int right_bnd;
int left;
int right;
int in_bound;
int out_bound;
int sig_width;
int sig_conf;
long rev_flg = 0;
long left_bnd;
long right_bnd;
long left;
long right;
long in_bound;
long out_bound;
long sig_width;
long sig_conf;
expr1 = bvl_crtabl (ABL_OR ,$8 ,$9,-1,-1);
if (BVL_BDDPNT != getlogbddnodeone())
@ -1474,13 +1474,13 @@ choice
{
char *val;
char val2[256];
int left;
int right;
int in_bound;
int out_bound;
int left_bnd;
int right_bnd;
int sig_conf;
long left;
long right;
long in_bound;
long out_bound;
long left_bnd;
long right_bnd;
long sig_conf;
strcpy (val2,"B\"");
sig_conf = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_SIGDFN);
@ -1675,13 +1675,13 @@ primary
| name
{
struct bvl_expr expr1;
int left;
int right;
int left_bnd;
int right_bnd;
int in_bound;
int out_bound;
int sig_conf;
long left;
long right;
long left_bnd;
long right_bnd;
long in_bound;
long out_bound;
long sig_conf;
sig_conf = beh_chktab (dic,$1.NAME,BVL_MODNAM,BVL_SIGDFN);
switch (sig_conf)
@ -1841,7 +1841,7 @@ attribute_name
{
char extname[100];
char *lclname;
int sig_conf;
long sig_conf;
struct bvl_expr expr1;
struct bvl_expr expr2;
struct chain *ptabl;
@ -2019,16 +2019,16 @@ END_ERR
;
%%
void *addstr (ptfig, object, mode, type, flag, name, left, right)
void *addstr (
struct befig *ptfig;
char object;
int mode;
int type;
char flag;
char *name;
short left;
short right;
struct befig *ptfig,
char object,
long mode,
long type,
char flag,
char *name,
short left,
short right )
{
void *pnt = NULL;
@ -2170,19 +2170,19 @@ short right;
return (pnt);
}
int chkdcl (object,mode,type,flag,kind,constraint,conf)
char object;
int mode;
int type;
char flag;
int kind;
char constraint;
int *conf;
static long
chkdcl (
char object,
long mode,
long type,
char flag,
long kind,
char constraint,
long *conf )
{
int errflg = 0;
int lclcnf = 0;
long errflg = 0;
long lclcnf = 0;
if (flag != constraint)
{

View File

@ -36,5 +36,5 @@
/* */
/* ###--------------------------------------------------------------### */
extern int BVL_LINNUM; /* file's line number */
static int search ();
extern long BVL_LINNUM; /* file's line number */
static long search ();

View File

@ -89,8 +89,8 @@ short right; /* array's right bound (= -1 if scalar) */
struct begen *ptgen;
struct chain *ptauxnam;
struct chain *ptauxnat;
int i;
int inc = 1;
long i;
long inc = 1;
ptgen = lastgeneric;
ptauxnam = nam_lst;
@ -160,9 +160,7 @@ struct chain *abllst;
/* called func. : mbkalloc <mbk>, bvl_cpyabllst */
/* ###--------------------------------------------------------------### */
bvl_ablstr bvl_cpyablstr (ablstr)
bvl_ablstr ablstr;
bvl_ablstr bvl_cpyablstr ( bvl_ablstr ablstr )
{
bvl_ablstr pt_ablstr;
@ -196,15 +194,15 @@ bvl_ablstr ablstr;
/* bvl_error , addchain , freechain */
/* ###--------------------------------------------------------------### */
bvl_ablstr bvl_crtabl ( oper, expr1, expr2, left, right )
bvl_ablstr bvl_crtabl (
short oper;
bvl_ablstr expr1;
bvl_ablstr expr2;
int left;
int right;
short oper,
bvl_ablstr expr1,
bvl_ablstr expr2,
long left,
long right )
{
{
char name[256];
char *name2;
struct chain *pt_abl1;
@ -213,8 +211,8 @@ int right;
struct chain *pt_aux2;
bvl_ablstr result;
char lcl_buffer[256];
short inc;
short i;
long inc;
long i;
char true_flag_un = 0;
char true_flag_zero = 0;
@ -725,7 +723,7 @@ int right;
}
return (result);
}
}
/* ###--------------------------------------------------------------### */
/* function : bvl_select */
@ -740,16 +738,16 @@ int right;
extern bddcircuit *BvlBddCircuit;
void bvl_select (result,pt_str, pt_bdd, pt_ablstr)
void bvl_select (
bvl_ablstr *result;
struct chain *pt_str; /* pointer on a list of choices */
bddnode **pt_bdd; /* used to check if a choice is legal */
bvl_ablstr pt_ablstr; /* tested expression */
bvl_ablstr *result,
struct chain *pt_str, /* pointer on a list of choices */
bddnode **pt_bdd, /* used to check if a choice is legal */
bvl_ablstr pt_ablstr ) /* tested expression */
{
char binstr[256];
int i;
long i;
struct chain *pt_auxabl;
bddnode *pt_bddres;
bddnode *pt_bddnew;
@ -758,8 +756,8 @@ bvl_ablstr pt_ablstr; /* tested expression */
char nomvar[10];
struct chain *pt_newabl;
struct chain *pt_newabl2;
static int oth_flg=0;
static int last_width=0;
static long oth_flg=0;
static long last_width=0;
result->LIST_ABL = NULL;
result->IDENT = NULL;
@ -851,18 +849,18 @@ bvl_ablstr pt_ablstr; /* tested expression */
/* in a string of '0' and '1's */
/* ###--------------------------------------------------------------### */
int bvl_tobin (trg,src,left,right)
long bvl_tobin (
char *trg;
char *src;
int left;
int right;
char *trg,
char *src,
long left,
long right )
{
{
char base;
int indx;
int j = 0;
int errflg = 0;
long indx;
long j = 0;
long errflg = 0;
char lcl_trg[256];
lcl_trg[0] = '\0';

View File

@ -40,7 +40,11 @@ extern bvl_ablstr BVL_EMPSTR;
struct begen *bvl_addgen ();
struct chain *bvl_cpyabllst ();
bvl_ablstr bvl_cpyablstr ();
bvl_ablstr bvl_crtabl ();
void bvl_select ();
extern bvl_ablstr bvl_crtabl ( short oper, bvl_ablstr expr1, bvl_ablstr expr2, long left, long right );
extern void bvl_select (
bvl_ablstr *result,
struct chain *pt_str, /* pointer on a list of choices */
bddnode **pt_bdd, /* used to check if a choice is legal */
bvl_ablstr pt_ablstr ); /* tested expression */
extern void bvl_error();
extern int bvl_tobin();
extern long bvl_tobin ( char *trg, char *src, long left, long right );

View File

@ -55,7 +55,7 @@ bvl_name;
struct g_type
{
int VALU;
long VALU;
char FLAG;
};
@ -64,7 +64,7 @@ char *BVL_MODNAM; /* curnennt model name */
bvl_ablstr BVL_SLCEXP; /* structure filled with the */
bvl_ablstr BVL_EMPSTR; /* empty structure used with NOT*/
extern int BVL_AUXMOD; /* simplify internal sig (= 1) */
extern long BVL_AUXMOD; /* simplify internal sig (= 1) */
static char *BVL_LBLNAM = NULL; /* label */
static struct chain *BVL_NM1LST = NULL; /* 1-st name liste */
@ -75,6 +75,7 @@ static struct befig *BVL_BEFPNT = NULL; /* current BEFIG pointer */
static struct beden **dic = NULL; /* dictionary */
static long chkdcl ( char object, long mode, long type, char flag, long kind, char constraint, long *conf );
struct chain *BVL_INTLST = NULL;
struct begen *BVL_GENPNT = NULL;
@ -83,8 +84,21 @@ extern struct befig *BVL_HEDFIG; /* head of befigs */
extern struct begen *bvl_addgen();
extern bvl_ablstr bvl_crtabl();
extern bvl_ablstr bvl_cpyablstr();
extern void bvl_select();
extern void bvl_error();
extern void *addstr ();
extern bvl_ablstr bvl_crtabl ( short oper, bvl_ablstr expr1, bvl_ablstr expr2, long left, long right );
extern bvl_ablstr bvl_cpyablstr ( bvl_ablstr ablstr );
extern void bvl_select (
bvl_ablstr *result,
struct chain *pt_str, /* pointer on a list of choices */
bddnode **pt_bdd, /* used to check if a choice is legal */
bvl_ablstr pt_ablstr ); /* tested expression */
extern void bvl_error ( long code, char *str1 );
extern void *addstr (
struct befig *ptfig,
char object,
long mode,
long type,
char flag,
char *name,
short left,
short right );

View File

@ -62,17 +62,17 @@
void vhdlsavebefig (pthedbefig, trace_mode)
struct befig *pthedbefig;
int trace_mode;
long trace_mode;
{
char *suffix;
char *str;
char *mode;
char *type_mark;
int nrlabel = 0;
long nrlabel = 0;
FILE *fd;
time_t clock;
int left,right;
long left,right;
char *name;
char *bus;

View File

@ -60,14 +60,14 @@ struct befig *vhdlloadbefig (pt_befig, figname, trace_mode)
struct befig *pt_befig;
char *figname;
int trace_mode;
long trace_mode;
{
char *tok;
char *str;
struct chain *behsfx_lst = NULL;
struct chain *suffix = NULL;
static unsigned int call_nbr = 0;
static unsigned long call_nbr = 0;
bddsystem *SaveBddSystem;
bddcircuit *SaveBddCircuit;

View File

@ -35,8 +35,8 @@
/* ###--------------------------------------------------------------### */
char BVL_ERRFLG = 0; /* if = 1 no structure is made */
int BVL_LINNUM = 1; /* file's line number */
int BVL_AUXMOD; /* simplify internal sig (= 1) */
long BVL_LINNUM = 1; /* file's line number */
long BVL_AUXMOD; /* simplify internal sig (= 1) */
char BVL_CURFIL[200]; /* current file's name */
befig_list *BVL_HEDFIG = NULL;

View File

@ -51,10 +51,7 @@
/* function : bvl_error */
/* ###--------------------------------------------------------------### */
void bvl_error (code, str1)
int code;
char *str1;
void bvl_error ( long code, char *str1 )
{
BVL_ERRFLG++;
@ -214,7 +211,7 @@ char *name;
char *prv_name;
char *tmp_name;
char buffer[200];
int i,j,flag,number;
long i,j,flag,number;
static struct beden **namtab=NULL;
static char *keywrd [] = {
"abs" , "access" ,
@ -334,7 +331,7 @@ char *name;
{
char *new_name ;
char tmp1 [256];
int i = 0;
long i = 0;
static struct beden **tab = NULL;
if (tab == NULL)
@ -373,7 +370,7 @@ char *name;
void *bvl_vectnam(pt_list,left,right,name,type)
void *pt_list;
int *left, *right;
long *left, *right;
char **name;
char type; /* If type = 0 bepor_list, type = 1 bebux_list */
/* If type = 2 bereg_list, type = 3 beaux_list */
@ -614,10 +611,10 @@ char *bvl_abl2str (expr, chaine, size_pnt)
struct chain *expr; /* expression */
char *chaine; /* target string */
int *size_pnt; /* size of available space */
long *size_pnt; /* size of available space */
{
int operator;
long operator;
char *oper ;
struct chain *operand ;
static char *str_z = NULL;
@ -667,7 +664,7 @@ int *size_pnt; /* size of available space */
/* "(operand operator operand operator operand ...)" */
/* ###------------------------------------------------------### */
operator = (int) ((struct chain *) expr->DATA)->DATA;
operator = (long) ((struct chain *) expr->DATA)->DATA;
operand = (struct chain *)expr->NEXT->DATA;
if (operator == ABL_STABLE)

View File

@ -35,7 +35,7 @@
/* */
/* ###--------------------------------------------------------------### */
extern int BVL_LINNUM; /* file's line number */
extern long BVL_LINNUM; /* file's line number */
extern char BVL_ERRFLG; /* Error flag */
extern char BVL_CURFIL[]; /* current file name */

View File

@ -8,6 +8,7 @@
/* ###--------------------------------------------------------------### */
#include <stdio.h>
#include <stdlib.h>
#include "mut.h"
#include "log.h"
#include "beh.h"

View File

@ -38,6 +38,7 @@
#include "vh_ltype.h"
#include "vh_lspec.h"
#include "vh_xspec.h"
#include "vh_xcomm.h"
/* ###--------------------------------------------------------------### */

View File

@ -10,6 +10,8 @@
#ifndef SCH_SCHDEF
#define SCH_SCHDEF
#include "mut.h"
/* ###------------------------------------------------------### */
/* basic defines */
/* ###------------------------------------------------------### */

View File

@ -794,7 +794,7 @@ char *type; /* structure's type */
{
size = siz [(typ [idx] & TYPE_DFN)];
pntr = (void *)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
readflg = 1;
}
@ -811,7 +811,7 @@ char *type; /* structure's type */
{
size = sizeof (void *);
pntr = * (void **)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
readflg = 1;
}

View File

@ -21,7 +21,7 @@ void *ident;
{
unsigned int index;
index = (unsigned int) ident;
index = (unsigned long) ident;
index = (((index >> 2) ^ (index >> 10)) + (index >> 12) + (index >> 20));
index &= index & 0x000000ff;

View File

@ -36,7 +36,7 @@ char **str ; /* recognized strings */
int i;
struct chain *ptr_abl;
static char *buffer = NULL;
static int buffer_size = 0;
static long buffer_size = 0;
static struct circuit *circuit_pnt = NULL;
struct chain *chain_pnt;
@ -1902,7 +1902,7 @@ char *type; /* structure's type */
{
size = siz [(typ [idx] & TYPE_DFN)];
pntr = (void *)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
readflg = 1;
}
@ -1919,7 +1919,7 @@ char *type; /* structure's type */
{
size = sizeof (void *);
pntr = * (void **)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
readflg = 1;
}

View File

@ -51,7 +51,7 @@
/* called funct : mbkalloc, addht, gethtitem, addhtitem, */
/* ###--------------------------------------------------------------### */
unsigned int vhx_getvalu (pt_lkdins, pt_ptmem, size, pt_func)
unsigned long vhx_getvalu (pt_lkdins, pt_ptmem, size, pt_func)
struct lkdins *pt_lkdins ;
char **pt_ptmem ;
@ -71,17 +71,17 @@ void (* pt_func) ();
pt_mem = (char *) gethtitem (mem_tabl, pt_lkdins);
if (((int) pt_mem) == EMPTYHT)
if (((long) pt_mem) == EMPTYHT)
{
pt_mem = mbkalloc (size);
addhtitem (mem_tabl, pt_lkdins, (int) pt_mem);
addhtitem (mem_tabl, pt_lkdins, (long) pt_mem);
addhtitem (siz_tabl, pt_lkdins, size );
if (pt_func != NULL)
(* pt_func) (pt_lkdins, pt_mem);
}
size = (unsigned int) gethtitem (siz_tabl, pt_lkdins);
size = (unsigned long) gethtitem (siz_tabl, pt_lkdins);
*pt_ptmem = pt_mem;
return (size);
@ -93,7 +93,7 @@ void (* pt_func) ();
/* called func. : vhx_getvalu */
/* ###--------------------------------------------------------------### */
unsigned int vhx_getsize (pt_lkdfig)
unsigned long vhx_getsize (pt_lkdfig)
struct lkdfig *pt_lkdfig;

View File

@ -8,8 +8,8 @@
/* the simulation funciotns */
/* ###--------------------------------------------------------------### */
extern unsigned int vhx_getvalu ();
extern unsigned int vhx_getsize ();
extern unsigned long vhx_getvalu ();
extern unsigned long vhx_getsize ();
extern char vhx_gexeval ();
extern char vhx_muxbit ();
extern char vhx_worbit ();

View File

@ -14,6 +14,7 @@
#include <stdlib.h>
#include <time.h>
#include "mut.h"
#include "mlo.h"
#include "beh.h"
#include "log.h"
#include "pat.h"
@ -1153,7 +1154,7 @@ unsigned char value;
unsigned int l_tim = 0; /* Statistics last_time access */
unsigned int res = 0;
switch((unsigned int)ctx)
switch((unsigned long)ctx)
{
case CTXPRB :
if (value == '1')

View File

@ -268,7 +268,7 @@ extern "C" {
| |
\------------------------------------------------------*/
extern void autexit __P((int Value));
extern void autexit __P((long Value));
/*------------------------------------------------------\
| |

View File

@ -43,8 +43,10 @@
# include <stdio.h>
# include <signal.h>
# include <string.h>
# include <stdlib.h>
# include <unistd.h>
# include <libgen.h>
# include <mut.h>
# include "aut.h"

View File

@ -86,7 +86,7 @@
void autexit( Value )
int Value;
long Value;
{
long *Core = (long *)1;

View File

@ -42,6 +42,7 @@
\------------------------------------------------------------*/
# include <stdio.h>
# include <malloc.h>
# include <memory.h>
# include <string.h>

View File

@ -277,6 +277,7 @@ begex_list;
/* ###------------------------------------------------------### */
extern struct beaux *beh_addbeaux ();
extern struct bequad *beh_addbequad ();
extern struct bebux *beh_addbebux ();
extern struct bebus *beh_addbebus ();
extern struct befig *beh_addbefig ();

View File

@ -52,7 +52,7 @@ char *key;
{
struct beden *entry;
int i ;
long i ;
if (BEH_DCEHED == NULL)
{
@ -91,7 +91,7 @@ char *key;
{
struct bedrd *recrd;
int i ;
long i ;
if (BEH_DCRHED == NULL)
{
@ -134,7 +134,7 @@ struct beden **beh_initab ()
{
struct beden **head;
int i;
long i;
head = (struct beden **)
mbkalloc (sizeof(struct beden *) * BEH_HSZDFN);
@ -156,17 +156,17 @@ void beh_addtab (head, key_str, ctx_str, field, valu)
struct beden **head;
char *key_str;
char *ctx_str;
int field;
int valu;
long field;
long valu;
{
int found = 0;
unsigned int key ;
unsigned int index ;
long found = 0;
unsigned long key ;
unsigned long index ;
struct beden *entry_pnt ;
struct bedrd *recrd_pnt ;
key = ((unsigned int) key_str) + ((unsigned int) ctx_str);
key = ((unsigned long) key_str) + ((unsigned long) ctx_str);
index = key % BEH_HSZDFN;
entry_pnt = head [index];
@ -238,17 +238,17 @@ long beh_chktab (head, key_str, ctx_str, field)
struct beden **head ;
char *key_str;
char *ctx_str;
int field ;
long field ;
{
int found = 0;
long found = 0;
long valu = 0;
unsigned int key ;
unsigned int index ;
unsigned long key ;
unsigned long index ;
struct beden *entry_pnt;
struct bedrd *recrd_pnt;
key = ((unsigned int) key_str) + ((unsigned int) ctx_str);
key = ((unsigned long) key_str) + ((unsigned long) ctx_str);
index = key % BEH_HSZDFN;
entry_pnt = head [index];
@ -317,7 +317,7 @@ struct beden **pt_hash;
struct beden *pt_entry ;
struct beden *pt_nxtentry;
struct bedrd *pt_record ;
int i ;
long i ;
if (pt_hash != NULL)
{

View File

@ -48,11 +48,11 @@ struct chain *pt_abl;
struct chain *opr_lst;
char *sig_nam;
struct chain *new_abl;
unsigned int opera ;
unsigned long opera ;
if (pt_abl->NEXT != NULL)
{
opera = (unsigned int) ((struct chain *) pt_abl->DATA)->DATA;
opera = (unsigned long) ((struct chain *) pt_abl->DATA)->DATA;
if (opera == STABLE)
{
sig_nam = (char *) ((struct chain *) pt_abl->NEXT->DATA)->DATA;

View File

@ -68,7 +68,7 @@ int nbr1;
fprintf (stderr,"cannot drive empty or erroneous description\n");
break;
case 15 :
fprintf (stderr,"illegal bit string value : `%c`\n",nbr1);
fprintf (stderr,"illegal bit string value : `%c`\n",(char)nbr1);
break;
case 16 :
fprintf (stderr,"the same expression cannot be used twice\n");

View File

@ -30,6 +30,7 @@
/* ###--------------------------------------------------------------### */
#include <stdio.h>
#include <string.h>
#include "mut.h"
#include "log.h"
#include "beh.h"
@ -46,7 +47,7 @@ char *name;
{
char *new_name ;
char tmp1 [256] ;
int i = 0 ;
long i = 0 ;
static struct beden **tab = NULL;
/* ###------------------------------------------------------### */

View File

@ -36,7 +36,7 @@
#include "beh_debug.h"
static char *buffer = NULL;
static unsigned int buff_size = 0;
static unsigned long buff_size = 0;
static struct circuit *circuit_pnt = NULL;
@ -55,7 +55,7 @@ char **str; /* recognized strings */
{
int i;
long i;
struct chain *ptr_abl;
struct chain *chain_pnt;
@ -79,7 +79,7 @@ char **str; /* recognized strings */
char **string_pnt;
char *character_pnt;
int *int_pnt;
long *int_pnt;
/* ###------------------------------------------------------### */
/* initialization */
@ -516,7 +516,7 @@ char **str; /* recognized strings */
case integer_DFN :
int_pnt = (int *) curpnt.data;
int_pnt = (long *) curpnt.data;
typ [integer_DFN] = IMMEDIATE_DFN | d_DFN | integer_DFN;
pnt [integer_DFN].imd = *int_pnt;
@ -641,17 +641,17 @@ char **str; /* recognized strings */
/* called func. : none */
/* ###--------------------------------------------------------------### */
static int splitline (words, line)
static long splitline (words, line)
char **words;
char *line ;
{
char *heap = *words;
int new = 1;
int wrdcnt = 0;
int i = 0;
int j = 0;
long new = 1;
long wrdcnt = 0;
long i = 0;
long j = 0;
/* ###------------------------------------------------------### */
/* copy the line read from input into the words until a */
@ -692,12 +692,12 @@ char *line ;
static void push (stk, stkpnt, data, type)
struct stack *stk;
int *stkpnt;
long *stkpnt;
void *data;
short type;
{
int stkidx = *stkpnt;
long stkidx = *stkpnt;
if (stkidx == STKSIZ_DFN)
fprintf (stdout, "beh_debug :\tSTACK OVERFLOW !!\tSTACK OVERFLOW !!\n");
@ -724,11 +724,11 @@ short type;
static void pop (stkpnt, count)
int *stkpnt;
int count;
long *stkpnt;
long count;
{
int stkidx = *stkpnt;
long stkidx = *stkpnt;
if (stkidx <= count)
stkidx = 0;
@ -748,7 +748,7 @@ int count;
static struct chain *goforward (pnt, count)
struct chain *pnt;
int count;
long count;
{
while ((count > 0) && (pnt != NULL) && (pnt->NEXT != NULL))
@ -767,17 +767,17 @@ int count;
/* called func. : none */
/* ###--------------------------------------------------------------### */
static int translate (words, wrdcnt, strgs, nmbrs, flags, indxs)
static long translate (words, wrdcnt, strgs, nmbrs, flags, indxs)
char **words; /* list of words */
int wrdcnt; /* number of words */
long wrdcnt; /* number of words */
char **strgs; /* list of recognized strings */
int *nmbrs; /* words translated to numbers */
long *nmbrs; /* words translated to numbers */
char *flags; /* set if word is a number */
int *indxs; /* words' index in strgs table */
long *indxs; /* words' index in strgs table */
{
int i , j;
long i , j;
/* ###------------------------------------------------------### */
/* initialize flags and indxs */
@ -813,10 +813,10 @@ int *indxs; /* words' index in strgs table */
static void getsize (siz)
unsigned int siz [];
unsigned long siz [];
{
int i;
long i;
for (i=0 ; i<MAXCMD_DFN ; i++)
siz [i] = 0;
@ -858,7 +858,7 @@ static void disp_immd (str, pnt, type)
char **str;
union value pnt ;
int type ;
long type ;
{
char *lcl_str ;
@ -931,25 +931,25 @@ char *type; /* structure's type */
char heap [128]; /* buffer to split the cmd line */
char *words [ 10]; /* number of words on a line */
int nmbrs [ 10]; /* words translated into number */
long nmbrs [ 10]; /* words translated into number */
char flags [ 10]; /* set if words is a number */
int indxs [ 10]; /* index of words */
long indxs [ 10]; /* index of words */
struct stack jtab [ 10]; /* list of memorized addresses */
int idx, i;
int dispflg = 0;
int code;
unsigned int size;
long idx, i;
long dispflg = 0;
long code;
unsigned long size;
char *pntr = NULL;
long pshtype;
int wrdcnt = 1;
long wrdcnt = 1;
struct stack stk [STKSIZ_DFN];
int stkpnt = -1;
long stkpnt = -1;
union value pnt [MAXCMD_DFN];
long typ [MAXCMD_DFN];
unsigned int siz [MAXCMD_DFN];
unsigned long siz [MAXCMD_DFN];
static char *str [] = {
"_back" , "_exit" , "_jump" , "_save" ,
@ -1176,7 +1176,7 @@ char *type; /* structure's type */
{
size = siz [(typ [idx] & TYPE_DFN)];
pntr = (void *)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
dispflg = 1;
}
@ -1189,7 +1189,7 @@ char *type; /* structure's type */
{
size = sizeof (void *);
pntr = * (void **)
(((unsigned int) pnt [idx].dat) + (size * nmbrs [1]));
(((unsigned long) pnt [idx].dat) + (size * nmbrs [1]));
push (stk, &stkpnt, pntr, pshtype);
dispflg = 1;
}

View File

@ -30,6 +30,8 @@
/* ###--------------------------------------------------------------### */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "mut.h"
#include "log.h"
#include "beh.h"
@ -57,7 +59,7 @@ struct chain *pt_exp;
struct chain *del_chain = NULL;
struct chain *tmp_chain = NULL;
struct chain *mem_chain = NULL;
int value ;
long value ;
if (pt_fig->ERRFLG == 0)
{
@ -97,7 +99,7 @@ struct chain *pt_exp;
exit( pt_fig->ERRFLG );
}
else
tmp_chain->DATA = (void *) value;
tmp_chain->DATA = (chain_list *) value;
tmp_chain = tmp_chain->NEXT;
}
@ -129,7 +131,7 @@ struct befig *pt_fig;
struct beout *pt_out ;
struct bebus *pt_bus ;
struct biabl *pt_biabl ;
unsigned int count = 0;
unsigned long count = 0;
/* ###------------------------------------------------------### */
/* if there is no error in the current figure ... */
@ -155,7 +157,7 @@ struct befig *pt_fig;
while (pt_rin != NULL)
{
addhtitem (rin_list, pt_rin->NAME, (int) pt_rin);
addhtitem (rin_list, pt_rin->NAME, (long) pt_rin);
pt_rin = pt_rin->NEXT;
}

View File

@ -41,9 +41,7 @@
/* called func. : beh_addbequad */
/* ###--------------------------------------------------------------### */
void beh_makquad (pt_befig)
struct befig *pt_befig;
void beh_makquad ( struct befig *pt_befig )
{
struct beaux *pt_beaux;

View File

@ -88,7 +88,7 @@ struct chain *pt_exp;
/* variable list. */
/* ###------------------------------------------------------### */
if (((int) ((struct chain *) pt_exp->DATA)->DATA) == STABLE)
if (((long) ((struct chain *) pt_exp->DATA)->DATA) == STABLE)
{
name = ((struct chain *) pt_exp->NEXT->DATA)->DATA;
res_chain = addchain (NULL, name);

View File

@ -54,7 +54,7 @@ static lofig_list *lofig;
/*befig in mapping*/
static befig_list* befig;
/*index of losig*/
static long index;
static long loc_index;
@ -63,7 +63,7 @@ static long index;
/****************************************************************************/
extern void setindex(long new_index)
{
index = new_index;
loc_index = new_index;
}
@ -73,8 +73,8 @@ extern void setindex(long new_index)
extern long getindex()
{
long ret;
ret=index;
index++;
ret=loc_index;
loc_index++;
return ret;
}
@ -128,7 +128,7 @@ extern losig_list* make_equi(losig_list* losig_sce, losig_list* losig_dest)
for (namechain=losig_dest->NAMECHAIN; namechain; namechain=namechain->NEXT) {
name=(char*) namechain->DATA;
losig_dest->NAMECHAIN=addchain(losig_dest->NAMECHAIN,name);
addauthelem(HTABLE,name,(int)losig_dest);
addauthelem(HTABLE,name,(long)losig_dest);
}
losig_dest->TYPE=losig_sce->TYPE;
@ -210,9 +210,9 @@ static void add_losig_to_lofig()
addlocon(lofig,bepor->NAME,losig,bepor->DIRECTION);
/*seek fast*/
if (isvss(bepor->NAME)) addauthelem(HTABLE,VSS,(int) losig);
else if (isvdd(bepor->NAME)) addauthelem(HTABLE,VDD,(int) losig);
else addauthelem(HTABLE,bepor->NAME,(int) losig);
if (isvss(bepor->NAME)) addauthelem(HTABLE,VSS,(long) losig);
else if (isvdd(bepor->NAME)) addauthelem(HTABLE,VDD,(long) losig);
else addauthelem(HTABLE,bepor->NAME,(long) losig);
}
/*copy of INTERNAL signals*/
@ -221,21 +221,21 @@ static void add_losig_to_lofig()
index=getindex();
losig=addlosig(lofig,index,namechain,INTERNAL/*no more capa parameter*/);
/*seek fast*/
addauthelem(HTABLE,beaux->NAME,(int) losig);
addauthelem(HTABLE,beaux->NAME,(long) losig);
}
for (bereg=befig->BEREG; bereg; bereg=bereg->NEXT) {
namechain=addchain(NULL,bereg->NAME);
index=getindex();
losig=addlosig(lofig,index,namechain,INTERNAL/*no more capa parameter*/);
addauthelem(HTABLE,bereg->NAME,(int) losig);
addauthelem(HTABLE,bereg->NAME,(long) losig);
}
for (bebux=befig->BEBUX; bebux; bebux=bebux->NEXT) {
namechain=addchain(NULL,bebux->NAME);
index=getindex();
losig=addlosig(lofig,index,namechain,INTERNAL/*no more capa parameter*/);
addauthelem(HTABLE,bebux->NAME,(int) losig);
addauthelem(HTABLE,bebux->NAME,(long) losig);
}
}
@ -259,7 +259,7 @@ static void add_one_zero_losig()
namechain=addchain(NULL,name);
index=getindex();
one=addlosig(lofig,index,namechain,INTERNAL/*no more capa parameter*/);
addauthelem(HTABLE,getablatomone(),(int) one);
addauthelem(HTABLE,getablatomone(),(long) one);
name=getautoname("zero");
/*report same properties*/
@ -268,7 +268,7 @@ static void add_one_zero_losig()
namechain=addchain(NULL,name);
index=getindex();
zero=addlosig(lofig,index,namechain,INTERNAL/*no more capa parameter*/);
addauthelem(HTABLE,getablatomzero(),(int) zero);
addauthelem(HTABLE,getablatomzero(),(long) zero);
}
@ -317,7 +317,7 @@ extern lofig_list* map_befig(befig_list *befig_param, char* lofig_name)
befig=befig_param;
HTABLE= createauthtable (BLOCK);
index=0;
loc_index=0;
begin_count_area();
/*header of lofig created*/
@ -342,7 +342,7 @@ extern lofig_list* map_befig(befig_list *befig_param, char* lofig_name)
destroyauthtable(HTABLE);
HTABLE=NULL;
index=0;
loc_index=0;
return lofig;
}

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <mut.h>
#include <abl.h>
#include <abe.h>

View File

@ -44,7 +44,7 @@
/*head operator arity*/
/* Warning: simpablexpr() do not work anymore after pulling arity */
#define ABL_ARITY(abl) ((int)ABL_CDR((chain_list*)ABL_CAR(abl)))
#define ABL_ARITY(abl) ((long)ABL_CDR((chain_list*)ABL_CAR(abl)))
#define ABL_ARITY_L(abl) (ABL_CDR((chain_list*)ABL_CAR(abl)))
/***************************************************************************/

View File

@ -42,11 +42,11 @@
#define USING(node) {node=-mark;}
#define USED(node) {node=(int)((((int)node<0)?0:(int)node)+1);}
#define IS_USING(node) ((int)node==-mark)
#define IS_USED(node) ((int)node!=0)
#define IS_UNUSED(node) ((int)node==0)
#define IS_ONE(node) ((int)node==1)
#define USED(node) {node=(long)((((long)node<0)?0L:(long)node)+1L);}
#define IS_USING(node) ((long)node==-mark)
#define IS_USED(node) ((long)node!=0)
#define IS_UNUSED(node) ((long)node==0)
#define IS_ONE(node) ((long)node==1)
typedef struct equi {
@ -330,7 +330,7 @@ static void unmark_all()
/* mark and follow the tree of abl */
/* return 1 if correct abl */
/******************************************************************************/
static int abl_dispatching(chain_list *abl, int mark)
static long abl_dispatching(chain_list *abl, long mark)
{
bebux_list *bebux;
beaux_list *beaux;
@ -502,12 +502,12 @@ static int abl_dispatching(chain_list *abl, int mark)
/* mark each output */
/* return 1 if correct */
/***************************************************************************/
static int mark_output()
static long mark_output()
{
bebus_list *bebus;
beout_list *beout;
biabl_list *biabl;
int mark=1;
long mark=1;
/*create new internal signals and mark the path from output to input*/
for (beout=befig->BEOUT; beout; beout=beout->NEXT) {
@ -549,7 +549,7 @@ static int mark_output()
/* control cycles in befig and erase unused internal signal */
/* return 1 if correct befig */
/******************************************************************************/
extern int DAG_control(befig_list *befig_param)
extern long DAG_control(befig_list *befig_param)
{
equi_list* equi, *equi2;
bereg_list *bereg;

View File

@ -46,7 +46,7 @@
/* control cycles in befig and erase unused internal signal */
/* return 1 if correct befig */
/******************************************************************************/
extern int DAG_control __P ((befig_list *befig));
extern long DAG_control __P ((befig_list *befig));
#endif

View File

@ -42,7 +42,7 @@
/***************************************************************************/
/* choose '1' or '0' to simplify the expression as well as we can */
/***************************************************************************/
static void find_d_z_abl(chain_list* abl, int value)
static void find_d_z_abl(chain_list* abl, long value)
{
if (ABL_ATOM(abl)) {
@ -56,6 +56,7 @@ static void find_d_z_abl(chain_list* abl, int value)
/* a pull-up is done for better conductance*/
ABL_CAR_L(abl)=getablatomone()/* = namealloc("'1'")*/;
}
return;
}
/*the first operator influences the most*/

View File

@ -85,7 +85,7 @@ static int control_vector()
name=nameindex((char*) ptype->DATA,ptype->TYPE);
SEPAR='_';
/*build a bit from a vector*/
addauthelem(HTABLE,name,(int)nameindex(ptype->DATA,ptype->TYPE));
addauthelem(HTABLE,name,(long)nameindex(ptype->DATA,ptype->TYPE));
}
}
else {
@ -349,21 +349,21 @@ extern void change_radical(befig_list* befig)
if (!forbid_radical(beaux->NAME)) continue;
name=beaux->NAME; /*name begins by MBK_NOT_..... */
beaux->NAME=getautoname(beaux->NAME);
addauthelem(HTABLE,name,(int)beaux->NAME);
addauthelem(HTABLE,name,(long)beaux->NAME);
}
for (bereg=befig->BEREG; bereg; bereg=bereg->NEXT) {
if (!forbid_radical(bereg->NAME)) continue;
name=bereg->NAME;
bereg->NAME=getautoname(bereg->NAME);
addauthelem(HTABLE,name,(int)bereg->NAME);
addauthelem(HTABLE,name,(long)bereg->NAME);
}
for (bebux=befig->BEBUX; bebux; bebux=bebux->NEXT) {
if (!forbid_radical(bebux->NAME)) continue;
name=bebux->NAME;
bebux->NAME=getautoname(bebux->NAME);
addauthelem(HTABLE,name,(int)bebux->NAME);
addauthelem(HTABLE,name,(long)bebux->NAME);
}
for (beaux=befig->BEAUX; beaux; beaux=beaux->NEXT) {

View File

@ -133,7 +133,7 @@ static void putsignal(signal_list* signal, char* name)
/*if doesn't exist hash table, init*/
if (!HTABLE) init_signals();
addauthelem(HTABLE,name,(int)signal);
addauthelem(HTABLE,name,(long)signal);
}

View File

@ -46,6 +46,8 @@
# ifndef BTR_ERROR_H
# define BTR_ERROR_H
# include <libgen.h>
/*------------------------------------------------------------\
| |
| Constants |

View File

@ -43,6 +43,7 @@
# include <stdio.h>
# include <string.h>
# include <libgen.h>
# include <memory.h>
# include "mut.h"
# include "aut.h"

View File

@ -25,7 +25,7 @@
typedef struct bvl_expr /* a signal's expression */
{
char *IDENT ; /* identifier or constant name */
unsigned int TIME ; /* waveform's delay */
unsigned long TIME ; /* waveform's delay */
struct chain *LIST_ABL; /* pointer on a list of ABL */
short WIDTH ; /* width of bit vector */
}
@ -42,7 +42,7 @@ bvl_name;
struct g_type
{
int VALU;
long VALU;
char FLAG;
};
@ -51,7 +51,7 @@ struct g_type
/* global variables */
/* ###------------------------------------------------------### */
extern int BVL_AUXMOD ; /* don't keep internal sig (=1) */
extern long BVL_AUXMOD ; /* don't keep internal sig (=1) */
extern char BVL_ERRFLG ; /* error flag */
extern char BVL_CURFIL []; /* current file name */
extern struct befig *BVL_HEDFIG ; /* list of descriptions */
@ -72,6 +72,6 @@ extern char *bvl_printabl ();
extern void bvl_message ();
extern struct befig *vhdlloadbefig ();
extern int vhdlsavebefig ();
extern long vhdlsavebefig ();
#endif

View File

@ -13,7 +13,7 @@
/* called func. : addht, addhtitem, gethtitem, namealloc */
/* ###--------------------------------------------------------------### */
static int search (key)
static long search (key)
char *key;
@ -198,7 +198,7 @@ base_specifier (B|b|O|o|X|x)
\/ { return (Slash ); }
{letter}(_?{letter_or_digit})* {
int itoken;
long itoken;
itoken = search (yytext);
if (itoken == EMPTYHT)
@ -213,7 +213,7 @@ base_specifier (B|b|O|o|X|x)
}
({decimal_literal})|({base}#{based_integer}(\.{based_integer})?#({exponent})?)|({base}:{based_integer}(\.{based_integer})?:({exponent})?) {
yylval.text = mbkalloc ((unsigned int)strlen(yytext)+1);
yylval.text = mbkalloc ((unsigned long)strlen(yytext)+1);
strcpy (yylval.text, yytext);
return (AbstractLit);
}

View File

@ -38,18 +38,18 @@ char *str;
/* in a string of '0' and '1's */
/* ###--------------------------------------------------------------### */
static int tobin (trg, src, left, right)
static long tobin (
char *trg ;
char *src ;
int left ;
int right;
char *trg ,
char *src ,
long left ,
long right )
{
{
char base ;
int indx ;
int j = 0;
int errflg = 0;
long indx ;
long j = 0;
long errflg = 0;
char lcl_trg [256];
lcl_trg [0] = '\0';
@ -216,25 +216,25 @@ int right;
}
return (errflg);
}
}
/* ###--------------------------------------------------------------### */
/* function : chkdcl */
/* ###--------------------------------------------------------------### */
static int chkdcl (object, mode, type, flag, kind, constraint, conf)
static long chkdcl (object, mode, type, flag, kind, constraint, conf)
char object ;
int mode ;
int type ;
long mode ;
long type ;
char flag ;
int kind ;
long kind ;
char constraint;
int *conf ;
long *conf ;
{
int errflg = 0;
int lclcnf = 0;
long errflg = 0;
long lclcnf = 0;
if (flag != constraint)
{
@ -404,8 +404,8 @@ static void *addstr (ptfig, object, mode, type, flag, name, left, right)
struct befig *ptfig ;
char object;
int mode ;
int type ;
long mode ;
long type ;
char flag ;
char *name ;
short left ;
@ -580,8 +580,8 @@ short right ; /* array's right bound (= -1 if scalar) */
struct begen *ptgen ;
struct chain *ptauxnam ;
struct chain *ptauxnat ;
int i ;
int inc = 1;
long i ;
long inc = 1;
ptgen = last_gen;
ptauxnam = nam_lst ;
@ -697,13 +697,13 @@ bvl_ablstr ablstr;
/* bvl_error , addchain , freechain */
/* ###--------------------------------------------------------------### */
static bvl_ablstr crtabl (oper, expr1, expr2, left, right)
static bvl_ablstr crtabl (
short oper ;
bvl_ablstr expr1;
bvl_ablstr expr2;
int left ;
int right;
short oper ,
bvl_ablstr expr1,
bvl_ablstr expr2,
long left ,
long right )
{
char name [256] ;
@ -1247,7 +1247,7 @@ bvl_ablstr pt_ablstr; /* tested expression */
{
char binstr[256];
int i;
long i;
struct chain *pt_auxabl;
pNode pt_bddres;
pNode pt_bddnew;
@ -1256,8 +1256,8 @@ bvl_ablstr pt_ablstr; /* tested expression */
char nomvar[10];
struct chain *pt_newabl;
struct chain *pt_newabl2;
static int oth_flg=0;
static int last_width=0;
static long oth_flg=0;
static long last_width=0;
static pCircuit pC = NULL;
result->LIST_ABL = NULL;
@ -1871,7 +1871,7 @@ formal_port_element
.signal_kind.
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
/* ###----------------------------------------------### */
@ -1895,7 +1895,7 @@ formal_port_element
beh_addtab (dic, signame, BVL_MODNAM, BVL_SIGDFN, sigconf);
beh_addtab (dic, signame, BVL_MODNAM, BVL_WMNDFN, $6.LEFT);
beh_addtab (dic, signame, BVL_MODNAM, BVL_WMXDFN, $6.RIGHT);
beh_addtab (dic, signame, BVL_MODNAM, BVL_PNTDFN, (int)pnt);
beh_addtab (dic, signame, BVL_MODNAM, BVL_PNTDFN, (long)pnt);
BVL_NM1LST = delchain (BVL_NM1LST, BVL_NM1LST);
}
@ -1984,7 +1984,7 @@ constant_declaration
constant_VarAsgn__expression
Semicolon_ERR
{
int sigconf;
long sigconf;
if (chkdcl ('C', 0, $4.VALU, $4.FLAG, 0, $5.FLAG, &sigconf)==0)
{
@ -2012,9 +2012,9 @@ signal_declaration
Semicolon_ERR
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
int errflg;
long errflg;
errflg = chkdcl ('S',0,$4.VALU,$4.FLAG,$6,$5.FLAG,&sigconf);
@ -2037,7 +2037,7 @@ signal_declaration
beh_addtab (dic, signame, BVL_MODNAM, BVL_SIGDFN, sigconf);
beh_addtab (dic, signame, BVL_MODNAM, BVL_WMNDFN, $5.LEFT);
beh_addtab (dic, signame, BVL_MODNAM, BVL_WMXDFN, $5.RIGHT);
beh_addtab (dic, signame, BVL_MODNAM, BVL_PNTDFN, (int)pnt);
beh_addtab (dic, signame, BVL_MODNAM, BVL_PNTDFN, (long)pnt);
BVL_NM1LST = delchain (BVL_NM1LST, BVL_NM1LST);
}
@ -2163,7 +2163,7 @@ unlabeled_conditional_signal_assignment
waveform
Semicolon_ERR
{
int i ;
long i ;
struct beout *beout_pnt;
struct bebus *bebus_pnt;
struct bereg *bereg_pnt;
@ -2178,15 +2178,15 @@ unlabeled_conditional_signal_assignment
struct bvl_expr expr4 ;
struct bvl_expr expr5 ;
struct bvl_expr expr6 ;
int rev_flg = 0;
int left_bnd ;
int right_bnd;
int left ;
int right ;
int in_bound ;
int out_bound;
int sig_width;
int sig_conf ;
long rev_flg = 0;
long left_bnd ;
long right_bnd;
long left ;
long right ;
long in_bound ;
long out_bound;
long sig_width;
long sig_conf ;
delay = $6.TIME;
expr4 = $6 ;
@ -2468,7 +2468,7 @@ unlabeled_selected_signal_assignment
...waveform__WHEN__choices..
Semicolon_ERR
{
int i;
long i;
struct beout *beout_pnt;
struct bebus *bebus_pnt;
struct bereg *bereg_pnt;
@ -2477,15 +2477,15 @@ unlabeled_selected_signal_assignment
struct chain *abl_pnt ;
unsigned long delay ;
struct bvl_expr expr1 ;
int rev_flg = 0;
int left_bnd;
int right_bnd;
int left;
int right;
int in_bound;
int out_bound;
int sig_width;
int sig_conf;
long rev_flg = 0;
long left_bnd;
long right_bnd;
long left;
long right;
long in_bound;
long out_bound;
long sig_width;
long sig_conf;
/* ###----------------------------------------------### */
/* $10 est une structure, pas un pointeur... */
@ -2791,7 +2791,7 @@ delay_expression
: abstractlit
time_unit
{
unsigned int dly;
unsigned long dly;
/* ###----------------------------------------------### */
/* if the delay is not null unset the 'zero delay' */
@ -2847,13 +2847,13 @@ choice
{
char *val;
char val2[256];
int left;
int right;
int in_bound;
int out_bound;
int left_bnd;
int right_bnd;
int sig_conf;
long left;
long right;
long in_bound;
long out_bound;
long left_bnd;
long right_bnd;
long sig_conf;
strcpy (val2, "B\"");
sig_conf = beh_chktab (dic, $1.NAME, BVL_MODNAM, BVL_SIGDFN);
@ -3048,13 +3048,13 @@ primary
| name
{
struct bvl_expr expr1;
int left;
int right;
int left_bnd;
int right_bnd;
int in_bound;
int out_bound;
int sig_conf;
long left;
long right;
long left_bnd;
long right_bnd;
long in_bound;
long out_bound;
long sig_conf;
sig_conf = beh_chktab (dic, $1.NAME, BVL_MODNAM, BVL_SIGDFN);
switch (sig_conf)
@ -3214,7 +3214,7 @@ attribute_name
{
char extname [100];
char *lclname ;
int sig_conf ;
long sig_conf ;
struct bvl_expr expr1 ;
struct bvl_expr expr2 ;
struct chain *ptabl ;

View File

@ -27,10 +27,10 @@
/* bvl_getvers */
/* ###--------------------------------------------------------------### */
int vhdlsavebefig (pt_fig, trace_mode)
long vhdlsavebefig (pt_fig, trace_mode)
struct befig *pt_fig ;
int trace_mode;
long trace_mode;
{
struct begen *pt_gen = NULL; /* current ptype pnt (generic) */
@ -49,17 +49,17 @@ int trace_mode;
char *kind ;
char *direct ;
char *transp ;
int nrlabel = 0;
int buff_size = 128;
long nrlabel = 0;
long buff_size = 128;
char *buffer ;
FILE *fp ;
time_t clock ;
int left ;
int right ;
long left ;
long right ;
char name [256];
char *time_unit ;
unsigned int time_step ;
int err_flg = 0;
unsigned long time_step ;
long err_flg = 0;
if ((pt_fig == NULL) || (pt_fig->ERRFLG != 0))
beh_toolbug (10, "vhdlsavebefig", NULL, 0);

View File

@ -12,7 +12,7 @@
#include "log.h"
#include "beh.h"
int BVL_AUXMOD ; /* don't keep internal sig (=1) */
long BVL_AUXMOD ; /* don't keep internal sig (=1) */
char BVL_ERRFLG = 0 ; /* error flag */
char BVL_CURFIL [256]; /* current file name */
struct befig *BVL_HEDFIG = NULL; /* list of descriptions */

View File

@ -28,17 +28,17 @@ struct befig *vhdlloadbefig (pt_befig, figname, trace_mode)
struct befig *pt_befig ;
char *figname ;
unsigned int trace_mode;
unsigned long trace_mode;
{
extern FILE *bvl_y_in ;
extern int bvl_y_parse ();
extern long bvl_y_parse ();
char *tok ;
char *str ;
unsigned int check_mode ;
unsigned long check_mode ;
struct chain *behsfx_lst = NULL;
struct chain *suffix = NULL;
static unsigned int call_nbr = 0 ;
static unsigned long call_nbr = 0 ;
/* ###------------------------------------------------------### */
/* read the environment variable VH_BEHSFX to create a list */

View File

@ -37,7 +37,7 @@ char *bvl_getvers ()
void bvl_error (code, str1)
int code;
long code;
char *str1;
{
@ -188,15 +188,15 @@ char *str1;
struct bepor *bvl_vpor (pt_por, pt_lft, pt_rit, name)
struct bepor *pt_por ;
int *pt_lft ;
int *pt_rit ;
long *pt_lft ;
long *pt_rit ;
char *name ;
{
struct bepor *prv_por = NULL;
int left = -1 ;
int right = -1 ;
int index = -1 ;
long left = -1 ;
long right = -1 ;
long index = -1 ;
char tmp_nam [256] ;
prv_por = pt_por;
@ -241,15 +241,15 @@ char *name ;
struct beaux *bvl_vaux (pt_aux, pt_lft, pt_rit, name)
struct beaux *pt_aux ;
int *pt_lft ;
int *pt_rit ;
long *pt_lft ;
long *pt_rit ;
char *name ;
{
struct beaux *prv_aux = NULL;
int left = -1 ;
int right = -1 ;
int index = -1 ;
long left = -1 ;
long right = -1 ;
long index = -1 ;
char tmp_nam [256] ;
prv_aux = pt_aux;
@ -294,15 +294,15 @@ char *name ;
struct bebux *bvl_vbux (pt_bux, pt_lft, pt_rit, name)
struct bebux *pt_bux ;
int *pt_lft ;
int *pt_rit ;
long *pt_lft ;
long *pt_rit ;
char *name ;
{
struct bebux *prv_bux = NULL;
int left = -1 ;
int right = -1 ;
int index = -1 ;
long left = -1 ;
long right = -1 ;
long index = -1 ;
char tmp_nam [256] ;
prv_bux = pt_bux;
@ -347,15 +347,15 @@ char *name ;
struct bereg *bvl_vreg (pt_reg, pt_lft, pt_rit, name)
struct bereg *pt_reg ;
int *pt_lft ;
int *pt_rit ;
long *pt_lft ;
long *pt_rit ;
char *name ;
{
struct bereg *prv_reg = NULL;
int left = -1 ;
int right = -1 ;
int index = -1 ;
long left = -1 ;
long right = -1 ;
long index = -1 ;
char tmp_nam [256] ;
prv_reg = pt_reg;
@ -427,10 +427,10 @@ char *bvl_abl2str (expr, chaine, size_pnt)
struct chain *expr ; /* expression */
char *chaine ; /* target string */
int *size_pnt; /* size of available space */
long *size_pnt; /* size of available space */
{
int operator;
long operator;
char *oper ;
struct chain *operand ;
static char *str_z = NULL;
@ -480,7 +480,7 @@ int *size_pnt; /* size of available space */
/* "(operand operator operand operator operand ...)" */
/* ###------------------------------------------------------### */
operator = (int) ((struct chain *) expr->DATA)->DATA;
operator = (long) ((struct chain *) expr->DATA)->DATA;
operand = (struct chain *) expr->NEXT->DATA;
if (operator == STABLE)

View File

@ -40,7 +40,7 @@ static struct dct_entry *addent ();
static struct dct_recrd *addrcd ();
static struct dct_entry **initab ();
static void addtab ();
static int chktab ();
static long chktab ();
static void fretab ();
static void *ctp_addstr ();
static ctltype_list *val_type();
@ -50,7 +50,7 @@ static struct ptype *reversetype();
extern char CTP_ERRFLG; /* set to 1 in case of error */
extern ctlfig_list *CTP_HEADFIG; /* head of vbfigs */
extern long CTP_LINNUM;
extern int CTP_NUMPTP;
extern long CTP_NUMPTP;
extern char *CTP_MODNAM;
/*\
@ -60,7 +60,7 @@ pNode CTP_BDDPNT;
ctp_vexstr CTP_SLCEXP; /* structure filled with the */
ctp_vexstr CTP_EMPSTR; /* empty structure used with NOT*/
static int CTP_NUMTYP = 0; /* nombre de type */
static long CTP_NUMTYP = 0; /* nombre de type */
static struct chain *CTP_NM1LST = NULL; /* 1-st name liste */
static struct chain *CTP_NM2LST = NULL; /* 2-st name liste */
static struct chain *CTP_INSLST = NULL; /* 3-st name liste */

View File

@ -60,7 +60,7 @@
%}
%union {
int valu;
long valu;
char *text;
chain_list *pcha;
ctp_name name;
@ -700,7 +700,7 @@ subtype_indication
.constraint.
{
ctltype_list *ctltype_pnt;
int mode;
long mode;
mode = chktab(hshtab,$1,CTP_MODNAM,CTP_SYMDFN);
@ -754,9 +754,9 @@ enumeration_type_definition
{
char *enumname;
char *enumval;
int size;
int indice;
int numbit;
long size;
long indice;
long numbit;
char **pnt;
chain_list *nm1lst;
@ -961,8 +961,8 @@ range
{
long Left;
long Right;
int ErrorL;
int ErrorR;
long ErrorL;
long ErrorR;
ErrorL = ctp_vextonum( $1.VEX, &Left );
ErrorR = ctp_vextonum( $3.VEX, &Right );
@ -1003,7 +1003,7 @@ type_mark
:
simple_name
{
int type;
long type;
$$.NAME = $1;
$$.LEFT = -1;
$$.RIGHT = -1;
@ -1339,8 +1339,8 @@ primary
long right_bnd;
long in_bound;
long out_bound;
int mode;
int flag;
long mode;
long flag;
flag = $1.FLAG;
@ -1393,7 +1393,7 @@ primary
right = $1.RIGHT;
{
int type;
long type;
expr1.IDENT = $1.NAME;
type = chktab(hshtab,$1.NAME,LocalName,CTP_TYPDFN);
@ -1610,7 +1610,7 @@ indexed_name
vexexpr *VexExpr;
vexexpr *VexRet;
long Index;
int Error;
long Error;
long Def;
ScanChain = $2;
@ -1686,8 +1686,8 @@ slice_name
char *LocalName;
long Left;
long Right;
int ErrorL;
int ErrorR;
long ErrorL;
long ErrorR;
LocalName = CTP_MODNAM;
@ -1721,9 +1721,9 @@ attribute_name
attribute_designator
{
char *LocalName;
int type;
int flag;
int mode;
long type;
long flag;
long mode;
long AttrLeft;
long AttrRight;
long AttrLow;
@ -1850,7 +1850,7 @@ char *key;
{
struct dct_entry *entry = NULL;
int i;
long i;
if (CTP_DCEHED == NULL)
{
@ -1883,7 +1883,7 @@ char *key;
{
struct dct_recrd *recrd = NULL;
int i;
long i;
if (CTP_DCRHED == NULL)
{
@ -1912,7 +1912,7 @@ static struct dct_entry **initab ()
{
struct dct_entry **head = NULL;
int i;
long i;
head = (struct dct_entry **)
autallocblock (sizeof(struct dct_entry *) * CTP_HSZDFN);
@ -2009,7 +2009,7 @@ long valu;
}
}
static int chktab (head,key_str,ctx_str,field)
static long chktab (head,key_str,ctx_str,field)
struct dct_entry **head;
char *key_str;
@ -2127,7 +2127,7 @@ struct dct_entry **pt_hash;
static void *ctp_addstr(object,mode,prtype,type,flag,name,left,right,exp)
char object;
int mode;
long mode;
ctltype_list *prtype;
unsigned char type;
char flag;
@ -2141,7 +2141,7 @@ vexexpr *exp;
ctldecl_list *CtlDeclar;
void *pnt = NULL;
vexexpr *vex_pnt;
int bitsize;
long bitsize;
if ( object == 'F' )
{

View File

@ -1091,7 +1091,7 @@ void CallbackChangeRectangleLayer( MyWidget, ClientData, CallData )
{
rdsbegin();
DrealRectangleLayer = (int)ClientData;
DrealRectangleLayer = (long)ClientData;
DrealChangeEditMode( DREAL_CREATE_RECTANGLE,
DrealPromptCreateRectangle );

View File

@ -2116,7 +2116,7 @@ void CallbackModifyRectangleLayer( MyWidget, ClientData, CallData )
{
rdsbegin();
DrealRectangleMLayer = (int)ClientData;
DrealRectangleMLayer = (long)ClientData;
DrealPromptModifyRectangle();

View File

@ -15,6 +15,7 @@
/* les inclusions */
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "mut.h"
#include "mlo.h"

View File

@ -1,5 +1,6 @@
%{
#include <stdio.h>
#include <string.h>
#include "elp_y.h"
#undef ECHO
#define ECHO

View File

@ -68,8 +68,8 @@ void eltremove (htelt_t * list)
*/
void htremove (ht_t * ht)
{
int i;
for (i = 1; i < (int) ht[0]; i++)
long i;
for (i = 1; i < (long) ht[0]; i++)
eltremove (ht[i]);
free (ht);
}
@ -79,12 +79,12 @@ void htremove (ht_t * ht)
*/
void htstat (ht_t * ht)
{
int i;
long i;
htelt_t *elt;
if (ht)
{
static int start=1;
for (i = 1; i < (int) ht[0]; i++)
static long start=1;
for (i = 1; i < (long) ht[0]; i++)
for (elt = ht[i]; elt; elt = elt->NEXT)
if (elt->USED == 0)
{
@ -113,9 +113,9 @@ static int primes[] = {
/* creation d'un dictionnaire
** --------------------------
*/
ht_t *htinit (int size)
ht_t *htinit (long size)
{
int i;
long i;
ht_t *ht;
/* prend le premier nombre premier au dela de size */
@ -138,12 +138,12 @@ ht_t *htinit (int size)
/* calcul de la valeur de hachage primaire
** ---------------------------------------
*/
static int hash (ht_t * ht, char *key)
static long hash (ht_t * ht, char *key)
{
int alveole = 0;
int length = strlen (key);
int segment;
int l;
long alveole = 0;
long length = strlen (key);
long segment;
long l;
if (ht == NULL)
{
@ -160,7 +160,7 @@ static int hash (ht_t * ht, char *key)
segment = 0xFFFF & ((key[l] << 8) | key[l + 1]);
alveole = alveole ^ ((segment << 1) | (segment >> 15));
}
alveole %= (int) ht[0]; /* ht[0] == la taille de la table */
alveole %= (long) ht[0]; /* ht[0] == la taille de la table */
return (alveole + 1); /* +1 car on ne doit rien mettre dans case 0 */
}
@ -174,7 +174,7 @@ static int hash (ht_t * ht, char *key)
*/
htelt_t *htget (ht_t * ht, char *key)
{
int alveole = hash (ht, key);
long alveole = hash (ht, key);
htelt_t *p;
for (p = ht[alveole]; p && strcmp (p->KEY, key); p = p->NEXT);
@ -187,7 +187,7 @@ htelt_t *htget (ht_t * ht, char *key)
*/
htelt_t *htadd (ht_t * ht, char *key)
{
int alveole = hash (ht, key);
long alveole = hash (ht, key);
return ht[alveole] = eltadd (ht[alveole], key);
}
@ -197,7 +197,7 @@ htelt_t *htadd (ht_t * ht, char *key)
*/
htelt_t *htset (ht_t * ht, char *key)
{
int alveole = hash (ht, key);
long alveole = hash (ht, key);
htelt_t *p;
for (p = ht[alveole]; p && strcmp (p->KEY, key); p = p->NEXT);
@ -215,12 +215,12 @@ htelt_t *htsetre (ht_t * ht, char *key)
{
regex_t preg;
htelt_t *elt, *res = NULL;
int i;
long i;
if (regcomp(&preg, key, REG_EXTENDED | REG_NOSUB) != 0)
return NULL;
if (ht)
for (i = 1; i < (int) ht[0]; i++)
for (i = 1; i < (long) ht[0]; i++)
for (elt = ht[i]; elt; elt = elt->NEXT)
if (regexec (&preg, elt->KEY, (size_t) 0, NULL, 0) == 0)
{

View File

@ -11,7 +11,7 @@ typedef union
{
struct htelt_st *e;
double f;
int i;
long i;
char *s;
}
elt_t;
@ -20,9 +20,9 @@ typedef struct htelt_st
{
struct htelt_st * NEXT;
char *KEY;
int TYPE;
int USED;
int FLINE;
long TYPE;
long USED;
long FLINE;
char * FNAME;
elt_t VAL;
}
@ -62,7 +62,7 @@ extern void htremove (ht_t * ht);
/* creation du dictionnaire
** ------------------------
*/
extern ht_t *htinit (int size);
extern ht_t *htinit (long size);
/* recherche d'une entree dans la table
** rend un pointeur sur l'element

View File

@ -46,6 +46,8 @@
# ifndef FKS_ERROR_H
# define FKS_ERROR_H
# include <libgen.h>
/*------------------------------------------------------------\
| |
| Constants |
@ -69,7 +71,7 @@
| |
\------------------------------------------------------------*/
# define fkserror( E, V ) (fks_error( (int)(E), (char *)(V), autbasename(__FILE__,NULL), __LINE__ ))
# define fkserror( E, V ) (fks_error( (long)(E), (char *)(V), autbasename(__FILE__,NULL), __LINE__ ))
/*------------------------------------------------------------\
| |

View File

@ -76,7 +76,7 @@
| |
\------------------------------------------------------------*/
static int KissLineNumber = 0;
static long KissLineNumber = 0;
static char KissBuffer[ KISS_BUFFER_SIZE ];
static char *KissScanBuffer;
static FILE *KissFile;

View File

@ -46,6 +46,8 @@
# ifndef FTL_ERROR_H
# define FTL_ERROR_H
# include <libgen.h>
/*------------------------------------------------------------\
| |
| Constants |

View File

@ -58,13 +58,13 @@ static void addtab ();
static long chktab ();
static void fretab ();
void *fbl_addstr ();
int fbl_chkdcl ();
long fbl_chkdcl ();
struct ptype *reversetype();
struct choice_chain *order_choice();
%}
%union {
int valu;
long valu;
char *text;
struct ptype *ptyp;
struct fbpcs proc;
@ -522,7 +522,7 @@ entity_declaration
simple_name
IS
{
int type,size=0;
long type,size=0;
struct fbtyp *fbtyp_pnt;
char *name;
char *name_bit;
@ -687,7 +687,7 @@ formal_port_element
.signal_kind.
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
/* ###----------------------------------------------### */
@ -715,7 +715,7 @@ formal_port_element
addtab (hshtab,signame,FBL_MODNAM,FBL_WMNDFN,$6.LEFT);
addtab (hshtab,signame,FBL_MODNAM,FBL_WMXDFN,$6.RIGHT);
addtab (hshtab,signame,FBL_MODNAM,FBL_LBLDFN,$7);
addtab (hshtab,signame,FBL_MODNAM,FBL_PNTDFN,(int)pnt);
addtab (hshtab,signame,FBL_MODNAM,FBL_PNTDFN,(long)pnt);
FBL_NM1LST = delchain (FBL_NM1LST, FBL_NM1LST);
}
@ -828,7 +828,7 @@ pragma_declaration
char name[128];
char value[128];
char *pt;
int field;
long field;
field = sscanf((char *)$1,"-- %s %s %s %s", pragma,type,name,value);
@ -854,7 +854,7 @@ constant_declaration
constant_VarAsgn__expression
Semicolon_ERR
{
int sigconf;
long sigconf;
if (fbl_chkdcl ('C',0,val_type($4.NAME),$4.FLAG,0,$5.FLAG,&sigconf) == 0)
{
@ -883,9 +883,9 @@ signal_declaration
Semicolon_ERR
{
char *signame;
int sigconf;
long sigconf;
void *pnt;
int errflg;
long errflg;
errflg = fbl_chkdcl ('S',0,val_type($4.NAME),$4.FLAG,$6,$5.FLAG,&sigconf);
@ -917,7 +917,7 @@ signal_declaration
addtab (hshtab,signame,FBL_MODNAM,FBL_WMNDFN,$5.LEFT);
addtab (hshtab,signame,FBL_MODNAM,FBL_WMXDFN,$5.RIGHT);
addtab (hshtab,signame,FBL_MODNAM,FBL_LBLDFN,$6);
addtab (hshtab,signame,FBL_MODNAM,FBL_PNTDFN,(int)pnt);
addtab (hshtab,signame,FBL_MODNAM,FBL_PNTDFN,(long)pnt);
FBL_NM1LST = delchain (FBL_NM1LST,FBL_NM1LST);
@ -942,7 +942,7 @@ full_type_declaration
addtab(hshtab,$2,FBL_MODNAM,FBL_SIGDFN,FBL_TPEDFN);
addtab(hshtab,$2,FBL_MODNAM,FBL_LBLDFN,$4.CLASS);
addtab(hshtab,$2,FBL_MODNAM,FBL_TYPDFN,FBL_NUMTYP);
addtab (hshtab,$2,FBL_MODNAM,FBL_PNTDFN,(int)FBL_BEFPNT->BETYP);
addtab (hshtab,$2,FBL_MODNAM,FBL_PNTDFN,(long)FBL_BEFPNT->BETYP);
FBL_NUMTYP++;
}
Semicolon_ERR
@ -969,7 +969,7 @@ subtype_declaration
addtab(hshtab,$2,FBL_MODNAM,FBL_SIGDFN,FBL_TPEDFN);
addtab(hshtab,$2,FBL_MODNAM,FBL_LBLDFN,$4.CLASS);
addtab(hshtab,$2,FBL_MODNAM,FBL_TYPDFN,FBL_NUMTYP);
addtab (hshtab,$2,FBL_MODNAM,FBL_PNTDFN,(int)FBL_BEFPNT->BETYP);
addtab (hshtab,$2,FBL_MODNAM,FBL_PNTDFN,(long)FBL_BEFPNT->BETYP);
FBL_NUMTYP++;
}
Semicolon_ERR
@ -1004,8 +1004,8 @@ enumeration_type_definition
RightParen_ERR
{
char *enumname;
int size=0;
int indice=0;
long size=0;
long indice=0;
char **pnt;
chain_list *nm1lst;
@ -1034,7 +1034,7 @@ enumeration_type_definition
addtab (hshtab,enumname,FBL_MODNAM,FBL_WMNDFN,-1);
addtab (hshtab,enumname,FBL_MODNAM,FBL_WMXDFN,-1);
addtab (hshtab,enumname,FBL_MODNAM,FBL_LBLDFN,indice);
addtab (hshtab,enumname,FBL_MODNAM,FBL_PNTDFN,(int)pnt);
addtab (hshtab,enumname,FBL_MODNAM,FBL_PNTDFN,(long)pnt);
pnt[indice++] = enumname;
FBL_NM1LST = delchain (FBL_NM1LST, FBL_NM1LST);
@ -1147,7 +1147,7 @@ discrete_range
type_mark
: simple_name
{
int type;
long type;
$$.NAME = $1;
$$.LEFT = -1;
$$.RIGHT = -1;
@ -1280,7 +1280,7 @@ unlabeled_conditional_signal_assignment
waveform
Semicolon_ERR
{
int i;
long i;
struct fbout *fbout_pnt;
struct fbbus *fbbus_pnt;
struct fbreg *fbreg_pnt;
@ -1294,15 +1294,15 @@ unlabeled_conditional_signal_assignment
struct fbl_expr expr4;
struct fbl_expr expr5;
struct fbl_expr expr6;
int rev_flg = 0;
int left_bnd;
int right_bnd;
int left;
int right;
int in_bound;
int out_bound;
int sig_width;
int sig_conf;
long rev_flg = 0;
long left_bnd;
long right_bnd;
long left;
long right;
long in_bound;
long out_bound;
long sig_width;
long sig_conf;
expr4 = $5;
@ -1587,7 +1587,7 @@ unlabeled_selected_signal_assignment
...waveform__WHEN__choices..
Semicolon_ERR
{
int i;
long i;
struct fbout *fbout_pnt;
struct fbbus *fbbus_pnt;
struct fbreg *fbreg_pnt;
@ -1595,15 +1595,15 @@ unlabeled_selected_signal_assignment
struct fbbux *fbbux_pnt;
struct chain *abl_pnt;
struct fbl_expr expr1;
int rev_flg = 0;
int left_bnd;
int right_bnd;
int left;
int right;
int in_bound;
int out_bound;
int sig_width;
int sig_conf;
long rev_flg = 0;
long left_bnd;
long right_bnd;
long left;
long right;
long in_bound;
long out_bound;
long sig_width;
long sig_conf;
expr1 = fbl_crtabl (ABL_OR ,$8 ,$9,-1,-1);
if (FBL_BDDPNT != getlogbddnodeone())
@ -1979,13 +1979,13 @@ signal_assignment_statement
_LESym
waveform
Semicolon_ERR
{ unsigned int type;
int sig_conf,i;
int left_bnd,right_bnd;
int in_bound,out_bound;
int left ,right;
int rev_flg, debut;
int sig_width;
{ unsigned long type;
long sig_conf,i;
long left_bnd,right_bnd;
long in_bound,out_bound;
long left ,right;
long rev_flg, debut;
long sig_width;
struct chain *abl_pnt;
char extname[100];
struct fbl_expr expr;
@ -2225,9 +2225,9 @@ case_statement
CASE
Semicolon_ERR
{
unsigned int size=1;
unsigned int *size1;
int indice=0;
unsigned long size=1;
unsigned long *size1;
long indice=0;
struct choice_chain *ch;
struct fbcho **pnt;
struct fbcho *tab;
@ -2257,7 +2257,7 @@ case_statement
tab[indice].SIZE = -1;
tab[indice++].VALUE = namealloc("others");
(*pnt) = tab;
size1 = (unsigned int*) FBL_NM1LST->DATA;
size1 = (unsigned long*) FBL_NM1LST->DATA;
*size1 = size;
FBL_NM1LST = delchain(FBL_NM1LST,FBL_NM1LST);
FBL_OTHPNT = 0;
@ -2414,13 +2414,13 @@ choice
{
char *val;
char val2[256];
int left;
int right;
int in_bound;
int out_bound;
int left_bnd;
int right_bnd;
int sig_conf;
long left;
long right;
long in_bound;
long out_bound;
long left_bnd;
long right_bnd;
long sig_conf;
strcpy (val2,"B\"");
sig_conf = chktab (hshtab,$1.NAME,FBL_MODNAM,FBL_SIGDFN);
@ -2646,15 +2646,15 @@ primary
| name
{
struct fbl_expr expr1;
int left;
int right;
int left_bnd;
int right_bnd;
int in_bound;
int out_bound;
int mode;
int prtype;
int type;
long left;
long right;
long left_bnd;
long right_bnd;
long in_bound;
long out_bound;
long mode;
long prtype;
long type;
mode = chktab (hshtab,$1.NAME,FBL_MODNAM,FBL_SIGDFN);
type = chktab(hshtab,$1.NAME,FBL_MODNAM,FBL_TYPDFN);
@ -2769,7 +2769,7 @@ primary
else
{
expr1.IDENT = (char *)chktab(hshtab,$1.NAME,0,FBL_PNTDFN);
expr1.TYPE =(int)-1;/*dec, cast int */
expr1.TYPE =(long)-1;/*dec, cast long */
$$ = fbl_crtabl (NOPS,expr1,FBL_EMPSTR,in_bound,out_bound);
}
}
@ -2864,9 +2864,9 @@ attribute_name
{
char extname[100];
char *lclname;
int sig_conf;
int type;
int kind;
long sig_conf;
long type;
long kind;
struct fbl_expr expr1;
struct fbl_expr expr2;
struct chain *ptabl;
@ -3035,7 +3035,7 @@ char *key;
{
struct dct_entry *entry;
int i;
long i;
if (FBL_DCEHED == 0)
{
@ -3068,7 +3068,7 @@ char *key;
{
struct dct_recrd *recrd;
int i;
long i;
if (FBL_DCRHED == 0)
{
@ -3105,7 +3105,7 @@ static struct dct_entry **initab ()
{
struct dct_entry **head;
int i;
long i;
head = (struct dct_entry **)
mbkalloc (sizeof(struct dct_entry *) * FBL_HSZDFN);
@ -3121,12 +3121,12 @@ static void addtab (head,key_str,ctx_str,field,valu)
struct dct_entry **head;
char *key_str;
char *ctx_str;
int field;
long field;
long valu;
{
int found = 0;
int index;
long found = 0;
long index;
struct dct_entry *entry_pnt;
struct dct_recrd *recrd_pnt;
@ -3202,11 +3202,11 @@ static long chktab (head,key_str,ctx_str,field)
struct dct_entry **head;
char *key_str;
char *ctx_str;
int field;
long field;
{
int found = 0;
int valu = 0;
long found = 0;
long valu = 0;
struct dct_entry *entry_pnt;
struct dct_recrd *recrd_pnt;
@ -3277,7 +3277,7 @@ struct dct_entry **pt_hash;
struct dct_entry *pt_entry;
struct dct_entry *pt_nxtentry;
struct dct_recrd *pt_record;
int i;
long i;
if (pt_hash != 0)
{
@ -3310,8 +3310,8 @@ void *fbl_addstr (ptfig,object,mode,prtype,type,flag,name,left,right)
struct fbfig *ptfig;
char object;
int mode;
int prtype;
long mode;
long prtype;
unsigned char type;
char flag;
char *name;
@ -3511,19 +3511,19 @@ short right;
return (pnt);
}
int fbl_chkdcl (object,mode,type,flag,kind,constraint,conf)
long fbl_chkdcl (object,mode,type,flag,kind,constraint,conf)
char object;
int mode;
int type;
long mode;
long type;
char flag;
int kind;
long kind;
char constraint;
int *conf;
long *conf;
{
int errflg = 0;
int lclcnf = 0;
long errflg = 0;
long lclcnf = 0;
if (flag != constraint && constraint !='U' && flag !='U')
{
@ -3695,7 +3695,7 @@ int *conf;
return (errflg);
}
int val_type(name)
long val_type(name)
char *name;
{
if(!name)
@ -3760,7 +3760,7 @@ int val_type(name)
struct choice_chain *lastpnt;
struct ptype *type;
char *val;
unsigned int size;
unsigned long size;
{
struct choice_chain *pnt;
@ -3776,7 +3776,7 @@ int val_type(name)
struct choice_chain *pnt;
struct ptype *type;
char *val;
unsigned int size;
unsigned long size;
{
struct choice_chain *aux1;
struct choice_chain *aux2;

View File

@ -79,8 +79,8 @@ short right; /* array's right bound (= -1 if scalar) */
struct fbgen *ptgen;
struct chain *ptauxnam;
struct chain *ptauxnat;
int i;
int inc = 1;
long i;
long inc = 1;
ptgen = lastgeneric;
ptauxnam = nam_lst;
@ -141,8 +141,8 @@ char *str;
{
char *resstr;
int i;
int j=0;
long i;
long j=0;
resstr = (char *)mbkalloc(100);
resstr[0] = '\0';
@ -226,8 +226,8 @@ fbl_ablstr fbl_crtabl ( oper, expr1, expr2, left, right )
short oper;
fbl_ablstr expr1;
fbl_ablstr expr2;
int left;
int right;
long left;
long right;
{
char name[256];
@ -677,11 +677,11 @@ int right;
/* description : transform a ENUMERATE */
/* in a string of '0' and '1's */
/* ###--------------------------------------------------------------### */
int fbl_bintonum(str)
long fbl_bintonum(str)
char* str;
{
int res,i=0;
long res,i=0;
res = 0;
while(str[i])
@ -699,12 +699,12 @@ char* str;
/* in a string of '0' and '1's */
/* ###--------------------------------------------------------------### */
char *fbl_numtobin(num)
int num;
long num;
{
char val[256];
char *str;
int res,i=1;
long res,i=1;
val[255] = '\0';
res = num;
@ -724,18 +724,18 @@ int num;
/* in a string of '0' and '1's */
/* ###--------------------------------------------------------------### */
int fbl_tobin (trg,src,left,right)
long fbl_tobin (trg,src,left,right)
char *trg;
char *src;
int left;
int right;
long left;
long right;
{
char base;
int indx;
int j = 0;
int errflg = 0;
long indx;
long j = 0;
long errflg = 0;
char lcl_trg[256];
lcl_trg[0] = '\0';
@ -927,7 +927,7 @@ bddnode **pt_bdd; /* used to check if a choice is legal */
fbl_ablstr *pt_ablstr; /* tested expression */
{
char binstr[512];
int i;
long i;
struct chain *pt_auxabl;
bddnode *pt_bddres;
bddnode *pt_bddnew;
@ -936,8 +936,8 @@ fbl_ablstr *pt_ablstr; /* tested expression */
char nomvar[10];
struct chain *pt_newabl;
struct chain *pt_newabl2;
static int oth_flg=0;
static int last_width=0;
static long oth_flg=0;
static long last_width=0;
result->LIST_ABL = NULL;
result->IDENT = NULL;

View File

@ -57,11 +57,11 @@ extern ablexpr *bddToAbl () ;
extern struct chain * fbl_cpyabllst __P((struct chain *abllst));
extern fbl_ablstr fbl_cpyablstr __P((fbl_ablstr ablstr));
extern fbl_ablstr fbl_crtabl __P((short oper, fbl_ablstr expr1, fbl_ablstr expr2, int left, int right));
extern char * fbl_numtobin __P((int num));
extern int fbl_tobin __P((char *trg, char *src, int left, int right));
extern void loc_fbl_error __P((int code, char *str1));
extern void fbl_toolbug __P((int code, char *str1, char *str2, int nbr1));
extern fbl_ablstr fbl_crtabl __P((short oper, fbl_ablstr expr1, fbl_ablstr expr2, long left, long right));
extern char * fbl_numtobin __P((long num));
extern long fbl_tobin __P((char *trg, char *src, long left, long right));
extern void loc_fbl_error __P((long code, char *str1));
extern void fbl_toolbug __P((long code, char *str1, char *str2, long nbr1));
# define fbl_error( C, S ) \
fprintf( stderr, "%s.%d: ", autbasename(__FILE__,NULL),__LINE__ ); loc_fbl_error( C, S );

View File

@ -66,7 +66,7 @@ fbl_name;
struct g_type
{
int VALU;
long VALU;
char FLAG;
};
@ -74,7 +74,7 @@ struct choice_chain
{
struct choice_chain* NEXT;
char *VALUE;
unsigned int SIZE;
unsigned long SIZE;
struct ptype *INSTRUCTION;
};
@ -84,7 +84,7 @@ fbl_ablstr FBL_EMPSTR; /* empty structure used with NOT*/
struct bddnode *FBL_BDDPNT = NULL; /* BDD pointer */
static char *FBL_LBLNAM = NULL; /* label */
static int FBL_NUMTYP = 0; /* nombre de type */
static long FBL_NUMTYP = 0; /* nombre de type */
static struct chain *FBL_NM1LST = NULL; /* 1-st name liste */
static struct chain *FBL_GRDLST = NULL; /* list of guard's ABL */
static struct chain *FBL_CNDLST = NULL; /* list of conditions (ABL) */
@ -102,22 +102,22 @@ static authtable *FBL_HASH_ASG_FSM = (authtable *)0;
extern char FBL_ERRFLG; /* set to 1 in case of error */
extern struct fbfig *FBL_HEADFIG; /* head of fbfigs */
extern int FBL_LINNUM;
extern int FBL_NUMPTP;
extern long FBL_LINNUM;
extern long FBL_NUMPTP;
static struct dct_entry **hshtab;
extern struct fbgen * fbl_addgen __P((struct fbgen *lastgeneric, struct chain *nam_lst, struct chain *nat_lst, char *type, short left, short right));
extern int val_type __P((char *name));
extern long val_type __P((char *name));
extern int fbl_tobin __P((char *trg, char *src, int left, int right));
extern int fbl_bintonum __P((char *str));
extern fbl_ablstr fbl_crtabl __P((short oper, fbl_ablstr expr1, fbl_ablstr expr2, int left, int right));
extern long fbl_tobin __P((char *trg, char *src, long left, long right));
extern long fbl_bintonum __P((char *str));
extern fbl_ablstr fbl_crtabl __P((short oper, fbl_ablstr expr1, fbl_ablstr expr2, long left, long right));
extern fbl_ablstr fbl_cpyablstr __P((fbl_ablstr ablstr));
extern void fbl_select();
extern char * fbl_stostr __P((char *str));
extern void fbl_y_error __P((char *str));
extern int fbl_y_lex __P(());
extern long fbl_y_lex __P(());

View File

@ -1,5 +1,5 @@
/*
* $Id: dpgen_Adder.c,v 1.2 2002/09/30 16:20:21 czo Exp $
* $Id: dpgen_Adder.c,v 1.3 2009/06/14 13:51:43 ludo Exp $
*
* /----------------------------------------------------------------\
* | |
@ -191,7 +191,7 @@ static void RSA_netlist ()
"add_sub",
GENLIB_ELM ("INB" , i),
GENLIB_ELM ("XORB", i),
"VDD", "VSS", 0);
"VDD", "VSS", NULL);
}
@ -202,26 +202,26 @@ static void RSA_netlist ()
GENLIB_ELM ("XORB", i),
GENLIB_NAME ("GI_0_%d", i),
GENLIB_NAME ("PI_0_%d", i),
"VDD", "VSS", 0);
"VDD", "VSS", NULL);
}
/* Calcul somme et retenue du LSB */
GENLIB_LOINS ("fulladder_x2", "S0",
GENLIB_ELM ("INA",0),
GENLIB_ELM ("INA",0),
GENLIB_ELM ("INA",0),
GENLIB_ELM ("INA",0),
GENLIB_ELM ("XORB",0),
GENLIB_ELM ("XORB",0),
GENLIB_ELM ("XORB",0),
GENLIB_ELM ("XORB",0),
GENLIB_ELM ("INA",NULL),
GENLIB_ELM ("INA",NULL),
GENLIB_ELM ("INA",NULL),
GENLIB_ELM ("INA",NULL),
GENLIB_ELM ("XORB",NULL),
GENLIB_ELM ("XORB",NULL),
GENLIB_ELM ("XORB",NULL),
GENLIB_ELM ("XORB",NULL),
"add_sub",
"add_sub",
"add_sub",
"R_1",
GENLIB_ELM ("S", 0),
"VDD", "VSS", 0);
GENLIB_ELM ("S", NULL),
"VDD", "VSS", NULL);
for (n = 1; n <= ilog2 (LV_N); n++) {
@ -233,7 +233,7 @@ static void RSA_netlist ()
GENLIB_NAME ("R_%d" , iexp2 (n - 1)),
GENLIB_NAME ("GI_%d_%d", ilog2 (isr), iexp2(n - 1) + isr),
GENLIB_NAME ("R_%d" , iexp2 (n - 1) + isr + 1),
"VDD", "VSS", 0);
"VDD", "VSS", NULL);
}
/* Calcul des PI GI intermediaires (PG) */
@ -245,7 +245,7 @@ static void RSA_netlist ()
GENLIB_NAME ("PI_%d_%d" , n - 1, ipg - 1),
GENLIB_NAME ("PI_%d_%d" , ilog2 (npg), inpg),
GENLIB_NAME ("PI_%d_%d" , n, inpg),
"VDD", "VSS", 0);
"VDD", "VSS", NULL);
GENLIB_LOINS("oa22_x2",
GENLIB_NAME ("PG_i2_%d_%d", n, inpg),
@ -253,7 +253,7 @@ static void RSA_netlist ()
GENLIB_NAME ("GI_%d_%d" , n - 1, ipg - 1),
GENLIB_NAME ("GI_%d_%d" , ilog2 (npg), inpg),
GENLIB_NAME ("GI_%d_%d" , n, inpg),
"VDD", "VSS", 0);
"VDD", "VSS", NULL);
}
}
}
@ -266,7 +266,7 @@ static void RSA_netlist ()
GENLIB_NAME ("PI_0_%d", i),
GENLIB_NAME ("R_%d", i),
GENLIB_ELM ("S", i),
"VDD","VSS",0);
"VDD","VSS",NULL);
}

View File

@ -1,5 +1,5 @@
/*
* $Id: dpgen_Nul.c,v 1.2 2002/09/30 16:20:22 czo Exp $
* $Id: dpgen_Nul.c,v 1.3 2009/06/14 13:51:43 ludo Exp $
*
* /----------------------------------------------------------------\
* | |
@ -101,7 +101,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext)
s64printf("i => i0[%ld]", aOffset),
"nq => nul",
"vdd => vdd",
"vss => vss", 0);
"vss => vss", NULL);
} else {
LV_prevTreeOut = aOffset;
@ -119,7 +119,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext)
s64printf("i => i0[%ld]", aOffset),
s64printf("nq => nul_%ld", aOffset),
"vdd => vdd",
"vss => vss", 0);
"vss => vss", NULL);
}
LV_oneShift = 1; aOffset++;
@ -184,7 +184,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext)
sInstance,
sI0, sI1, sQ,
"vdd => vdd",
"vss => vss", 0);
"vss => vss", NULL);
}
}
@ -225,7 +225,7 @@ static long create_Netlist_Tree (aOffset, amDepth, amDepthNext)
s64printf("i1 => nul_%ld", i1_index),
sQ,
"vdd => vdd",
"vss => vss", 0);
"vss => vss", NULL);
LV_prevTreeOut = cell_index;
@ -258,7 +258,7 @@ static void create_Netlist ()
offset = 0;
depthNext = get_depth (LV_N, 0);
depthNext = get_depth (LV_N, NULL);
do {
depth = depthNext;
@ -398,7 +398,7 @@ static void create_Layout ()
offset = 0;
depthNext = get_depth (LV_N, 0);
depthNext = get_depth (LV_N, NULL);
do {
depth = depthNext;

View File

@ -71,7 +71,7 @@
#include "mbkgen.h"
#define __GENLIB__
#include "mgn.h"
static char rcsid[] = "$Id: genlib.c,v 1.12 2003/02/06 09:52:14 fred Exp $";
static char rcsid[] = "$Id: genlib.c,v 1.13 2009/06/14 13:51:43 ludo Exp $";
/*******************************************************************************
* global variables used in genlib *
@ -89,7 +89,7 @@ static chain_list *lolist;
static char *checkname();
static void toolong();
static int hassep();
int is_bus();
int is_bus(char *name);
int bus_decod();
/*******************************************************************************
@ -281,8 +281,7 @@ chain_list *c = NULL;
/*******************************************************************************
* function DEF_PHFIG *
*******************************************************************************/
void genDEF_PHFIG(name)
char *name;
void genDEF_PHFIG( char *name )
{
phfig_list *ptfig;
char *s;
@ -3081,8 +3080,7 @@ chain_list *ptchain = NULL;
/*******************************************************************************
* function LOSIG *
*******************************************************************************/
void genLOSIG(signame)
char *signame;
void genLOSIG( char *signame )
{
losig_list *ptsig;
chain_list *ptchain, *ptchain1 = NULL;
@ -3167,8 +3165,7 @@ char *s;
/*******************************************************************************
* function LOCON *
*******************************************************************************/
void genLOCON(conname, direction, signame)
char *conname, direction, *signame;
void genLOCON( char *conname, char direction, char *signame )
{
losig_list * ptsig;
chain_list * ptchain, *ptchain1 = NULL, *ptchain2 = NULL;
@ -3336,10 +3333,7 @@ char *s = NULL; /* To make -Wall happy */
/*******************************************************************************
* function LOTRS *
*******************************************************************************/
void genLOTRS(type, width, length, grid, source, drain)
char type;
unsigned short width, length;
char *grid, *source, *drain;
void genLOTRS( char type, unsigned short width, unsigned short length, char *grid, char *source, char *drain )
{
int i = 0;
losig_list *s_grid = NULL, *s_source = NULL, *s_drain = NULL, *ptsig = NULL;
@ -3390,8 +3384,7 @@ char *signame = NULL; /* To make -Wall happy */
/*******************************************************************************
* function LOSIGMERGE *
*******************************************************************************/
void genLOSIGMERGE(sig1, sig2)
char *sig1, *sig2;
void genLOSIGMERGE( char *sig1, char *sig2 )
{
losig_list *ls0, *ls1, *ls2;
locon_list *c;
@ -3680,9 +3673,7 @@ char *s, *t;
/*******************************************************************************
* function FLATTEN_LOFIG *
*******************************************************************************/
void genFLATTEN_LOFIG(insname, concat)
char *insname;
char concat;
void genFLATTEN_LOFIG( char *insname, char concat )
{
long i = 0;
losig_list *s;
@ -3705,8 +3696,7 @@ losig_list *s;
/*******************************************************************************
* flattens FLATTEN_ALL_LOINS *
*******************************************************************************/
void genFLATTEN_ALL_LOINS(concat, catal)
char concat, catal;
void genFLATTEN_ALL_LOINS( char concat, int catal )
{
chain_list *c, *namelist = NULL;
loins_list *l;
@ -3779,10 +3769,7 @@ chain_list *ilist = NULL;
/*******************************************************************************
* function SC_PLACE *
*******************************************************************************/
void genSC_PLACE(insname, sym, x, y)
char *insname;
int sym;
long x, y;
void genSC_PLACE( char *insname, int sym, long x, long y )
{
loins_list * ptins;
char *s = namealloc(insname);
@ -3816,9 +3803,7 @@ char *s = namealloc(insname);
/*******************************************************************************
* function SC_RIGHT *
*******************************************************************************/
void genSC_RIGHT(insname, sym)
char *insname;
int sym;
void genSC_RIGHT( char *insname, int sym )
{
loins_list * ptins;
char *s = namealloc(insname);
@ -3852,9 +3837,7 @@ char *s = namealloc(insname);
/*******************************************************************************
* function SC_LEFT *
*******************************************************************************/
void genSC_LEFT(insname, sym)
char *insname;
int sym;
void genSC_LEFT( char *insname, int sym )
{
loins_list *ptins;
char *s = namealloc(insname);
@ -3886,9 +3869,7 @@ char *s = namealloc(insname);
/*******************************************************************************
* function SC_TOP *
*******************************************************************************/
void genSC_TOP(insname, sym)
char *insname;
int sym;
void genSC_TOP( char *insname, int sym )
{
loins_list *ptins;
char *s = namealloc(insname);
@ -3920,9 +3901,7 @@ char *s = namealloc(insname);
/*******************************************************************************
* function SC_BOTTOM *
*******************************************************************************/
void genSC_BOTTOM(insname, sym)
char *insname;
int sym;
void genSC_BOTTOM( char *insname, int sym )
{
loins_list *ptins;
char *s = namealloc(insname);
@ -3955,9 +3934,7 @@ char *s = namealloc(insname);
/*******************************************************************************
* BUS allows the definition of a bus for logical operations *
*******************************************************************************/
char *genBUS(signame, from, to)
char *signame;
long from, to;
char *genBUS( char *signame, long from, long to )
{
char sigid[100];
@ -3974,9 +3951,7 @@ char sigid[100];
/*******************************************************************************
* ELM allows the definition of a bus element for logical operations *
*******************************************************************************/
char *genELM(signame, number)
char *signame;
long number;
char *genELM( char *signame, long number )
{
char sigid[100];
@ -3994,9 +3969,7 @@ char sigid[100];
* Do not forget to free a vectorized string that comes out from this
* function ! */
char *genUSED(s, c)
char *s;
int c;
char *genUSED( char *s, int c )
/* Czo */
{
char *t, *u;
@ -4015,8 +3988,7 @@ char *t, *u;
* loads the net-list description of a cell and create what's necessary to *
* physically describe it *
*******************************************************************************/
void genDEF_PHSC(name)
char *name;
void genDEF_PHSC( char *name )
{
lofig_list *ptlofig;
@ -4192,8 +4164,7 @@ long d;
* something like "abcd[efgh]" will exit on a syntax error *
* return 1 if "abcd[23:45]" 0 if "abcd" or "abdc[12]" *
*******************************************************************************/
int is_bus(signame)
char *signame;
int is_bus( char *signame )
{
char *t = signame, c;
char is_a_bus = 0, flag = 0;
@ -4251,9 +4222,7 @@ char i, where = 0; /* used to say exactly where */
* function bus_decod *
* decods the bus name so buses can be used in LOINS & LOCON *
*******************************************************************************/
int bus_decod(busname, signame, first, last)
char *busname, *signame;
long *first, *last;
int bus_decod( char *busname, char *signame, long *first, long *last )
{
char *space;
char *buffer = mbkstrdup(busname);
@ -4276,8 +4245,7 @@ char *buffer = mbkstrdup(busname);
* function toolong *
* cheks the validity of the lentgh of a string *
*******************************************************************************/
static void toolong(length)
long length;
static void toolong( long length )
{
if (length > BUFSIZ) {
(void)fflush(stdout);
@ -4290,8 +4258,7 @@ long length;
/*******************************************************************************
* checkname : check for busses with single index *
*******************************************************************************/
static char *checkname(name)
char *name;
static char *checkname( char *name )
{
static char str[256];
char *s, *t;
@ -4324,8 +4291,7 @@ end:
/*******************************************************************************
* hassep : check for legal instance names *
*******************************************************************************/
static int hassep(s)
char *s;
static int hassep( char *s )
{
for (; *s != '\0'; s++)
if (*s == '[' || *s == ']' ||

View File

@ -94,18 +94,18 @@ extern void genSAVE_LOFIG();
extern void genLOINS(char *, ...);
extern void genLOINSE(char *, ...);
extern void genLOINSA();
extern void genLOTRS();
extern void genLOCON();
extern void genLOSIGMERGE();
extern void genFLATTEN_LOFIG();
extern void genFLATTEN_ALL_LOINS();
extern void genDEF_PHSC();
extern void genLOTRS( char type, unsigned short width, unsigned short length, char *grid, char *source, char *drain );
extern void genLOCON( char *conname, char direction, char *signame );
extern void genLOSIGMERGE( char *sig1, char *sig2 );
extern void genFLATTEN_LOFIG( char *insname, char concat );
extern void genFLATTEN_ALL_LOINS( char concat, int catal );
extern void genDEF_PHSC( char *name );
extern void genSAVE_PHSC();
extern void genSC_PLACE();
extern void genSC_RIGHT();
extern void genSC_LEFT();
extern void genSC_TOP();
extern void genSC_BOTTOM();
extern void genSC_PLACE( char *insname, int sym, long x, long y );
extern void genSC_RIGHT( char *insname, int sym );
extern void genSC_LEFT( char *insname, int sym );
extern void genSC_TOP( char *insname, int sym );
extern void genSC_BOTTOM( char *insname, int sym );
extern void genSC_CHANNEL();
extern void genSC_CON_CHANNEL();
extern void genLOGEN(char *, int, ...);

View File

@ -3140,7 +3140,7 @@ void CallbackChangeSegmentLayer( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalSegmentLayer = (int)ClientData;
GraalSegmentLayer = (long)ClientData;
GraalSegmentWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalSegmentLayer ][0];
if ( GraalSegmentWire == GRAAL_FALSE )
@ -3310,7 +3310,7 @@ void CallbackChangeViaType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalViaType = (int)ClientData;
GraalViaType = (long)ClientData;
GraalChangeEditMode( GRAAL_CREATE_VIA,
GraalPromptCreateVia );
@ -3409,7 +3409,7 @@ void CallbackChangeBigViaType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalBigViaType = (int)ClientData;
GraalBigViaType = (long)ClientData;
GraalChangeEditMode( GRAAL_CREATE_BIGVIA,
GraalPromptCreateBigVia );
@ -3509,7 +3509,7 @@ void CallbackChangeTransistorType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalTransistorType = (int)ClientData;
GraalTransistorType = (long)ClientData;
GraalTransistorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorType ][0];
if ( GraalTransistorWire == GRAAL_FALSE )
@ -3680,7 +3680,7 @@ void CallbackChangeConnectorLayer( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalConnectorLayer = (int)ClientData;
GraalConnectorLayer = (long)ClientData;
GraalConnectorWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorLayer ][0];
GraalChangeEditMode( GRAAL_CREATE_CONNECTOR,
@ -3754,7 +3754,7 @@ void CallbackChangeConnectorOrient( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalConnectorOrient = (int)ClientData;
GraalConnectorOrient = (long)ClientData;
GraalChangeEditMode( GRAAL_CREATE_CONNECTOR,
GraalPromptCreateConnector );
@ -3803,7 +3803,7 @@ void CallbackChangeReferenceType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalReferenceType = (int)ClientData;
GraalReferenceType = (long)ClientData;
GraalChangeEditMode( GRAAL_CREATE_REFERENCE,
GraalPromptCreateReference );
@ -3883,7 +3883,7 @@ void CallbackChangeInstanceSym( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalInstanceSym = (int)ClientData;
GraalInstanceSym = (long)ClientData;
GraalChangeEditMode( GRAAL_CREATE_INSTANCE,
GraalPromptCreateInstance );

View File

@ -4422,7 +4422,7 @@ void CallbackModifySegmentLayer( MyWidget, ClientData, CallData )
rdsbegin();
NewLayer = (int)ClientData;
NewLayer = (long)ClientData;
if ( ( GraalSegmentMName == (char *)0 ) &&
( ( NewLayer >= CALU1 ) &&
@ -4547,7 +4547,7 @@ void CallbackModifyTransistorType( MyWidget, ClientData, CallData )
rdsbegin();
GraalTransistorMType = (int)ClientData;
GraalTransistorMType = (long)ClientData;
MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalTransistorMType ][0];
if ( GraalTransistorMWidth < MinWidth ) GraalTransistorMWidth = MinWidth;
@ -4662,7 +4662,7 @@ void CallbackModifyConnectorLayer( MyWidget, ClientData, CallData )
rdsbegin();
GraalConnectorMLayer = (int)ClientData;
GraalConnectorMLayer = (long)ClientData;
MinWidth = GRAAL_SEGMENT_VALUE_TABLE[ GraalConnectorMLayer ][0];
if ( GraalConnectorMWidth < MinWidth ) GraalConnectorMWidth = MinWidth;
@ -4686,7 +4686,7 @@ void CallbackModifyConnectorOrient( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalConnectorMOrient = (int)ClientData;
GraalConnectorMOrient = (long)ClientData;
GraalPromptModifyConnector();
@ -4796,7 +4796,7 @@ void CallbackModifyReferenceType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalReferenceMType = (int)ClientData;
GraalReferenceMType = (long)ClientData;
GraalPromptModifyReference();
@ -4887,7 +4887,7 @@ void CallbackModifyInstanceSym( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalInstanceMSym = (int)ClientData;
GraalInstanceMSym = (long)ClientData;
GraalPromptModifyInstance();
@ -4997,7 +4997,7 @@ void CallbackModifyViaType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalViaMType = (int)ClientData;
GraalViaMType = (long)ClientData;
GraalPromptModifyVia();
@ -5089,7 +5089,7 @@ void CallbackModifyBigViaType( MyWidget, ClientData, CallData )
{
rdsbegin();
GraalViaMType = (int)ClientData;
GraalViaMType = (long)ClientData;
GraalPromptModifyBigVia();

View File

@ -3157,7 +3157,7 @@ void CallbackLayerVisible( MyWidget, ClientData, CallData )
{
rdsbegin();
if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)ClientData ] == 0 )
if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (long)ClientData ] == 0 )
{
GraalSetLayerVisible( ClientData );
}
@ -3179,7 +3179,7 @@ void CallbackNameVisible( MyWidget, ClientData, CallData )
{
rdsbegin();
if ( GRAAL_RDS_ACTIVE_NAME_TABLE[ (int)ClientData ] == 0 )
if ( GRAAL_RDS_ACTIVE_NAME_TABLE[ (long)ClientData ] == 0 )
{
GraalSetNameVisible( ClientData );
}
@ -3201,7 +3201,7 @@ void CallbackLayerInvisible( MyWidget, ClientData, CallData )
{
rdsbegin();
if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (int)ClientData ] == 1 )
if ( GRAAL_RDS_ACTIVE_LAYER_TABLE[ (long)ClientData ] == 1 )
{
GraalSetLayerInvisible( ClientData );
}
@ -3223,7 +3223,7 @@ void CallbackNameInvisible( MyWidget, ClientData, CallData )
{
rdsbegin();
if ( GRAAL_RDS_ACTIVE_NAME_TABLE[ (int)ClientData ] == 1 )
if ( GRAAL_RDS_ACTIVE_NAME_TABLE[ (long)ClientData ] == 1 )
{
GraalSetNameInvisible( ClientData );
}

View File

@ -36,15 +36,15 @@ static int primes[] = {
void htremove (ht_t * htable)
{
int i;
for (i = 1; i < (int)htable[0]; i++)
long i;
for (i = 1; i < (long)htable[0]; i++)
freechain (htable[i]);
free (htable);
}
ht_t *htinit (int size)
ht_t *htinit (long size)
{
int i;
long i;
ht_t *htable;
/* prend le premier nombre premier au dela de size */
@ -64,12 +64,12 @@ ht_t *htinit (int size)
return htable;
}
static int hash (ht_t * htable, char *key)
static long hash (ht_t * htable, char *key)
{
int alveole = 0;
int length = strlen (key);
int segment;
int l;
long alveole = 0;
long length = strlen (key);
long segment;
long l;
if ((key == NULL) || (length == 0))
{
@ -81,13 +81,13 @@ static int hash (ht_t * htable, char *key)
segment = 0xFFFF & ((key[l] << 8) | key[l + 1]);
alveole = alveole ^ ((segment << 1) | (segment >> 15));
}
alveole %= (int) htable[0]; /* htable[0] == la taille de la table */
alveole %= (long) htable[0]; /* htable[0] == la taille de la table */
return (alveole + 1); /* +1 car on ne doit rien mettre dans case 0 */
}
chain_list *htget (ht_t * htable, char *key)
{
int alveole = hash (htable, key);
long alveole = hash (htable, key);
chain_list *p;
for (p = htable[alveole]; p && strcmp (p->DATA, key); p = p->NEXT);
@ -96,7 +96,7 @@ chain_list *htget (ht_t * htable, char *key)
chain_list *htset (ht_t * htable, char *key)
{
int alveole = hash (htable, key);
long alveole = hash (htable, key);
chain_list *p;
for (p = htable[alveole]; p && strcmp (p->DATA, key); p = p->NEXT);

View File

@ -29,7 +29,7 @@
typedef chain_list *ht_t; /* def d'1 table de hachage table de htele_t */
extern ht_t *htinit (int size);
extern ht_t *htinit (long size);
extern void htremove (ht_t * htable);
extern chain_list *htset (ht_t * htable, char *key);
extern chain_list *htget (ht_t * htable, char *key);

View File

@ -30,7 +30,7 @@
/* $Id: log.h,v 1.5 2005/04/15 08:38:49 alliance Exp $ */
/* $Id: log.h,v 1.6 2009/06/14 13:51:47 ludo Exp $ */
#ifndef LUC_LOG_H
#define LUC_LOG_H
@ -75,7 +75,7 @@
typedef struct elemTH
{
char *key;
int value;
long value;
}
*pElemTH;
@ -86,9 +86,9 @@ typedef struct elemTH
typedef struct tableTH
{
int length;
long length;
pElemTH pElem;
int count;
long count;
}
*pTH;
@ -108,7 +108,7 @@ typedef struct tableTH
#define CADR(expr) CAR(CDR(expr))
#define ATOM(expr) (!expr->NEXT)
#define VALUE_ATOM(expr) (char *) expr->DATA
#define OPER(expr) ((int)(CAR(expr))->DATA)
#define OPER(expr) ((long)(CAR(expr))->DATA)
@ -186,9 +186,9 @@ typedef struct node
typedef struct tableBdd
{
int lenTableBdd;
long lenTableBdd;
pNode *pBdd;
int compteur;
long compteur;
}
*pTableBdd;
@ -210,7 +210,7 @@ typedef struct vertexLoc
typedef struct tableLoc
{
int lenTabLoc;
long lenTabLoc;
pVertexLoc pLoc;
}
*pTableLoc;
@ -236,7 +236,7 @@ struct systemBdd
chain_list *lpAT;
pTableBdd pRT;
pNode pAT;
int indiceAT;
long indiceAT;
pTableLoc pMC;
};
extern struct systemBdd sysBdd;
@ -255,24 +255,24 @@ extern pNode one, zero;
/* Prototypes from log_bdd0.c */
extern pNode initVertexBdd __P((int index, pNode high, pNode low));
extern pNode initVertexBdd __P((long index, pNode high, pNode low));
extern pNode createNodeTermBdd __P((short index));
extern void initializeBdd __P((int size));
extern void destroyBdd __P((int level));
extern void initializeBdd __P((long size));
extern void destroyBdd __P((long level));
extern void resetBdd __P(());
extern int numberNodeAllBdd __P(());
extern int numberNodeBdd __P((pNode pBdd));
extern int countNode __P((pNode pt));
extern int countNodeTdg __P((pNode pt));
extern long numberNodeAllBdd __P(());
extern long numberNodeBdd __P((pNode pBdd));
extern long countNode __P((pNode pt));
extern long countNodeTdg __P((pNode pt));
extern chain_list * muxAbl __P((pNode high, pNode low, chain_list *a, char **tabName));
extern chain_list * bddToAbl __P((pNode pt, char **tabName));
extern void displayBddLoc __P((short level, pNode pt));
extern void displayBdd __P((pNode pBdd, int level));
extern void assignNumNodeBdd __P((pNode bdd, pTH vTable, int *pNodeNumber));
extern void displayBdd __P((pNode pBdd, long level));
extern void assignNumNodeBdd __P((pNode bdd, pTH vTable, long *pNodeNumber));
extern void displayGraphicBdd __P((pNode pBdd));
extern void displayBddName __P((short level, pNode pt, char **TabName));
extern pNode notBdd __P((pNode pBdd));
extern pNode applyTerm __P((int oper, short index, pNode pBdd));
extern pNode applyTerm __P((long oper, short index, pNode pBdd));
extern pNode applyBinBdd __P((short oper, pNode pBdd1, pNode pBdd2));
extern pNode applyBdd __P((short oper, chain_list *pt));
extern pNode cnstBdd __P((pNode pBdd1, pNode pBddGc));
@ -282,11 +282,11 @@ extern pNode one, zero;
extern pNode simplifPlusDcZeroBdd __P((pNode pGon, pNode pGdc));
extern pNode simplifDcOneBdd __P((pNode pGon, pNode pGdc));
extern pNode simplifDcOneFPGABdd __P((pNode pGon, pNode pGdc));
extern pNode composeBdd __P((pNode pBdd1, pNode pBdd2, int index));
extern pNode composeBdd __P((pNode pBdd1, pNode pBdd2, long index));
extern chain_list * addListBdd __P((chain_list *pt, pNode pBdd));
extern int oneBdd __P((pNode pBdd));
extern int zeroBdd __P((pNode pBdd));
extern int equalBdd __P((pNode pBdd1, pNode pBdd2));
extern long oneBdd __P((pNode pBdd));
extern long zeroBdd __P((pNode pBdd));
extern long equalBdd __P((pNode pBdd1, pNode pBdd2));
extern void markBdd __P((pNode pBdd, short value));
extern pNode upVarBdd __P((pNode pF, pNode pFoldIndex, short newIndex));
extern void markAllBdd __P((short value));
@ -296,12 +296,12 @@ extern pNode one, zero;
extern pNode regenereBdd __P((pNode pBdd, struct systemBdd *sysCible, pTH pTHNode));
extern void gcNodeBdd __P((chain_list *pt));
extern void rempTabIndex __P((pNode pt, char *tabIndex));
extern chain_list * supportIndexBdd __P((pNode pt, int sens));
extern chain_list * supportIndexBdd __P((pNode pt, long sens));
/* Prototypes from log_bdd1.c */
extern pCircuit initializeCct __P((char *name, int nbI, int nbO));
extern pCircuit initializeCct __P((char *name, long nbI, long nbO));
extern void resetCct __P((pCircuit pC));
extern void destroyCct __P((pCircuit pC));
extern pNode searchOutputCct __P((pCircuit pC, char *name));
@ -310,22 +310,22 @@ extern pNode one, zero;
extern short searchInputCct __P((pCircuit pC, char *name));
extern short addInputCct __P((pCircuit pC, char *name));
extern void delInputCct __P((pCircuit pC, char *name));
extern void displayCct __P((pCircuit pC, int mode));
extern void displayCct __P((pCircuit pC, long mode));
extern void composeCct __P((pCircuit pC, char *name, pNode pt));
extern void constraintCct __P((pCircuit pC, pNode pt));
extern void proofCct __P((pCircuit pC1, pCircuit pC2));
extern pNode ablToBddCct __P((pCircuit pC, chain_list *expr));
extern void cpOrderCct __P((pCircuit CC1, pCircuit CC2));
extern void upVarCct __P((pCircuit pC, pNode ptOldIndex, short newIndex));
extern int numberNodeCct __P((pCircuit pC));
extern int numberNodeTdgCct __P((pCircuit pC));
extern long numberNodeCct __P((pCircuit pC));
extern long numberNodeTdgCct __P((pCircuit pC));
extern chain_list * bddToAblCct __P((pCircuit pC, pNode pBdd));
extern void gcNodeCct __P((pCircuit pC));
/* Prototypes from log_prefbib.c */
extern char * gensym_abl __P((char *name, int num));
extern char * gensym_abl __P((char *name, long num));
extern void ablError __P((chain_list *expr, char *func));
extern chain_list * createAtom __P((char *name));
extern chain_list * createExpr __P((short oper));
@ -339,86 +339,86 @@ extern pNode one, zero;
extern void displayExprInt __P((chain_list *expr));
extern void displayExpr __P((chain_list *expr));
extern void displayInfExpr __P((chain_list *expr));
extern char * exprToCharInt __P((chain_list *expr, int mode, char *chaine, int *taille));
extern char * exprToChar __P((chain_list *expr, int mode));
extern char * identExprInt __P((chain_list *expr, char *chaine, int *taille));
extern char * exprToCharInt __P((chain_list *expr, long mode, char *chaine, long *taille));
extern char * exprToChar __P((chain_list *expr, long mode));
extern char * identExprInt __P((chain_list *expr, char *chaine, long *taille));
extern char * identExpr __P((chain_list *expr));
extern int profExpr __P((chain_list *expr));
extern int profAOExpr __P((chain_list *expr));
extern long profExpr __P((chain_list *expr));
extern long profAOExpr __P((chain_list *expr));
extern chain_list * mapCarExpr __P((chain_list *(*func)(), short oper, chain_list *expr));
extern void mapExpr __P((void (*func)(), chain_list *expr));
extern int anyExpr __P((int (*func)(), chain_list *expr));
extern int everyExpr __P((int (*func)(), chain_list *expr));
extern int searchOperExpr __P((chain_list *expr, short oper));
extern long anyExpr __P((long (*func)(), chain_list *expr));
extern long everyExpr __P((long (*func)(), chain_list *expr));
extern long searchOperExpr __P((chain_list *expr, short oper));
extern short searchExprLow __P((chain_list *expr, char *name));
extern int searchExpr __P((chain_list *expr, char *name));
extern int equalExpr __P((chain_list *expr1, chain_list *expr2));
extern int equalVarExpr __P((chain_list *expr1, chain_list *expr2));
extern int lengthExpr __P((chain_list *expr));
extern int numberOperBinExpr __P((chain_list *expr));
extern int numberAtomExpr __P((chain_list *expr));
extern long searchExpr __P((chain_list *expr, char *name));
extern long equalExpr __P((chain_list *expr1, chain_list *expr2));
extern long equalVarExpr __P((chain_list *expr1, chain_list *expr2));
extern long lengthExpr __P((chain_list *expr));
extern long numberOperBinExpr __P((chain_list *expr));
extern long numberAtomExpr __P((chain_list *expr));
extern chain_list * copyExpr __P((chain_list *expr));
extern void substPhyExpr __P((chain_list *expr1, char *name, chain_list *expr2));
extern chain_list * substExpr __P((chain_list *expr1, char *name, chain_list *expr2));
extern chain_list * devXorExpr __P((chain_list *expr));
extern chain_list * devXor2Expr __P((chain_list *expr));
extern chain_list * flatPolarityExpr __P((chain_list *expr, int signe));
extern chain_list * flatPolarityExpr __P((chain_list *expr, long signe));
extern void flatArityExpr __P((chain_list *expr));
extern void supportChain_listExprInt __P((chain_list *expr, chain_list **ppCL));
extern chain_list * supportChain_listExpr __P((chain_list *expr));
extern void supportPtype_listExprInt __P((chain_list *expr, ptype_list **ppCL));
extern ptype_list * supportPtype_listExpr __P((chain_list *expr));
extern chain_list * maxExpr __P((chain_list *expr, int (*func)()));
extern chain_list * minExpr __P((chain_list *expr, int (*func)()));
extern void sortExpr __P((chain_list *expr, int (*func)(), int direction));
extern int funcNormExpr __P((chain_list *expr));
extern chain_list * maxExpr __P((chain_list *expr, long (*func)()));
extern chain_list * minExpr __P((chain_list *expr, long (*func)()));
extern void sortExpr __P((chain_list *expr, long (*func)(), long direction));
extern long funcNormExpr __P((chain_list *expr));
extern void normExpr __P((chain_list *expr));
extern void deleteNumExpr __P((chain_list *expr, int i));
extern chain_list * searchNumExpr __P((chain_list *expr, int i));
extern int numberOccExpr __P((chain_list *exp, char *name));
extern void deleteNumExpr __P((chain_list *expr, long i));
extern chain_list * searchNumExpr __P((chain_list *expr, long i));
extern long numberOccExpr __P((chain_list *exp, char *name));
extern void changeOperExpr __P((chain_list *expr, short oper));
extern chain_list * simplif10Expr __P((chain_list *expr));
extern chain_list * simplifNotExpr __P((chain_list *exp));
extern chain_list * charToExprInt __P((char *stringExpr, int *cptCar));
extern chain_list * charToExprInt __P((char *stringExpr, long *cptCar));
extern chain_list * charToExpr __P((char *stringExpr));
extern char * tokenExpr __P((char *stringExpr, int *cptCar));
extern int PMExprInt __P((chain_list *expr, chain_list *pattern, ptype_list **bind));
extern int PMExpr __P((chain_list *expr, chain_list *pattern));
extern char * tokenExpr __P((char *stringExpr, long *cptCar));
extern long PMExprInt __P((chain_list *expr, chain_list *pattern, ptype_list **bind));
extern long PMExpr __P((chain_list *expr, chain_list *pattern));
/* Prototypes from log_thash.c */
extern int hashTH __P((char *pn));
extern pTH createTH __P((int len));
extern long hashTH __P((char *pn));
extern pTH createTH __P((long len));
extern void destroyTH __P((pTH pTable));
extern int searchTH __P((pTH pTable, char *key));
extern int addTH __P((pTH pTable, char *key, int value));
extern int addExistTH __P((pTH pTable, char *key, int value));
extern int deleteTH __P((pTH pTable, char *key));
extern long searchTH __P((pTH pTable, char *key));
extern long addTH __P((pTH pTable, char *key, long value));
extern long addExistTH __P((pTH pTable, char *key, long value));
extern long deleteTH __P((pTH pTable, char *key));
extern void displayTH __P((pTH pTable));
extern void reAllocTH __P((pTH pTable));
/* Prototypes from log_thashbdd.c */
extern int hashBdd __P((int index, pNode high, pNode low));
extern int newKeyBdd __P((int index, pNode high, pNode low));
extern pTableBdd createTableBdd __P((int len));
extern long hashBdd __P((long index, pNode high, pNode low));
extern long newKeyBdd __P((long index, pNode high, pNode low));
extern pTableBdd createTableBdd __P((long len));
extern void destroyTableBdd __P((pTableBdd pTab));
extern pTableBdd reAllocTableBdd __P((pTableBdd pTab));
extern pNode searchTableBdd __P((pTableBdd pTab, int index, pNode high, pNode low));
extern int addTableBdd __P((pTableBdd pTab, pNode pBdd));
extern int deleteTableBdd __P((pTableBdd pTab, pNode pBdd));
extern pNode searchTableBdd __P((pTableBdd pTab, long index, pNode high, pNode low));
extern long addTableBdd __P((pTableBdd pTab, pNode pBdd));
extern long deleteTableBdd __P((pTableBdd pTab, pNode pBdd));
extern void displayHashBdd __P((pTableBdd pTab));
/* Prototypes from log_thashloc.c */
extern int hashLoc __P((pNode high, pNode low));
extern pTableLoc createTabLoc __P((int len));
extern long hashLoc __P((pNode high, pNode low));
extern pTableLoc createTabLoc __P((long len));
extern void destroyTabLoc __P((pTableLoc pTab));
extern pNode searchTabLoc __P((pTableLoc pTab, pNode high, pNode low, short oper));
extern int addTabLoc __P((pTableLoc pTab, pNode high, pNode low, pNode father, short oper));
extern long addTabLoc __P((pTableLoc pTab, pNode high, pNode low, pNode father, short oper));
extern void displayLoc __P((pTableLoc pTab));
extern void videTabLoc __P((pTableLoc pTab));
#endif

View File

@ -30,7 +30,7 @@
#ident "$Id: log_bdd0.c,v 1.5 2006/03/29 17:10:13 xtof Exp $"
#ident "$Id: log_bdd0.c,v 1.6 2009/06/14 13:51:47 ludo Exp $"
/****************************************************************************/
/* Produit : librairie BDD - Gestion de BDD */
@ -63,7 +63,7 @@ return :pointeur sur le noeud cree.
pNode
initVertexBdd (index, high, low)
int index;
long index;
pNode high, low;
{
pNode pt;
@ -143,7 +143,7 @@ return :rien.
void
initializeBdd (size)
int size;
long size;
{
switch (size)
{
@ -179,7 +179,7 @@ return :rien.
void
destroyBdd (level)
int level;
long level;
{
chain_list *pt;
@ -214,7 +214,7 @@ return :rien.
void
resetBdd ()
{
int i;
long i;
pNode *pBdd;
chain_list *pt;
@ -248,7 +248,7 @@ numberNodeAllBdd :compte le nombre de noeud utilise dans le systeme.
return :le nombre de noeud.
------------------------------------------------------------------------------*/
int
long
numberNodeAllBdd ()
{
return ((sysBdd.pRT)->compteur);
@ -262,11 +262,11 @@ parametres :un pointeur de Node.
return :le nombre de noeud.
------------------------------------------------------------------------------*/
int
long
numberNodeBdd (pBdd)
pNode pBdd;
{
int val;
long val;
markBdd (pBdd, -1);
markBdd (pBdd, 0);
@ -280,9 +280,9 @@ countNode : calcul du nombre de noeuds BDD
-------------------------------------------------------
parametres : une pNode
-------------------------------------------------------
return : int
return : long
------------------------------------------------------------------------------*/
int
long
countNode (pt)
pNode pt;
{
@ -302,9 +302,9 @@ countNodeTdg : calcul du nombre de noeuds equivalent TDG sur un BDD
-------------------------------------------------------
parametres : une pNode
-------------------------------------------------------
return : int
return : long
------------------------------------------------------------------------------*/
int
long
countNodeTdg (pt)
pNode pt;
{
@ -312,7 +312,7 @@ countNodeTdg (pt)
{
if (pt->mark == 0)
{
int val;
long val;
pt->mark = 1;
val = countNodeTdg (pt->high) + countNodeTdg (pt->low) + 1;
markBdd (notBdd (pt), 1);
@ -573,21 +573,21 @@ displayBddLoc (level, pt)
pt->mark = 1;
if (pt->index > 1)
{
printf ("%d\t INDEX = %d\t", (int) pt, (int) pt->index);
printf ("%ld\t INDEX = %ld\t", (long) pt, (long) pt->index);
if ((pt->low)->index == 0)
printf (" LOW = ZERO");
else if ((pt->low)->index == 1)
printf (" LOW = ONE");
else
printf (" LOW = %d", (int) pt->low);
printf (" LOW = %ld", (long) pt->low);
if ((pt->high)->index == 0)
printf ("\t HIGH = ZERO\n");
else if ((pt->high)->index == 1)
printf ("\t HIGH = ONE\n");
else
printf ("\t HIGH = %d\n", (int) pt->high);
printf ("\t HIGH = %ld\n", (long) pt->high);
/* appel recursif */
@ -608,7 +608,7 @@ displayBddLoc (level, pt)
void
displayBdd (pBdd, level)
pNode pBdd;
int level;
long level;
{
markBdd (pBdd, 0);
displayBddLoc (level, pBdd);
@ -625,7 +625,7 @@ void
assignNumNodeBdd (bdd, vTable, pNodeNumber)
pNode bdd;
pTH vTable;
int *pNodeNumber;
long *pNodeNumber;
{
if (bdd != one && bdd != zero)
{
@ -660,9 +660,9 @@ displayGraphicBdd (pBdd)
pNode pBdd;
{
pTH vTable;
int numNode = 2;
long numNode = 2;
chain_list *lst, *supp;
int i;
long i;
supp = reverse (supportChain_listBdd (pBdd));
@ -706,9 +706,9 @@ displayGraphicBdd (pBdd)
if (i == pt->index)
{
int numLow = searchTH (vTable, (char *) pt->low);
int numHigh = searchTH (vTable, (char *) pt->high);
int num = searchTH (vTable, (char *)pt);
long numLow = searchTH (vTable, (char *) pt->low);
long numHigh = searchTH (vTable, (char *) pt->high);
long num = searchTH (vTable, (char *)pt);
printf (" %d_(%d)_%d ", numLow, num, numHigh);
}
@ -742,20 +742,20 @@ displayBddName (level, pt, TabName)
pt->mark = 1;
if (pt->index > 1)
{
printf ("%d\t INPUT = %s\t", (int) pt, *(TabName + pt->index - 2));
printf ("%ld\t INPUT = %s\t", (long) pt, *(TabName + pt->index - 2));
if ((pt->high)->index == 0)
printf (" HIGH = ZERO");
else if ((pt->high)->index == 1)
printf (" HIGH = ONE");
else
printf (" HIGH = %d", (int) pt->high);
printf (" HIGH = %ld", (long) pt->high);
if ((pt->low)->index == 0)
printf ("\t LOW = ZERO\n");
else if ((pt->low)->index == 1)
printf ("\t LOW = ONE\n");
else
printf ("\t LOW = %d\n", (int) pt->low);
printf ("\t LOW = %ld\n", (long) pt->low);
if (level == 1)
{
if ((pt->low)->index > 1)
@ -806,7 +806,7 @@ return :un pointeur de Bdd.
pNode
applyTerm (oper, index, pBdd)
int oper;
long oper;
short index;
pNode pBdd;
{
@ -1483,7 +1483,7 @@ return :un pointeur de Bdd.
pNode
composeBdd (pBdd1, pBdd2, index)
pNode pBdd1, pBdd2;
int index;
long index;
{
pNode r1, r2, resul;
@ -1514,7 +1514,7 @@ addListBdd (pt, pBdd)
pNode pBdd;
{
chain_list *new_lstGdb, *pCur, *pCurSup;
int index;
long index;
index = pBdd->index;
@ -1556,10 +1556,10 @@ renvoie 1 si le graphe est une tautologie
-----------------------------------------------------------------------
parametres :un pointeur de Bdd.
-----------------------------------------------------------------------
return :un int.
return :un long.
------------------------------------------------------------------------------*/
int
long
oneBdd (pBdd)
pNode pBdd;
{
@ -1575,10 +1575,10 @@ renvoie 1 si le graphe est une antilogie
-----------------------------------------------------------------------
parametres :un pointeur de Bdd.
-----------------------------------------------------------------------
return :un int.
return :un long.
------------------------------------------------------------------------------*/
int
long
zeroBdd (pBdd)
pNode pBdd;
{
@ -1597,7 +1597,7 @@ parametres :deux pointeurs de Bdd.
return :un short.
------------------------------------------------------------------------------*/
int
long
equalBdd (pBdd1, pBdd2)
pNode pBdd1, pBdd2;
{
@ -1670,7 +1670,7 @@ markAllBdd (value)
short value;
{
pNode pBdd, *ppBdd;
int i;
long i;
ppBdd = (sysBdd.pRT)->pBdd;
@ -1787,7 +1787,7 @@ regenereBdd (pBdd, sysCible, pTHNode)
struct systemBdd *sysCible;
pTH pTHNode;
{
int resul;
long resul;
if ((resul = searchTH (pTHNode, (char *)pBdd)) != EMPTYTH)
return ((pNode) resul);
@ -1798,7 +1798,7 @@ regenereBdd (pBdd, sysCible, pTHNode)
printf ("gcNode : error - bad index %d\n", pBdd->index);
exit (-1);
}
resul = (int) initVertexBddAux (pBdd->index,
resul = (long) initVertexBddAux (pBdd->index,
regenereBdd (pBdd->high, sysCible, pTHNode),
regenereBdd (pBdd->low, sysCible, pTHNode),
sysCible);
@ -1831,8 +1831,8 @@ gcNodeBdd (pt)
sysBddAux.lpAT = NULL;
zeroAux = initVertexBddAux (0, (pNode) 0, (pNode) 1, &sysBddAux);
oneAux = initVertexBddAux (1, (pNode) 0, (pNode) 1, &sysBddAux);
addTH (pTHNode, (char *)zero, (int) zeroAux);
addTH (pTHNode, (char *)one, (int) oneAux);
addTH (pTHNode, (char *)zero, (long) zeroAux);
addTH (pTHNode, (char *)one, (long) oneAux);
while (pt)
{
@ -1882,10 +1882,10 @@ rempTabIndex (pt, tabIndex)
chain_list *
supportIndexBdd (pt, sens)
pNode pt;
int sens;
long sens;
{
char *tabIndex;
int i;
long i;
chain_list *ret;
/* initialisation du tableau d'index utilises */

View File

@ -31,14 +31,15 @@
#ident "$Id: log_bdd1.c,v 1.2 2002/09/30 16:20:43 czo Exp $"
#ident "$Id: log_bdd1.c,v 1.3 2009/06/14 13:51:47 ludo Exp $"
/****************************************************************************/
/* Produit : librairie BDD - Gestion de BDD */
/****************************************************************************/
#include<stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include "mut.h"
#include "log.h"
@ -52,11 +53,11 @@ return :pointeur de circuit.
pCircuit
initializeCct (name, nbI, nbO)
char *name;
int nbI, nbO;
long nbI, nbO;
{
pCircuit pC;
char **pt;
int i;
long i;
/* on assure ... */
nbI++;
nbO++;
@ -139,7 +140,7 @@ searchOutputCct (pC, name)
pCircuit pC;
char *name;
{
int res;
long res;
if ((res = searchTH (pC->pTO, namealloc (name))) != EMPTYTH)
return ((pNode) res);
@ -161,7 +162,7 @@ addOutputCct (pC, name, pt)
pNode pt;
{
name = namealloc (name);
addTH (pC->pTO, name, (int)pt);
addTH (pC->pTO, name, (long)pt);
}
/*------------------------------------------------------------------------------
searchIndexCct :recherche entree associe a un index .
@ -192,8 +193,8 @@ searchInputCct (pC, name)
pCircuit pC;
char *name;
{
int reallocTH;
int resul;
long reallocTH;
long resul;
reallocTH = (pC->pTI)->length;
resul = searchTH (pC->pTI, namealloc (name));
@ -202,7 +203,7 @@ searchInputCct (pC, name)
if (reallocTH != (pC->pTI)->length)
{
int i, j;
long i, j;
char **pOldName = pC->pNameI;
char **pOldSave = pC->pNameI;
char **pt;
@ -250,7 +251,7 @@ addInputCct (pC, name)
}
else
{
int reallocTH;
long reallocTH;
index = pC->countI;
reallocTH = (pC->pTI)->length;
@ -260,7 +261,7 @@ addInputCct (pC, name)
if (reallocTH != (pC->pTI)->length)
{
int i, j;
long i, j;
char **pOldName = pC->pNameI;
char **pOldSave = pC->pNameI;
char **pt;
@ -315,7 +316,7 @@ return :rien.
void
displayCct (pC, mode)
pCircuit pC;
int mode;
long mode;
{
pElemTH pEl;
short i, cpt = 0;
@ -380,7 +381,7 @@ composeCct (pC, name, pt)
char *name;
pNode pt;
{
int i;
long i;
short index;
pElemTH pEl;
@ -394,7 +395,7 @@ composeCct (pC, name, pt)
for (i = 0; i < (pC->pTO)->length; i++)
{
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
pEl->value = (int) composeBdd ((pNode)pEl->value, pt, index);
pEl->value = (long) composeBdd ((pNode)pEl->value, pt, index);
pEl++;
}
deleteTH (pC->pTI, name); /* on elimine name des INPUT */
@ -412,14 +413,14 @@ constraintCct (pC, pt)
pCircuit pC;
pNode pt;
{
int i;
long i;
pElemTH pEl;
pEl = (pC->pTO)->pElem; /* pointeur courant de la table pTO */
for (i = 0; i < (pC->pTO)->length; i++)
{
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
pEl->value = (int) constraintBdd ((pNode)pEl->value, pt);
pEl->value = (long) constraintBdd ((pNode)pEl->value, pt);
pEl++;
}
}
@ -436,7 +437,7 @@ proofCct (pC1, pC2)
{
pElemTH pEl;
pNode noeudCC2;
int i;
long i;
short indexCC2;
chain_list *expr;
@ -556,7 +557,7 @@ void
cpOrderCct (CC1, CC2)
pCircuit CC1, CC2;
{
int i;
long i;
pElemTH pEl1;
pElemTH pEl2;
char **pt1, **pt2;
@ -601,14 +602,14 @@ upVarCct (pC, ptOldIndex, newIndex)
pNode ptOldIndex;
short newIndex;
{
int i;
long i;
pElemTH pEl;
pEl = (pC->pTO)->pElem;
for (i = 0; i < (pC->pTO)->length; i++)
{
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
pEl->value = (int) upVarBdd ((pNode)pEl->value, ptOldIndex, newIndex);
pEl->value = (long) upVarBdd ((pNode)pEl->value, ptOldIndex, newIndex);
pEl++;
}
deleteTH (pC->pTI, *(pC->pNameI + newIndex - 2));
@ -622,12 +623,12 @@ numberNodeCct : calcule le nombre de noeud d'un circuit
retour : un entier.
---------------------------------------------------------------------------*/
int
long
numberNodeCct (pC)
pCircuit pC;
{
pElemTH pEl;
int i, number_node;
long i, number_node;
number_node = 0;
markAllBdd (0);
@ -650,12 +651,12 @@ numberNodeTdgCct : calcule le nombre de noeud equivalent TDG d'un circuit
retour : un entier.
---------------------------------------------------------------------------*/
int
long
numberNodeTdgCct (pC)
pCircuit pC;
{
pElemTH pEl;
int i, number_node;
long i, number_node;
number_node = 0;
markAllBdd (0);
@ -704,7 +705,7 @@ gcNodeCct (pC)
pNode zeroAux, oneAux;
pTH pTHNode;
pElemTH pEl;
int j;
long j;
pTHNode = createTH (MEDIUM);
sysBddAux.pRT = createTableBdd (MEDIUM);
@ -713,8 +714,8 @@ gcNodeCct (pC)
sysBddAux.lpAT = NULL;
zeroAux = initVertexBddAux (0, (pNode) 0, (pNode) 1, &sysBddAux);
oneAux = initVertexBddAux (1, (pNode) 0, (pNode) 1, &sysBddAux);
addTH (pTHNode, (char *)zero, (int) zeroAux);
addTH (pTHNode, (char *)one, (int) oneAux);
addTH (pTHNode, (char *)zero, (long) zeroAux);
addTH (pTHNode, (char *)one, (long) oneAux);
/* on regenere les graphes */
@ -723,7 +724,7 @@ gcNodeCct (pC)
for (j = 0; j < (pC->pTO)->length; j++)
{
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
pEl->value = (int) regenereBdd ((pNode) pEl->value, &sysBddAux, pTHNode);
pEl->value = (long) regenereBdd ((pNode) pEl->value, &sysBddAux, pTHNode);
pEl++;
}

View File

@ -31,7 +31,7 @@
#ident "$Id: log_prefbib.c,v 1.3 2002/09/30 16:20:43 czo Exp $"
#ident "$Id: log_prefbib.c,v 1.4 2009/06/14 13:51:47 ludo Exp $"
/****************************************************************************/
/* Produit : librairie ABL - Gestion de representations prefixees */
@ -58,7 +58,7 @@ retour : un pointeur de chaine de caracteres.
char *
gensym_abl (name, num)
char *name;
int num;
long num;
{
char *name1;
char number[3];
@ -87,7 +87,7 @@ ablError (expr, func)
chain_list *expr;
char *func;
{
int oper = OPER (expr);
long oper = OPER (expr);
if (oper < MIN_OPER || oper > MAX_OPER)
{
@ -342,7 +342,7 @@ void
displayExprInt (expr)
chain_list *expr;
{
int oper;
long oper;
if (ATOM (expr))
printf (" %s", VALUE_ATOM (expr));
@ -386,7 +386,7 @@ void
displayInfExpr (expr)
chain_list *expr;
{
int oper;
long oper;
if (ATOM (expr)) /* Traitement atomique */
printf ("%s", VALUE_ATOM (expr));
@ -423,12 +423,12 @@ displayInfExpr (expr)
char *
exprToCharInt (expr, mode, chaine, taille)
chain_list *expr;
int mode;
long mode;
char *chaine;
int *taille;
long *taille;
{
char *oper;
int lenVA;
long lenVA;
if (ATOM (expr))
{
@ -481,7 +481,7 @@ exprToCharInt (expr, mode, chaine, taille)
else
/*----- prefixe -----*/
{
int lenOPER = strlen (oper);
long lenOPER = strlen (oper);
strncat (chaine, "(", 1);
strncat (chaine, oper, lenOPER);
while ((expr = CDR (expr)))
@ -504,10 +504,10 @@ exprToCharInt (expr, mode, chaine, taille)
char *
exprToChar (expr, mode)
chain_list *expr;
int mode;
long mode;
{
char *chaine;
int taille;
long taille;
taille = 100;
chaine = (char *) mbkalloc (100);
@ -526,7 +526,7 @@ char *
identExprInt (expr, chaine, taille)
chain_list *expr;
char *chaine;
int *taille;
long *taille;
{
if (ATOM (expr))
return chaine;
@ -534,7 +534,7 @@ identExprInt (expr, chaine, taille)
{
chain_list *expr1;
char arite[3];
int oper = OPER (expr);
long oper = OPER (expr);
switch (oper)
{
@ -588,9 +588,9 @@ identExpr (expr)
chain_list *expr;
{
char *chaine, *bidon;
int taille, i;
long taille, i;
chain_list *expr1;
int flag_alloc = 0;
long flag_alloc = 0;
taille = 100;
@ -648,7 +648,7 @@ identExpr (expr)
------------------------------------------------------------------
FUNCTION : calcule la profondeur d'une expression.
------------------------------------------------------------------*/
int
long
profExpr (expr)
chain_list *expr;
{
@ -656,7 +656,7 @@ profExpr (expr)
return 0;
else
{
int max = 0, profCar;
long max = 0, profCar;
while ((expr = CDR (expr)))
{
@ -674,7 +674,7 @@ profExpr (expr)
FUNCTION : calcule la profondeur d'une expression sans tenir compte
des inverseurs.
------------------------------------------------------------------*/
int
long
profAOExpr (expr)
chain_list *expr;
{
@ -682,7 +682,7 @@ profAOExpr (expr)
return 0;
else
{
int max = 0, profCar, oper = OPER (expr);
long max = 0, profCar, oper = OPER (expr);
while ((expr = CDR (expr)))
{
@ -744,9 +744,9 @@ mapExpr (func, expr)
renvoie 1 s'il y a eu au moins un appel de func qui a
renvoye 1. (OU logique)
------------------------------------------------------------------*/
int
long
anyExpr (func, expr)
int (*func) ();
long (*func) ();
chain_list *expr;
{
while ((expr = CDR (expr)))
@ -763,9 +763,9 @@ anyExpr (func, expr)
renvoie 1 si tout les appels de func ont renvoye 1.
(ET logique)
------------------------------------------------------------------*/
int
long
everyExpr (func, expr)
int (*func) ();
long (*func) ();
chain_list *expr;
{
while ((expr = CDR (expr)))
@ -782,7 +782,7 @@ everyExpr (func, expr)
------------------------------------------------------------------
FUNCTION : renvoie 1 si oper existe dans expr, 0 sinon.
------------------------------------------------------------------*/
int
long
searchOperExpr (expr, oper)
chain_list *expr;
short oper;
@ -829,7 +829,7 @@ searchExprLow (expr, name)
------------------------------------------------------------------
FUNCTION : renvoie 1 si namealloc(name) existe dans expr, 0 sinon.
------------------------------------------------------------------*/
int
long
searchExpr (expr, name)
chain_list *expr;
char *name;
@ -843,7 +843,7 @@ searchExpr (expr, name)
------------------------------------------------------------------
FUNCTION : renvoie 1 si expr1 = expr2, 0 sinon.
------------------------------------------------------------------*/
int
long
equalExpr (expr1, expr2)
chain_list *expr1, *expr2;
{
@ -879,7 +879,7 @@ equalExpr (expr1, expr2)
------------------------------------------------------------------
FUNCTION : renvoie 1 si expr1 = expr2 aux variables pres, 0 sinon.
------------------------------------------------------------------*/
int
long
equalVarExpr (expr1, expr2)
chain_list *expr1, *expr2;
{
@ -918,7 +918,7 @@ equalVarExpr (expr1, expr2)
FUNCTION : renvoie la taille de l'expression au premier niveau.
(en fait l'arite de l'operateur)
------------------------------------------------------------------*/
int
long
lengthExpr (expr)
chain_list *expr;
{
@ -926,7 +926,7 @@ lengthExpr (expr)
return 1;
else
{
int cpt = 0;
long cpt = 0;
while ((expr = CDR (expr)))
cpt++;
@ -940,7 +940,7 @@ lengthExpr (expr)
FUNCTION : renvoie le nombre d'operateurs binaires (equivalent)
d'une expression.
------------------------------------------------------------------*/
int
long
numberOperBinExpr (expr)
chain_list *expr;
{
@ -948,7 +948,7 @@ numberOperBinExpr (expr)
return 0;
else
{
int cpt = -1;
long cpt = -1;
if (OPER (expr) == NOT)
return numberOperBinExpr (CADR (expr));
@ -965,7 +965,7 @@ numberOperBinExpr (expr)
------------------------------------------------------------------
FUNCTION : renvoie le nombre d'atomes de l'expression.
------------------------------------------------------------------*/
int
long
numberAtomExpr (expr)
chain_list *expr;
{
@ -973,7 +973,7 @@ numberAtomExpr (expr)
return 1;
else
{
int cpt = 0;
long cpt = 0;
while ((expr = CDR (expr)))
cpt += numberAtomExpr (CAR (expr));
@ -1171,7 +1171,7 @@ devXor2Expr (expr)
chain_list *
flatPolarityExpr (expr, signe)
chain_list *expr;
int signe;
long signe;
{
short oper;
chain_list *pt;
@ -1240,7 +1240,7 @@ void
flatArityExpr (expr)
chain_list *expr;
{
int oper;
long oper;
chain_list *expr1, *expr2, *exprBefore;
if (!ATOM (expr))
@ -1405,12 +1405,12 @@ supportPtype_listExpr (expr)
IDENT : maxExpr
------------------------------------------------------------------
FUNCTION : renvoie le max des arguments d'une expression avec une
fonction de comparaison func renvoyant un int.
fonction de comparaison func renvoyant un long.
------------------------------------------------------------------ */
chain_list *
maxExpr (expr, func)
chain_list *expr;
int (*func) ();
long (*func) ();
{
chain_list *expr1;
@ -1427,13 +1427,13 @@ maxExpr (expr, func)
IDENT : minExpr
------------------------------------------------------------------
FUNCTION : renvoie le min des arguments d'une expression avec une
fonction de comparaison func renvoyant un int.
fonction de comparaison func renvoyant un long.
------------------------------------------------------------------ */
chain_list *
minExpr (expr, func)
chain_list *expr;
int (*func) ();
long (*func) ();
{
chain_list *expr1;
@ -1450,17 +1450,17 @@ minExpr (expr, func)
IDENT : sortExpr
------------------------------------------------------------------
FUNCTION : trie les arguments d'une expression a partir d'une fonction
func renvoyant un int.
func renvoyant un long.
direction = 1 croissant ; direction = 0 decroissant
------------------------------------------------------------------ */
void
sortExpr (expr, func, direction)
chain_list *expr;
int (*func) ();
int direction;
long (*func) ();
long direction;
{
chain_list *expr1;
int okPermu = 1;
long okPermu = 1;
if (!ATOM (expr)) /* ce n'est pas un atome */
{
@ -1497,12 +1497,12 @@ sortExpr (expr, func, direction)
ex : (and a (xor w g) b (or x f) (or e g o) (xor t h k))
--> (and (or x f) (or e o g) (xor g w) (xor t h k) b a)
------------------------------------------------------------------ */
int
long
funcNormExpr (expr)
chain_list *expr;
{
if (ATOM (expr))
return ((int) VALUE_ATOM (expr));
return ((long) VALUE_ATOM (expr));
else if (OPER (expr) == NOT)
if (ATOM (CADR (expr)))
return (NOT * 100 + 10);
@ -1544,9 +1544,9 @@ return : rien.
void
deleteNumExpr (expr, i)
chain_list *expr;
int i;
long i;
{
int co = 0;
long co = 0;
chain_list *e = expr, *pt;
if (lengthExpr (expr) <= i)
@ -1584,9 +1584,9 @@ return : un chain_list *
chain_list *
searchNumExpr (expr, i)
chain_list *expr;
int i;
long i;
{
int co = 0;
long co = 0;
chain_list *e = expr;
while ((expr = CDR (expr)))
@ -1606,23 +1606,23 @@ numberOccExpr : renvoie le nombre d'occurences d'une variable dans expr.
------------------------------------------------------
parametres : un ABL et une variable.
-------------------------------------------------------
return : un int.
return : un long.
----------------------------------------------------------------------------*/
int
long
numberOccExpr (exp, name)
chain_list *exp;
char *name;
{
if (ATOM (exp))
{
if ((int) name == (int) VALUE_ATOM (exp))
if ((long) name == (long) VALUE_ATOM (exp))
return 1;
else
return 0;
}
else
{
int cpt = 0;
long cpt = 0;
while ((exp = CDR (exp)))
cpt += numberOccExpr (CAR (exp), name);
@ -1642,7 +1642,7 @@ changeOperExpr (expr, oper)
chain_list *expr;
short oper;
{
int op = (int) oper;
long op = (long) oper;
if (ATOM (expr))
{
@ -1675,7 +1675,7 @@ simplif10Expr (expr)
{
short oper = OPER (expr);
chain_list *auxExpr = createExpr (oper), *args, *res;
int cpt1 = 0;
long cpt1 = 0;
for (args = CDR (expr); args; args = CDR (args))
{
@ -1888,7 +1888,7 @@ return : expr.
chain_list *
charToExprInt (stringExpr, cptCar)
char *stringExpr;
int *cptCar;
long *cptCar;
{
char *tokOper;
char *tok;
@ -2012,7 +2012,7 @@ chain_list *
charToExpr (stringExpr)
char *stringExpr;
{
int cptCar = 0;
long cptCar = 0;
return charToExprInt (stringExpr, &cptCar);
}
@ -2027,11 +2027,11 @@ return : (, ), ou une chaine de caractere.
char *
tokenExpr (stringExpr, cptCar)
char *stringExpr;
int *cptCar;
long *cptCar;
{
char *tok;
int i;
int compteur = *cptCar;
long i;
long compteur = *cptCar;
for (; isspace (stringExpr[compteur]); compteur++); /* suppression ds blancs */
@ -2070,7 +2070,7 @@ PMExprInt : Pattern Matching entre expr et pattern
(and (not a) (not a)) avec le pattern (and x x) renvoie 1
------------------------------------------------------------------------------
retour : 0 ou 1
----------------------------------------------------------------------------*/ int
----------------------------------------------------------------------------*/ long
PMExprInt (expr, pattern, bind)
chain_list *expr, *pattern;
ptype_list **bind;
@ -2122,11 +2122,11 @@ PMExpr : Pattern Matching entre expr et pattern
------------------------------------------------------------------------------
retour : 0 ou 1
----------------------------------------------------------------------------*/
int
long
PMExpr (expr, pattern)
chain_list *expr, *pattern;
{
int ret;
long ret;
ptype_list *bind = NULL;
/* on mettra dans "bind" le couple (char * pattern, expr) */

View File

@ -31,13 +31,14 @@
#ident "$Id: log_thash.c,v 1.2 2002/09/30 16:20:43 czo Exp $"
#ident "$Id: log_thash.c,v 1.3 2009/06/14 13:51:47 ludo Exp $"
/****************************************************************************/
/* Produit : librairie TSH - Gestion de tables de hachage */
/****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "mut.h"
#include "log.h"
@ -50,7 +51,7 @@
a. creation de table
pTH createTH(len)
int len;
long len;
b. destruction de la table
@ -59,29 +60,29 @@
c. recherche d'un element
int searchTH(pTable,key)
long searchTH(pTable,key)
pTH pTable;
char *key;
d. ajout d'un element (ecrasement de la valeur s'il existe deja un element
dans la table possedant la meme cle)
int addTH(pTable,key,value)
long addTH(pTable,key,value)
pTH pTable;
char *key;
int value;
long value;
e. test d'existence et ajout d'un element dans la table.( renvoie 0 si
l'element n'existait pas avant son ajout, 1 sinon).
int addExistTH(pTable,key,value)
long addExistTH(pTable,key,value)
pTH pTable;
char *key;
int value;
long value;
f. destruction d'un element
int deleteTH(pTable,key)
long deleteTH(pTable,key)
pTH pTable;
char *key;
@ -99,12 +100,12 @@
/*--------------- la fonction de base pour le hachage.---------------- */
int
long
hashTH (pn)
char *pn;
{
/* return(abs((int) pn * ((int) pn >> 5) >> 4)); */
/* return(abs((long) pn * ((long) pn >> 5) >> 4)); */
return (((unsigned long) pn >> 2));
}
@ -113,11 +114,11 @@ hashTH (pn)
pTH
createTH (len)
int len;
long len;
{
pTH pTable;
pElemTH pEl;
int i;
long i;
if (len <= 0)
{
@ -156,13 +157,13 @@ destroyTH (pTable)
renvoie -1 si la recherche echoue. */
int
long
searchTH (pTable, key)
pTH pTable;
char *key;
{
int co = 0;
int indice = 0;
long co = 0;
long indice = 0;
pElemTH pEl;
indice = hashTH (key) % pTable->length;
@ -177,7 +178,7 @@ searchTH (pTable, key)
pEl = (pTable->pElem) + indice;
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
{
if ((int) key == (int) pEl->key)
if ((long) key == (long) pEl->key)
return (pEl->value);
}
else if (pEl->value == EMPTYTH)
@ -190,15 +191,15 @@ searchTH (pTable, key)
/* ajout d'un element a la table */
int
long
addTH (pTable, key, value)
pTH pTable;
char *key;
int value;
long value;
{
int indice = 0;
long indice = 0;
pElemTH pEl;
int co = 0;
long co = 0;
if (value == EMPTYTH || value == DELETETH)
{
@ -226,7 +227,7 @@ addTH (pTable, key, value)
pEl->key = key;
return (value);
}
else if ((int) pEl->key == (int) key)
else if ((long) pEl->key == (long) key)
{
pTable->count--;
pEl->value = value;
@ -240,15 +241,15 @@ addTH (pTable, key, value)
/* test d'existence et ajout d'un element a la table */
int
long
addExistTH (pTable, key, value)
pTH pTable;
char *key;
int value;
long value;
{
int indice = 0;
long indice = 0;
pElemTH pEl;
int co = 0;
long co = 0;
if (value == EMPTYTH || value == DELETETH)
{
@ -276,7 +277,7 @@ addExistTH (pTable, key, value)
pEl->key = key;
return (0);
}
else if ((int) pEl->key == (int) key)
else if ((long) pEl->key == (long) key)
{
pTable->count--;
pEl->value = value;
@ -294,14 +295,14 @@ addExistTH (pTable, key, value)
/* elimination d'un element de la table */
int
long
deleteTH (pTable, key)
pTH pTable;
char *key;
{
int indice = 0;
long indice = 0;
pElemTH pEl;
int co = 0;
long co = 0;
indice = hashTH (key) % pTable->length;
do
@ -314,7 +315,7 @@ deleteTH (pTable, key)
pEl = (pTable->pElem) + indice;
if (pEl->value != EMPTYTH && pEl->value != DELETETH)
{
if ((int) key == (int) pEl->key)
if ((long) key == (long) pEl->key)
{
pTable->count--;
pEl->value = DELETETH;
@ -335,7 +336,7 @@ void
displayTH (pTable)
pTH pTable;
{
int i;
long i;
pElemTH pEl;
pEl = pTable->pElem;
printf ("================== DISPLAYTH ================\n");
@ -361,7 +362,7 @@ reAllocTH (pTable)
{
pTH tabBis;
pElemTH pEl;
int i;
long i;
pEl = pTable->pElem;
tabBis = createTH ((pTable->length) * 5);

View File

@ -30,7 +30,7 @@
#ident "$Id: log_thashbdd.c,v 1.3 2006/03/29 17:10:13 xtof Exp $"
#ident "$Id: log_thashbdd.c,v 1.4 2009/06/14 13:51:47 ludo Exp $"
/*--------------------------------------------------------------------------
la table de hachage des BDD
@ -54,7 +54,7 @@
a. creation de table
pTableBdd createTableBdd(len)
int len;
long len;
b. destruction de la table
@ -70,18 +70,18 @@
pNode searchTableBdd(pTab,index,high,low)
pTableBdd pTab;
int index;
long index;
pNode high,low;
e. ajout d'un element
int addTableBdd(pTab,pBdd)
long addTableBdd(pTab,pBdd)
pTableBdd pTab;
pNode pBdd;
f. destruction d'un element
int deleteTableBdd(pTab,key)
long deleteTableBdd(pTab,key)
pTableBdd pTab;
pNode pBdd;
@ -100,23 +100,23 @@
/*-------------------- la fonction de hachage ---------------------------- */
int
long
hashBdd (index, high, low)
int index;
long index;
pNode high, low;
{
return (abs (index + ((int) high << 1) + (int) low +
((int) high >> 4) + ((int) low >> 5)));
return (abs (index + ((long) high << 1) + (long) low +
((long) high >> 4) + ((long) low >> 5)));
}
/*--------------- la fonction de changement de cle ------------------------- */
int
long
newKeyBdd (index, high, low)
int index;
long index;
pNode high, low;
{
return (index + (index << 2) + (int) high + ((int) low << 1));
return (index + (index << 2) + (long) high + ((long) low << 1));
}
/*--------------- La table de hachage pour des BDD ------------ */
@ -128,11 +128,11 @@ newKeyBdd (index, high, low)
pTableBdd
createTableBdd (len)
int len;
long len;
{
pTableBdd pTab;
pNode *pBdd;
int i;
long i;
if (!(pTab = (pTableBdd) mbkalloc (sizeof (struct tableBdd))))
{
@ -179,7 +179,7 @@ return :rien.
/*
void markBddLst(pC,value)
pCircuit pC;
int value;
long value;
{
pNode pBdd;
@ -200,7 +200,7 @@ pTableBdd
reAllocTableBdd (pTab)
pTableBdd pTab;
{
int i;
long i;
pNode *pBdd;
pTableBdd pTabBis;
@ -227,13 +227,13 @@ reAllocTableBdd (pTab)
pNode
searchTableBdd (pTab, index, high, low)
pTableBdd pTab;
int index;
long index;
pNode high, low;
{
int co = 0;
long co = 0;
pNode pBddCur;
int key = index;
int indice;
long key = index;
long indice;
do
{
@ -255,18 +255,18 @@ searchTableBdd (pTab, index, high, low)
/* ajout d'un element a la table */
int
long
addTableBdd (pTab, pBdd)
pTableBdd pTab;
pNode pBdd;
{
int co = 0;
long co = 0;
pNode *pBddCur;
int index = pBdd->index;
long index = pBdd->index;
pNode high = pBdd->high;
pNode low = pBdd->low;
int key = index;
int indice;
long key = index;
long indice;
if (pTab->compteur++ > (pTab->lenTableBdd) * 8 / 10) /* remplissage au 8/10 */
return (TABLE_PLEINE);
@ -290,17 +290,17 @@ addTableBdd (pTab, pBdd)
/* elimination d'un element de la table */
int
long
deleteTableBdd (pTab, pBdd)
pTableBdd pTab;
pNode pBdd;
{
int co = 0;
long co = 0;
pNode *pBddCur;
pNode high = pBdd->high;
pNode low = pBdd->low;
int key = pBdd->index;
int indice;
long key = pBdd->index;
long indice;
do
{
@ -319,7 +319,7 @@ deleteTableBdd (pTab, pBdd)
key = newKeyBdd (key, high, low);
}
while (pBddCur != NULL);
return ((int) NULL);
return ((long) NULL);
}
/* affichage des elements de la table */
@ -328,8 +328,8 @@ void
displayHashBdd (pTab)
pTableBdd pTab;
{
int i;
int co = 0;
long i;
long co = 0;
pNode *pBdd;
pBdd = pTab->pBdd;

View File

@ -30,12 +30,14 @@
#ident "$Id: log_thashloc.c,v 1.2 2002/09/30 16:20:44 czo Exp $"
#ident "$Id: log_thashloc.c,v 1.3 2009/06/14 13:51:47 ludo Exp $"
/*--------------------------------------------------------------------------
la table de hachage local
la version du 14.12.90
-------------------------------------------------------------------------- */
#include <stdlib.h>
#include <string.h>
#include "mut.h"
#include "log.h"
@ -51,7 +53,7 @@
a. creation de table
pTableLoc createTabLoc(len)
int len;
long len;
b. destruction de la table
@ -71,7 +73,7 @@
e. ajout d'un element
int addTabLoc(pTab,pLoc)
long addTabLoc(pTab,pLoc)
pTableLoc pTab;
pVertexLoc pLoc;
@ -85,13 +87,13 @@
/*-------------------- la fonction de hachage ---------------------------- */
int
long
hashLoc (high, low)
pNode high, low;
{
return (abs (high->index + low->index +
(((int) high) >> 4) + (((int) low) >> 5) +
(int) high + (int) low));
(((long) high) >> 4) + (((long) low) >> 5) +
(long) high + (long) low));
}
/*--------------- La table de hachage pour des LOC ------------ */
@ -103,11 +105,11 @@ hashLoc (high, low)
pTableLoc
createTabLoc (len)
int len;
long len;
{
pTableLoc pTab;
pVertexLoc pLoc;
int i;
long i;
if (!(pTab = (pTableLoc) mbkalloc (sizeof (struct tableLoc))))
{
@ -150,7 +152,7 @@ searchTabLoc (pTab, high, low, oper)
short oper;
{
pVertexLoc pLoc;
int indice;
long indice;
/* un seul acces permis */
@ -165,14 +167,14 @@ searchTabLoc (pTab, high, low, oper)
/* ajout d'un element a la table */
int
long
addTabLoc (pTab, high, low, father, oper)
pTableLoc pTab;
pNode high, low, father;
short oper;
{
pVertexLoc pLoc;
int indice;
long indice;
/* un seul acces permis */
@ -192,8 +194,8 @@ void
displayLoc (pTab)
pTableLoc pTab;
{
int i;
int co = 0;
long i;
long co = 0;
pVertexLoc pLoc;
pLoc = pTab->pLoc;
@ -206,12 +208,12 @@ displayLoc (pTab)
if (pLoc[i].oper != EMPTYTH)
{
co++;
printf ("****** indice %d ****** \n", i);
printf ("HIGH %d LOW %d FATHER %d\n", (int) pLoc[i].high, (int) pLoc[i].low, (int) pLoc[i].father);
printf ("****** indice %ld ****** \n", i);
printf ("HIGH %d LOW %ld FATHER %ld\n", (long) pLoc[i].high, (long) pLoc[i].low, (long) pLoc[i].father);
printf ("\n");
}
}
printf ("\n****** Nombre de noeuds dans la table = %d\n", co);
printf ("\n****** Nombre de noeuds dans la table = %ld\n", co);
}
@ -229,7 +231,7 @@ videTabLoc (pTab)
pTableLoc pTab;
{
pVertexLoc pLoc;
int i;
long i;
pLoc = pTab->pLoc;

View File

@ -129,7 +129,7 @@ static void putsignal(signal_list* signal, char* name)
/*if doesn't exist hash table, init*/
if (!HTABLE) init_signals();
addauthelem(HTABLE,name,(int)signal);
addauthelem(HTABLE,name,(long)signal);
}

View File

@ -171,7 +171,7 @@ losig_list *Signal;
Rec->X+Rec->DX,
Rec->Y+Rec->DY);
for( ptdebug = Rec->USER ; ptdebug ; ptdebug = ptdebug->NEXT )
printf("[%5ld-%08X] ", ptdebug->TYPE, (int)(ptdebug->DATA) );
printf("[%5ld-%08lX] ", ptdebug->TYPE, (long)(ptdebug->DATA) );
printf("\n");
}
@ -370,12 +370,12 @@ GrgWindow *WinInfo;
n'y est deja pas present */
if(GrgWinDebug)
fprintf(stderr," (%6ld;%6ld)-(%6ld;%6ld) USERS: %X\n",
fprintf(stderr," (%6ld;%6ld)-(%6ld;%6ld) USERS: %lX\n",
ScanchRec->REC[i]->X,
ScanchRec->REC[i]->Y,
ScanchRec->REC[i]->X+ScanchRec->REC[i]->DX,
ScanchRec->REC[i]->Y+ScanchRec->REC[i]->DY,
(int)(ScanchRec->REC[i]->USER) );
(long)(ScanchRec->REC[i]->USER) );
R=ScanchRec->REC[i];
if(R->USER!=(ptype_list*)1)
@ -404,8 +404,8 @@ GrgWindow *WinInfo;
R->USER=scanmystack->PILE[scanmystack->CASEIN];
if(GrgWinDebug)
fprintf(stderr," (%6ld;%6ld)-(%6ld;%6ld) USERS: %X\n",
R->X,R->Y,R->X+R->DX,R->Y+R->DY,(int)(R->USER) );
fprintf(stderr," (%6ld;%6ld)-(%6ld;%6ld) USERS: %lX\n",
R->X,R->Y,R->X+R->DX,R->Y+R->DY,(long)(R->USER) );
if(scanmystack->CASEIN==0)
scanmystack=scanmystack->NEXT;

View File

@ -202,7 +202,7 @@ lofig_list *fig;
fprintf(stderr," %s",scan->NAME);
for(ptptype = scan->USER ; ptptype ; ptptype = ptptype->NEXT )
printf("[%ld-%08X] ", ptptype->TYPE, (int)(ptptype->DATA) );
printf("[%ld-%08lX] ", ptptype->TYPE, (long)(ptptype->DATA) );
printf("*\n");
if(getptype(scan->USER,RDSLOCON))

View File

@ -551,7 +551,7 @@ WinZnc *winznc;
for(scanwin=*(winznc->ChZnc+i);scanwin;scanwin=scanwin->NEXT)
{
zone=(znc*)(scanwin->DATA);
fprintf(stderr,"\t%X : (%ld,%ld)-(%ld,%ld) [%s]\n", (int)zone,
fprintf(stderr,"\t%lX : (%ld,%ld)-(%ld,%ld) [%s]\n", (long)zone,
zone->x1,
zone->y1,
zone->x2,

View File

@ -881,9 +881,9 @@ void TraitSignaux(lofig_list *ptfig)
*p = '_'; /* remplace l'espace par _ dans les signaux indices */
if((pt = getptype(psig->USER,(long)DEDALE)) != NULL)
{
if((int)pt->DATA != class) {
fprintf(po,"Change Class %d;\n",(int)pt->DATA) ;
class = (int)pt->DATA;
if((long)pt->DATA != class) {
fprintf(po,"Change Class %ld;\n",(long)pt->DATA) ;
class = (long)pt->DATA;
}
}
else

View File

@ -30,7 +30,7 @@
* Modified by pnt <Pierre.Nguyen-Tuong@lip6.fr> 2002
*/
#ident "$Id: mbk_lo.c,v 1.7 2003/04/03 14:46:30 xtof Exp $"
#ident "$Id: mbk_lo.c,v 1.8 2009/06/14 13:51:52 ludo Exp $"
#include <stdio.h>
#include <unistd.h>
@ -41,7 +41,7 @@
#include "rcn.h"
#include "mbk_lo.h"
int NB_TAT_LOSIG = 0;
long NB_TAT_LOSIG = 0;
/*******************************************************************************
* global variable for netlist view *
*******************************************************************************/
@ -383,10 +383,10 @@ losig_list *ptsig;
losig_list *pthead;
ptype_list *pt;
chain_list *ptchain;
int high;
int low;
int i;
int sigsize;
long high;
long low;
long i;
long sigsize;
sigsize = getsigsize( ptfig );
@ -855,9 +855,9 @@ losig_list *getlosig(lofig_list *ptfig, long index)
{
losig_list *ptsig;
ptype_list *pt;
int low;
int high;
int sigsize;
long low;
long high;
long sigsize;
sigsize = getsigsize( ptfig );
low = (index % sigsize);
@ -1010,13 +1010,13 @@ chain_list *ptscan;
char *ptchar;
char buffer[50];
char *result = NULL;
register int nseparmin = 1000;
register long nseparmin = 1000;
if (ptsig == NULL)
return NULL;
for (ptscan = ptsig->NAMECHAIN; ptscan; ptscan = ptscan->NEXT) {
register int nsepar = 0;
register long nsepar = 0;
if (ptscan->DATA != NULL) {
for (ptchar = (char *)ptscan->DATA; *ptchar != '\0'; ptchar++)
if (*ptchar == SEPAR)
@ -1481,13 +1481,13 @@ else
* function getsigsize() *
*******************************************************************************/
int getsigsize(lofig_list *ptfig)
long getsigsize(lofig_list *ptfig)
{
ptype_list *ptl;
ptl = getptype( ptfig->USER, PTSIGSIZE );
if( ptl )
return( (int)(ptl->DATA) );
return( (long)(ptl->DATA) );
return( SIGSIZE );
}
@ -1496,7 +1496,7 @@ int getsigsize(lofig_list *ptfig)
* function setsigsize() *
*******************************************************************************/
void setsigsize(lofig_list *ptfig, int nb)
void setsigsize(lofig_list *ptfig, long nb)
{
ptype_list *ptl;
@ -1528,7 +1528,7 @@ void delloconuser(locon_list *ptlocon)
ptype_list *scanptype;
ptype_list *next;
ptype_list *prev;
int del;
long del;
prev = NULL;
for( scanptype = ptlocon->USER ; scanptype ; scanptype = next )
@ -1570,7 +1570,7 @@ void dellofiguser(lofig_list *ptlofig)
ptype_list *scanptype;
ptype_list *next;
ptype_list *prev;
int del;
long del;
prev = NULL;
for( scanptype = ptlofig->USER ; scanptype ; scanptype = next )
@ -1615,7 +1615,7 @@ void delloinsuser(loins_list *ptloins)
ptype_list *scanptype;
ptype_list *next;
ptype_list *prev;
int del;
long del;
prev = NULL;
for( scanptype = ptloins->USER ; scanptype ; scanptype = next )
@ -1657,7 +1657,7 @@ void dellotrsuser(lotrs_list *ptlotrs)
ptype_list *scanptype;
ptype_list *next;
ptype_list *prev;
int del;
long del;
prev = NULL;
for( scanptype = ptlotrs->USER ; scanptype ; scanptype = next )
@ -1695,7 +1695,7 @@ void dellosiguser(losig_list *ptlosig)
ptype_list *scanptype;
ptype_list *next;
ptype_list *prev;
int del;
long del;
prev = NULL;
for( scanptype = ptlosig->USER ; scanptype ; scanptype = next )
@ -1959,7 +1959,7 @@ void dellocapuser(locap_list *ptlocap)
ptype_list *scanptype = NULL ;
ptype_list *next = NULL ;
ptype_list *prev = NULL ;
int del = 0 ;
long del = 0 ;
for(scanptype = ptlocap -> USER ; scanptype != NULL ; scanptype = next)
{
@ -2222,7 +2222,7 @@ void delloresuser(lores_list *ptlores)
ptype_list *scanptype = NULL ;
ptype_list *next = NULL ;
ptype_list *prev = NULL ;
int del = 0 ;
long del = 0 ;
for(scanptype = ptlores -> USER ; scanptype != NULL ; scanptype = next)
{
@ -2485,7 +2485,7 @@ void delloselfuser(loself_list *ptloself)
ptype_list *scanptype = NULL ;
ptype_list *next = NULL ;
ptype_list *prev = NULL ;
int del = 0 ;
long del = 0 ;
for(scanptype = ptloself -> USER ; scanptype != NULL ; scanptype = next)
{

View File

@ -28,7 +28,7 @@
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
*/
#ident "$Id: mbk_lo_util.c,v 1.4 2002/09/30 16:20:49 czo Exp $"
#ident "$Id: mbk_lo_util.c,v 1.5 2009/06/14 13:51:52 ludo Exp $"
#include <stdio.h>
#include <stdlib.h>
@ -1264,7 +1264,7 @@ void debugctc2 ( lofig_list *ptfig )
printf( "Information sur la figure %s.\n", ptfig->NAME );
for( sig = ptfig->LOSIG ; sig ; sig = sig->NEXT )
{
printf( "Signal %2ld (%08X)\n", sig->INDEX, (unsigned int) sig );
printf( "Signal %2ld (%08X)\n", sig->INDEX, (unsigned long) sig );
if( sig->PRCN )
{
for( scanchain = sig->PRCN->PCTC ;
@ -1274,12 +1274,12 @@ void debugctc2 ( lofig_list *ptfig )
{
ptctc = ( loctc_list* )( scanchain->DATA );
printf(
" CTC (%08X) entre le signal %2ld (%08X) et le signal %2ld (%08X).\n",
(unsigned int)ptctc,
" CTC (%lX) entre le signal %2ld (%lX) et le signal %2ld (%lX).\n",
(unsigned long)ptctc,
ptctc->SIG1->INDEX,
(unsigned int)ptctc->SIG1,
(unsigned long)ptctc->SIG1,
ptctc->SIG2->INDEX,
(unsigned int)ptctc->SIG2
(unsigned long)ptctc->SIG2
);
}
}
@ -1304,9 +1304,9 @@ void debugctc ( losig_list *headlosig, int niveau )
ptctc = (loctc_list*)( scanctc->DATA );
if( getptype( ptctc->USER, FLATTEN_CTC ) )
{
printf( "(%d) FLATTEN_CTC trouve dans la CTC (%08X) entre %ld.%ld et %ld.%ld.\n",
printf( "(%d) FLATTEN_CTC trouve dans la CTC (%lX) entre %ld.%ld et %ld.%ld.\n",
niveau,
(unsigned int)ptctc,
(unsigned long)ptctc,
ptctc->SIG1->INDEX,
ptctc->NODE1,
ptctc->SIG2->INDEX,
@ -1324,9 +1324,9 @@ void debugctc ( losig_list *headlosig, int niveau )
}
if( !scanctc2 )
{
printf( "(%d) CTC (%08X) entre %ld:%ld et %ld:%ld sur signal %ld non trouvee sur l'autre signal.\n",
printf( "(%d) CTC (%lX) entre %ld:%ld et %ld:%ld sur signal %ld non trouvee sur l'autre signal.\n",
niveau,
(unsigned int)ptctc,
(unsigned long)ptctc,
ptctc->SIG1->INDEX, ptctc->NODE1,
ptctc->SIG2->INDEX, ptctc->NODE2,
scanlosig->INDEX

View File

@ -28,7 +28,7 @@
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
*/
#ident "$Id: mbk_sys.c,v 1.3 2002/09/30 16:20:50 czo Exp $"
#ident "$Id: mbk_sys.c,v 1.4 2009/06/14 13:51:52 ludo Exp $"
#include <stdio.h>
#include <stdlib.h>
@ -55,7 +55,7 @@ int STAT_AUTOACKCHLD;
long mbkalloc_stat = 0; /* statistics on maximun allocated memory */
void *mbkalloc(unsigned int nbytes)
void *mbkalloc(size_t nbytes)
{
void *pt;
@ -69,7 +69,7 @@ void *pt;
return pt;
}
void *mbkrealloc(void *pt, unsigned int nbytes)
void *mbkrealloc(void *pt, size_t nbytes)
{
mbkalloc_stat += nbytes;

View File

@ -26,7 +26,7 @@
* Date : 18/12/91
* Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
* $Id: mbk_sys.h,v 1.2 2002/09/30 16:20:50 czo Exp $
* $Id: mbk_sys.h,v 1.3 2009/06/14 13:51:52 ludo Exp $
*/
#ifndef _MBK_SYS_H_
@ -44,8 +44,8 @@
extern FILE* mbkfopen __P((const char *name, const char *extension, const char *mode));
extern FILE *mbkfopentrace __P((const char *name, const char *extension, const char *mode));
extern void mbkfopen_infos __P((const FILE *in, const char *filename, const char *name, const char *extension, const char *mode, const char filter));
extern void* mbkalloc __P((unsigned int nbytes));
extern void* mbkrealloc __P((void *pt, unsigned int nbytes));
extern void* mbkalloc __P((size_t nbytes));
extern void* mbkrealloc __P((void *pt, size_t nbytes));
extern void mbkfree __P((void *ptr));
void ps();
extern void mbkackchld __P((int));

View File

@ -28,7 +28,7 @@
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
*/
#ident "$Id: mbk_util.c,v 1.5 2003/10/20 10:04:39 xtof Exp $"
#ident "$Id: mbk_util.c,v 1.6 2009/06/14 13:51:52 ludo Exp $"
#include <stdio.h>
#include <stdlib.h>
@ -872,7 +872,7 @@ char *mbkstrdup(const char *s)
if (s == NULL)
return NULL;
t = (char *)mbkalloc((unsigned int)(strlen(s) + 1));
t = (char *)mbkalloc((size_t)(strlen(s) + 1));
return strcpy(t, s);
}
@ -916,7 +916,7 @@ static char **table;
if (!size)
loadcatalog(&table, &size, 'F');
return size ?
(int)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
(long)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
}
/*******************************************************************************
@ -931,7 +931,7 @@ static char **table;
if (!size)
loadcatalog(&table, &size, 'G');
return size ?
(int)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
(long)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
}
/*******************************************************************************
@ -946,7 +946,7 @@ static char **table;
if (!size)
loadcatalog(&table, &size, 'C');
return size ?
(int)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
(long)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
}
/*******************************************************************************
@ -961,7 +961,7 @@ static char **table;
if (!size)
loadcatalog(&table, &size, 'D');
return size ?
(int)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
(long)bsearch(&figname, table, size, sizeof(char *), pstrcmp) : 0;
}
/*******************************************************************************

View File

@ -27,7 +27,7 @@
* Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
* Modified by pnt <Pierre.Nguyen-Tuong@lip6.fr> 2002
* $Id: mlo.h,v 1.7 2002/09/30 16:20:50 czo Exp $
* $Id: mlo.h,v 1.8 2009/06/14 13:51:52 ludo Exp $
*/
#ifndef _MLO_H_
@ -298,8 +298,8 @@ typedef struct loself /* analog inductor
extern char * getsigname __P((losig_list *ptsig));
extern void lofigchain __P((lofig_list *ptfig));
extern void viewlo __P(());
extern void setsigsize __P((lofig_list*, int));
extern int getsigsize __P((lofig_list* ));
extern void setsigsize __P((lofig_list*, long));
extern long getsigsize __P((lofig_list* ));
extern void dellosiguser __P((losig_list*));
extern void dellotrsuser __P((lotrs_list*));
extern void delloinsuser __P((loins_list*));

View File

@ -26,7 +26,7 @@
* Date : 31/08/93
* Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
* Modified by Czo <Olivier.Sirol@lip6.fr> 1997,98
* $Id: mut.h,v 1.8 2003/10/20 08:55:22 xtof Exp $
* $Id: mut.h,v 1.9 2009/06/14 13:51:52 ludo Exp $
*/
#ifndef _MUT_H_
@ -35,6 +35,8 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <libgen.h>
#ifdef __cplusplus
extern "C" {
@ -278,8 +280,8 @@ extern void mbkexit __P(( int ExitValue )); /* new exit handler system */
/*******************************************************************************
* externals for mbk_sys.c functions *
*******************************************************************************/
extern void *mbkalloc __P((unsigned int nbytes));
extern void *mbkrealloc __P((void *pt, unsigned int nbytes));
extern void *mbkalloc __P((size_t nbytes));
extern void *mbkrealloc __P((void *pt, size_t nbytes));
extern void mbkfree __P((void *ptr));
extern char *mbkgetenv __P((const char *name));
extern FILE *mbkfopen __P((const char *name, const char *extension, const char *mode));

View File

@ -21,7 +21,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ident "$Id: rcn_lo.c,v 1.4 2006/03/29 17:10:33 xtof Exp $"
#ident "$Id: rcn_lo.c,v 1.5 2009/06/14 13:51:52 ludo Exp $"
/*******************************************************************************
* rcn : acces functions to logical rc network structures *
@ -1096,7 +1096,7 @@ lonode_list *getlonode(ptsig, index)
losig_list *ptsig;
long index;
{
int taille;
long taille;
ptype_list *head;
chain_list *scan;
int max;
@ -1111,7 +1111,7 @@ long index;
EXIT(1);
}
taille = (int)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA);
taille = (long)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA);
scan = head->DATA;
pos=0;
@ -1144,7 +1144,7 @@ lonode_list *givelonode(ptsig, index)
losig_list *ptsig;
long index;
{
int taille;
long taille;
ptype_list *head;
chain_list *scan;
chain_list *prev;
@ -1173,7 +1173,7 @@ long index;
EXIT(1);
}
taille = (int)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA);
taille = (long)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA);
scan = head->DATA;
prev = head->DATA;
@ -1495,7 +1495,7 @@ loctc_list* heaploctc()
ptctc=HEAD_CTC_FREE;
for(i=1;i<RCNBUFSIZE;i++)
{
ptctc->SIG1 = ptctc+1;
ptctc->SIG1 = (struct losig *)ptctc+1;
ptctc->NODE1 = -1000;
ptctc++;
}
@ -1627,7 +1627,7 @@ losig_list *ptsig;
{
chain_list *head;
chain_list *scan;
int taille;
long taille;
ptype_list *ptl;
int i;
lonode_list *ptnode;
@ -1651,7 +1651,7 @@ losig_list *ptsig;
exit(-1);
}
taille = (int)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA );
taille = (long)(getptype( ptsig->PRCN->USER, RCN_SIZETAB )->DATA );
for( scan = head; scan ; scan = scan->NEXT )
{
for( i=0 ; i<taille ; i++ )
@ -1963,14 +1963,14 @@ unsigned char flag;
{
long i;
ptype_list *head;
int taille;
long taille;
chain_list *scan;
head = getptype( ptrcnet->USER, RCN_LONODE );
if( ! head )
return;
taille = (int)(getptype( ptrcnet->USER, RCN_SIZETAB )->DATA);
taille = (long)(getptype( ptrcnet->USER, RCN_SIZETAB )->DATA);
for( scan = (chain_list*)(head->DATA) ; scan ; scan = scan->NEXT )
{
for( i=0 ; i<taille ; i++ )
@ -2406,8 +2406,8 @@ losig_list *ptsig;
if( !scanwire )
{
wireok = 0;
printf( " [16] Wire %08X inexistant trouve sur le noeud %d.\n",
(int)scanchain->DATA,
printf( " [16] Wire %lX inexistant trouve sur le noeud %d.\n",
(long)scanchain->DATA,
i
);
}

Some files were not shown because too many files have changed in this diff Show More