rowio.h 644 B

1234567891011121314151617181920212223242526
  1. #ifndef GRASS_ROWIO_H
  2. #define GRASS_ROWIO_H
  3. typedef struct
  4. {
  5. int fd; /* file descriptor for reading */
  6. int nrows; /* number of rows to be held in memory */
  7. int len; /* buffer length */
  8. int cur; /* current row in memory */
  9. void *buf; /* current data buf */
  10. int (*getrow) (int, void *, int, int); /* routine to do the row reads */
  11. int (*putrow) (int, const void *, int, int); /* routine to do the row writes */
  12. struct ROWIO_RCB
  13. {
  14. void *buf; /* data buffer */
  15. int age; /* for order of access */
  16. int row; /* row number */
  17. int dirty;
  18. } *rcb;
  19. } ROWIO;
  20. #include <grass/defs/rowio.h>
  21. #endif