home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / unistd / ftruncat.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  470 b   |  27 lines

  1. @node ftruncate, stdio
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <unistd.h>
  6.  
  7. int ftruncate(int file, off_t where);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function truncates @var{file} at @var{where} length.  This only
  13. works if the file is closed right after this call. 
  14.  
  15. @subheading Return Value
  16.  
  17. Zero for success, nonzero for failure.
  18.  
  19. @subheading Example
  20.  
  21. @example
  22. int x = open("data", O_WRONLY);
  23. ftruncate(x, 1000);
  24. close(x);
  25. @end example
  26.  
  27.