stdio.pxd 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # 7.19 Input/output <stdio.h>
  2. # deprecated cimports for backwards compatibility:
  3. from libc.string cimport const_char, const_void
  4. cdef extern from "<stdio.h>" nogil:
  5. ctypedef struct FILE
  6. cdef FILE *stdin
  7. cdef FILE *stdout
  8. cdef FILE *stderr
  9. enum: FOPEN_MAX
  10. enum: FILENAME_MAX
  11. FILE *fopen (const char *filename, const char *opentype)
  12. FILE *freopen (const char *filename, const char *opentype, FILE *stream)
  13. FILE *fdopen (int fdescriptor, const char *opentype)
  14. int fclose (FILE *stream)
  15. int remove (const char *filename)
  16. int rename (const char *oldname, const char *newname)
  17. FILE *tmpfile ()
  18. int remove (const char *pathname)
  19. int rename (const char *oldpath, const char *newpath)
  20. enum: _IOFBF
  21. enum: _IOLBF
  22. enum: _IONBF
  23. int setvbuf (FILE *stream, char *buf, int mode, size_t size)
  24. enum: BUFSIZ
  25. void setbuf (FILE *stream, char *buf)
  26. size_t fread (void *data, size_t size, size_t count, FILE *stream)
  27. size_t fwrite (const void *data, size_t size, size_t count, FILE *stream)
  28. int fflush (FILE *stream)
  29. enum: EOF
  30. void clearerr (FILE *stream)
  31. int feof (FILE *stream)
  32. int ferror (FILE *stream)
  33. enum: SEEK_SET
  34. enum: SEEK_CUR
  35. enum: SEEK_END
  36. int fseek (FILE *stream, long int offset, int whence)
  37. void rewind (FILE *stream)
  38. long int ftell (FILE *stream)
  39. ctypedef struct fpos_t
  40. ctypedef const fpos_t const_fpos_t "const fpos_t"
  41. int fgetpos (FILE *stream, fpos_t *position)
  42. int fsetpos (FILE *stream, const fpos_t *position)
  43. int scanf (const char *template, ...)
  44. int sscanf (const char *s, const char *template, ...)
  45. int fscanf (FILE *stream, const char *template, ...)
  46. int printf (const char *template, ...)
  47. int sprintf (char *s, const char *template, ...)
  48. int snprintf (char *s, size_t size, const char *template, ...)
  49. int fprintf (FILE *stream, const char *template, ...)
  50. void perror (const char *message)
  51. char *gets (char *s)
  52. char *fgets (char *s, int count, FILE *stream)
  53. int getchar ()
  54. int fgetc (FILE *stream)
  55. int getc (FILE *stream)
  56. int ungetc (int c, FILE *stream)
  57. int puts (const char *s)
  58. int fputs (const char *s, FILE *stream)
  59. int putchar (int c)
  60. int fputc (int c, FILE *stream)
  61. int putc (int c, FILE *stream)
  62. size_t getline(char **lineptr, size_t *n, FILE *stream)