mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
b0e3f73375
Userspace programs can now open /dev/gui_events and read a stream of GUI_Event structs one at a time. I was stuck on a stupid problem where we'd reenter Scheduler::yield() due to having one of the has_data_available_for_reading() implementations using locks.
71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
#pragma once
|
|
|
|
#include <sys/cdefs.h>
|
|
#include <sys/types.h>
|
|
#include <stdarg.h>
|
|
#include <limits.h>
|
|
|
|
__BEGIN_DECLS
|
|
#ifndef EOF
|
|
#define EOF (-1)
|
|
#endif
|
|
|
|
#define SEEK_SET 0
|
|
#define SEEK_CUR 1
|
|
#define SEEK_END 2
|
|
|
|
#define _IOFBF 0
|
|
#define _IOLBF 1
|
|
#define _IONBF 2
|
|
|
|
struct __STDIO_FILE {
|
|
int fd;
|
|
int eof;
|
|
int error;
|
|
int mode;
|
|
char* buffer;
|
|
size_t buffer_size;
|
|
size_t buffer_index;
|
|
char default_buffer[BUFSIZ];
|
|
};
|
|
|
|
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* fdopen(int fd, const char* mode);
|
|
FILE* fopen(const char* pathname, const char* mode);
|
|
int fclose(FILE*);
|
|
void rewind(FILE*);
|
|
void clearerr(FILE*);
|
|
int ferror(FILE*);
|
|
int feof(FILE*);
|
|
int fflush(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 vfprintf(FILE*, const char* fmt, va_list);
|
|
int vsprintf(char* buffer, const char* fmt, va_list);
|
|
int fprintf(FILE*, const char* fmt, ...);
|
|
int printf(const char* fmt, ...);
|
|
int sys_printf(const char* fmt, ...);
|
|
int sprintf(char* buffer, const char* fmt, ...);
|
|
int putchar(int ch);
|
|
int putc(int ch, FILE*);
|
|
int puts(const char*);
|
|
int fputs(const char*, FILE*);
|
|
void perror(const char*);
|
|
int sscanf (const char* buf, const char* fmt, ...);
|
|
int fscanf(FILE*, const char* fmt, ...);
|
|
int setvbuf(FILE*, char* buf, int mode, size_t);
|
|
void setbuf(FILE*, char* buf);
|
|
void setlinebuf(FILE*);
|
|
|
|
__END_DECLS
|
|
|