vcs-svn: allow input from file descriptor

Based-on-patch-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
Jonathan Nieder
2011-01-02 21:09:38 -06:00
parent cc193f1f0b
commit cb3f87cf1b
5 changed files with 31 additions and 7 deletions

View File

@ -17,6 +17,14 @@ int buffer_init(struct line_buffer *buf, const char *filename)
return 0;
}
int buffer_fdinit(struct line_buffer *buf, int fd)
{
buf->infile = fdopen(fd, "r");
if (!buf->infile)
return -1;
return 0;
}
int buffer_deinit(struct line_buffer *buf)
{
int err;