[AD] Grabber and vsnprintf

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I'd used vsnprintf a few times in the grabber, but it seems to be C99 only.
The attached patch changes it to uvszprintf, which seems to work just fine 
despite not setting the encoding.
There are quite a few calls to vsprintf() in dat that we should probably 
also change for good measure.

Evert
Index: tools/grabber.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tools/grabber.c,v
retrieving revision 1.75
diff -u -r1.75 grabber.c
--- tools/grabber.c	3 May 2005 20:56:46 -0000	1.75
+++ tools/grabber.c	14 May 2005 12:00:31 -0000
@@ -3418,7 +3418,7 @@
    char buf[1024];
 
    va_start(args, fmt);
-   vsprintf(buf, fmt, args);
+   uvszprintf(buf, 1024, fmt, args);
    va_end(args);
 
    show_mouse(NULL);
@@ -3440,7 +3440,7 @@
    char buf[1024];
 
    va_start(args, fmt);
-   vsprintf(buf, fmt, args);
+   uvszprintf(buf, 1024, fmt, args);
    va_end(args);
 
    box_out(buf);
@@ -3455,7 +3455,7 @@
    char buf[1024];
 
    va_start(args, fmt);
-   vsprintf(buf, fmt, args);
+   uvszprintf(buf, 1024, fmt, args);
    va_end(args);
 
    show_mouse(NULL);
@@ -3477,7 +3477,7 @@
    char buf[1024];
 
    va_start(args, fmt);
-   vsprintf(buf, fmt, args);
+   uvszprintf(buf, 1024, fmt, args);
    va_end(args);
 
    set_mouse_sprite(my_mouse_pointer);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/