FCLOSE.3
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 1k
Category:

OS Develop

Development Platform:

WINDOWS

  1. ." @(#)fclose.3s 6.1 (Berkeley) 5/15/85
  2. ."
  3. .TH FCLOSE 3  "May 15, 1985"
  4. .AT 3
  5. .SH NAME
  6. fclose, fflush - close or flush a stream
  7. .SH SYNOPSIS
  8. .nf
  9. .ft B
  10. #include <stdio.h>
  11. int fclose(FILE *fIstreamfP)
  12. int fflush(FILE *fIstreamfP)
  13. .ft R
  14. .fi
  15. .SH DESCRIPTION
  16. .B Fclose
  17. causes any buffers for the named
  18. .I stream
  19. to be emptied, and the file to be closed.
  20. Buffers allocated by the standard input/output system
  21. are freed.
  22. .PP
  23. .B Fclose
  24. is performed automatically upon
  25. calling
  26. .BR  exit (3).
  27. .PP
  28. .B Fflush
  29. causes any buffered data for the named output
  30. .I stream
  31. to be written to that file.
  32. The stream remains open.
  33. .SH "SEE ALSO"
  34. .BR close (2),
  35. .BR fopen (3),
  36. .BR setbuf (3).
  37. .SH DIAGNOSTICS
  38. These routines return
  39. .SM
  40. .B EOF
  41. if
  42. .I stream
  43. is not associated with an output file, or
  44. if buffered data cannot be transferred to that file.