emacs-devel
[Top][All Lists]
Advanced

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

Re: New session management patch.


From: Richard Stallman
Subject: Re: New session management patch.
Date: Tue, 26 Feb 2002 22:51:06 -0700 (MST)

    +/* Return non-zero if PATH is an executable file. */
    +static int
    +executable_file_p (path)
    +     char *path;

In GNU we don't call these things "paths", we call them file names.
We use the term "path" only for a list of directories to search.
Would you please change names accordingly?

    +/* Try to find program by searching path from environment.  If not found,
    +   the CURRENT_DIRECTORY concatenated with PROGRAM is returned.
    +   The return value is allocated with malloc and the caller must free it. 
*/
    +static char*
    +path_search (program, current_directory)

Why not use openp for this?  Is there some reason you can't?

But why do you need this anyway?  Can't you get the info
from Vinvocation_name and Vinvocation_directory?


    +  if (strchr(program, PATH_SEP_CHAR) || ! (bp = getenv ("PATH")))
    +      return make_absolute_path (program, current_directory);

Please write a space before an open paren after a function name.
Likewise everywhere else.

Also, the indentation there is not correct.

    +      if (proglen+len+1 <= MAXPATHLEN)
    +        {
    +          char maybe[MAXPATHLEN+1];

That is an arbitrary limit, so please remove it.  openp avoids having
such a limit.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]