[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs & MAXPATHLEN
From: |
Giuseppe Scrivano |
Subject: |
Re: emacs & MAXPATHLEN |
Date: |
Sun, 31 Jul 2005 02:05:30 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Someone wrote:
>
> In my opinion it is better to alloc directly MAXPATHLEN+1 bytes
> when that limit exists without entering the loop and use multiple
> reallocations.
>
> It's best to keep the code simple, all else being equal,
> and reduce the number of conditionals.
To keep the code simple we can remove the #ifdef MAXPATHLEN...#endif piece in
the HAVE_GETCWD part. In this way we use always the loop both if MAXPATHLEN is
defined or not.
Anyway, checking for the MAXPATHLEN inside the loop doesn't change the number
of switches, if we want to check for the limit I suggest to have the check
outside the loop and avoid multiple reallocations.
Giuseppe Scrivano
- Re: emacs & MAXPATHLEN, (continued)
- Re: emacs & MAXPATHLEN, Jan D., 2005/07/30
- Re: emacs & MAXPATHLEN, Alfred M\. Szmidt, 2005/07/30
- Re: emacs & MAXPATHLEN, Eli Zaretskii, 2005/07/30
- Re: emacs & MAXPATHLEN, Alfred M\. Szmidt, 2005/07/30
- Re: emacs & MAXPATHLEN, Andreas Schwab, 2005/07/30
- Re: emacs & MAXPATHLEN, Eli Zaretskii, 2005/07/30
- Re: emacs & MAXPATHLEN, Jan D., 2005/07/30
- Re: emacs & MAXPATHLEN, Andreas Schwab, 2005/07/30
- Re: emacs & MAXPATHLEN, Richard M. Stallman, 2005/07/31
- Re: emacs & MAXPATHLEN, Richard M. Stallman, 2005/07/30
- Re: emacs & MAXPATHLEN,
Giuseppe Scrivano <=
- Re: emacs & MAXPATHLEN, Alfred M\. Szmidt, 2005/07/30
- Re: emacs & MAXPATHLEN, Jan D., 2005/07/30
- Re: emacs & MAXPATHLEN, Alfred M\. Szmidt, 2005/07/30
- Re: emacs & MAXPATHLEN, Giuseppe Scrivano, 2005/07/30
- Re: emacs & MAXPATHLEN, Andreas Schwab, 2005/07/30
- Re: emacs & MAXPATHLEN, Giuseppe Scrivano, 2005/07/30
- Re: emacs & MAXPATHLEN, Giuseppe Scrivano, 2005/07/30
- Re: emacs & MAXPATHLEN, Richard M. Stallman, 2005/07/30
- Re: emacs & MAXPATHLEN, Giuseppe Scrivano, 2005/07/30
- Re: emacs & MAXPATHLEN, Richard M. Stallman, 2005/07/31