Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!portal!cup.portal.com!DMasterson From: DMasterson@cup.portal.com (David Scott Masterson) Newsgroups: comp.sys.amiga Subject: Re: Relying on ARP (was Re: My AmigaDOS 1.4 wishlist (one among Message-ID: <21095@cup.portal.com> Date: 7 Aug 89 05:03:42 GMT References: <12878@well.UUCP> <26758@agate.BERKELEY.EDU> <20904@cup.portal.com> <126@egrunix.UUCP> <11119@polya.Stanford.EDU> Distribution: usa Organization: The Portal System (TM) Lines: 27 In message <11119@polya.Stanford.EDU>, rokicki@polya.Stanford.EDU writes: >> > I've always wanted to be able to fopen("|lpr", "w"), for instance, to > >> Since no one else has posted an answer (I'm sure they will), I guess >> I'll do the honers. Unix has EXACTLY what you want. The system call is called >> popen! (Stands for Pipe? Process? open). Is has the following syntax: > >You missed my point. I know it's possible like that. I want it to be part >of the file system semantics, so when I'm typing to a file requestor or >asked to supply a path, I can type |lpr. I don't want to change every >program to look at the first character, if it's a pipe symbol turn it >into a popen call. > Hmmm, I think I missed something also... If you want it to be apart of "your" filesystem semantics, you could always roll your own rapping function (which you can then make available so it might become a defacto standard ;-). However, I can't see making this a part of the file system because it can't be completely compatible. Using fopen("|lpr", "w") makes good sense, but fopen("|lpr", "r") does not. Also, extending the idea, fopen("sort|", "r") makes sense, but fopen("sort|", "w") does not. Therefore, making this capability part of the filesystem semantics would lead to certain things being semantically correct and other things not being semantically correct. David Masterson DMasterson@cup.portal.com