home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / unixtools / util / dev / h / x < prev   
Encoding:
Text File  |  1992-07-21  |  627 b   |  36 lines

  1. /*      > H.X - X data type header file */
  2.  
  3. #ifndef __X_h
  4.  
  5. #define __X_h
  6.  
  7. struct X
  8. {
  9.         ... ...
  10.         int obj_size;   /* size of one element */
  11. };
  12.  
  13. typedef struct X *X;
  14.  
  15. /* General component routines */
  16.  
  17. X x_new (int obj_len);
  18. void x_free (X x);
  19. void x_clear (X x);
  20. int x_copy (X x1, X x2);
  21. int x_equal (X x1, X x2);
  22. int x_empty (X x);
  23. int x_size (X x);
  24.  
  25. /* Iterator */
  26.  
  27. #define STATUS_CONTINUE 0       /* Continue processing */
  28. #define STATUS_STOP     1       /* Stop processing */
  29. #define STATUS_ERROR    (-1)    /* Error - terminate */
  30.  
  31. int x_iterate (X x, int (*process)(void *));
  32.  
  33. /* X-specific routines */
  34.  
  35. #endif
  36.