* src/pairs.c (bdd_copypair): Use memcpy to copy from->result.
This commit is contained in:
parent
42782f3a83
commit
2f6e476cba
2 changed files with 7 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
2003-05-20 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
2003-05-20 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/pairs.c (bdd_copypair): Use memcpy to copy from->result.
|
||||||
|
|
||||||
* src/pairs.c (bdd_setbddpair): Fix prototype in documentation.
|
* src/pairs.c (bdd_setbddpair): Fix prototype in documentation.
|
||||||
|
|
||||||
2003-05-19 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
2003-05-19 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
========================================================================*/
|
========================================================================*/
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/pairs.c,v 1.4 2003/05/20 08:22:36 aduret Exp $
|
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/pairs.c,v 1.5 2003/05/20 10:42:19 aduret Exp $
|
||||||
FILE: pairs.c
|
FILE: pairs.c
|
||||||
DESCR: Pair management for BDD package.
|
DESCR: Pair management for BDD package.
|
||||||
AUTH: Jorn Lind
|
AUTH: Jorn Lind
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <assert.h>
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
|
|
||||||
/*======================================================================*/
|
/*======================================================================*/
|
||||||
|
|
@ -158,7 +159,7 @@ PROTO {* bddPair *bdd_newpair(void) *}
|
||||||
DESCR {* Variable pairs of the type {\tt bddPair} are used in
|
DESCR {* Variable pairs of the type {\tt bddPair} are used in
|
||||||
{\tt bdd\_replace} to define which variables to replace with
|
{\tt bdd\_replace} to define which variables to replace with
|
||||||
other variables. This function allocates such an empty table. The
|
other variables. This function allocates such an empty table. The
|
||||||
table can be freed by a call to {\em bdd\_freepair}. *}
|
table can be freed by a call to {\tt bdd\_freepair}. *}
|
||||||
RETURN {* Returns a new table of pairs. *}
|
RETURN {* Returns a new table of pairs. *}
|
||||||
ALSO {* bdd\_freepair, bdd\_replace, bdd\_setpair, bdd\_setpairs *}
|
ALSO {* bdd\_freepair, bdd\_replace, bdd\_setpair, bdd\_setpairs *}
|
||||||
*/
|
*/
|
||||||
|
|
@ -189,7 +190,7 @@ SHORT {* clone a pair table *}
|
||||||
PROTO {* bddPair *bdd_copypair(bddPair *from) *}
|
PROTO {* bddPair *bdd_copypair(bddPair *from) *}
|
||||||
DESCR {* Duplicate the table of pairs {\tt from}.
|
DESCR {* Duplicate the table of pairs {\tt from}.
|
||||||
This function allocates the cloned table. The
|
This function allocates the cloned table. The
|
||||||
table can be freed by a call to {\em bdd\_freepair}. *}
|
table can be freed by a call to {\tt bdd\_freepair}. *}
|
||||||
RETURN {* Returns a new table of pairs. *}
|
RETURN {* Returns a new table of pairs. *}
|
||||||
ALSO {* bdd\_newpair, bdd\_freepair, bdd\_replace, bdd\_setpair, bdd\_setpairs *}
|
ALSO {* bdd\_newpair, bdd\_freepair, bdd\_replace, bdd\_setpair, bdd\_setpairs *}
|
||||||
*/
|
*/
|
||||||
|
|
@ -202,8 +203,7 @@ bddPair *bdd_copypair(bddPair *from)
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (n=0 ; n<bddvarnum ; n++)
|
memcpy(p->result, from->result, bddvarnum * sizeof(*p->result));
|
||||||
p->result[n] = from->result[n];
|
|
||||||
|
|
||||||
p->id = update_pairsid();
|
p->id = update_pairsid();
|
||||||
p->last = -1;
|
p->last = -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue