From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: New session management patch. Date: Wed, 27 Feb 2002 20:43:47 +0100 Message-ID: <3C7D36F3.6504B869@mbox200.swipnet.se> References: <200202262249.XAA20211@gaffa.gaia.swipnet.se> <200202270551.g1R5p6k17632@aztec.santafe.edu> Reply-To: jan.djarv@mbox200.swipnet.se NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: quimby2.netfonds.no 1014839392 17201 195.204.10.66 (27 Feb 2002 19:49:52 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 27 Feb 2002 19:49:52 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16gA5H-0004TL-00 for ; Wed, 27 Feb 2002 20:49:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16gA1L-0003io-00; Wed, 27 Feb 2002 14:45:47 -0500 Original-Received: from [195.196.30.60] (helo=aurora.natverket.com) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16g9zl-0003YE-00; Wed, 27 Feb 2002 14:44:09 -0500 Original-Received: from mbox200.swipnet.se (pc35.bodenonline.com [195.196.29.227] (may be forged)) by aurora.natverket.com (8.9.3/8.9.3) with ESMTP id VAA19677; Wed, 27 Feb 2002 21:27:28 +0100 (CET) X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.17 i686) X-Accept-Language: Swedish, sv, en Original-To: rms@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1607 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1607 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