#ifndef __UNFOLD_H_
 #define __UNFOLD_H_

typedef struct __unfold_ {
  char eof;
  struct __buffer_ *b;
  struct __line_ *l, *lb;
} unfold_t;

unfold_t *unfold_alloc(void);
unfold_t *unfold_init(int, unsigned long);
void unfold_kill(unfold_t *);
void unfold_restart(unfold_t *, int);
char *unfold_next_line(unfold_t *);

#endif
