1 # 7.19 Input/output <stdio.h>
4 # deprecated cimports for backwards compatibility:
5 from libc.string cimport const_char, const_void
8 cdef extern from "stdio.h" nogil:
17 FILE *fopen (const char *filename, const char *opentype)
18 FILE *freopen (const char *filename, const char *opentype, FILE *stream)
19 FILE *fdopen (int fdescriptor, const char *opentype)
20 int fclose (FILE *stream)
21 int remove (const char *filename)
22 int rename (const char *oldname, const char *newname)
25 int remove (const char *pathname)
26 int rename (const char *oldpath, const char *newpath)
31 int setvbuf (FILE *stream, char *buf, int mode, size_t size)
33 void setbuf (FILE *stream, char *buf)
35 size_t fread (void *data, size_t size, size_t count, FILE *stream)
36 size_t fwrite (const void *data, size_t size, size_t count, FILE *stream)
37 int fflush (FILE *stream)
40 void clearerr (FILE *stream)
41 int feof (FILE *stream)
42 int ferror (FILE *stream)
47 int fseek (FILE *stream, long int offset, int whence)
48 void rewind (FILE *stream)
49 long int ftell (FILE *stream)
51 ctypedef struct fpos_t
52 ctypedef const fpos_t const_fpos_t "const fpos_t"
53 int fgetpos (FILE *stream, fpos_t *position)
54 int fsetpos (FILE *stream, const fpos_t *position)
56 int scanf (const char *template, ...)
57 int sscanf (const char *s, const char *template, ...)
58 int fscanf (FILE *stream, const char *template, ...)
60 int printf (const char *template, ...)
61 int sprintf (char *s, const char *template, ...)
62 int snprintf (char *s, size_t size, const char *template, ...)
63 int fprintf (FILE *stream, const char *template, ...)
65 void perror (const char *message)
68 char *fgets (char *s, int count, FILE *stream)
70 int fgetc (FILE *stream)
71 int getc (FILE *stream)
72 int ungetc (int c, FILE *stream)
74 int puts (const char *s)
75 int fputs (const char *s, FILE *stream)
77 int fputc (int c, FILE *stream)
78 int putc (int c, FILE *stream)
80 size_t getline(char **lineptr, size_t *n, FILE *stream)