KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
porthelper.h
Go to the documentation of this file.
1#ifndef __PORTHELPER_H
2#define __PORTHELPER_H
3
4/* This file will ease porting to KOS */
5
6#include <assert.h>
7#include <stdio.h>
8#include <stdlib.h>
9#include <string.h>
10#include <unistd.h>
11#include <kos.h>
12#include <conio/conio.h>
13
14/* Some KOS macros to help us port */
15#ifdef fprintf
16#undef fprintf
17#endif
18#define fprintf(a, fmt, args...) conio_printf(fmt, ## args)
19#define printf(fmt, args...) ({ conio_printf(fmt, ## args); })
20#define fgets(buf, len, a) ({ conio_input_getline(1, buf, len); 1; })
21
22#define srandom(a) ({ })
23#define err(a, b...) ({ })
24#define errx(a, b...) ({ })
25
26#undef getchar
27#undef putchar
28int getchar(void);
29
30#endif /* __PORTHELPER_H */
Standard C Assertions.
Include everything KOS has to offer!
int getchar(void)
Definition porthelper.c:14
Basic sys/stdio.h file from newlib.
KOS-implementation of select POSIX extensions.
Variants on standard block memory copy/set functions.