From f620d685afb1e9ea45f1fe78463d1d7796a40f0d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 24 Apr 2014 10:09:16 +0200 Subject: portability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- hungarian.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hungarian.c') diff --git a/hungarian.c b/hungarian.c index e981066..fdc7a7a 100644 --- a/hungarian.c +++ b/hungarian.c @@ -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 @@ -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) { @@ -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"); @@ -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++) -- cgit v1.2.3-70-g09d2