🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #1134

Wanted: the C standard I/O library for SUMacC.

#1134
From: guido
Date: Sun, 21 Apr 1985 05:13
51 lines
3211 bytes
We have just unpacked our copy of SUMacC (sp?) and I have successfully
compiled, downloaded and run several programs like the 'example' that
was recently posted to net.sources.mac (which actually shared a lot of
code with 'Skel', also posted both in C and Pascal, without mentioning
it as a source -- so I suspect a common ancestor or brutal theft :-).

However, it strikes me that none of the examples uses any part of the
'standard I/O library'.  In other words, no "printf", no "fopen", no
"getchar", no what-have-you.  I tried what would happen to the standard
"Hello, world" program.  I got no "undefined externals" errors, but
sure enough, it bombed with ID=11.  I would believe that I am missing
something, except that I ran "nm68" on libc, and it contains no references
to anything in libmac, which leads me to believe that this library was
set up for another operating system (the Sun or the Motorola Exormacs?).
Also, "fopen" did not exist in the library.  Other evidence is the
lack of a file "stdio.h" in the include library.

So I am left with accepting that the Mac does not support "stdio".
I recognize that the standard I/O library doesn't fit too well in the
philosophy of the Mac's user interface standards, yet I can see a "niche"
for it: it would immensely ease the initial phase of porting existing
applications.  The Mac OS supports all necessary functions (open, close,
read, write, seek) so it would be easy to implement it, except for the
fact that the screen and keyboard can't be accessed as ordinary files
-- this could be cured, however, by introducing a "stdio window".

I would like to receive any answers you have to the following questions:

	- Have I missed something, and is there a simple way to make
	  printf c.s. behave properly?
	- If not, has someone already implemented stdio for the Mac OS,
	  and are they willing to share it?
	- If not, I am probably going to do it myself.  I am willing
	  to share the code.  However, I am not terribly eager to
	  re-invent the wheel.
	- What is your opinion on the usefulness of stdio in the Mac
	  environment?
	- What do other compilers offer in this area?

	- A related question: is it possible to write routines that are
	  compatible with C's malloc, realloc and free (I expect to find
	  these in the ANSI standard library, so they're not bound to
	  Unix)?  How?

Send mail or post to the net as you find appropriate.  Thanks in advance.

	Guido van Rossum, "Stamp Out BASIC Committee", CWI, Amsterdam
	guido@mcvax.UUCP

(Who said the Macintosh made programming unnecessary? :-)
Technical Details
Message-ID: <6389@boring.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!mcvax!boring!guido

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site boring.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!mcvax!boring!guido
From: guido@boring.UUCP
Newsgroups: net.micro.mac
Subject: Wanted: the C standard I/O library for SUMacC.
Message-ID: <6389@boring.UUCP>
Date: Sun, 21-Apr-85 00:13:52 EST
Article-I.D.: boring.6389
Posted: Sun Apr 21 00:13:52 1985
Date-Received: Tue, 23-Apr-85 00:35:12 EST
Reply-To: guido@mcvax.UUCP (Guido van Rossum)
Organization: CWI, Amsterdam
Lines: 50
Apparently-To: rnews@mcvax.LOCAL