[comp.sys.amiga] Qestions

bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) (06/13/87)

Question:
    Is there any way to identify the MACHINE that a program is runing on?
(A1000, A500, A2000, A60,000).  Also it's street price, in German marks.

Qestion:
    Is there any way to find the head of the input.device chain without
adding a dummy handler?  I would like to search the chain for a handler
with a specified name, then remove it.

Question:
    There is a graphics library function called TextLength().  This will
count how many pixels a string of characters requires.  Is there a way to
count how many CHARACTERS will fit in a specified number of PIXELS?
(PROPORTIONAL characters, please!)

Question:
    Is there a DOS packet, like GET_BLOCK, that will find and return cached
blocks?  (Without Facc)

Question:
    Is there a packet (other than INHIBIT) that will allow a external file
system parasite to lock a directory block to eliminate the possibility of
examining a newly deleted file?  (Speeddir II replaces the ExNext packet)
(The current ExNext allows deleting files while another process is reading
that directory)

Question:
    Is the combined packet information in the Technical Reference Manual
and Glossy AmigaMail issue complete?  Has a handler example that uses all
the packets expected to be supported been released, and if so, where?

Ideas:
    NewCloseLibrary("Name").  One less mangy pointer to keep track of.
Slightly smaller code.  Blitzfonts in ROM.  "Interest" lock on a file
or directory.  A message would be sent when it changes, and what changed
(deleted file, new file, etc)


         Ack!  (NAK,EOT,SOH)
 |\ /|  .
 {o O} .  bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce
 ( " ) 
   U      Single tasking?  Just say *NO!*

Tip of the day:  Before you release your latest creation on the world, test
it with the font set from preferences to Topaz-60.

grr@cbmvax.UUCP (06/13/87)

In article <8706122325.AA17348@cogsci.berkeley.edu> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes:
> Question:
>     Is there any way to identify the MACHINE that a program is runing on?
> (A1000, A500, A2000, A60,000).  Also it's street price, in German marks.

No, the machines are intended to be highly compatible, so we didn't go to any
particular effor to provide machine-id registers or such foolishness.  The
general idea is that software should be written to run on any of the machines,
with any differences being on a "feature" basis rather than a "model" basis.

Custom chips have ID registers/bits.  You can tell which joystick port the light
pen is on by programatically twitching the fire button, etc.

The "street price", even in DM, is up to the dealer population.  All we know
about is a "list price" which is somehow related to the "dealer price". 8-)

-- 
George Robbins - now working for,	uucp: {ihnp4|seismo|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@seismo.css.GOV
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)

ewhac@well.UUCP (06/15/87)

[ Requiem sacrifice to a line eating bug. ]

In article <8706122325.AA17348@cogsci.berkeley.edu> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes:
>Question:
>    There is a graphics library function called TextLength().  This will
>count how many pixels a string of characters requires.  Is there a way to
>count how many CHARACTERS will fit in a specified number of PIXELS?
>(PROPORTIONAL characters, please!)
>
	Proportional characters?  Hmm, well lemme see.  Proportional
characters vary in width depending on what letter you have.  So I guess that
means if you had 320 pixels of width to play with, you could fit 40
characters in them.  Of course, that's only if each if them were 8 pixels
wide, which is about average.  However, if you have a few 'i's sprinkled in
there, they're thinner than all the other letters, and take fewer pixels, so
that would bring your total up to, oh, let's say 47.

	No, wait.  What if you had some 'm's in there?  They're a bit wider
than most, so that would take us back down to maybe 42.

	No, that won't work either.  What if they all were upper-case 'W's?
They're real wide.  You'd only get about -- gee, I don't know -- 21 of those
on a line?

	Say, just how is this routine going to know how many proportional
characters are going to fit in a specified number of pixels unless it knows
what the characters are?  Looks like an intractable problem to me.

	Seriously, it's not possible to know how many proportional
characters are going to fit into a specified number of pixels until you try
it.  Old style printers (ink, lead type, and all that) had this problem all
the time, except that they sort of got a "feel" for just how much they could
cram into one line.

	Your best recourse is to run the string you're interested in
printing through TextLength() and see if it'll fit.  If it's too big, search
backwards from the end for the first space, cut it there, and try again.

	Of course, if you have a fixed width font, the solution is obvious.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_	 Bike shrunk by popular demand,	      dual ---> !{well,unicom}!ewhac
O----^o	 But it's still the only way to fly.  hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor