home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / IO / FTRUNCAT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  350 b   |  16 lines

  1. /* ftruncat.c (emx+gcc) -- Copyright (c) 1990-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <io.h>
  5. #include <errno.h>
  6.  
  7. int ftruncate (int handle, long length)
  8. {
  9.   if (handle < 0 || handle >= _nfiles || (_files[handle] & F_DEV))
  10.     {
  11.       errno = EBADF;
  12.       return (-1);
  13.     }
  14.   return (__ftruncate (handle, length));
  15. }
  16.