home *** CD-ROM | disk | FTP | other *** search
- /* > H.X - X data type header file */
-
- #ifndef __X_h
-
- #define __X_h
-
- struct X
- {
- ... ...
- int obj_size; /* size of one element */
- };
-
- typedef struct X *X;
-
- /* General component routines */
-
- X x_new (int obj_len);
- void x_free (X x);
- void x_clear (X x);
- int x_copy (X x1, X x2);
- int x_equal (X x1, X x2);
- int x_empty (X x);
- int x_size (X x);
-
- /* Iterator */
-
- #define STATUS_CONTINUE 0 /* Continue processing */
- #define STATUS_STOP 1 /* Stop processing */
- #define STATUS_ERROR (-1) /* Error - terminate */
-
- int x_iterate (X x, int (*process)(void *));
-
- /* X-specific routines */
-
- #endif
-