Mail Archives: djgpp/1997/08/25/01:18:17
daisuke wrote:
>
> I use gcc for MS-DOS ported by you, and I am facing problem. I found
> that atoi function and fgets function working starangely. I used atoi,
> but it returns incorrect value. The argument was a character
> representing one digit integer, but it returns four digit integer. For
> fgets function, file pointer increment is incorrect. It read a string
> containing 70 character, but increment was only 2 bytes. Those
> functions sometimes work properly, sometimes don't.
>
> Is there debugged version already, or patch?
Please give further details on your attempts to use these functions,
such as sample code and data. As a 32-bit compiler, DJGPP has features
which may confuse you if you are used to 16-bit compilers like Borland
and MSVC. For example, integers are four bytes instead of two. I don't
know if this could be causing your problem; we need more specific
details.
Please post the smallest working program which displays the problems you
are experiencing, along with the data you are trying to read. Also,
make sure you're compiling your program with all the warning options
turned on, such as '-Wall'. These will often catch less obvious
mistakes.
hth
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better! This time, you're going all the way down...|
---------------------------------------------------------------------
- Raw text -