Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Functions
libc.c File Reference

Pseudo-libC implementation. More...

#include "libc.h"
#include <stdint.h>

Functions

void * memset (void *ptr, int value, size_t num)
 Sets a memory space with a single, fixed value. More...
 
void * strcpy (char *dest, const char *src)
 String copy. More...
 
void * memcpy (void *destination, const void *source, size_t num)
 Copies data from source to destination. More...
 
char * strcat (char *dest, const char *source)
 Concatenates a source string into a destination string, assuming the destination string buffer is large enough. More...
 
int strlen (char *str)
 String length. More...
 

Detailed Description

Pseudo-libC implementation.

Warning
Some of these implementations are unsafe. We know. We're not proud of this.

Function Documentation

◆ memcpy()

void* memcpy ( void *  destination,
const void *  source,
size_t  num 
)

Copies data from source to destination.

Parameters
destinationDestination address
sourceSource address
numSize of data to copy
Returns
Pointer to the destination address

◆ memset()

void* memset ( void *  ptr,
int  value,
size_t  num 
)

Sets a memory space with a single, fixed value.

Parameters
ptrPointer to the memory space
valueThe value to write
numThe amount of memory to write to
Returns
Pointer to the memory space

◆ strcat()

char* strcat ( char *  dest,
const char *  source 
)

Concatenates a source string into a destination string, assuming the destination string buffer is large enough.

Parameters
destDestination string buffer
sourceSource string buffer
Returns
Destination string buffer, containing the concatenated strings.

◆ strcpy()

void* strcpy ( char *  dest,
const char *  src 
)

String copy.

◆ strlen()

int strlen ( char *  str)

String length.