[go: up one dir, main page]

File: str_copy.c

package info (click to toggle)
fnord 1.9-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 328 kB
  • ctags: 167
  • sloc: ansic: 1,889; makefile: 99; sh: 62; perl: 36
file content (13 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "str.h"

unsigned int str_copy(char *out,const char *in) {
  register char* s=out;
  register const char* t=in;
  for (;;) {
    if (!(*s=*t)) break; ++s; ++t;
    if (!(*s=*t)) break; ++s; ++t;
    if (!(*s=*t)) break; ++s; ++t;
    if (!(*s=*t)) break; ++s; ++t;
  }
  return s-out;
}