HDTenEightyP/NetNews huggingface dataset:
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Socket/Filesystem library released
Followup-To: comp.sys.mac.programmer
Organization: Integrated Systems Laboratory, ETH, Zurich
Distribution: comp
Date: Mon, 21 Dec 1992 10:24:08 GMT


Release 1.0 of GUSI (Grand Unified Socket Interface :-) is now avaliable
at nic.switch.ch [130.59.1.40], software/mac/src/mpw_c/GUSI_10.sit.bin

GUSI is an extension and partial replacement of the MPW C runtime library.
Its main objective is to provide a more or less simple and consistent
interface across the following communication domains:

Files        Ordinary Macintosh files and MPW pseudo devices.
Unix         Memory based communication within a single machine
Appletalk    ADSP communication over a network.
PPC          Local and remote connections with the System 7 PPC Toolbox
Internet     TCP and UDP connections over MacTCP.

Additionally, GUSI adds some UNIX library calls dealing with files which
were missing, like chdir(), getcwd(), symlink(), and readlink(), and
changes a few other library calls to behave more like their UNIX
counterparts.

REQUIREMENTS

To use GUSI, you need MPW C 3.2 or later. To modify it, you additionally need
MPW C++ 3.2 or later and Perl.

COPYING

Copyright  1992 Matthias Neeracher

Permission is granted to anyone to use this software for any purpose on any 
computer system, and to redistribute it freely, subject to the following 
restrictions:

- The author is not responsible for the consequences of use of this software, 
  no matter how awful, even if they arise from defects in it.
- The origin of this software must not be misrepresented, either by explicit 
  claim or by omission.
- Altered versions must be plainly marked as such, and must not be
  misrepresented as being the original software.

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
  "And that's why I am going to turn this world upside down, and make
   of it a fire so *bright* that someone real will notice"
                                -- Vernor Vinge, _Tatja Grimm's World_
From: thomas@camino.mic.cl (Thomas Fruin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: DECnet packets via ARA getting truncated!?
Organization: El Camino
Reply-To: Thomas Fruin <thomas@camino.mic.cl>
Distribution: world
X-Mailer: uAccess - Macintosh Release: 1.5v4
Date: Tue, 29 Dec 1992 18:55:27 CST


In article <0105013E.m9gd41@camino.mic.cl> (comp.sys.mac.programmer), Thomas Fruin <thomas@camino.mic.cl> writes:

>My application receives DECnet packets which are always approximately
>1024 bytes in size. My protocol specifies that if there is no more
>data in a packet, it should be padded with spaces until the end.

>Now here's the weird problem: ONLY when I connect remotely, DECnet
>packets get filled with spaces near the end, overwriting part of the
>information in the packet. The size of the packet is perfect, except
>that the information in it gets overwritten. This problem does not
>occur if I connect locally using Ethernet.

I have some more data to add to the previous description of my problem
with DECnet packets getting truncated:

The problem seems to be related to the encapsulation of DECnet
in AppleTalk, because the problem appears both when using AppleTalk
Remote Access and when using a Macintosh on LocalTalk. And the problem
does not consist of truncation, but of receiving large DECnet packets
as multiple small AppleTalk packets.

After some more debugging, I found out that sometimes my ~1K DECnet
packets get delivered in two pieces. The first CMRead will sometimes
return only 537 bytes (instead of 1066, which is the standard size
of my packet). When that happens, the second packet is inevitably
529 bytes (making a total of 1066).

My theory is that most of the time the multiple AppleTalk packets
get concatenated into full DECnet packets by my DECnet driver, but
when the two pieces arrive too far apart in time, the driver goes
ahead and gives me the first piece.

So my new questions are the following:

1.- Can somebody confirm my theory of the encapsulation of DECnet
    in AppleTalk, and how packets are delivered by the DECnet driver
    in Pathworks?

2.- How can I tell if a packet received by my call to CMRead is a
    full or a partial packet? On examining the 'caps' resource in
    the DECnet tool, I found out that it doesn't support end-of-message
    flags, which I presume I should be using in this case.

Thanks and bedankt to the folks who sent me their suggestions and
help!

-- Thomas Fruin

   GroupWare Ltda
   Temuco Office
   CHILE

   thomas@camino.mic.cl

Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: porting windows app to mac
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Fri, 1 Jan 1993 15:35:52 GMT

>Finally, what would be a good mac system to get the development work done on?
 
SE/30. No longer in Apple's product line and there's lots in the forsale
newsgroups.
 
>We don't plan on spending much money on this project.
 
Don't plan on spending, huh? Then you can't have C++. Use Think C and TCL.
 
If you change your mind, get MPW and prepare for a learning curve and a
BIG, SUPER LARGE price tag. After you pay this and get MPW and C (Don't
forget the CD-ROM drive, it's a must), and you decide you want to use
MacApp (a class lib), get ready to pay apple _royalties_ for each app you write.
(Zortech C++ is rumored not to work)
 
Unfortunately, the makers of GNU C++ have a disagreement with apple because
apple wants to create legislation which ultimately affects your and my freedom
to write any program any way we want. As a result, there is no port to the
mac which is supported by GNU CC's authors. This makes things difficult should
you want to try to port this to the mac.
(apple employees and former apple employees, see below.)
 
In either case, get 'The Debugger' by Jasik Designs, it's $300 and it's the
best there is. It catches just about everything; as a result, it's a little
hard to get used to. However, it does both MPW and THINK. It does both C and
Pascal (displays the source files while debugging). Command-click on the
source window and it also shows the asm code.
 
(to apple employees and former apple employees, especially those who appreciate
GNU CC and/or freedom in coding, rms@gnu.ai.mit.edu (Richard Stallman, author
of GNU CC) wishes to make contact with you.)
From: cardinal@informix.com (Edward Cardinal)
Newsgroups: comp.sys.mac.programmer
Subject: AppMaker and TCL
Date: 18 Dec 92 20:23:08 GMT
Organization: Informix Software, Inc.

Does anyone know what version of TCL code AppMaker produces? In particular,
does it use the new Table classes for list panes, or does it use its own?
-- 
[ Ed Cardinal                   An English major from Berkeley  ]
[                               Who sold out to programming     ]
[ cardinal@informix.com         Because it pays more.           ]
[          DISCLAIMER: My Opinions. MINE! MINE! MINE!           ]
Newsgroups: comp.sys.mac.programmer
From: Randy DeRuiter
Subject: CustomGetFile won't work with my CDEV
Reply-To: dedrad@arco.com
Organization: TheNews 
Date: Sun, 20 Dec 1992 16:48:00 GMT

 Hi all-

Sorry if this is a second posting but I don't thin my first one made it out to
the net.

I'm writing a CDEV in Think C 5.0 and am having a lousy time of getting the
nifty new CustomGetFile routine into the CDEV.  I'm trying to create a
"Multigetfile" dialog which uses a second list in the dialog to show which
files have been selected.  I converted the latest Apple DTS pascal snippet
which does what I want into C, added a little more functionality, and debugged
it in a test application.  Everything worked well until I shoved it into the
CDEV.  The CustomGetFile code does have a few globals, though I've tried to
remove as many as possible.  From some simple examinations with MacsBug, it
looks like the A4 register is not valid when I enter my hook routines from
CustomGetFile.  Stuffing the proper A4 address into the code in various places
has not been successful.  Has anyone out there had success in this area?  Any
suggestions direct to me or to the net would be appreciated.

Thanks,

Randy DeRuiter
dedrad@arco.com
From: jimlynch@netcom.com (Jim Lynch)
Newsgroups: comp.sys.mac.programmer
Subject: TopSoft contacts (corrected)
Date: 2 Jan 93 13:32:57 GMT
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

I left a message earlier specifying some mailing contacts re: TopSoft C but
inadvertently included old info. Here it is again, with all references to
events removed:

The Topsoft lists are:
 
ts-announce (a list for product announcements, moderated)
ts-general (a general, chit-chat list, also gets the ts-announce mail)
ts-request (an address for mail administration)
ts-info (an address for requesting info about TopSoft)
 
ft-announce (a list for product announcements)
ft-general (general chit-chat, also gets the ft-announce mail)
ft-request (request to be added/removed from the list)
ft-info (an address to request info about FilterTop)
 
tc-announce (a list for product announcements)
tc-general (general chit-chat, also gets the tc-announce mail)
tc-request (request to be added/removed from the list)
tc-info (a list to request info about TopSoftC)
 
NOTE: You really should only need to be on one list in any particular project
to get the level of mail your interested in. For instance, if you only want
announcements about the FilterTop project, then you should subscribe to
ft-announce. If, on the other hand, you want to be privy to all of the general
chit-chat that takes place, you should subscribe to ft-gen: it receives
ft-announce traffic as well as ft-gen traffic.
 
-----
 
All of the lists are '@syrinx.kgs.ukans.edu'. To subscribe to any of the
lists, send your request to the xx-request list. Your main interest is in
the 'C' project, which is currently called TopSoft C, so send your request
to tc-request@syrinx.kgs.ukans.edu. If you have any problems, a human
contact is Fred Terry (pfterry@syrinx.kgs.ukans.edu).
 
A warning: if you sign up for ts-general, you will get a fair amount of
mail, some of which is the inevitable flame traffic when a group of people
try and discuss topics like the best way to do a user interface via EMail.
<g>
 
TopSoft also maintains a site for anonymous ftp. The site name is
syrinx.kgs.ukans.edu, and you would look in the /topsoft directory.
 
Meetings, oh yes, there is a weekly (quite regular) meeting of TopSoft
folks via the internet on Wednesday nights. It currently is starting at
6:00 PM PST, which wraps around to 10am Thursday in Perth, where Peter
Lewis hosts the meeting. Telnet to Peter's Chat Line (134.7.122.51 1420).
Newsgroups: comp.sys.mac.programmer
From: e-sink@uiuc.edu (Eric W. Sink)
Subject: Re: Sozobon C - a free C for the Mac, too?
Originator: sink@ux2.cso.uiuc.edu
Reply-To: e-sink@uiuc.edu
Organization: University of Illinois at Urbana
Distribution: comp
Date: Wed, 30 Dec 1992 20:15:24 GMT

brad@tazboy.jpl.nasa.gov (Brad Pickering) writes:

>MacMINIX uses a standard K&R C compiler that doesn't know anything about
>using A5 as a globals pointer or about pascal functions.  This compiler
>can be used to generate Mac applications.  Traps are called through glue
>routines that convert the C calling conventions into Pascal calling
>conventions and setup register A5 from a global variable before actually
>calling the trap.  Global variables are not relative to A5, but absolute
>addresses that are relocated when the program starts.  Subroutines are
>not called through jump tables but through absolute addresses, also
>relocated at program startup.  Mac applications generated with this
>compiler have a special CODE 0 resource which contains 1 jump table
>entry which loads and calls the main program which relocates itself
>before referencing any global variables.  I have used these techniques
>to build mac applications on a sun using gcc.  I don't think that
>we are very far from a free development system for the mac.  It
>will certainly not be as convenient as Think C, but what can we expect
>for free.

This is certainly another way to go.  Is anyone at TopSoft following
this thread ?  If so, let's have some discussion about the possibilities.
I just want to see a simple, reliable, free C compiler for the Mac.
The above mentioned strategy is one way to avoid all the gory details
of the compiler itself, since decent C compilers without Mac-ish features
are freely available.

-- 
Eric W. Sink, Spyglass        | "In all the earth, only humans have the ability
1800 Woodfield Drive          |    to be content in bad situations...
Savoy, IL  61826              |    and vice-versa."
---- e-sink@uiuc.edu ---------|---------- 217-355-6000 -----------------------
Newsgroups: comp.sys.mac.programmer
From: christopher m. knox <chris@benton.prepress.com>
Subject: Re: Resource help?
Organization: Pre-Press Technologies, Inc.
X-Useragent: Nuntius v1.1b2
Date: Wed, 23 Dec 1992 21:13:40 GMT

In article <1h7hg5INNhmr@gap.caltech.edu> Chris Michael Ward,
chriswd@cco.caltech.edu writes:
>I was wondering if someone could help me out.  As a newtimer to Macintosh
>programming, I am in the process of learning how to use resources.  I'm
>trying to get the data from a simple 'STR#' resource, but it doesn't
>seem to be working correctly.  

Hi,
'GetIndString(str,strListID,n);' will return the nth string in the STR#
resource
with id strListID. N ranges from 1... number of strings. (see IM I p.468).
To do anything more, like inserting strings, the following info might
help:
format of a STR# resource:
n, number of strings (2 bytes)
 - m, length of string 1 (1 byte)
 - characters of string 1 (m bytes)
 ....
 - m, length of string n
 - characters of string n

Happy Holidays, Chris
chris knox, primary programmer, SpectreTouch? 
                                                    
"Omne animal triste est post (or without) coitum"  Umberto Eco
From: ken@isgtec.com (Ken Newman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sozobon C - a free C for the Mac, too?
Date: 30 Dec 92 18:14:06 GMT
Organization: ISG Technologies Inc., Mississauga Ontario

In article <29848@castle.ed.ac.uk> ngse18@castle.ed.ac.uk (J R Evans) writes:
> connected with Sozobon's assumption that sizeof(int)=4, whereas Think C 
> uses sizeof(int)=2, 

Gag! Think C uses 16-bit ints?! Is there no option for 32-bit ints?
Wow, I thought Think C was a major full-featured compiler. This label
doesn't apply to 16-bit int compilers. :) I still like Laser C on the
ST, but would like to have a switch for 32-bit ints. (I have gcc as
well, if I need 32-bit).

BTW, does anyone know if the latest Think C (5.0?) works under Spectre GCR?
- kn
--

ken@isgtec.com   [ ...!uunet.ca!isgtec!ken ]  Ken Newman
From: vollrath@vax.oxford.ac.uk
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick TCL Question
Date: 23 Dec 92 16:52:16 GMT
Followup-To: comp.sys.mac.programmer
Organization: Oxford University VAX 6620

In article <jpugh-211292224942@kip2-3.apple.com>, jpugh@apple.com (Jon Pugh) writes:
> In article <1992Dec22.015946.12196@rock.concert.net>, tbl@rock.concert.net
> (Ted B Lowery -- Personal Account) wrote:
>> 
>> Hi all,
>> 
>> A quick question about the Think C Class Libraries.  When my program starts,
>> it is automatically sent a Open AppleEvent, which opens a blank document.  I
>> do not want a blank document automatically opened, so I want to stop this
>> default action.  But I cannot seem to find out how to do this without changing
>> the core classes.  How should I go about doing this?
> 
> Override DoAppleEvent and make the same check the default method does, but
> don't do anything.  Pass all other cases.
> 
> Jon

Hi Ted,
The problem with Jon's method, I think, is that most of the time you do want
to respond to oApp events, for example if someone dragged a document onto
your app's icon while you were switched out. You have to override Create
Document anyway. When this is called from StartUpAction, the phase is
appInitializing. I would check the phase in CreateDocument, and simply
exit if you are in this phase. (I am using the Pascal version 1.1 of
TCL, I presume this same system is used in the C version? Apologies for
misleading you if it isn't)

Alun ap Rhisiart
Animal Behaviour Research Group
Oxford University
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Curves in QuickDraw GX
Date: 24 Dec 92 23:47:52 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec24.131341.12976@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:

>That's a little worrying, considering the sort of hardware it seems to take
>to run Display PostScript (eg 68040-based NeXTs). Will QuickDraw GX not
>run on 68000 CPUs?

The 68000 is dead, buried and forgotten. Except the PB100 is
still the lightest PowerBook around. The screen on the Duos
sucks whole mountains.

>> No words or tokens are used in the imaging model,

>Well, there'll be another lot of extensions to the QuickDraw picture format,
>won't there?

QuickDraw GX is orthogonal from QuickDraw. It will co-exist, but
QuickDraw will not be extended to know anything about GX. At
least that's my impressino.

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   There's no problem that can't be solved using brute-force algorithms
   and a sufficiently fast computer. Ergo, buy more hardware.
Newsgroups: comp.sys.mac.programmer
From: positron@quip.eecs.umich.edu (Jonathan Haas)
Subject: Re: argc and argv in Think C
Keywords: Think vs. ANSI C
Organization: University of Michigan EECS Dept., Ann Arbor
Distribution: NA
Date: Sun, 3 Jan 1993 02:47:46 GMT

In article <1i527bINNk39@gap.caltech.edu> rotenber@cco.caltech.edu (James Michael Rotenberry) writes:
>   I am trying to port a C program to the Mac.  Think C claims to
>   have ANSI C conformance, but I can find no reference to argc or
>   argv in the User Manual.  
>
>   Could someone indicate where I might find such a reference?  Thanks.
>

Being as it is that the Mac has no command line, it's hard to think of
a context where command line arguments would be relevant.

-- 
__/\__  Jonathan S. Haas         | Jake liked his women the way he liked
\    /  University of Michigan   | his kiwi fruit: sweet yet tart, firm-
/_  _\  positron@eecs.umich.edu  | fleshed yet yielding to the touch, and
  \/                             | covered with short brown fuzzy hair.
Newsgroups: comp.sys.mac.programmer
From: tmorrow@oracle.com (Thomas Morrow)
Subject: help- sound playing w/ bufferCmd
Organization: Oracle Corporation, Belmont, CA
Distribution: comp
Date: Sat, 2 Jan 1993 23:19:12 GMT
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.


I am having trouble using SndDoCommand to play a sampled sound header.

I do:
	SndCommand mySndCmd;
	
	/* mySndH is a handle to a sound header and data */
	/* mySndChan is already properly opened */
	mySndCmd.cmd;
	mySndCmd.param1 = 0;
	mySndCmd.param2 = (long)(*mySndH) & 0xffffff;
	SndDoCommand(mySndChan, mySndCmd, false);

This does not work for some reason; I can't figure out why because if
I replace the SndDoCommand with a Snd Play, it works:

	SndPlay(mySndChan, mySndH, true);
	
So the channel and header must be alright.  I am new to Mac
programming, and wasn't sure exactly how to set param2 (a long) to the
header address (Ptr)... The IM IV uses ORD4() to do the type
conversion, but I am using Think C rather than Lisa Pascal. My way
seems to work, but what is the elegant way?

Anyway, I use SndChannelStatus to get the status every event loop
cycle, and the SCStatus returned is blank (zero) in all except CPUload
(24),  ChannelAttributes (initMono), and ChannelBusy (true).  How can
the channel be busy if StartTime == endTime == 0?


Please email responses.  I will summarize.

			Tom             tmorrow@us.oracle.com

--

---------------------------------------------------------------------------
Tom Morrow       3OP4     voice:415-506-2202    Office: 427
tmorrow@us.oracle.com       fax:415-506-7292    Application Object Library
---------------------------------------------------------------------------
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick TCL Question
Date: 24 Dec 92 23:40:22 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec23.165216.10982@vax.oxford.ac.uk> vollrath@vax.oxford.ac.uk writes:

>> Override DoAppleEvent and make the same check the default method does, but
>> don't do anything.  Pass all other cases.

>The problem with Jon's method, I think, is that most of the time you do want
>to respond to oApp events, for example if someone dragged a document onto
>your app's icon while you were switched out. You have to override Create

You won't get oapp events when someone drags documents on your icon,
ONLY when the program is started, by itself, without arguments.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   There's no problem that can't be solved using brute-force algorithms
   and a sufficiently fast computer. Ergo, buy more hardware.
Newsgroups: comp.sys.mac.programmer
From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
Subject: Re: Sozobon C - a free C for the Mac, too?
Organization: University of Illinois at Urbana
Date: Sun, 3 Jan 1993 18:52:59 GMT

In <3917@isgtec.isgtec.com> ken@isgtec.com (Ken Newman) writes:

>Gag! Think C uses 16-bit ints?! Is there no option for 32-bit ints?
>Wow, I thought Think C was a major full-featured compiler. This label
>doesn't apply to 16-bit int compilers. :) I still like Laser C on the
>ST, but would like to have a switch for 32-bit ints. (I have gcc as
>well, if I need 32-bit).

The Mac int standard is 16-bit ints and 32-bit longs. If you need to declare an
int and get 32 bits, Think C has a switch  for that, but it should not ever be
needed on the Mac specificly. I'm not really sure why anyone would ever need 
that unles one is porting in code from a system that always uses 32-bit ints, 
since on the Mac you have a standard long of 32 bits.(plus a tangle of double 
extended and SANE formats for even longer numbers)
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: Deliminator char in AFP C++ sample
Date: 30 Dec 92 21:59:13 GMT
Followup-To: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <4592@bimacs.BITNET>, liran@bimacs.BITNET (Eshel Liran) wrote:
> The "AFP C++" sample code uses '@' as it's deliminator character in path names.
> WHY ????
> Is't it safer to use ':' instead ?
> Knowing that the finder doesn't allow one to use ':' in a file or volume name 
I could only think of one possible issue, and that's A/UX, but in that
case the File Manager emulator maps things back and forth concerning path
names. Full path names are evil anyway. Never heard you could use @ for
deliminator char, is there a #define somewhere?

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
Newsgroups: comp.sys.mac.programmer