TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Neil Heller
from: Jasen Betts
date: 2003-05-26 16:15:48
subject: Linux and GCC

Hi Neil.

25-May-03 10:58:02, Neil Heller wrote to Darin McBride


 DM>> Thus, "foo" is just a file, but if it has the execute
bit set,...

 DM>> Certain conventions exist for executable source code (such as
 DM>> shell scripts  or perl scripts),...

 NH> Which bring another question to mind.  If I write a program that
 NH> prompts the user for a file name, and then pass that name directly
 NH> to fopen() must that file name have "./" prepended if the target
 NH> file is in the same directory as the executable and that directory
 NH> is not in the path?

no... $PATH is only used for commands either via the shell (eg. system())
it is also used for calls to execp() (etc) )

for opening files the current directory is used unless the file specifier
starts with / (also exec() ( and variants without the p))

AFAIK there is no unix equivalent to the DOS APPEND command/tool cause a
type of,path search for regular files.

---
* Origin: Entropy isn't what it used to be. (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.