Add: semi-working printf implementation
This commit is contained in:
17
stdio.h
17
stdio.h
@@ -1,6 +1,8 @@
|
||||
#ifndef INCLUDE_STDIO_H
|
||||
#define INCLUDE_STDIO_H
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
#define FB_GREEN 2
|
||||
#define FB_DARK_GREY 8
|
||||
|
||||
@@ -19,4 +21,19 @@ unsigned int getcolor(int x, int y);
|
||||
void scroll(int lines);
|
||||
void putc(char c);
|
||||
|
||||
#define PRINTF_STATE_START 0
|
||||
#define PRINTF_STATE_LENGTH 1
|
||||
#define PRINTF_STATE_SHORT 2
|
||||
#define PRINTF_STATE_LONG 3
|
||||
#define PRINTF_STATE_SPEC 4
|
||||
|
||||
#define PRINTF_LENGTH_START 0
|
||||
#define PRINTF_LENGTH_SHORT_SHORT 1
|
||||
#define PRINTF_LENGTH_SHORT 2
|
||||
#define PRINTF_LENGTH_LONG 3
|
||||
#define PRINTF_LENGTH_LONG_LONG 4
|
||||
|
||||
void printf(const char* fmt, ...);
|
||||
int* printf_number(int* argp, int length, bool sign, int radix);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user