HDTenEightyP/NetNews huggingface dataset:
From: km@forty-2 (Kay Mathiesen)
Newsgroups: comp.sys.mac.programmer
Subject: Q: Which QD-Fonts for ImageWriter draft printing?
Keywords: ImageWriter draft
Date: 20 Aug 92 12:57:10 GMT
Organization: FORTY-TWO Software-Entwicklung GmbH, Hamburg, Germany

I want to use the ImageWriter II in draft printing mode for fast output.
But if I try to print right-aligned columns with a monospaced font like
Monaco or Courier, the columns are not printed right-aligned. Some Rows differ
only one or two pixels from the ideal aligment.
It seems, that the ImageWriter Driver needs special fonts.

Has anybody found a solution for this problem?
How doess the printer driver font transformation?
Are there special Quickdraw-fonts for printing?

This bothers me since the introduction of the mac...

Kay
--
--------------------------------------------------------------
!  Kay Mathiesen               !  FORTY-TWO                  !
!  Internet:    km@forty-2.de  !  Software-Entwicklung GmbH  !
--------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: annoying pascal strings
Organization: Kalamazoo College
Date: Wed, 12 Aug 1992 18:21:06 GMT

tom@dtint.uucp (Thomas R. Kimpton) writes:
>
>This is one of my favorite constructs on the mac:
>{
>char dstr[257];
>	dstr[0] = sprintf(&dstr[1],"debug info");
>	DebugStr(dstr);
>}

I just write:   DebugStr("\pdebug info");

Does MPW not let you do the "\p"-string-prefix thing?
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "Oh shut up."                         - Dan "Maynard" Gannon, 28 July 1992
From: a62178a@ccsparc01.center.osaka-u.ac.jp (kikkawa lab)
Newsgroups: comp.sys.mac.programmer
Subject: THINK Pascal's Undo (In no)
Keywords: THINK Pascal, Undo, Bug
Date: 20 Aug 92 05:37:12 GMT
Organization: Computation Center, Osaka University

I found a fatal bug in my THINK Pascal 4.01.

Soon after compiling some source program, `Undo'ing the last 
action, such as deleting a character, causes THINK Pascal to
make absurd code when re-compile it. Example:

  program test;
      var i : integer;
  begin
      i := 1
  end.

Let's change i := 1 to i := 0 and compile this program. Next, 
choose `Undo Typing' from the Edit menu and compile it again. 
When I run this program on THINK Pascal environment, there 
appears a message saying:
   "The THINK Pascal Zone is damaged. Proceed with caution."

If I build application by taking similar step, the size of CODE 
resource of the resulting one is only 30 bytes (362 bytes, if 
correctly compiled.)

Is this bug popular, or proper to my THINK Pascal and my 
environment?

Sorry for my poor English.  Humitaka Tamura
From: John_Shepardson.esh@qmail.slac.stanford.edu (John Shepardson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: byte alignment problem
Date: 21 Aug 92 17:17:48 GMT
Followup-To: comp.sys.mac.programmer
Organization: slac

In article <1992Aug17.233739.19308@athena.cs.uga.edu>,
kinsey@athena.cs.uga.edu (Kevin Kinsey) wrote:
> 
> a quick question:
> 
> 	if given a struct { char a; long b;} x;, what is the best method
> 	to create a buffer that contains 'a' followed by 'b' WITHOUT the
> 	implicit padding within the struct.

Think C will not add the pad byte within a struct. I can't say about other
compilers.


-------------------------------------------
John_Shepardson.esh@qmail.slac.stanford.edu
From: bowman@reed.edu (Eric Bowman (bobo))
Newsgroups: comp.sys.mac.programmer
Subject: CMarker 3.2.1 doesn't work?
Date: 13 Aug 92 22:33:19 GMT
Article-I.D.: reed.1992Aug13.223319.10578
Organization: Reed College, Portland, OR

After waiting a *very* long time for CMarker to do it's job on a bunch of
source, I'm annoyed to report that, for me at least, it doesn't work.
I haven't investigated it fully yet; it could be a problem with Mark
(I'm using Shell 3.3a14 off of ETO #8); I don't really understand the
syntax Mark uses.

Anyone else notice this?

bobo
bowman@reed.edu
From: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Creating background tasks (HELP!).
Date: 14 Aug 1992 15:21:17 GMT
Reply-To: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
Organization: Baylor College of Medicine, Houston, Tx
Originator: jstevens@crick.ssctr.bcm.tmc.edu


In article <1992Aug13.200535.18236@sunfs3.Camex.COM>, kent@sunfs3.Camex.COM (Kent Borg) writes:
|> In article <1992Aug13.170029.3055@qiclab.scn.rain.com> baer@qiclab.scn.rain.com (Ken Baer) writes:

|> >What I want to do is allow our 3D rendering software to render in the
|> >background to the user can use the modeller etc. while rendering.
|> >Could someone either post, or point me to some documented code to set
|> >this up?
|> 
|> Look in Inside Macintosh Volume VI or the new "Processes" volume of
|> Inside Macintosh for details, but in general, there are two things to
|> do:
|> 
|> 1) When your code gets CPU time (you will know this because it is
|> executing) do your thing.
|> 
|> 2) When the user decides to say something to your running code--for
|> example canceling the rendering he mistakenly started--notice the
|> "Stop" menu choice, or "Cancel" button, or command-period keystroke,
|> and act on it (by stopping in this case).  

Another option that may be more in line with what you really want to do
is use threads.  The new Threads package from apple allows programs to
have multiple threads of execution.  In your case, a single program (not
seperate processes, as described above) could well shunt off all of the 
compute intensive rendering into a new thread, that would chug along while
the user was free to interact with the rest of the program (which resides
in its own thread).

-jps

-- 
Jason Stevens			Internet:  jstevens@bcm.tmc.edu
Network User Services		Voice:  (713) 798-7370
Baylor College of Medicine	Opinions expressed are mine alone.

Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: Re: Localized System software
Organization: Universitaet Kaiserslautern
Date: Fri, 14 Aug 1992 20:58:21 GMT

In article <1992Aug12.164152.8934@Csli.Stanford.EDU> francis@csli.stanford.edu (Dave Francis) writes:
>From: francis@csli.stanford.edu (Dave Francis)
>Subject: Localized System software
>Date: 12 Aug 92 16:41:52 GMT
>This question may have two answers given the release of system 7.1 (Cube-E).
>
>How does one tell if the System running is Japanese or Persian or
>whatever? Does this change with the introduction of system 7.1?
>
>Thanks,
>Dave Francis

Once again, please: R T F M! (Read this fine manual!)
And the answer is: look at the ITL0 resource. It's all there. Right in the 
System file. Use ResEdit to look at it. Do not pass over GO. IM VI, 
Wordlwide Software, says it all.

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help with TextEdit.
Date: 20 Aug 92 11:39:48 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Aug18.162910.26177@leela.cs.orst.edu>,
woodc@jacobs.CS.ORST.EDU (Major Havok) wrote:
> 
> [...]
> If anyone out there can give me some information about using
> TextEdit, I would be forever in your debt. :-) Also, any source code that
> might demonstrate the use of TextEdit would be very helpful. Thanks...

"Major Havok"?

I have code in THINK C, not Pascal for a sample application called
"Chassis."  If you also know C, it would be useful.

I also have the handouts for a course I taught in Macintosh programming for
people who had experience programming something else.  E-mail me and I
would be happy to send you the pages about TextEdit and/or the current
"Chassis" source code (and flow chart).

Believe it or not, I found the most difficult thing about TextEdit was
hooking it into the use of a scrolling control.  In fact, after I posted
"Chassis" in public places a bug was discovered in scrolling!  The
descriptions of the destination and view rectangles in IM-1 are
unfortunately ambiguous.

-Chuck
From: pollansw@cse.fau.edu (Warren Pollans)
Newsgroups: comp.sys.mac.programmer
Subject: SE: xWindows terminal?
Date: 21 Aug 92 14:42:38 GMT
Organization: Florida Atlantic University, Boca Raton, FL, USA

I log onto a unix system (sunOs) from home with my SE (old) using
RedRyder.  Is there a terminal program that will allow me pretend
that I'm an xWindow terminal so that I can use the dbxtool or ups
debuggers from home?

Thanks,

Warren

(pollansw@cse.fau.edu)
From: siegel@world.std.com (Rich Siegel)
Newsgroups: comp.sys.mac.programmer
Subject: Re: HELP, PLZ:  MPW tool bums out when loading HUGE resource map
Date: 14 Aug 92 18:40:47 GMT
Distribution: comp
Organization: GCC Technologies

In article <COLIN.92Aug14091537@wrangel.Cayman.COM> colin@Cayman.COM (Colin "Atilla" Steele) writes:
>
>It works fine, with one small problem.  It pukes on my ".proj" file.
>After some investigation, it looks like the problem is that the
>resource map is too big - the file (map) is 2.5 Mb.  Since MPW tools
>run in a conjured-up C run-time environment, inside MPW, when the tool
>loads the 2.5 Mb resource map, all hell breaks loose.

	The file may be big, but that doesn't make the resource map big.
The size of the resource map depends on the number of resources in the
file, not on the size of the resources in the file.

>So, my question is: "How do I make this work?"  My first inclination
>is to find some way of getting a handle to 'ckid' # 128 without
>loading the whole resource map.  Is this possible?  Using
>SetResLoad(FALSE) will just cause GetResource() to return NIL, right?

Wrong. SetResLoad(FALSE) will suppress loading of resources into memory,
but doesn't inhibit reading of the resource map. Therefore, you can 
SetResLoad(FALSE) before OpenResFile()-ing the resource file, do a 
GetResource() to get an empty handle (i.e. NIL master pointer) to 
your resource, then LoadResource() on that handle. And don't forget
to call SetResLoad(TRUE) when you're done.

If the resource file you're opening in fact has lots of preloaded resources
in it, then you are well advised to call SetResLoad(FALSE) before opening
your resource file, but source files only have a few resources in them,
and Projector project databases don't even have resource forks.

R.
-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Software Engineer & Toolsmith
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: stepan@natinst.com (Stepan Riha)
Subject: Re: THINK Debugger Question
Organization: National Instruments, Austin, TX
Date: Fri, 14 Aug 1992 15:31:37 GMT

In article <steve.herman-130892173316@hermasj.msfc.nasa.gov.> steve.herman%express@freedom.msfc.nasa.gov (Steve Herman) writes:
>
>  Is there a way to run in the THINK C debugger and break on an Open
>Document AppleEvent (or any other apple event for that matter)?
>
>The copy of my app running under the debugger never gets the apple event. 
>It seems that under the debugger you aren't really running under your
>application's signature.  Is this true?
>
>Any ideas?
>

Yup, it's true.  The project "runs" as type "PROJ" and creator "KAHL".  That's
also why "About this Macintosh" shows a project icon for your program.  I don't
know why you get the generic application icon in the menubar, though.

I fixed this "problem" by faking ODOC events during development.  I'd have a
menu item that prompts me with a file dialog and then sends an ODOC event to my
program with the file I selected.  Of course, this menu is removed once I'm
finished with debugging...

Stepan
-- 
   Stepan Riha -- stepan@natinst.com
From: orpheus@reed.edu (P. Hawthorne)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Porting code using fork() to the Mac
Date: 16 Aug 92 00:10:18 GMT
Article-I.D.: reed.1992Aug16.001018.26666
Organization: Reed College, Portland, OR


  mikeb@sam.amgen.com, Michael Brennan, writes:
: Apple has released a "Threads" library on its developer CDs. It's use is
: documented in issue 6 of Develop. It has a calling syntax very similar to
: fork() and (from what I've been able to tell) appears to be quite robust.

  If imitation is the sincerest form of flattery, then a failed attempt at
imitation is the most telling. I, rather unsuccessfully, tried to take the
same approach to a threading package for Object Pascal. It was like trying
to walk on eggshells, and still make the perfect omelette.

  In the docs, there is some interesting discussion of a scheme for marking
all unused code resources purgeable. The idea was to mark all code
resources purgeable with the obvious exception of one resource, followed by
a walk of the stack looking for anything resembling a return address, so
that the relevant resources could be marked as non-purgeable.

  Has anyone given that a shot?

  Theus (orpheus@reed.edu)
Newsgroups: comp.sys.mac.programmer
From: jedwards@gmuvax2.gmu.edu (James Edwards)
Subject: I wonder...
Organization: George Mason University, Fairfax, Va.
Date: Thu, 20 Aug 1992 22:01:02 GMT

I like many other people that post on here am looking for information on
using a modem with some software I've written.  I have to wonder why
there isn't a single good example of serial communications to be found
anywhere.  I have though about using the Communications Toolbox, but I
really don't want to.  On pre-7 macs, it's a pain to install, and even
requiring all the right files on 7 macs is trouble.  It would be nice to
have a PD set of routines for doing the basic setting of the serial
ports, reading a string from the port, and writing a string to the port.
If such exists, and I haven't seen them, someone please mail them to me,
and I apologize for wasting everyones time.  If not, and if I manage to
figure it all out, I'll post the routines for future beginning mac
programmers.

Jimi

Newsgroups: comp.sys.mac.programmer
From: "John Lacey" <johnl@spinner.cs.indiana.edu>
Subject: Calculating folder sizes [Q]
Organization: Computer Science, Indiana University
Date: Sat, 22 Aug 92 1:12:37 EST
X-Mailer: ELM [version 2.3 PL11]

How does one go about calculating the size of a folder?

I would be interested in distinguishing between logical and physical
sizes. (I would also be interested in which of those the Finder
reports.)

-- 
John Lacey         `Everything must end; meanwhile we
                    must amuse ourselves.' --Voltaire
Newsgroups: comp.sys.mac.programmer
From: twi@poise.fysik.uu.se (Tomas Wiell)
Subject: Problem with interrupts
Organization: Department of Physics, Uppsala University
Date: Thu, 20 Aug 1992 16:49:15 GMT

I'm working on a program for data collection using a NB-DIO-32F board 
on a Mac IIci. The programming is written in pascal and the problem is 
an interrupt. The machine crashes when I enable a NMR interrupt on the
NB-DIO-32F. The interrupt routine is tested as a time interrupt (PrimeTime)
so it should be ok.


Tomas Wiell  email: Twi@poise.fysik.uu.se
Newsgroups: comp.sys.mac.programmer
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: Re: Map (was: Australian Mac systems)
Organization: Universitaet Kaiserslautern
Date: Fri, 21 Aug 1992 20:04:18 GMT

In article <1992Aug20.131856.3286@otago.ac.nz> stanger@otago.ac.nz (Nigel Stanger) writes:
>Subject: Re: Map (was: Australian Mac systems)
>From: stanger@otago.ac.nz (Nigel Stanger)
>Date: 20 Aug 92 13:18:56 +1300
>
> [stuff deleted]
>
>Probably wouldn't have done you much good :) I don't know about
>earlier version of the System software, but I just looked up "Map
>control panel" in the System 7 Reference manual, and it says
>"icon (fig.) 35". I looked up p. 35 and sure enough, there was a
>figure with all the standard control panel icons! That's the
>_only_ mention of the Map control panel that I could find. I also
>tried looking up "time zone", "setting" and "localisation".
>Nothing.
>
>So is there _any_ documentation on this anywhere?

Here in Germany, the Map control panel is documented in a "Readme" file 
sitting next to it on the installation disk.

>
>----------------------------------------------------------------------
>Nigel Stanger,                  Internet: stanger@otago.ac.nz
>University of Otago,            Phone: +64 3 479-8179
>Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
>"No problemo." -- Arnold, "Terminator 2"


-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
From: russotto@eng.umd.edu (Matthew T. Russotto)
Newsgroups: comp.sys.mac.programmer
Subject: Re: low-level keyboard interface?
Date: 21 Aug 92 00:38:34 GMT
Article-I.D.: eng.1992Aug21.003834.24327
Organization: College of Engineering, University of Maryland, College Park

In article <1992Aug20.222210.21063@CSD-NewsHost.Stanford.EDU> philip@ziggy.stanford.edu (Philip Machanick) writes:
>A friend of mine is giving an assembly language course and wants to illustrate  
>some alternative approaches to keyboard I/O including polling the VIA (all this  
>is on an SE and he is not concerned about using higher level interfaces,  
>portability, etc.)
>
>Any pointers, ideas etc. welcome. I can supply more detail but I suspect this  
>question is not of general interest.

On an SE?  Keyboard IO is done through ADB-- polling the VIA won't get
you anything more than whether any ADB event (including mouse moves)
takes place.
-- 
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Some news readers expect "Disclaimer:" here.
Just say NO to police searches and seizures.  Make them use force.
(not responsible for bodily harm resulting from following above advice)
From: aph@milton.u.washington.edu (Al Hallstrom)
Newsgroups: comp.sys.mac.programmer
Subject: CHK error  -HELP
Date: 17 Aug 92 21:30:20 GMT
Article-I.D.: u.1992Aug17.213020.21649
Reply-To: aph@u.washington.edu
Distribution: usa
Organization: University of Washington, Seattle

I'm using THINK C 5.0 on a Mac IIsi using System 7. I've written a program
that gets a window from a resource file.  It draws to and erases the window. 
Then I disose the window.  Later in the program I call it back using the same 
WindowPtr and resouce ID. Anyway my program crashes. I've used the debugger and the address doesn't get screwed up there.  So what I've been doing
is commenting out code to find out what the problem is. I commented out a 
DrawString statement and this is what I get the next time I get the window:
A dialog pops up with the following message.

Sorry a systemt error occurred
"My Project"
CHK error

What is a CHK error? If anyone happens to know what else might be causing this
I'd be grateful.
One other thing.  I have not initiated the toolbox or anything.  My first call
is "char = getchar()".  I am only using the window to draw to.

Respond to aph@u.washington.edu.

Thanks in advance.
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help!  System error #28
Date: 13 Aug 92 12:49:44 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <chuck-120892123052@choffman.gte.com>, chuck@gte.com (Chuck
Hoffman) wrote:
> 
> SystemErrors DA says "stack has moved into application heap."  Is this
> simply a memory management problem, or is it really something else
> masquerading as a memory problem with a bogus return?

In article <chuck-120892141258@choffman.gte.com>, chuck@gte.com (Chuck
Hoffman) wrote:
> 
> Arrrrgggghhhh!!!!  I changed the program SIZE parameter and the error
> changed to #25 (out of memory).  Something is definitely running amok.

Problem solved.

I got some very interesting and helpful information about stack management
from John Wallace at TRW.  Thanks much, John.  I appreciate it.

The problem turned out to be a dumb error masquerading as a memory
management problem, though.  I had passed an int to FSRead for the number
of bytes to read.  It was expecting a long, so FSRead thought the few bytes
ahead of my int were the upper half of a long word with a VERY large value.
 Naturally, the read overflowed the buffer in the stack and manifested
itself as error #28 or #25.

This kind of problem would have been much easier to debug at the assembly
level with MacsBug, rather than at the source level with THINK C Debugger. 
I'm a very experienced programmer using IBM System/370 Assembly Language
(mainframe).  I simply must learn 680x0 assembly language.  Any
recommendations for textbook, course, or assembler software?

-Chuck Hoffman

I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
From: chris@benton.prepress.com (Christopher Knox)
Newsgroups: comp.sys.mac.programmer
Subject: Help ! MPW/MacApp Link Error
Date: 12 Aug 92 18:33:30 GMT
Organization: Pre-Press Technologies, Inc.
X-Useragent: Nuntius v1.0


ThinkC is so easy to use, it's boring. So let's try MPW/MacApp (ha ha).

I'm trying to get a slow start on MacApp. So after two days of tutorial
from
a CD ROM (what happened to books, at least you can turn the page when
you're
done reading it !) and building the sample application I boldly decided
to add
some other code to it. 
It's a large chunk and is to be called from strategic places within the
MacApp framework. 
So far so good. I fought my way through to extern "C" and -ModelFar but
now I'm stuck. 
I'm calling one (!)  routine without parameters in ...->IMyApplication. 
This routine is part of the large chunk of code. 
I get the following error:

Making:        Touch.MAMake
Linking:       Touch
### While reading file "HRDKNOX:MPW:Libraries:Libraries:RunTime.o"
### HRDKNOX:MPW:Tools:Link: Error: PC-relative edit, offset out of range.
(Error 48) %__MAIN (260) 
  Reference to: main in file: HRDKNOX:MPW:-Touch2:.S7TefCfD:MTouch.cp.o
### HRDKNOX:MPW:Tools:Link: Error: PC-relative edit, offset out of range.
(Error 48) %__MAIN (260) 
  Reference to: %__MAIN in file: ### HRDKNOX:MPW:Tools:Link: Errors
prevented normal completion.

Any suggestions ? Thanks.
                              
                              Desperate In CA.
Chris Knox
"Omne animal triste est post (or without) coitum"
Newsgroups: comp.sys.mac.programmer
From: krf@troy.cat.rpi.edu (Keith R. Fieldhouse)
Subject: Re: My view resource won't load.  Any suggestions?
Keywords: view macapp resource
Organization: Rensselaer Polytechnic Institute, Troy, NY
Date: Thu, 13 Aug 1992 18:58:58 GMT

I've run into similar kinds of problems, generally when I forget to call
inherited::something().  I'm using 2.0 views so the culprit for me is often
a failure to call inherited::IRes().  In 3.0 perhaps it is DoPostCreate or
ReadFields (I'm not sure).  This, of course, only applies if you've sub-classed
some MacApp views in the view hierarchy that you're having trouble with.

Hope this helps,

Keith