Skip to content

Commit

Permalink
portability
Browse files Browse the repository at this point in the history
Signed-off-by: Mattias Andr茅e <maandree@operamail.com>
  • Loading branch information
maandree committed Apr 24, 2014
1 parent a561753 commit f620d68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hungarian.c
Expand Up @@ -69,7 +69,7 @@ typedef struct
/**
* The set of all limbs, a limb consist of 64 bits
*/
cell* limbs;
llong* limbs;

/**
* Singleton array with the index of the first non-zero limb
Expand Down Expand Up @@ -108,7 +108,7 @@ size_t lb(llong x) __attribute__((const));



void print(cell** t, size_t n, size_t m, long** assignment);
void print(cell** t, size_t n, size_t m, ssize_t** assignment);

int main(int argc, char** argv)
{
Expand Down Expand Up @@ -191,7 +191,7 @@ void print(cell** t, size_t n, size_t m, ssize_t** assignment)
for (j = 0; j < m; j++)
{
if (*(*(assigned + i) + j))
printf("\033[%lim", 30 + *(*(assigned + i) + j));
printf("\033[%im", (int)(30 + *(*(assigned + i) + j)));
printf("%5li%s\033[m ", (cell)(*(*(t + i) + j)), (*(*(assigned + i) + j) ? "^" : " "));
}
printf("\n\n");
Expand Down Expand Up @@ -629,9 +629,9 @@ BitSet new_BitSet(size_t size)
c++;

this.limbs = malloc(c * sizeof(llong));
this.prev = malloc((c + 1) * sizeof(long));
this.next = malloc((c + 1) * sizeof(long));
*(this.first = malloc(sizeof(long))) = 0;
this.prev = malloc((c + 1) * sizeof(size_t));
this.next = malloc((c + 1) * sizeof(size_t));
*(this.first = malloc(sizeof(size_t))) = 0;

size_t i;
for (i = 0; i < c; i++)
Expand Down

0 comments on commit f620d68

Please sign in to comment.