Mail Archives: cygwin/1997/11/14/00:53:59
Hi all !
I was asked to give a code example where the COOLVIEW strncat function fails.
Consider the following (which is nonsense, but shows what's going on):
....
int main()
{
char string[10];
...
strcpy(string, "test");
...
/* make string empty and check */
string[0] = '\0';
printf(string);
/* append a character and check */
strncat(string, "x", 1);
printf(string);
return 0;
}
This example should print
->
-> x
(without arrows...), but it actually gives
->
-> testx
BTW, after replacing the cygwin.dll from COOLVIEW by its original b18 version,
the result is correct.
Hope this helps,
Axel
===============================================================================
Axel Riese
Research Institute for Symbolic Computation
J. Kepler University Linz
A-4040 Linz e-Mail: Axel DOT Riese AT risc DOT uni-linz DOT ac DOT at
Austria URL: http://www.risc.uni-linz.ac.at/research/combinat/risc/
===============================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -