HDTenEightyP/NetNews huggingface dataset:
From: scott@mcl.ucsb.edu (Scott Bronson)
Newsgroups: comp.sys.mac.programmer
Subject: Can THINK C write dcmds?
Keywords: dcmd THINK C
Date: 22 Aug 92 01:57:51 GMT

Can THINK C write dcmds?  Seems there's no problem getting THINK to write
the code, but the converter is an MPW tool.

Has anyone else done this?

	- Scott
Newsgroups: comp.sys.mac.programmer
From: raffuj@aix.rpi.edu (Jose A. Raffucci)
Subject: Killing UpdateEvents
Organization: Rensselaer Polytechnic Institute, Troy, NY
Distribution: usa
Date: Thu, 20 Aug 1992 15:05:21 GMT

When I start my program up, it draws the screen, redraws the screen, and then gets going
I narrowed it down to an update event that either isn't getting killed off
when it should, or is getting generated when it's not supposed to.  Using the 
thinkC debugger, I found that my handleUpdateEvent() routine is getting called
immediately after I enter the event loop. I tried to flush the events right before
I enetered the loop, but that din't work either.  I'm rapidly  running out of idas
and I'm starting to consider NOT drawing my screen initially, but just let the update
routine handle it when I start up...

-hOz

-- 
X/\/\/\/\/\/\/\/\__/\__/\/\/\/\/\/\__/\__/\/\/\/\/\/\/\--:OO  _________________|
  //  The Amigoids from hell,     raffuj@rpi.edu     Ren & Stimpy (SNICK) 
\X/   Renssepolyinstatechnitute                 New Episodes! Aug 15, 7:00 pm   
Oh my beloved Ice Cream Bar!  How I love to lick your creamy center!  ChowwmP!
Newsgroups: comp.sys.mac.programmer
From: system@asuvax.eas.asu.edu (Marc Lesure)
Subject: yet another bad f-line problem
Organization: Arizona State University
Date: Mon, 17 Aug 1992 21:36:14 GMT

With the recent discussion on bad f-line's message, I thought I'd mention
my problem.  My application builds a link list of data and each member in
the list has its own link list.  All memory is allocated using NewPtr().
I can build and access this memory structure with no problem.  The problem 
arises when I display the data.  I have a window with two lists defined in
it.  The first list displays the members of the main link list and when you
select a cell, the second list displays that member's link list.  The bad
f-line occurs after I finish stuffing the second list.  I'm using Think C
5.0.2.  It seems like the List Manager is trashing something, but I haven't
been able to track it down.  Any hints?

-----------------------------------------------------------------------
Marc Lesure / Arizona State University / Tempe, AZ
"Between the world of men and make-believe, I can be found..."
"False faces and meaningless chases, I travel alone..."
"And where do you go when you come to the end of your dream?"

UUCP:       ...!ncar!noao!asuvax!lesure  
Internet:   lesure@asuvax.eas.asu.edu
Xref: sparky comp.sys.mac.programmer:14223 misc.education:3158 soc.college:3641
From: tedwards@src.umd.edu (Thomas Grant Edwards)
Newsgroups: comp.sys.mac.programmer,misc.education,soc.college
Subject: Re: Computer Science Programs
Date: 19 Aug 92 19:56:12 GMT
Article-I.D.: src.1992Aug19.195612.5537
Organization: Systems Research Center, Maryversity of Uniland, College Park

In article <ELM.92Aug15022615@terrorism.berkeley.edu> elm@cs.berkeley.edu writes:
>In article <1992Aug14.230223.17066@athena.mit.edu> solman@athena.mit.edu (Jason W Solinsky) writes:
>=>If you plan on going to graduate school in CS, go to (in order) MIT,
>=>Stanford, CMU, UCB, or the University of Illinois at Urbana or don't
>=>think of it. Anything less than a good GPA and great recomendations
>=>from a second tier CS school (Ivy League, Caltech) and you probaly
>=>won't make it. If you're from a third tier school, forget it.

Of course, something else to consider is not only the quality of the
theoretic education you get, but the amount of hands-on experience w.
computer systems and research you get.  While alot of people will 
consider undergraduate research as an unneccessary part of an education,
the reality is that when you go looking for a job out of college
w. no experience, you'll be in worse shape than someone who went to
a slightly lesser-tier school (such as Johns Hopkins) but actually
got to work w. a professor on a serious research project.

If you _know_ you'll be going to grad school, then it might matter
alot less.

-Thomas
From: ozma@kuhub.cc.ukans.edu
Newsgroups: comp.sys.mac.programmer
Subject: New Macs - no 1-bit depth?
Date: 14 Aug 92 00:22:55 CDT
Organization: University of Kansas Academic Computing Services

Can anyone confirm that at least one of the new Mac models does NOT support B&W
mode on a 12" monitor?

I find this rather incredulous, but then I'm no engineer.  This presents a bit
of a problem for me (and perhaps other game authors) who assume B&W is an
option irregardless.  I suppose I'll have to pull a HasDepth() now just to
confirm that 1 bit is an option.

john calhoun-
From: isbell@ai.mit.edu (Charles L Isbell)
Newsgroups: comp.sys.mac.programmer
Subject: Newline mode
Date: 18 Aug 92 17:14:32 GMT
Organization: MIT Artificial Intelligence Laboratory


Here's an easy one.  Think C.  Mac file manager interface (ie FSRead()
as opposed to fgets(), etc).  I want to read in a line (defined as a
string of characters terminated by a newline) at a time.  Inside Mac
say there's a newline mode that will do this for you automatically,
but doesn't explain how to do it.  Currently I read in a character at
a time until I hit a newline, but I'm sure that's just toooooo slow.

So, how do I do this nwline thing (ie implement a fast fgets())?
--
Peace.
                    "There is nothing more dangerous 
                     than a man who has nothing to lose."
                                    -Malcolm X
                                   -\--/-
    Don't just adopt opinions     |  \/  |       Some of you are homeboys
          develop them.           |  /\  | but only I am The Homeboy From hell
                                   -/--\-
From: wayne@jahangir.UUCP (wayne)
Newsgroups: comp.sys.mac.programmer
Subject: UDP Broadcast on a Mac?
Date: 20 Aug 92 19:23:38 GMT
Organization: MDC, NYC


     I am currently doing UDP broadcast on a Sun
Sparcstation. I want to do something similiar on a
Mac?

     Is the Mac capable of broadcast? Is there any
reason why the Mac would not be able to do broadcast.


     - Wayne wayne@mktdata.com
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Weird Quickdraw Bug w/ Geneva
Date: 18 Aug 1992 15:31:25 GMT
Followup-To: comp.sys.mac.programmer
Organization: Academic Computing

I've run into a VERY odd "feature" with a relatively simple piece of code.
In the following code, InitWin is called to build a small window on the fly
and set up the defaults for drawing later. At some point, the window is
made visible and the event loop calls the UpdateWin routine to redraw the
new window.

Here's the problem.  When 9 pt. Geneva is used, the text comes out as a
VERY pale yellow (instead of the expected black). If any font besides
Geneva is used, or any any size of Geneva BESIDES 9 pt, there is no
problem.

This problem occurs on a Quadra 700 and IIci, both running Sys 7.01. The
color aliasing happens in both 4 and 8 bit video modes on both machines.
There are other windows in the program with custom palettes, but this
window is left alone. None of the other windows has this problem. Anyone
have any clues?

------------------------------------------------------

WindowPtr buttonWin;

void InitWin()
{
Rect r;

   SetRect(&r, 100, 100, 400, 150);
   buttonWin = NewCWindow(NULL, &r, "\pCommand Buttons", FALSE, 
                          noGrowDocProc, NULL, TRUE, -1);
  	SetPort((WindowPtr) buttonWin);
	  TextFont(geneva);
	  TextSize(9);    /*** THIS is the problem?!?! Change to 10 and it
works***/
}

void UpdateWin()
{
	SetPort(buttonWin);
	MoveTo(10,20);
	DrawString("\pSome text.");
}


--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                      |    
Ass't Director, Academic Computing |       "This space for rent."
UT Health Science Center Houston   |  
cshotton@oac.hsc.uth.tmc.edu       |         
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Newsgroups: comp.sys.mac.programmer,misc.education,soc.college
From: idfriedm@hertz.uwaterloo.ca (id friedman)
Subject: Re: Computer Science Programs
Organization: University of Waterloo
Date: Mon, 17 Aug 1992 20:55:25 GMT

In article <ELM.92Aug15022615@terrorism.berkeley.edu> elm@cs.berkeley.edu writes:
>In article <1992Aug14.230223.17066@athena.mit.edu> solman@athena.mit.edu (Jason W Solinsky) writes:
>=>If you plan on going to graduate school in CS, go to (in order) MIT,
>=>Stanford, CMU, UCB, or the University of Illinois at Urbana or don't
>=>think of it. Anything less than a good GPA and great recomendations
>=>from a second tier CS school (Ivy League, Caltech) and you probaly
>=>won't make it. If you're from a third tier school, forget it.
>
 
  There are Canadian schools with a good reputation ( Univ. Waterloo,
  University of Toronto). I'm sure that there are many American schools which
  will fullfil your needs quite well aside from the five mentioned above.
  For example I don't see Cal-Tech, RPI, and other schools that may have
  good programs. Perhaps you can also go outside of North America.

  There are also guides, such as Baron's, which rank schools in various
  grad. programs ( the rankings are debateable, but they are a useful
  starting point).







>Actually, I would put UCB above Stanford for sure, and perhaps ahead
>of CMU.  The federal funding scandal has hurt Stanford, and CMU just
>lost three good professors (Rashing, Kung, and one other whose name
>escapes me).  Of course, it depends on your area, too.  Berkeley is
>probably tops in theory, while CMU has an advantage in robotics.  The
>bottom line is that you should visit each school you're considering,
>as there are cultural differences between them.  Remember that even
>the hardest working grad student will spend more than 20 hours/week
>awake and outside the lab (much more than that in most cases).  Pick
>somewhere you'll be happy for five years.
>
>ethan
>--
>+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
>ethan miller--cs grad student   | "Anybody not wearing 2000000 sunblock's
>elm@cs.berkeley.edu             |  gonna have a REALLY bad day.  GET IT?"
>#include <std/disclaimer.h>     |  -- Sarah Connor, _Terminator 2_
From: deslade@vaxsar.vassar.edu
Newsgroups: comp.sys.mac.programmer
Subject: Need to read the fonts in a Quark file
Date: 19 Aug 92 15:54:06 +1000
Organization: Vassar College

I am desperately seeking the file format for QuarkXPress documents.  I need to
know where the fonts are listed.  Any information or leads to where I can get
the information would be helpful.  Thanks in advance.

	-dennis
-- 
+----------------------------------------+----------------------------------+
|                                        |   Standard disclaimer for rent.  |
|  Dennis Slade Jr.                      |         +++++++++++++++          |
|  Box 3533, Vassar College              |         Inquire within.          |
|  Poughkeepsie, NY  12601               +----------------------------------+
|  internet: deslade@vaxsar.vassar.edu   |      Develop the world...        |
|  bitnet:   deslade@vassar.bitnet       |    Develop yourself...           |
|                                        |  AIESEC: in a country near you!  |
+----------------------------------------+----------------------------------+
Newsgroups: comp.sys.mac.programmer
From: hpoppe@ncar.ucar.edu (Herb Poppe)
Subject: Re: GetKeys, Events, Sound Manager
Organization: Scientific Computing Division/NCAR Boulder, CO
Date: Wed, 12 Aug 1992 15:19:58 GMT

In article <1992Aug11.203247.15836@athena.mit.edu> slchambe@athena.mit.edu 
(Stephen L Chamberlin) writes:

> 3. Ok, so I lied about there only being 2 questions. Is there any limit 
to
> the number of channels that can be open at once to the sampled sound 
> synth? It seems that when I try to open more than 3 such channels, 
> SndNewChannel returns a valid channel pointer for the 4th and subsequent 
> channels, but if I try to play sounds on those channels I get silence. 
But if
> I dispose of one of the first 3, channel 4 magically starts working. It 
also
> seems that the limit is not 3 channels per app, but 3 channels total for 
the
> whole computer, all apps combined.

There is a limit on the number of sampled sound channels that may be active 
at once. This limit is machine dependent. The faster the machine, the more 
channels. If I remember correctly, the limit on a Mac Plus is one. At one 
time the maximum number of channels was four, but that was before the 
Quadras were introduced. I don't know if the Quadras support more active 
channels, or if the Sound Manager has some hard-wired upper limit. Also, 
the determination of the maximum number of channels is dynamic: if the 
machine is "busy with other things", the limit may be reduced. And yes, 
the limit is for the machine as a whole and is not an application limit. 
Therefore, Apple suggests you dispose of the channels at "suspend" time, 
so they can be made available to the app that comes to the foreground.

Herb Poppe                 National Center for Atmospheric Research (NCAR)
hpoppe@ncar.ucar.edu       1850 Table Mesa Dr.
(303) 497-1296             Boulder, CO  80303
From: jonh@pogo.wv.tek.com (Jon Howell)
Newsgroups: comp.sys.mac.programmer
Subject: Think C Debugger & Class dynamic typing
Date: 13 Aug 92 22:07:51 GMT
Followup-To: comp.sys.mac.programmer
Organization: Tektronix

[I haven't really researched either of these problems in depth -- RTFM
 replies are welcome. :v]

In the process of debugging my project, a thought finally occurred to me.
(It's amazing I've gotten this far without a thought, but...) When you look
at a CObject in the Data window of the debugger, and dereference it to open
up a view of the object's structure, it views the object as though it were
the type it's declared as in the context. Why can't/doesn't it use the type
the object *really* is?  For example:

{
   CView *hokey;

   hokey = new CWindow;
   hokey ->IWindow(blah blah blah);
<> hokey ->Update();
}

(The <> is a breakpoint.) If I stop there and view *hokey (and double-click
the address to see the contents of the struct), I only see as much
information
as pertains to a CView. However, hokey is *really* a CWindow, and the
debugger
should be able to figure that out dynamically, right? Symantec? :v)

Another question: TC provides member() and class_name() (and another I
forget)
functions for figuring out the dynamic type of an object. I'd like to be
able
to see if an object I've been passed is of a certain type. However, I don't
want to do a string compare (class_name), and member() seems to only tell
me
if the object is a member of class X or one of its ancestors. [Well, yes,
in fact, it IS a CObject! :v] Is there a way I can get an integer which
uniquely identifies the class? (It'd be extra cool if it gave some info on
the
hierarchy, but... :v)

Thanks,

         --Jon

-----------------------------------------------------------------------------
jonh@pogo.wv.tek.com     Jon Howell
Newsgroups: comp.sys.mac.programmer
From: raffuj@aix.rpi.edu (Jose A. Raffucci)
Subject: Help w/files needed...
Organization: Rensselaer Polytechnic Institute, Troy, NY
Distribution: usa
Date: Thu, 20 Aug 1992 15:00:35 GMT

I need to open a file, write to it using standard text i/o stuff, and 
close it up again.  I figure fopen() and fclose() work ok since they're
in the standard library, but how can I use them with the standard filre
requestors?  

I gave it a couple of whacks, and I guess I just wasn't looking hard 
enough, but I just couldn't find a way to get the mac getfile routines
to just give me back a filename that I could use with fopen().  I know this
can't be too hard, but I'm not a mac person.              

If you've got an easy solution, PLEASE, let me hear it... 

-hOz

-- 
X/\/\/\/\/\/\/\/\__/\__/\/\/\/\/\/\__/\__/\/\/\/\/\/\/\--:OO  _________________|
  //  The Amigoids from hell,     raffuj@rpi.edu     Ren & Stimpy (SNICK) 
\X/   Renssepolyinstatechnitute                 New Episodes! Aug 15, 7:00 pm   
Oh my beloved Ice Cream Bar!  How I love to lick your creamy center!  ChowwmP!
Newsgroups: comp.sys.mac.programmer
From: leonardr@ccs.itd.umich.edu
Subject: IconDispatch/IconUtils (was Re: Finder labels)
Originator: leonardr@diddley.ccs.itd.umich.edu
Organization: Campus Computing Sites, University of Michigan-Ann Arbor
Date: Tue, 18 Aug 1992 16:53:08 GMT

In article <1992Aug18.044548.6932@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
>In article <318@farallon.farallon.com> neal@farallon.com (Neal Trautman) writes:
>> 	FUNCTION GetLabel(labelNumber: INTEGER; VAR labelColor: RGBColor;
>> 						VAR labelString: Str255): OSErr;
>> 		INLINE $303C, $050B, $ABC9;
>
>So what's this _IconDispatch, then?
>
	IconDispatch is the trap that the new (Sys7) Icon Manager (also known
as IconUtils) has allocated to it.  the Icon Manager (as documented in a
tech note somewhere) is what Finder 7, the Chooser, the Notification Manager,
the CTB, etc. all use to display "Icon Families" which includes the new types
of icons (icxx) introduced for Sys7.

	If you check out the Tech Note, you'll find a number of the selectors
for _IconDispatch listed along with routines for calling them so you can
draw your own icon families easily, or use them for sending notifications,etc.

-- 
-----------------------------------------------------------------------
Leonard Rosenthol		  Internet: leonardr@ccs.itd.umich.edu
Director of Advanced Technology   AppleLink: MACgician
Aladdin Systems, inc.		  GEnie:     MACgician
Newsgroups: comp.sys.mac.programmer
From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
Subject: Re: annoying pascal strings
Organization: NASA/ARC Information Sciences Division
Date: Thu, 13 Aug 1992 17:49:42 GMT

In article <zben-100892215906@zben-mac-ii.umd.edu> zben@ni.umd.edu (Charles B. Cranston) writes:
>In article <1992Aug10.132907.23439@das.harvard.edu>,
>vreddy@das.harvard.edu (Venkatesh Reddy) wrote:
>
>> Does anyone know of an easy way to use sprintf or something to convert
>> a number or formatted float to a pascal string? For example, I have a
>> number 45 or a number 3.4567 and I want this to go into a pascal
>> string... I can send it into a regular C string by typing
>
>> sprintf(str, "%d %f", 45, 3.4567);
>
>> but is there a way to do this to a pascal string? Thanks...
>
>sprintf(&str[1], "%d %f", 45, 3.4567);
>str[0] = strlen(&str[1]);
>
>Or something close to it, you erect a C string at one byte into the
>memory area then manually store the length byte.  No, I won't answer
>your other question till you put in carriage returns at reasonable
>line boundaries...
>
>zben@ni.umd.edu     -KA3ZDF

Some common C functions: these modify the string in place.
------------
here is header
char * CToPStr(char *aCStr);
char * PToCStr(char *aPStr);

=
------------
here is source
------------



#include "StrFuncs.h"
#include <string.h>
#include <Global.h>


char * CToPStr(char *aCStr)
{
   long i, len;
   len = strlen(aCStr);
   for (i=len; i>0; i--) 
      aCStr[i] = aCStr[i-1];
      
   aCStr[0] = Min(255, len);
   return aCStr;
}


char *PToCStr(char *aPStr)
{
   long i, len;
   len = *aPStr;
   for (i=0; i<len; i++) 
      aPStr[i] = aPStr[i+1];
   aPStr[len] = '\0';
   return aPStr;
}

    


					      
-- 
----------------------------------
#include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
joshr@kronos.arc.nasa.gov
"'I see', said the blind carpenter, as he picked up his hammer and saw".
Newsgroups: comp.sys.mac.programmer
From: Michael Brennan <mikeb@sam.amgen.com>
Subject: Pict to Region?
Organization: Amgen
X-Useragent: Nuntius v1.1
Date: Wed, 19 Aug 1992 01:37:06 GMT

I'm trying to devise the simplest strategy to capture a Region that
matches the outline of a Pict.  Ideally, the Region would be defined
relative to the picFrame, not the current port in which the Pict is drawn.

Any suggestions, pointers, or sample code?
Newsgroups: comp.sys.mac.programmer
From: zben@ni.umd.edu (Charles B. Cranston)
Subject: Re: converting the vRefNum and DirID to just a vRefNum...
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical
Distribution: usa
Date: Thu, 20 Aug 1992 01:51:38 GMT

eric_gorr@coglab_psych.uoregon.edu (Eric Gorr) writes:
 
> I have a vRefNum and a DirID and I want to use these two numbers so that I
> can have just a vRefNum to be used by SetVol.  
 
In article <71403@apple.Apple.COM>, mlanett@Apple.COM (Mark Lanett) wrote:
 
> HSetVol (volName, vRefNum, dirID)

No, you don't want to do this, please read Technical Note 140,
"Why PBHSetVol is Dangerous".  You want to either create a Working
Directory and pass it to SetVol or do what Keith Rollin suggested
and only change the current volume temporarily, so no other piece
of software can possibly do a GetVol and get incorrect data.

Or maybe this is obsolete information since Desk Accessories are
now run in their own partition (under MF or System 7)...

zben@ni.umd.edu     -KA3ZDF
Xref: sparky comp.sys.mac.programmer:13979 misc.education:3110 soc.college:3590
From: steve@tosh.UUCP (Steve Wilson)
Newsgroups: comp.sys.mac.programmer,misc.education,soc.college
Subject: Computer Science Programs
Date: Wed, 12 Aug 92 09:53:55 MST
Reply-To: tosh!steve@enuucp.eas.asu.edu

Hello.

I am looking for descriptions of Computer Science programs at the different
Colleges and Universities around the country.

I'm interested in learning what languages are taught; whether there is an
emphasis on mathematics and physics or programming. In addition, I would
like to know how the faculty are (research or teaching oriented), how
plentiful the resources (i.e., are different computer environments available
for use by undergrads to broaden exposure), and how the campus culture is?

Recommendations and additional information are welcome, so don't be afraid
to tell me about your alma mater.

Please e-mail responses. Thank you.

sw
From: rgonzal@gandalf.rutgers.edu (Ralph Gonzalez)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick Quickbasic Question (Q)
Date: 17 Aug 92 14:44:30 GMT
Organization: Rutgers Univ., New Brunswick, N.J.

MASONS1@vm.utcs.utoronto.ca writes:

>Greetings ,
> I have been asked to maintain a QuickBasic program ,as such I need to
>determine the volume name from which the application was launched. Is there a
>system() function or some other method to achieve this? All thoughts invited!
>Cheers!

According to an addendum to my QB manual, system(7) returns the
file reference number of the application resource fork in a compiled
application. The GetPathName subprogram (included in one of the QB
demo programs) then returns the program's full path name. Then you can
use LEFT$ to get the volume name...

-Ralph

-- 
Ralph Gonzalez, Computer Science, Rutgers Univ., Camden, NJ
Phone: (609) 757-6122; Internet: rgonzal@elbereth.rutgers.edu
--