Hiltjo Posthuma writes:
Looks good to me, minor nitpick, maybe the style can be:

        if (buf[0] == '\0')

Sure, either style is fine with me. I'll send v2 now. :-)

and maybe fgets can simply be rewritten using getline() at:

        http://git.suckless.org/sent/file/sent.c.html#l417

Hmm, unless I'm missing something, getline() actually would hinder here since we need to use separate heap storage for each line, but getline() optimises for the case where `char **lineptr` can be reused for each line. As such we'd still have to strdup(), or entries in s->lines would always end up being the same.

Reply via email to