24 lines
655 B
C
24 lines
655 B
C
// Minimal stdio.h stub for freestanding Nim
|
|
#ifndef _STDIO_H
|
|
#define _STDIO_H
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef struct FILE FILE;
|
|
#define EOF (-1)
|
|
#define stdin ((FILE*)0)
|
|
#define stdout ((FILE*)1)
|
|
#define stderr ((FILE*)2)
|
|
|
|
int printf(const char *format, ...);
|
|
int fprintf(FILE *stream, const char *format, ...);
|
|
int sprintf(char *str, const char *format, ...);
|
|
int snprintf(char *str, size_t size, const char *format, ...);
|
|
int vsnprintf(char *str, size_t size, const char *format, ...);
|
|
int putchar(int c);
|
|
int puts(const char *s);
|
|
int fflush(FILE *stream);
|
|
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
|
|
#endif /* _STDIO_H */
|