[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Dev:Printer - device file on the Mac?



On Tue, 12 Mar 1996, Holger Skok wrote:

> Hi,
> 
> I've recently come across the example PERL code that sends
> a PS-file to the selected printer and I am at a loss to
> understand what's going on...
> 
> Since when are there any device special files on a Mac?
> How does MacPerl emulate them?
> Which ones are supported?
>
> (I couldn't find anything in the help files)
> By the way: I'm still using PERL4...

I was curious about that as well.  After some digging, I found out about 
GUSI, the Grand Unified Socket Interface.  It a package that our good 
friend Mattias wrote that emulates the UNIX socket interface on a Mac.  
It allows access to several types of sockets, including PAP (AppleTalk's 
Printer Access Protocol).  Download the GUSI package and read the docs, 
it tells all (perhaps more than you want...).  

(Other socket types available with GUSI are:

unix--memory mapped files;
AppleTalk ADSP (Apple Data Stream Protocol)--like TELNET over AppleTalk;
PPC (Process-to-Process Comunication)--Program linking with some security; and 
Internet (TCP/UDP/etc.)--TCP/IP sockets.)

In answer to your other question, to my knowledge MacPerl also recognizes:

'Dev:AEVT:...' for AppleEvents, described (somewhat) in MacPerl.frontend; 
'Dev:Console:...' for the console and other windows (see
        macscripts:PlainPerl); 
'Dev:Null' for what you'd expect; 
'Dev:stdin', 'Dev:stdout' and 'Dev:stderr' refer to standard input, 
        standard output and standard error; and
'Dev:Psuedo:...' for access to resources of type 'TEXT'.  

Did I miss any???

John Peterson -- University Networking Services -- Brigham Young University
Internet: John_Peterson@byu.edu                       Phone: (801) 378-5007