[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Your git repository for recutils
From: |
Jose E. Marchesi |
Subject: |
Re: [bug-recutils] Your git repository for recutils |
Date: |
Fri, 25 May 2012 18:03:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Hi.
> Do you have any place where you can publish a git repo of recutils? I
> will be then pulling your changes as they become ready.
>
> I would suggest to start with a branch for the seekable parsers.
git://elderthing.mtjm.eu/recutils-indexing.git has changes for the
seekable parsers. I haven't tested the file backend yet.
Some comments.
@@ -120,6 +121,7 @@ rec_parser_new (FILE *in,
{
parser->in_file = in;
parser->in_buffer = NULL;
+ parser->in_size = -1;
size_t is guaranteed to be an unsigned value, and you are assigning -1
to it. In my opinion a good default value for that field is 0: that is
actually the size of a not allocated buffer :)
+size_t
+rec_parser_tell (rec_parser_t parser)
+{
+ if (parser->in_file)
+ {
+ return ftell (parser->in_file);
+ }
That won't work. ftell returns a signed value. If it is -1 it means
there was an error. rec_parser_tell returns size_t, which is unsigned.
--
Jose E. Marchesi http://www.jemarch.net
GNU Project http://www.gnu.org