Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0116/6

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


memccpy is in bsd.h
 [rsc] --rw-rw-r-- M 661145 rsc sys 1079 Jan 16 22:34 sys/src/ape/lib/utf/utfecpy.c
	/n/sourcesdump/2006/0116/plan9/sys/src/ape/lib/utf/utfecpy.c:16,36 - 
	/n/sourcesdump/2006/0117/plan9/sys/src/ape/lib/utf/utfecpy.c:16,21
	  #include "utf.h"
	  #include "utfdef.h"
	  
	- static void*
	- memccpy(void *a1, void *a2, int c, ulong n)
	- {
	- 	uchar *s1, *s2;
	- 
	- 	s1 = a1;
	- 	s2 = a2;
	- 	c &= 0xFF;
	- 	while(n > 0) {
	- 		if((*s1++ = *s2++) == c)
	- 			return s1;
	- 		n--;
	- 	}
	- 	return 0;
	- }
	  char*
	  utfecpy(char *to, char *e, char *from)
	  {


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.