[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#534641: [ptex:00358] Re: mendex bug



Dear Tsuchimura-san, dear all,

On So, 08 Sep 2013, TSUCHIMURA Nobuyuki wrote:
> > +#define TAIL_LEN(x) ((x)+strlen(x)), (BUFFERLEN-strlen(x))
> 
>   OK, I recognize 'BUFFERLEN-strlen(x)' is always plus.
> Even when buffer is full, strlen(x) become BUFFERLEN-1,

Yes. Because we use it only with buffers that are of BUFFERLEN.
I didn't say that it is a universal macro ;-)

If we would had something like allocated_length(x) then it would be
	((x)+strlen(x)), (allocated_length(x)-strlen(x))
which would be clearer.

If nobody else complains, I would commit that to the svn repository.

Norbert

------------------------------------------------------------------------
PREINING, Norbert                               http://www.preining.info
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------


Reply to: