stdio.pxd 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # POSIX additions to <stdio.h>.
  2. # http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
  3. from libc.stdio cimport FILE
  4. from libc.stddef cimport wchar_t
  5. from posix.types cimport off_t
  6. cdef extern from "<stdio.h>" nogil:
  7. # File descriptors
  8. FILE *fdopen(int, const char *)
  9. int fileno(FILE *)
  10. # Pipes
  11. FILE *popen(const char *, const char *)
  12. int pclose(FILE *)
  13. # Memory streams (POSIX.2008)
  14. FILE *fmemopen(void *, size_t, const char *)
  15. FILE *open_memstream(char **, size_t *)
  16. FILE *open_wmemstream(wchar_t **, size_t *)
  17. # Seek and tell with off_t
  18. int fseeko(FILE *, off_t, int)
  19. off_t ftello(FILE *)
  20. # Locking (for multithreading)
  21. void flockfile(FILE *)
  22. int ftrylockfile(FILE *)
  23. void funlockfile(FILE *)
  24. int getc_unlocked(FILE *)
  25. int getchar_unlocked()
  26. int putc_unlocked(int, FILE *)
  27. int putchar_unlocked(int)
  28. # Reading lines and records (POSIX.2008)
  29. ssize_t getline(char **, size_t *, FILE *)
  30. ssize_t getdelim(char **, size_t *, int, FILE *)