![]() |
Helixis 1.0
Task Programming API
|
Go to the source code of this file.
Functions | |
| unsigned long | hlx_hash (const char *str) |
| void * | hlx_memcpy (void *dest, const void *src, unsigned int num) |
| unsigned long hlx_hash | ( | const char * | str | ) |
Compute an hash code with the given string
| str | The string. |
Definition at line 43 of file builtins.c.
{
unsigned long hash;
int c;
hash = 5361;
while (*str)
{
c = *str;
hash = (hash << 5) + hash + c;
++str;
}
return (hash);
}
| void* hlx_memcpy | ( | void * | dest, |
| const void * | src, | ||
| unsigned int | num | ||
| ) |
Definition at line 58 of file builtins.c.
Referenced by hlx_core_init().
{
char* dst8 = (char*)dest;
char* src8 = (char*)src;
if (num & 1)
{
dst8[0] = src8[0];
dst8 += 1;
src8 += 1;
}
num /= 2;
while (num--)
{
dst8[0] = src8[0];
dst8[1] = src8[1];
dst8 += 2;
src8 += 2;
}
return (dest);
}
1.7.4