xref: /reactos/modules/rostests/tests/edit/utils.c (revision 1734f297)
1 /*
2  * Edit Control Test for ReactOS, quick n' dirty. There you go
3  * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
4  * by Waldo Alvarez Ca�izares <wac at ghost.matcom.uh.cu>, June 22, 2003.
5  */
6 
7 #include <windows.h>
8 
9 static const char hexvals[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
10 VOID  htoa (unsigned int val, char *buf)
11 {
12    int i;
13    buf += 7;
14 
15    for (i=0;i<8;i++)
16        {
17             *buf-- = hexvals[val & 0x0000000F];
18             val = val >> 4;
19        }
20 }
21 
22 
23 VOID strcpy_(char *dst, const char *src)
24 {
25 	const char* p = src;
26 	while ((*dst++ = *p++)) {}
27 }
28 
29 VOID strcpyw_(wchar_t* dst,wchar_t* src)
30 {
31     const wchar_t* p = src;
32     while ((*dst++ = *p++)) {}
33 }
34