Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
323 B

  1. #include <stdarg.h>
  2. #include "fmt.h"
  3. size_t fmt_strm_internal(char* dest, ...) {
  4. size_t n;
  5. va_list a;
  6. const char* s;
  7. va_start(a,dest);
  8. for (n=0; (s=va_arg(a,const char*)); ) {
  9. size_t inc=fmt_str(dest,s);
  10. if (n+inc<n) return (size_t)-1;
  11. if (dest) dest+=inc;
  12. n+=inc;
  13. }
  14. va_end(a);
  15. return n;
  16. }