readline.h 581 Bytes
Newer Older
Seblu's avatar
Seblu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/*
** readline.h for 42sh
**
** Made by Seblu
** Login   <seblu@epita.fr>
**
** Started on  Wed Aug  2 01:06:25 2006 Seblu
** Last update Wed Aug  2 17:57:38 2006 Seblu
*/

#ifndef READLINE_H_
# define READLINE_H_

# define GETLN_BUF_SIZE 1024

struct          s_getln
{
  int           fd;
  char          data[GETLN_BUF_SIZE];
  unsigned      offset;
  int           size;
};

char		*readline(const char *prompt);
char            *getln(struct s_getln *buf);
void            getln_close(struct s_getln *buf, const int closefd);
struct s_getln  *getln_open(const int fd);

#endif