[gs-cvs] rev 7675 - Wrong log message.
Leonardo
leonardo at artifex.com
Sun Feb 4 08:23:36 PST 2007
The log message should start as this :
Fix : MSVC doesn't implement snprintf (continued).
Leo.
----- Original Message -----
From: <leonardo at ghostscript.com>
To: <gs-cvs at ghostscript.com>
Sent: Sunday, February 04, 2007 7:19 PM
Subject: [gs-cvs] rev 7675 - trunk/gs/src
> Author: leonardo
> Date: 2007-02-04 08:19:41 -0800 (Sun, 04 Feb 2007)
> New Revision: 7675
>
> Modified:
> trunk/gs/src/gp_mswin.c
> Log:
> Fix : MSVC doesn't implement snscanf (continued).
>
> DETAILS :
>
> The last revision doesn't compile with MSVC6,7,
> so this is a better one.
> Patch from SaGS.
>
> EXPECTED DIFFERENCES :
>
> None.
>
>
> Modified: trunk/gs/src/gp_mswin.c
> ===================================================================
> --- trunk/gs/src/gp_mswin.c 2007-02-03 13:30:24 UTC (rev 7674)
> +++ trunk/gs/src/gp_mswin.c 2007-02-04 16:19:41 UTC (rev 7675)
> @@ -725,8 +725,15 @@
>
> int snprintf(char *buffer, size_t count, const char *format, ...)
> {
> - va_list args;
> - va_start(args, format);
> + if (count > 0) {
> + va_list args;
> + int n;
>
> - return vsnprintf_s(buffer, count, count - 1, format, args);
> + va_start(args, format);
> + n = _vsnprintf(buffer, count, format, args);
> + buffer[count - 1] = 0;
> + va_end(args);
> + return n;
> + } else
> + return 0;
> }
> \ No newline at end of file
>
> _______________________________________________
> gs-cvs mailing list
> gs-cvs at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-cvs
More information about the gs-cvs
mailing list