- Don't put the digits strings on the stack.
authorHartmut Birr <osexpert@googlemail.com>
Tue, 2 Sep 2003 18:19:41 +0000 (18:19 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Tue, 2 Sep 2003 18:19:41 +0000 (18:19 +0000)
svn path=/trunk/; revision=5961

reactos/lib/ntdll/stdio/sprintf.c
reactos/lib/ntdll/stdio/swprintf.c
reactos/ntoskrnl/rtl/sprintf.c
reactos/ntoskrnl/rtl/swprintf.c

index f458b3f..7a2e28f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sprintf.c,v 1.11 2003/07/11 13:50:23 royce Exp $
+/* $Id: sprintf.c,v 1.12 2003/09/02 18:19:41 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -62,8 +62,8 @@ number(char * buf, char * end, long long num, int base, int size, int precision,
 {
        char c,sign,tmp[66];
        const char *digits;
-       const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-       const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+       const char *small_digits = "0123456789abcdefghijklmnopqrstuvwxyz";
+       const char *large_digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        int i;
 
        digits = (type & LARGE) ? large_digits : small_digits;
index 79dc7ae..cf876f5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: swprintf.c,v 1.13 2003/07/11 13:50:23 royce Exp $
+/* $Id: swprintf.c,v 1.14 2003/09/02 18:19:41 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -64,8 +64,8 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec
 {
        wchar_t c, sign, tmp[66];
        const wchar_t *digits;
-       const wchar_t small_digits[] = L"0123456789abcdefghijklmnopqrstuvwxyz";
-       const wchar_t large_digits[] = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+       const wchar_t *small_digits = L"0123456789abcdefghijklmnopqrstuvwxyz";
+       const wchar_t *large_digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        int i;
 
        digits = (type & LARGE) ? large_digits : small_digits;
index 8ac20f1..90e112f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sprintf.c,v 1.12 2003/07/11 01:23:16 royce Exp $
+/* $Id: sprintf.c,v 1.13 2003/09/02 18:19:41 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -61,8 +61,8 @@ number(char *buf, char *end, long long num, int base, int size, int precision, i
 {
   char c,sign,tmp[66];
   const char *digits;
-  const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-  const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+  const char *small_digits = "0123456789abcdefghijklmnopqrstuvwxyz";
+  const char *large_digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
   int i;
 
   digits = (type & LARGE) ? large_digits : small_digits;
index fc8ef14..117bf03 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: swprintf.c,v 1.10 2003/07/11 01:23:16 royce Exp $
+/* $Id: swprintf.c,v 1.11 2003/09/02 18:19:41 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -64,8 +64,8 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec
 {
        wchar_t c,sign, tmp[66];
        const wchar_t *digits;
-       const wchar_t small_digits[] = L"0123456789abcdefghijklmnopqrstuvwxyz";
-       const wchar_t large_digits[] = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+       const wchar_t *small_digits = L"0123456789abcdefghijklmnopqrstuvwxyz";
+       const wchar_t *large_digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        int i;
 
        digits = (type & LARGE) ? large_digits : small_digits;