HDTenEightyP/NetNews huggingface dataset:
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Best method of avoiding code/data segment issues
Date: 11 Jan 93 05:09:13 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <1993Jan9.044328.19069@gn.ecn.purdue.edu>,
jess@gn.ecn.purdue.edu (Jess M Holle) wrote:
> 
> I am in the process of getting a large chunk of C++ code from a
> UNIX workstation (SGI) to compile on the Mac.  Although I have
> not gotten everything to compile, I am getting relatively close.
> My problem is that I want to avoid messing with code/data 
> segmentation issues as much as possible.
> 
> What is the best way to do this? -model far? -br? -bigseg?  How
> much do any of these affect code-size/performance (not too 
> important)?  Any bugs/incompatibilities to watch for?
> 
> If it matters any, the final link will be based on a half dozen
> libraries.  Some of these have been placed in named segments, but
> most haven't and I'd rather not bother if I don't have to.
> 
> Thanks a lot (this newsgroup is a BIG help, thanks to all of you).
> 
> 
> Jess Holle

-model far will remove almost all 16-based limitations from your
MPW code.  I believe structures larger than 32K and local variables
larger than 32K are not allowed, but I may be incorrect.  If you
want everything to go into one segment, you can do so by adding
"-sg Main" to your link command; this merges all segments into
the Main segment; if your code doesn't actually ever unload a
segment, this is probably better than loading a number of
segments and leaving them loaded.

32-bit everything degrades performance to a certain degree, although
this can be reduced somewhat by restricting your code to running
on 68020s or better; the 68000 doesn't have some useful 32-bit
offset addressing modes, so some 32-bit addressing has to be done
manually on the 68000; removing it as a destination makes more
efficient constructs possible.

If you're only going to run on >= 68020, then -bigseg can help create
large code segments, but all your external entry points must be in
the first 32K because the jump table is still just 16-bit.  There
should be little if any performance impact, because this is done
entirely with a processor addressing mode.

-br will allow you large code resources on any processor; once again,
all external references must be in the first 32K.  Jump islands
make long jumps slightly slower, but not greatly so.

In summary, -model far is the only complete solution, but -br or
-bigseg impact your code a little less and can be useful.  I don't
know of any significant show-stopping problems with any of these
options.

Tim Dierks
MacDTS, but I speak for myself
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.hardware
From: Albert-Lunde@nwu.edu (Albert Lunde)
Subject: Limiting HP printers to draft mode?
Followup-To: poster
Originator: lunde@casbah.acns.nwu.edu
Reply-To: Albert-Lunde@nwu.edu (Albert Lunde)
Organization: Northwestern University, Evanston, Illinois, USA
Date: Fri, 8 Jan 1993 15:53:28 GMT

At Northwestern University we offer free printing on HP Deskwriters,
and laser printing at $0.20 per page.  Especially since the
advent of TrueType, this has been a problem, since running at the
best quality the Deskjets can give very good output and use a lot
of ink.  On one hand we don't want to undercut our market for
laser printing, on the other we can't really afford free printing
when the costs are too high. We would like to offer some sort
of free draft printing, however.

Toward that end, I would like advice: Has anyone tried to hack the 
Deskwriter drivers so they will only print in draft mode?

Since they come up in Normal mode by default, it is not just a matter of 
hiding the buttons,  and the default settings are not stored in an obvious
resource.

Send me e-mail at Albert-Lunde@nwu.edu, and I will post a summary of
replies.

-- 
    Albert Lunde                      Albert-Lunde@nwu.edu
From: dev@cats.ucsc.edu (/dev/null)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Menus from 2 resource files?
Date: 6 Jan 1993 03:56:20 GMT
Organization: University of California; Santa Cruz
NNTP-Posting-Host: am.ucsc.edu
Keywords: menus resources furry bunnies



ajr@quads.uchicago.edu asks about heirarchical menus that are saved
in a preferences file.

There is some sample code that deals with showing menu icons that are
in a preferences file in the Word Services Software Development Kit.
I think that you have a similiar problem to the one that is addressed
in the Word Services SDK.

It is available via anonymous FTP from ics.uci.edu, and it is in the
file /mac/think-c/demos/ws-sdk-10.hqx.

The Word Services SDK contains the complete source code to a word processor
that supports the Word Services Apple Event Suite.  You can load services
such as spellers and grammar checkers into its menu and have them work
as if they were built-in menu items.
Newsgroups: comp.sys.mac.programmer
From: ray@netcom.com (Ray Fischer)
Subject: Re: Alternate Screen buffer in newer macs?
Keywords: Alternate screen buffer, animation
Organization: Netcom. San Jose, California
Date: Wed, 6 Jan 1993 02:35:36 GMT

markkj@muse.cs.mu.OZ.AU (Mark Johnston) writes ...
>    G'day.  I was wondering if anyone could tell me if the newer macs (ie
>anything above a Plus... :) still have the alternate screen buffer?
[...]
>    The reason I am asking about this is that I am writing a game for the mac
>(Ultima-ish with the birds-eye-view of the player who moves around killing
>monsters...), and I have a 7x7 map drawn out of 32x32 bitmaps.  I think I will
>actually just throw an vertical retrace event in to make sure that the data
>is copied to the screen without flickering...

Yes, I can.  No, they don't.

In fact, many of the newer Macs don't (or didn't) have _any_ screen
buffer, relying instead on plug-in video cards.  I suppose you might
be able to hack something that would futz with the buffer start
address on some video cards / systems, but it would be truly nasty
stuff that would break the moment Apple looked at it funny.  If you
want to be at all portable, use either CopyBits, or if that isn't fast
enough try copying directly to the video RAM (but make sure you know
how to do it _properly_, it ain't easy).

>    Inside mac V does not have any information on the SE's or the II[vcL][ixC]'s
>hardware, and it details no changes to the Segment Loader (which, I would assume
>means that the Chain call is unaffected, hence one would imagine the alternate
>buffer does exist in these later machines).

There is a manual for the Macs which has more relevent info; most of
the specific info is in separate manuals.

-- 
Ray Fischer                   "Convictions are more dangerous enemies of truth
ray@netcom.com                 than lies."  -- Friedrich Nietszsche
Newsgroups: comp.sys.mac.programmer
From: asu@server2.panther.mot.com (Russell Trotter)
Subject: Mac serial communication.
Organization: Motorola Panther Project, Chandler, AZ
Date: Thu, 7 Jan 1993 21:05:40 GMT

Were working on some dial-up software here and I have a few
questions for you guys.  our application is sorta just like
a terminal emulator/modem interface.  Along the lines of white knight.
I've been reading the material in Vol II of IM about the serial
drivers.  I noticed that the serial driver can be set up to
57600 baud..can data really be transfered that fast? or is
there a practical limit on how fast a program can read/write
to the driver?  Are there tricks needed or tinkering with
serial driver configuration to get fast throughput?  Are there
any PD libraries or commercial libraries that I should look
in to rather than rolling my own?  Thanks!

Russ
 
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools
From: troy@cbme.unsw.EDU.AU (Troy Rollo)
Subject: Re: Stallman and friends
Organization: University of New South Wales
Date: Sun, 10 Jan 1993 01:47:01 GMT

From article <1ig6dkINNdq5@shelley.u.washington.edu>, by tzs@carson.u.washington.edu (Tim Smith):
> FSF is inconsistent here.  You can use GCC, for example, to compile
> proprietary software, and you can use GNU Emacs to edit your proprietary
> stuff.  Yet, if you want to take one little routine from the source for
> GCC or GNU Emacs and use that in your proprietary software, FSF gets
> upset.
> 
> Why don't they require stuff compiled with GCC to be placed under GPL,
> and things edited with GNU Emacs?

Simple. When you compile something with GCC, or edit it with Emacs, it does
not result in any FSF intelectual property being present in the output code.
Some might say that libgcc[12].a are FSF intellectual property, however they
do not contain algorithms, but a compiled version of events that other
programmers would code in identical ways.

If you take out a GNU routine and use it in your software, or use bison
to create a parser, the result will be something that contains code which is
FSF intellectual property, and thus cannot be distributed with commercial
software.

In practice, the situation doesn't really arise anyway. While the GNU tools
are generally better than their commercial counterparts, businesses are
nervous about buying products produced with free tools, primarily because
they have nobody they can blame if something goes wrong as a result of
an error in one of those tools. That is, they would rather have a higher
chance of problems arising and being able to blame somebody than have a
lower chance of something going wrong and having nbobody to blame.
--
_______________________________________________________________________________
troy@cbme.unsw.EDU.AU	      Overworked, overcommited and always multitasking.
Opinions expressed are not those of the CBME or UNSW, but are my opinions only.
You are free to adopt them.   I suggest you adopt them.    You will adopt them!
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Licensing and the rights of programming environments...
Date: 4 Jan 93 16:21:45 GMT
Followup-To: comp.sys.mac.programmer
Distribution: na
Organization: GTE Laboratories

In article <C08y6r.MDq@world.std.com>, siegel@world.std.com (Rich Siegel)
wrote:
> 
> In article <1993Jan2.181136.18003@cc.umontreal.ca> parej@JSP.UMontreal.CA (Pare Jerome) writes:
> >Hi to all of you and a happy new year!
> >
> >I have a question regarding the rights you have when programming in an
> >environment (Think C and Pascal, MPW, and the others...):
> >Can you commercially program "right out the box" and sell your programs
> >commercially or do you need to get extra licensing to distribute your
> >products (from Think, Apple, and other makers...)?
> 
> With THINK C and THINK Pascal, the software license gives you permission
> to use the libraries in your programs without additional licensing. This
> includes programs that use the THINK Class Library.

The permission in the license is under the condition that you declare your
own copyright in a manner sufficient to protect your own work.  That is,
you can't just use the Symantec stuff, then publish it without your own
copyright protection.

If you have any significant interest, or exposure, you should consult an
attorney who has experience in the software copyright field, and in your
case certainly one familiar with both U.S. and Canadian law.

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
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: andersm@prism.CS.ORST.EDU (Mark Anderson)
Newsgroups: comp.sys.mac.programmer
Subject: Changing contents of Toolbox globals?
Date: 10 Jan 93 21:24:23 GMT
Organization: CS Dept, Oregon State University
NNTP-Posting-Host: prism.cs.orst.edu

This might be a very simple question, but how do I change the contents of a
Toolbox global variable?  Basically I want to change the value of the variable
'SysFontFam', 'SysFontSize', and 'LastSpExtra' in order to change the font
used by my pop-up menus?  THINK Reference gave one example, but I got a
syntax error message in THINK C when I tried it.  It looked like the following:

	extern short   DlgFont : 0xAFA;

	DlgFont = 3;

Any help would be appreciated.

						- Mark J. Anderson
Newsgroups: comp.sys.mac.programmer
From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
Subject: Re: Why Control Segmentation?
Organization: University of Illinois at Urbana
Date: Sun, 10 Jan 1993 07:42:22 GMT

The more control the better, but there are powers one should never need. There 
is a clear advantage to having well thought out  and implemented segment 
planning. Aside from the memory concerns of needing to keep multiple segments 
around, there is always the simple performance penalties of far calls and the 
jump table. I think the level of control is really a matter of working style. 
With the by-file control of Think C, I get fine results, but I also have a lot 
of different files. Provided the programmer designs the code well, there ought 
to be no excuse for having an object splittable between segments (i.e. at the 
function level) If I could split easily by object instead of file, I would 
have an easier management problem in Think C. I doubt I would ever use an easy 
ability to split my objects by function, but if I did a lot more procedural 
work, it might be nice (i.e. maybe encourage good object design) to NOT allow 
segmentation by function inside objects, but allow it for procedural code 
(maybe by thinking of procedures as tiny objects...) 
Newsgroups: comp.sys.mac.programmer
From: housen@plato.ds.boeing.com (Kevin housen/.na)
Subject: Programming with VideoSpigot
Organization: Boeing Defense & Space Group
Distribution: usa
Date: Mon, 4 Jan 1993 23:05:22 GMT

Has anyone out there had any experience in writing code
to access a SuperMac VideoSpigot board?  In particular,
I need to be able to instruct the device to grab a single
frame and send it to me.  Is it possible to do this?  I need
to know before investing in one - and the tech support
people at SuperMac weren't completely sure.

Thanks heaps-
Kevin Housen
From: bredell@tdb.uu.se (Mats Bredell)
Newsgroups: comp.sys.mac.programmer
Subject: Re: No programmer switch, so how to enter MacBugs on LCII?
Date: 5 Jan 93 09:57:38 GMT
Reply-To: Mats.Bredell@udac.uu.se
Organization: Uppsala University Computing Center (UDAC)
X-Newsreader: TIN [version 1.1 PL6]

Michael Wolf (wolfmc@rtsg.mot.com) wrote:
: Am I missing it or is it actually not there.  Why does the LCII not have
: a programmers switch on the side.  This would enable me to enter MacBugs 
: at the time I desire it.
: 
: So, how do I enter MacBugs then without the programmer switch?

Simply press cmd-power, where power is the key with the small triangle used
to power up some models. If you instead want to do a reset, press 
ctrl-cmd-power. This is a lot better than the old method with two small
plastic buttons.

/Mats
-- 
Mats Bredell                                   Mats.Bredell@udac.uu.se
Uppsala University Computing Center (UDAC)     Ph:  +46 18 187817
Department of medical systems                  Fax: +46 18 187825
Sweden                                         Think straight - be gay!
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: Direct screen writing; getting to (x,y)
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 12 Jan 1993 13:03:57 GMT

In <1993Jan11.235448.22675@afterlife.ncsc.mil> mssmith@afterlife.ncsc.mil (M. Scott Smith) writes:

>   Anyway, this code seems to work.  I'd like a few suggestions on better ways
>of doing this.  Do I have the right idea, or did I miss the boat completely?

You're not calling SwapMMUMode. That's bad. You should, before
changing the address (swap to 32bit mode) and set it back
afterwards (to what it was)

>   That is, say the monitor is 480 lines vertical; I'd then make an array
>480 long and manually compute row_bytes*y for each y position, plugging the
>value into the array.  Then I could simply do something like:
>base_addr + x + line[y]

Ah, but better yet you could create an array of pointers to
each and every row, so the affected address is

	row_address [ y ] + x

>expensive part of this routine.  But, on second thought, C is really doing
>multiplication anytime you access a subscript of an array, right?  (For
>example, if you want line[50], then it does some multiplication to go from
>the base address -- line -- up 50*sizeof(line) to get the value, right?)

Ah, enter the MC68k instruction set! They thought of this, and
provide instructions that do the multiplication (bit-shift really)
implicitly; this works especially well with 68020 code generation.
Since you use color QD, you have a68020 and better; turn it on!

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
   This signature is kept shorter than 4 lines in the interests of UseNet
   S/N ratio.
Newsgroups: comp.sys.mac.programmer
From: bskendig@netcom.com (Brian Kendig)
Subject: How do I make my windows handle a multiple-monitor system?
Organization: Starfleet Headquarters: San Francisco
Date: Tue, 5 Jan 1993 19:30:34 GMT

The windows in my program work just fine with a single-monitor system,
but they have problems when the user tries to drag or zoom them on a
Macintosh with more than one monitor connected to it.

To drag the window, I just set up a drag rect with

	dragRect = screenBits.bounds;
	dragRect.left += DRAG_THRESHOLD;
	dragRect.right -= DRAG_THRESHOLD;
	dragRect.bottom -= DRAG_THRESHOLD;

then do a DragWindow(whichWindow, theEvent.where, &dragRect).  I zoom
in the standard way too, with ZoomWindow, but that's not quite working
either.  (I don't know exactly what's happening, because I don't have
multiple monitors; my beta-testers are the ones reporting the problems.)

Is there sample code available anywhere for how to properly drag and
zoom windows across multiple monitors?

-- 
_/_/_/  Brian Kendig                             Je ne suis fait comme aucun
/_/_/  bskendig@netcom.com                de ceux que j'ai vus; j'ose croire
_/_/                            n'etre fait comme aucun de ceux qui existent.
  /  Nolite te bastardes     Si je ne vaux pas mieux, au moins je suis autre.
 /    carborundorum.                                             -- Rousseau
Newsgroups: comp.windows.ms.programmer,comp.sys.mac.programmer
From: whedon@netcom.com (Bill Whedon)
Subject: Re: MS Windows API for the MAC?
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sat, 9 Jan 1993 08:17:35 GMT

In article <1993Jan6.195836.6150@news.columbia.edu> emt1@cunixf.cc.columbia.edu (Eduardo Miguel Thieberger) writes:
>There's at least one company that sells a package for Unix/X Windows that
>provides an MS Windows API, so that you can port MS Windows applications to
>Unix.  Is there anything like this for the Apple Macintosh?  I.e., a library
>for the Mac that provides the MS Windows function calls and converts these into
>the appropriate calls for displaying on a Mac.
> 
>Please reply by E-mail, I don't usually read this newsgroup.

No, post it, please.  Bob should start reading it.  I think that there are
quite a few others, myself included, who would like an answer to this one.

Thanks,
Bill Whedon   whedon@netcom.com



-- 
C, ICON dBase Ada!  Paradox?  (B Jovial, Pascal!)
From: myke@terminator.rs.itd.umich.edu (Michael Dautermann)
Newsgroups: comp.sys.mac.programmer
Subject: on mac.archive.umich.edu Re: Where does BinHex live?
Followup-To: comp.sys.mac.programmer
Date: 9 Jan 1993 05:02:50 -0500
Organization: We're from the government, ma'am
Distribution: world
NNTP-Posting-Host: terminator.rs.itd.umich.edu
Summary: my favorite archive
Keywords: mac, archive, pd, shareware

In article <1993Jan7.233540.320@physc1.byu.edu> seth@physc1.byu.edu writes:
>
>The version of Stuffit Expander that I have (1.0.1) doesn't do .hqx files, nor
>have I found any way to configure it at all. Is there a newer version than
>1.0.1? My version's info window shows a date in September.

the up-to-date version is something like 3.03, I believe... and it is
available on mac.archive.umich.edu in the mac/util/compression 
directory.

As for the location of BinHex (which nobody has answered correctly)...
the only file on mac.archive which isn't BinHexed is the binary copy of
BinHex available in the mac/00help directory (I believe the file name
is something like binhex4.bin... I'm not at my mac presently).  Transfer
the file to your unix account using binary, and then down to your mac 
using MacBinary.  You should then have an launchable version....

hope that helps!

 
-- 
-----------------------------------------------------------------
myke@terminator.rs.itd.umich.edu = usermyke@umichum.bitnet = myke@umich.edu
mike@mac.archive.umich.edu = MISTER archive
Michael Dautermann - U-M Ann Arbor, Dearborn and, soon.. the world!
From: chris_russo@gateway.qm.apple.com (Christopher Russo)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why the Piracy? Here's why...
Date: 6 Jan 93 01:54:33 GMT
Organization: Apple

In article <noah-050193093437@noah.apple.com> Noah Price, noah@apple.com
writes:
>In article <C0D9q1.H6r@news.udel.edu>, kurisuto@chopin.udel.edu (Sean
J.In article 
<noah-050193093437@noah.apple.com> Noah Price, noah@apple.com writes:
>> 
>> In article <noah-040193095748@noah.apple.com> noah@apple.com (Noah
Price) 
writes:
>> 
>> >Yah, people use that argument for shoplifting as well...
>
>> If you don't make this distinction, you would have to claim that
making a
>> copy of an application which your friend bought is morally identical to
>> walking into a store and stealing a shrink-wrapped software package
off the
>> shelf.
>
>Yup.  Exactly.  The only difference is you're less likely to get caught
>copying your friend's disk.
>
>noah

The obvious difference between the two is that when shoplifting, you've
stolen 
hard resources - the box, the disk, the manuals, shipping costs, shelving
costs - 
that can no longer be purchased by anyone else.  When making a copy of a
piece
of $200 software that NEVER WOULD HAVE BEEN BOUGHT BY THAT POOR STUDENT
ANYWAY, the software manufacturer doesn't lose anything.

After that, there could be gains and losses.  Now, our financially
disadvantaged
pirate has a copy of a piece of software that could easily fall into the
hands of
someone who HAS money, and probably would have bought it himself.  But,
well, 
his friend has a pirated copy, so he might as well have one too.

On the other hand:  When I was in school, I didn't have enough money for
a computer, 
much less expensive software.  Consequently, I used the school's software
and 
compuaters.  In particular, I used MS Word, Think C, Excel.  When I got
my first job, I 
was given a computer and told, "Just put in a purchase order for whatever
software 
you'll need."  Was it just a coincidence that I ordered MS Word, Think C,
and Excel? I
think not.  They were the ones I was used to.  Granted, I didn't PIRATE
copies of
these during school, but I didn't buy my own copy of them either.  Who
lost in that
situation?

Chris
-----Christopher Russo
----- I admire a clever .sig message.  Wish I had one. <sigh>
----- day 408.974.6070