[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Good bits from Marcin's patch3
From: |
Glenn Satchell |
Subject: |
Re: Good bits from Marcin's patch3 |
Date: |
Thu, 4 Apr 2002 00:58:37 +1000 (EST) |
> We should implement another test, similar to the following (just an idea,
> I'll finish it this night):
>
> char buf[5] = {0, 0, 0, 0, 0};
> snprintf(buf, 4, "ABCD");
> exit( strlen(buf) != 3 );
>
> If the implementation is broken strlen(buf) will be 4, C99 compliant should
> produce 3. :-)
Hi,
Just tested this on Solaris 2.6 with gcc and it works correctly. So
this could be a good test.
regards,
-glenn