Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-17 Thread Jeff King
On Tue, Sep 16, 2014 at 10:01:11AM +0200, Christian Couder wrote: On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +/* Get the length of buf from its beginning until its last alphanumeric character */ That

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-17 Thread Christian Couder
On Wed, Sep 17, 2014 at 9:58 AM, Jeff King p...@peff.net wrote: On Tue, Sep 16, 2014 at 10:01:11AM +0200, Christian Couder wrote: On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +/* Get the length of buf from its

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-16 Thread Christian Couder
On Mon, Sep 15, 2014 at 10:39 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +/* Get the length of buf from its beginning until its last alphanumeric character */ That makes it sound as if feeding abc%de#f@ to the function returns 3 for abc,

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-15 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: +/* Get the length of buf from its beginning until its last alphanumeric character */ That makes it sound as if feeding abc%de#f@ to the function returns 3 for abc, but +static size_t alnum_len(const char *buf, size_t len) +{ + while

[PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-14 Thread Christian Couder
We will use a doubly linked list to store all information about trailers and their configuration. This way we can easily remove or add trailers to or from trailer lists while traversing the lists in either direction. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C