Files
novaos/libc/include/stdlib.h
Nathan Singer f9c2ea2f2b Does a lot of work towards the PIT
Added a math library, with clamp and POW.
added printf support for printing doubles
added a few helper functions in PIT for calcaulting the time in seconds of a clock cycle based on divisor
2025-06-06 22:01:18 -04:00

27 lines
670 B
C

#include <stdint.h>
#ifndef _STDLIB_H
#define _STDLIB_H 1
#include <sys/cdefs.h>
__attribute__((__noreturn__))
void abort(void);
char* s64toa(int64_t num, char* buf, int base);
char* u64toa(uint64_t num, char* buf, int base);
char* s32toa(int32_t num, char* buf, int base);
char* u32toa(uint32_t num, char* buf, int base);
char* s16toa(int16_t num, char* buf, int base);
char* u16toa(uint16_t num, char* buf, int base);
char* s8toa(int8_t num, char* buf, int base);
char* u8toa(uint8_t num, char* buf, int base);
char* itoa(int num, char* buf, int base);
char* utoa(unsigned int num, char* buf, int base);
char* dtoa(double n, char* buf, int afterpoint);
#endif