cinap_lenrekadd hg and python4bb9e2215 years agoHistory
25 lines · 439 B · C
RawDownload
 /* A perhaps slow but I hope correct implementation of memmove */ extern char *memcpy(char *, char *, int); char *memmove(char *dst, char *src, int n){	char *realdst = dst;	if (n <= 0)		return dst;	if (src >= dst+n || dst >= src+n)		return memcpy(dst, src, n);	if (src > dst) {		while (--n >= 0)			*dst++ = *src++;	}	else if (src < dst) {		src += n;		dst += n;		while (--n >= 0)			*--dst = *--src;	}	return realdst;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t