OSSDKImpossible SDK

Reference

impossible/base.h

Start-up, memory and console.

Tier 0

im_main

Every program defines this. Its result is the exit code.

impossible/base.h, line 8
int im_main(void);

im_alloc

Zeroed memory, or NULL when there is none.

impossible/base.h, line 11
void *im_alloc(size_t bytes);

im_free

Gives memory of im_alloc back. im_free(NULL) does nothing.

impossible/base.h, line 14
void im_free(void *memory);

im_has_argument

True when the command line has this exact argument, unquoted.

impossible/base.h, line 17
bool im_has_argument(const wchar_t *argument);

im_print

Writes UTF-8 text to standard output; false when it could not all be written.

impossible/base.h, line 20
bool im_print(const char *text);

memcpy memmove memset memcmp

The four memory routines are as C defines them, and the compiler calls them too. This one copies between places that do not overlap.

memmove: Copies between places that may overlap.

memset: Fills with one byte.

memcmp: Compares byte by byte: below, at or above 0.

impossible/base.h, line 23
void *memcpy(void *restrict to, const void *restrict from, size_t bytes);
void *memmove(void *to, const void *from, size_t bytes); /* Copies between places that may overlap. */
void *memset(void *to, int value, size_t bytes); /* Fills with one byte. */
int memcmp(const void *a, const void *b, size_t bytes); /* Compares byte by byte: below, at or above 0. */
GeneratedMade from include/impossible/base.hPublished from dfbf2d3