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

  1. /* eawrite.c (emx+gcc) -- Copyright (c) 1993 by Eberhard Mattes */
  2.  
  3. #define INCL_DOSFILEMGR
  4. #include <os2.h>
  5. #include <stdlib.h>
  6. #include "ea.h"
  7.  
  8. int _ea_write (const char *path, int handle, PFEA2LIST src)
  9. {
  10.   ULONG rc;
  11.   EAOP2 eaop;
  12.  
  13.   eaop.fpGEA2List = NULL;
  14.   eaop.fpFEA2List = src;
  15.   eaop.oError = 0;
  16.   if (path != NULL)
  17.     rc = DosSetPathInfo (path, 2, &eaop, sizeof (eaop), 0);
  18.   else
  19.     rc = DosSetFileInfo (handle, 2, &eaop, sizeof (eaop));
  20.   if (rc != 0)
  21.     {
  22.       _ea_set_errno (rc);
  23.       return (-1);
  24.     }
  25.   return (0);
  26. }
  27.