@ -1,3 +1,6 @@
0.9:
fmt_str did not check for out==NULL! Thanks, Uwe Ohse.
0.8:
BSD compatibility.
fix mmap_shared.
@ -4,10 +4,10 @@ unsigned int fmt_str(char *out,const char *in) {
register char* s=out;
register const char* t=in;
for (;;) {
if (!*t) break; *s=*t; ++s; ++t;
if (!*t) break; if (s) { *s=*t; ++s; } ++t;
}
return s-out;
return t-in;
@ -14,7 +14,10 @@
__asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
int main(int argc,char* argv[]) {
#if 1
char buf[100];
printf("%d\n",fmt_str(buf,"fnord"));
printf("%d\n",fmt_str(0,"fnord"));
#if 0
buffer_putulong(buffer_1,23);
// buffer_putspace(buffer_1);
buffer_putsflush(buffer_1,"\n");