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.
 
 
 
 

25 lines
605 B

  1. #include "fmt.h"
  2. size_t fmt_str(char *out,const char *in) {
  3. register char* s=out;
  4. register const char* t=in;
  5. for (;;) {
  6. if (!*t) break;
  7. if (s) { *s=*t; ++s; }
  8. ++t;
  9. if (!*t) break;
  10. if (s) { *s=*t; ++s; }
  11. ++t;
  12. if (!*t) break;
  13. if (s) { *s=*t; ++s; }
  14. ++t;
  15. if (!*t) break;
  16. if (s) { *s=*t; ++s; }
  17. ++t;
  18. }
  19. return (size_t)(t-in);
  20. }