forked from kframework/c-semantics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdio.h
41 lines (35 loc) · 1019 Bytes
/
stdio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _KCC_STDIO_H
#define _KCC_STDIO_H
#include <kcc_settings.h>
#include <stddef.h>
typedef struct FILE_ {
unsigned long long int offset;
unsigned short handle;
unsigned char eof;
unsigned char error;
} FILE;
extern FILE stdin_file;
extern FILE stdout_file;
extern FILE stderr_file;
extern FILE* stdin;
extern FILE* stdout;
extern FILE* stderr;
// stdio.h
#define EOF -1
int putchar(int character);
int putc(int c, FILE *stream);
int getchar(void);
int printf(const char * restrict format, ...);
int fprintf(FILE *stream, const char *format, ...);
int sprintf(char * restrict s, const char * restrict format, ...);
int snprintf(char * restrict s, size_t n, const char * restrict format, ...);
int puts(const char * str);
int getc(FILE *stream);
int feof(FILE * stream);
int ferror(FILE *stream);
FILE* fopen(const char *filename, const char *mode);
int fclose(FILE *stream);
int fgetc(FILE *stream);
int fputc(int c, FILE *stream);
char* fgets(char* restrict str, int size, FILE* restrict stream);
#endif