ladybird/LibC/stdio.h
Andreas Kling 819ce91395 Enough compatibility work to make figlet build and run!
I ran out of steam writing library routines and imported two
BSD-licensed libc routines: sscanf() and getopt().

I will most likely rewrite them sooner or later. For now
I just wanted to see figlet running.
2018-10-31 17:52:59 +01:00

45 lines
868 B
C

#pragma once
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
#ifndef EOF
#define EOF (-1)
#endif
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
struct __STDIO_FILE {
int fd;
int eof;
};
typedef struct __STDIO_FILE FILE;
extern FILE* stdin;
extern FILE* stdout;
extern FILE* stderr;
char* fgets(char* buffer, int size, FILE*);
int fileno(FILE*);
int fgetc(FILE*);
int getc(FILE*);
int getchar();
FILE* fopen(const char* pathname, const char* mode);
int fclose(FILE*);
size_t fread(void* ptr, size_t size, size_t nmemb, FILE*);
size_t fwrite(const void* ptr, size_t size, size_t nmemb, FILE*);
int fprintf(FILE*, const char* fmt, ...);
int printf(const char* fmt, ...);
int sprintf(char* buffer, const char* fmt, ...);
int putchar(int ch);
void perror(const char*);
int sscanf (const char* buf, const char* fmt, ...);
__END_DECLS