33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
#ifndef CONFORMANCE_STDIO_H
|
|
#define CONFORMANCE_STDIO_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdarg.h>
|
|
|
|
#define EOF (-1)
|
|
|
|
/* stdout and stderr are distinct sink descriptors: stdout writes the fixed
|
|
* CONF_OUT stream (01B10000/01B00020), stderr the CONF_ERR stream
|
|
* (01B30000/01B00060). 16 KiB of bytes is 0x20000 bit address units, so
|
|
* stdout ends at 01B2FFFF and does not alias stderr. Both cap at 16 KiB; the
|
|
* runner rejects a full buffer
|
|
* as truncated. fprintf/vfprintf return the untruncated formatted length;
|
|
* fputs/fwrite return the untruncated byte/item count; fputc returns the
|
|
* character written. */
|
|
typedef struct conf_file FILE;
|
|
|
|
extern FILE *stdout;
|
|
extern FILE *stderr;
|
|
|
|
int printf(const char *fmt, ...);
|
|
int sprintf(char *buf, const char *fmt, ...);
|
|
int fprintf(FILE *stream, const char *fmt, ...);
|
|
int vfprintf(FILE *stream, const char *fmt, va_list ap);
|
|
int putchar(int c);
|
|
int puts(const char *s);
|
|
int fputc(int c, FILE *stream);
|
|
int fputs(const char *s, FILE *stream);
|
|
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
|
|
#endif
|