Files
mars-libowfat/fmt/fmt_str.c
leitner ea2b3e6c6f updates makefile dependencies
remove compiler.h include from tryinline.c
add #ifdef INTERNAL to files included by n.c and ent.c so they don't need headers in libowfat/ and can compile without an installed or build libowfat
2025-01-22 17:32:17 +00:00

27 lines
638 B
C

#ifndef INTERNAL
#include <libowfat/fmt.h>
#endif
size_t fmt_str(char *out,const char *in) {
register char* s=out;
register const char* t=in;
for (;;) {
if (!*t) break;
if (s) { *s=*t; ++s; }
++t;
if (!*t) break;
if (s) { *s=*t; ++s; }
++t;
if (!*t) break;
if (s) { *s=*t; ++s; }
++t;
if (!*t) break;
if (s) { *s=*t; ++s; }
++t;
}
return (size_t)(t-in);
}