🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #2620

Re: Megamax bugs and queries

#2620
From: braner
Date: Thu, 30 Oct 1986 05:54
33 lines
1731 bytes
[]

A few answers/suggestions:

	Never put a function call inside a macro!  E.g.: isalpha(c) is
a macro (defined in ctype.h):

	#define isalpha(c) (c>='A' && c<='Z' || c>='a' && c<='z')

which means that isalpha(c=getchar()) calls getchar() 4 times, probably
not what you wanted...  (to make things worse, getchar() is a macro
inside another macro...).  BTW, they should have defined isalpha as
above but with "(c)" instead of "c" everywhere - that may be why it
does not compile...

	To get stuff out on the screen or whatever, flushing the
buffer, use fflush().

	The Megamax malloc(), as explained in the manual, is designed
to bypass the problems with the OS Malloc().  It takes no less than 8K
at a time from the system, and does further splitting itself.  It works
mighty fine under heavy use, with MANY small malloc()s and free()s,
as exemplified by my microEMACS.

	To print out a pointer, use:

	printf("%lx", (long)pointer);

(remember: from now on, pointers are 32 bits, until they get to be 64!)

- Moshe Braner

PS - anybody got the upgrade from Megamax yet?  Or is it due Friday night?
Technical Details
Message-ID: <1333@batcomputer.TN.CORNELL.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!cornell!batcomputer!braner
References: <381@cernvax.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!cornell!batcomputer!braner
From: braner@batcomputer.TN.CORNELL.EDU (braner)
Newsgroups: net.micro.atari16
Subject: Re: Megamax bugs and queries
Message-ID: <1333@batcomputer.TN.CORNELL.EDU>
Date: Thu, 30-Oct-86 00:54:07 EST
Article-I.D.: batcompu.1333
Posted: Thu Oct 30 00:54:07 1986
Date-Received: Thu, 30-Oct-86 23:36:42 EST
References: <381@cernvax.UUCP>
Reply-To: braner@batcomputer.UUCP (braner)
Distribution: world
Organization: Theory Center, Cornell University, Ithaca NY
Lines: 33