Blame src/internal/ntux_nolibc_impl.c

26e14f
/***********************************************************/
26e14f
/*  ntux: native translation und extension                 */
db57dd
/*  Copyright (C) 2016--2018  Z. Gilboa                    */
26e14f
/*  Released under GPLv2 and GPLv3; see COPYING.NTUX.      */
26e14f
/***********************************************************/
26e14f
471bb0
#include <psxxfi/xfi_base.h>
26e14f
26e14f
void * ntux_memcpy(void * dst, const void * src, size_t n)
26e14f
{
471bb0
	return __xfi_memcpy(dst,src,n);
26e14f
}
26e14f
26e14f
void * ntux_memset(void * ch, int c, size_t n)
26e14f
{
471bb0
	return __xfi_memset(ch,c,n);
26e14f
}
26e14f
26e14f
char * ntux_strcpy(char * dst, const char * src)
26e14f
{
471bb0
	return __xfi_memcpy(
26e14f
		dst,src,
471bb0
		__xfi_strlen(src));
26e14f
}
26e14f
26e14f
size_t ntux_strlen(const char * ch)
26e14f
{
471bb0
	return __xfi_strlen(ch);
26e14f
}
26e14f
26e14f
int ntux_strcmp(const char * a, const char * b)
26e14f
{
471bb0
	return __xfi_strcmp(a,b);
26e14f
}
26e14f
26e14f
int ntux_strncmp(const char * a, const char * b, size_t n)
26e14f
{
471bb0
	return __xfi_strncmp(a,b,n);
26e14f
}
26e14f
26e14f
char * ntux_strchr(const char * ch, int c)
26e14f
{
26e14f
	for (; *ch; ch++)
26e14f
		if (*ch == c)
26e14f
			return (char *)ch;
26e14f
	return 0;
26e14f
}
26e14f
26e14f
char * ntux_strrchr(const char * ch, int c)
26e14f
{
26e14f
	const char * base;
26e14f
26e14f
	base = ch;
471bb0
	ch  += __xfi_strlen(ch);
26e14f
26e14f
	for (; ch >= base; ch--)
26e14f
		if (*ch == c)
26e14f
			return (char *)ch;
26e14f
	return 0;
26e14f
}
26e14f
26e14f
#ifdef NTUX_EXPORT
26e14f
int __stdcall ntux_entry_point(void * hinstance, uint32_t reason, void * reserved)
26e14f
{
26e14f
	(void)hinstance;
26e14f
	(void)reason;
26e14f
	(void)reserved;
26e14f
26e14f
	return 1;
26e14f
}
26e14f
#endif