unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.djarv@mbox200.swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: New session management patch.
Date: Wed, 27 Feb 2002 20:43:47 +0100	[thread overview]
Message-ID: <3C7D36F3.6504B869@mbox200.swipnet.se> (raw)
In-Reply-To: 200202270551.g1R5p6k17632@aztec.santafe.edu

Richard Stallman wrote:
> 
>     +/* 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?

This function will go away.  But it was modeled after file_p in xrdb.c, maybe
that should be changed:
  static int
  file_p (path)
       char *path;
  {
    ...

> 
>     +/* 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?

I didn't know about those.  I will use Vinvocation_name and
Vinvocation_directory instead, it will simplify things.  Do I nead to GCPRO
these before use?  Are the rules for using GCPRO/UNGCPRO written down
somewhere?

> 
>     +  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.

I have a conflicting rule at work, so when I switch to Emacs it comes out
wrong.  I will fix this.

> 
>     +      if (proglen+len+1 <= MAXPATHLEN)
>     +        {
>     +          char maybe[MAXPATHLEN+1];
> 
> That is an arbitrary limit, so please remove it.  openp avoids having
> such a limit.

Yes and no as several has pointed out.  But since this will be done in a much
more simpler way, the code will be removed.  MAXPATHLEN is used in other places
in Emacs, like buffer.c and fileio.c, that is why I used it.

	Jan D.

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  parent reply	other threads:[~2002-02-27 19:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-17 19:11 Session management patch, please comment Jan D.
2002-02-19  6:37 ` Richard Stallman
2002-02-19  8:40   ` Kim F. Storm
2002-02-19 20:13     ` Jan D.
2002-02-19 20:12   ` Jan D.
2002-02-19 22:43     ` Kim F. Storm
2002-02-20 20:29       ` Jan Djärv
2002-02-20 22:50         ` Kim F. Storm
2002-02-21 19:57           ` Jan D.
2002-02-21 21:18             ` Kim F. Storm
2002-02-26 22:49               ` New session management patch Jan D.
2002-02-27  5:51                 ` Richard Stallman
2002-02-27 10:23                   ` Eli Zaretskii
2002-02-27 15:25                     ` Andreas Schwab
2002-02-27 18:11                     ` Colin Walters
2002-02-28  4:08                     ` Richard Stallman
2002-02-27 19:43                   ` Jan D. [this message]
2002-02-28 18:22                     ` Richard Stallman
2002-02-28 15:36                   ` Kim F. Storm
2002-03-01  1:11                     ` Richard Stallman
2002-02-22  4:32           ` Session management patch, please comment Richard Stallman
2002-02-20 22:13     ` Richard Stallman
2002-02-21 20:01       ` Jan D.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C7D36F3.6504B869@mbox200.swipnet.se \
    --to=jan.djarv@mbox200.swipnet.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).