]> git.sur5r.net Git - cc65/commitdiff
Use xsprintf instead of sprintf.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 6 Sep 2009 19:07:18 +0000 (19:07 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 6 Sep 2009 19:07:18 +0000 (19:07 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4124 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/anonname.c

index 499532f932025e6ad98f596ab28800a816aaef41..27b498d2a3e14c44dcd04df0fbe34afd62ff0951 100644 (file)
@@ -1,15 +1,15 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                               anonname.c                                 */
+/*                               anonname.c                                 */
 /*                                                                           */
 /*               Create names for anonymous variables/types                 */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000      Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2000-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 #include <stdio.h>
 #include <string.h>
 
+/* common */
+#include "xsprintf.h"
+
 /* cc65 */
 #include "anonname.h"
+#include "ident.h"
 
 
 
@@ -63,7 +67,7 @@ char* AnonName (char* Buf, const char* Spec)
  */
 {
     static unsigned ACount = 0;
-    sprintf (Buf, "%s-%s-%04X", AnonTag, Spec, ++ACount);
+    xsprintf (Buf, IDENTSIZE, "%s-%s-%04X", AnonTag, Spec, ++ACount);
     return Buf;
 }