Mail Archives: djgpp/1999/09/02/13:47:49
On Wed, 1 Sep 1999, Peter Restall wrote:
> Thanks. However, I tried the '%hd' and '%hX', but to no avail. The new code
> I used is that given below:
> sscanf(modedef, "%[^:]:%hdx%hd:%hd:%hd:%hX:%hX:%hX",
> mode->name,
> &mode->width,
> &mode->height,
> &mode->depth,
> &mode->flags,
> &seg,
> &off,
> &mode->num);
>
> But it still doesn't work.
Are the symptoms *exactly* the same with the new code?
> The thing is, the code works fine in Linux, which is usually
> the first to complain if there's a segmentation violation or something.
This doesn't prove anything. Linux uses an entirely different library
with a different implementation of `sscanf'. It could mean that
DJGPP's version has a bug that reveals itself in your case, but it
also could mean that the bugs in your code manifest themselves in a
different manner in these two environments.
If you cannot figure this out, please post a complete short program
that can be compiled and debugged, and which exhibits this behavior.
Then someone will probably find the problem.
- Raw text -