home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / IO / EA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-23  |  1.0 KB  |  26 lines

  1. /* ea.h (emx+gcc) */
  2.  
  3. struct _ead_data
  4. {
  5.   int count;                    /* Number of EAs */
  6.   int max_count;                /* Number of pointers allocated for INDEX */
  7.   int total_value_size;         /* Total size of values */
  8.   int total_name_len;           /* Total length of names w/o null characters */
  9.   size_t buffer_size;           /* Number of bytes allocated for BUFFER */
  10.   PFEA2LIST buffer;             /* Buffer holding FEA2LIST */
  11.   PFEA2 *index;                 /* Index for BUFFER */
  12. };
  13.  
  14. void _ea_set_errno (ULONG rc);
  15. int _ea_write (const char *path, int handle, PFEA2LIST src);
  16.  
  17. int _ead_make_index (struct _ead_data *ead, int new_count);
  18. int _ead_size_buffer (struct _ead_data *ead, int new_size);
  19. int _ead_enum (struct _ead_data *ead, const char *path, int handle,
  20.     int (*function)(struct _ead_data *ead, PDENA2 pdena, void *arg),
  21.     void *arg);
  22.  
  23. #define _EA_ALIGN(i)     (((i) + 3) & -4)
  24. #define _EA_SIZE1(n, v)  _EA_ALIGN (sizeof (FEA2) + (n) + (v))
  25. #define _EA_SIZE2(p)     _EA_SIZE1 ((p)->cbName, (p)->cbValue)
  26.