mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
r6880 accidentally backed out r6780. That's what I get for accepting
source files from Mike rather than patches, and not adequately checking the result... [originally from svn r6882] [r6780 == f05c25347d66821d928668a7e87dffbf3ffed027] [r6880 == b9547673c6462bf73e642328300479df6df71d7b]
This commit is contained in:
14
dsf.c
14
dsf.c
@ -60,17 +60,23 @@ done:
|
|||||||
sfree(inverse_elements);
|
sfree(inverse_elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
int *snew_dsf(int size)
|
void dsf_init(int *dsf, int size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int *ret;
|
|
||||||
|
|
||||||
ret = snewn(size, int);
|
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
/* Bottom bit of each element of this array stores whether that element
|
/* Bottom bit of each element of this array stores whether that element
|
||||||
* is opposite to its parent, which starts off as false */
|
* is opposite to its parent, which starts off as false */
|
||||||
ret[i] = i << 1;
|
dsf[i] = i << 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int *snew_dsf(int size)
|
||||||
|
{
|
||||||
|
int *ret;
|
||||||
|
|
||||||
|
ret = snewn(size, int);
|
||||||
|
dsf_init(ret, size);
|
||||||
|
|
||||||
/*print_dsf(ret, size); */
|
/*print_dsf(ret, size); */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user