module core.c.stdio
C Bindings | C Standard Library Bindings

Code Map

module core.c.stdio;


enum BUFSIZ;
enum EOF;
enum FOPEN_MAX;
enum FILENAME_MAX;
enum TMP_MAX;
enum L_tmpnam;
enum SEEK_SET;
enum SEEK_CUR;
enum SEEK_END;
enum _F_RDWR;
enum _F_READ;
enum _F_WRIT;
enum _F_BUF;
enum _F_LBUF;
enum _F_ERR;
enum _F_EOF;
enum _F_BIN;
enum _F_IN;
enum _F_OUT;
enum _F_TERM;
enum _IOFBF;
enum _IOLBF;
enum _IONBF;

alias FILE = _iobuf;
alias fpos_t = i32;

struct _iobuf
{
public:
	_flags: i32;
	_read_ptr: char*;
	_read_end: char*;
	_read_base: char*;
	_write_base: char*;
	_write_ptr: char*;
	_write_end: char*;
	_buf_base: char*;
	_buf_end: char*;
	_save_base: char*;
	_backup_base: char*;
	_save_end: char*;
	_markers: void*;
	_chain: _iobuf*;
	_fileno: i32;
	_blksize: i32;
	_old_offset: i32;
	_cur_column: i32;
	_vtable_offset: i8;
	_shortbuf: char[1];
	_lock: void*;
}

global stdin: FILE*;
global stdout: FILE*;
global stderr: FILE*;

fn remove(filename: const(const(char)*)) i32;
fn rename(from: const(const(char)*), to: const(const(char)*)) i32;
fn tmpfile() FILE*;
fn tmpnam(s: char*) char*;
fn fclose(stream: FILE*) i32;
fn fflush(stream: FILE*) i32;
fn fopen(filename: const(const(char)*), mode: const(const(char)*)) FILE*;
fn freopen(filename: const(const(char)*), mode: const(const(char)*), stream: FILE*) FILE*;
fn setbuf(stream: FILE*, buf: char*);
fn setvbuf(stream: FILE*, buf: char*, mode: i32, size: size_t) i32;
fn fprintf(stream: FILE*, format: const(const(char)*)) i32;
fn fscanf(stream: FILE*, format: const(const(char)*)) i32;
fn sprintf(s: char*, format: const(const(char)*)) i32;
fn sscanf(s: const(char)*, format: const(const(char)*)) i32;
fn vfprintf(stream: FILE*, format: const(char)*, arg: va_list) i32;
fn vfscanf(stream: FILE*, format: const(const(char)*), arg: va_list) i32;
fn vsprintf(s: char*, format: const(const(char)*), arg: va_list) i32;
fn vsscanf(s: const(const(char)*), format: const(const(char)*), arg: va_list) i32;
fn vprintf(format: const(const(char)*), arg: va_list) i32;
fn vscanf(format: const(const(char)*), arg: va_list) i32;
fn printf(format: const(const(char)*)) i32;
fn scanf(format: const(const(char)*)) i32;
fn fgetc(stream: FILE*) i32;
fn fputc(c: i32, stream: FILE*) i32;
fn fgets(s: char*, n: i32, stream: FILE*) char*;
fn fputs(s: const(const(char)*), stream: FILE*) i32;
fn gets(s: char*) char*;
fn puts(s: const(const(char)*)) i32;
fn getchar() i32 { }
fn putchar(c: i32) i32 { }
fn getc(stream: FILE*) i32 { }
fn putc(c: i32, stream: FILE*) i32 { }
fn ungetc(c: i32, stream: FILE*) i32;
fn fread(ptr: void*, size: size_t, nmemb: size_t, stream: FILE*) size_t;
fn fwrite(ptr: const(const(void)*), size: size_t, nmemb: size_t, stream: FILE*) size_t;
fn fgetpos(stream: FILE*, pos: fpos_t*) i32;
fn fsetpos(stream: FILE*, pos: const(const(fpos_t)*)) i32;
fn fseek(stream: FILE*, offset: c_long, whence: i32) i32;
fn ftell(stream: FILE*) c_long;
fn popen(const(char)*, const(char)*) FILE*;
fn pclose(FILE*) i32;
fn rewind(stream: FILE*);
fn clearerr(stream: FILE*);
fn feof(stream: FILE*) i32;
fn ferror(stream: FILE*) i32;
fn fileno(FILE*) i32;
fn snprintf(s: char*, n: size_t, format: const(const(char)*)) i32;
fn vsnprintf(s: char*, n: size_t, format: const(const(char)*), arg: va_list) i32;
fn perror(s: const(const(char)*));
fn unlink(s: const(const(char)*)) i32;