Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.5-pws-4: findcmd()



On Jan 18,  2:09pm, Peter Stephenson wrote:
} Subject: PATCH: 3.1.5-pws-4: findcmd()
}
} I added a second argument
} which lets findcmd() effectively return a truth value.

I think it would be worth "documenting" that findcmd() returns its first
argument when the docopy parameter is zero.  Besides, your comment has a
typo.

Index: Src/exec.c
===================================================================
--- exec.c	1999/01/18 16:39:07	1.16
+++ exec.c	1999/01/18 16:42:40
@@ -461,8 +461,8 @@
 
 /*
  * Get the full pathname of an external command.
- * If the first argument is zero, just return a non-null pointer if found;
- * if non-zero, get the actual name using heap memory.
+ * If the second argument is zero, return the first argument if found;
+ * if non-zero, return the path using heap memory.  (RET_IF_COM(X), above).
  */
 
 /**/


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author