[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-glpk] print_context in glpmpl01.c

From: Andrew Makhorin
Subject: Re: [Bug-glpk] print_context in glpmpl01.c
Date: Mon, 12 Nov 2007 01:40:14 +0300

> in glpmpl01.c, print_context defines c as int. c should be char because
> mpl->context is *char.

I do not think this is a bug. Char's being used in expressions are
converted to int's, so it is normal to use int for representing one

> memmove will copy only CONTEXT_SIZE-1 bytes even if char is 2 bytes wide
> on unicode systems. strncpy might be as better choice. Otherwise You
> might use memmove with (CONTEXT_SIZE-1) * sizeof(char).

Glpk conforms to ILP32, LLP64, and LP64 programming models
(please see http://www.unix.org/version2/whatsnew/lp64_wp.html), where
sizeof(char) is always 1 and CHAR_BIT is always 8. The same conventions
are used on all GNU platforms. Wide characters have their own data type,
namely, wchar.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]