Perhaps this might lead you in the right direction Jean-Christophe ...

#include <stdarg.h>
#include <stdlib.h>
#include <strings.h>

Str_t  s_format( Str_t fmt, ... ){
   va_list  ap ;
   Int_t    nx ;
   Byt_t    buf[1] ;
   Str_t    qptr ;

   va_start( ap, fmt );
    nx = vsnprintf( buf, 0, fmt, ap ) ;
   va_end( ap ) ;

   qptr = (Str_t) q_calloc( 1, nx+1 ) ;

   va_start( ap, fmt ) ;
    nx = vsnprintf( qptr, nx+1, fmt, ap ) ;
   va_end( ap ) ;

   return qptr ;
}

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
Robert S. Sciuk         http://www.controlq.com         259 Simcoe St. S.
Control-Q Research      tel: 905.576.8028               Oshawa, Ont.
r...@controlq.com       fax: 905.576.8386               Canada, L1H 4H3
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to