projects
/
bison.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(bitsets_sources): Add vbitset.c, vbitset.h.
[bison.git]
/
src
/
relation.c
diff --git
a/src/relation.c
b/src/relation.c
index 5efb29d07d37c6e98988fc0c3933079059b0af9a..9eb647c47cf2144710683a8692ff24ad9389a84f 100644
(file)
--- a/
src/relation.c
+++ b/
src/relation.c
@@
-97,8
+97,8
@@
relation_digraph (relation r, size_t size, bitsetv *function)
unsigned i;
infinity = size + 2;
unsigned i;
infinity = size + 2;
-
INDEX = XCALLOC (relation_node
, size + 1);
-
VERTICES = XCALLOC (relation_node
, size + 1);
+
CALLOC (INDEX
, size + 1);
+
CALLOC (VERTICES
, size + 1);
top = 0;
R = r;
top = 0;
R = r;
@@
-126,11
+126,11
@@
void
relation_transpose (relation *R_arg, int n)
{
/* The result. */
relation_transpose (relation *R_arg, int n)
{
/* The result. */
- relation new_R =
XCALLOC (relation_nodes
, n);
+ relation new_R =
CALLOC (new_R
, n);
/* END_R[I] -- next entry of NEW_R[I]. */
/* END_R[I] -- next entry of NEW_R[I]. */
- relation end_R =
XCALLOC (relation_nodes
, n);
+ relation end_R =
CALLOC (end_R
, n);
/* NEDGES[I] -- total size of NEW_R[I]. */
/* NEDGES[I] -- total size of NEW_R[I]. */
- int *nedges =
XCALLOC (int
, n);
+ int *nedges =
CALLOC (nedges
, n);
int i, j;
if (trace_flag & trace_sets)
int i, j;
if (trace_flag & trace_sets)
@@
-149,7
+149,7
@@
relation_transpose (relation *R_arg, int n)
for (i = 0; i < n; i++)
if (nedges[i] > 0)
{
for (i = 0; i < n; i++)
if (nedges[i] > 0)
{
- relation_node *sp =
XCALLOC (relation_node
, nedges[i] + 1);
+ relation_node *sp =
CALLOC (sp
, nedges[i] + 1);
sp[nedges[i]] = -1;
new_R[i] = sp;
end_R[i] = sp;
sp[nedges[i]] = -1;
new_R[i] = sp;
end_R[i] = sp;