HDTenEightyP/NetNews huggingface dataset:
From: a74k110@titan.ucc.umass.edu (Chris Lloyd)
Subject: Re: _IO, _IOR, _IOW and _IOWR functions
Keywords: low level NeXT system functions
Organization: University of Massachusetts, Amherst
Date: Wed, 19 Aug 1992 20:42:11 GMT

In article <rabjab.11.0@golem.ucsd.edu> rabjab@golem.ucsd.edu (Jeff Bytof) writes:
>Does anyone have good documentation for the NeXT low-level system
>functions _IO,_IOR, _IOW and _IOWR?  They are mentioned extensively
>in various include files in /usr/include but not in sufficient detail
>to get a really good handle on them.

From /usr/include/ioctl.h:
#define IOCPARM_MASK    0x7f            /* parameters must be < 128 bytes */
#define IOC_VOID        0x20000000      /* no parameters */
#define IOC_OUT         0x40000000      /* copy out parameters */
#define IOC_IN          0x80000000      /* copy in parameters */
#define IOC_INOUT       (IOC_IN|IOC_OUT)
/* the 0x20000000 is so we can distinguish new ioctl's from old */
#define _IO(x,y)        (IOC_VOID|(x<<8)|y)
#define _IOR(x,y,t)     (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
#define _IOW(x,y,t)     (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
/* this should be _IORW, but stdio got there first */
#define _IOWR(x,y,t)    (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)

These are macros used to construct ioctl commands.  If you take a good
look, the macros are used to construct a 32 bit integer composed of
various bitfields which hold different information for the command.
For example, the definition of TIOCGETD (get tty line discipline) is:

#define TIOCGETD    _IOR('t', 0, int)

If you expand this, you get:

(IOC_OUT|((sizeof(int)&IOCPARM_MASK)<<16)|(x<<8)|y)

Which packs 4 distinct bit fields into a 32 bit command number, the first
being how the parameter is passed (in/out/inout), the next being the
size of the parameter (up to 127 chars), then a character major
command identifier and then a minor number for the command, if you
look at a bunch of ioctl command definitions you'll see the patterns
and just common usage.  The major/minor command fields are device specific
and are uninterpreted by the syscall mechanism, whereas the first two
command parameters are used by the syscall trap mechanism to determine how
much data to copy from/to user space to/from kernel space on trap, plus
in which direction the data is to be copied.

Unless your writing a driver and need to construct your own ioctl()
commands, these macros aren't of much use really.

la la la,
-- 
:: Christopher Lloyd :: a74k110@titan.ucc.umass.edu :: Yrrid, Inc. ::
From: alex@laos (Alex D. Nghiem)
Newsgroups: comp.sys.next.programmer
Subject: location of putenv(), setenv() and getenv()
Date: 13 Aug 92 20:16:57 GMT
Reply-To: alex@pencom.com
Organization: Pencom Software

Hello there:

Mike D Marchionna was kind enough to post the locations of these three  
routines.  Actually, getenv() is still on the NeXT, although I needed all three  
of them.  These routines and others are on ftp.uu.net under  
/systems/unix/bsd-sources/lib/libc/stdlib.

Thanks, Mike!


Best regards,


Alex Duong Nghiem          Phone: (512) 343-1111
Pencom Software            Fax:   (512) 343-9650    
9050 Capital of TX Hwy N.  Mail:  alex@pencom.com
Suite 300                  Mail:  co-Xist_support@pencom.com
Austin, TX 78759           Mail:  co-Xist_info@pencom.com
USA
                           ****************************
                           * NeXTMail gladly accepted *
                           ****************************
From: goldly@u.washington.edu (Lloyd P. Goldwasser)
Newsgroups: comp.sys.next.programmer
Subject: Faster draw
Date: 14 Aug 92 22:06:46 GMT
Article-I.D.: u.1992Aug14.220646.5882
Organization: University of Washington

Are there any good NeXT examples floating around of the use of
Postscript forms (PS Reference Manual, 2nd ed., p. 172) for
speeding up drawing?  Does anyone have any experience with the
relative merits of forms vs. user defined paths?

Thanks in advance,

Lloyd Goldwasser
goldly@u.washington.edu

* - - - * - - - * - - - * - - - * - - - * - - - * - - - * - - - * - - - *
*    If it is appropriate for M Carling to broadcast inflammatory       *
*          statements under the pretense that they are a signature,     *
*    while insisting that others keep political discussion              *
*           out of the newsgroup,                                       *
*    while in the role of Director of the Bay Area NeXT Group,          *
*    and about an issue for which people of conscience                  *
*           may reasonably differ,                                      *
*    then I am a duck.                                                  *
* - - - * - - - * - - - * - - - * - - - * - - - * - - - * - - - * - - - *
Newsgroups: comp.sys.next.programmer
From: ray@mtl.mit.edu (Ray Ghanbari)
Subject: Re: In-line graphics (was Re: SoftPC 2.0 or 3.0)
Reply-To: ray@mtl.mit.edu
Organization: Massachvsetts Institvte of Technology
Date: Wed, 12 Aug 1992 15:57:31 GMT

In article <1992Aug12.040333.2209@cubetech.com> andrew@cubetech.com  
(Andrew Loewenstern) writes:
> In article <1992Aug11.172502.393@prim> prim!dave@germany.eu.net (Dave  
Griffiths) writes:
> >In article <1992Aug10.132122.16546@athena.mit.edu> ray@mtl.mit.edu  
writes:
> >>However, it still  
> >>falls to the user community to hold developers accountable (why can't  
I  
> >>copy RTF out of FrameMaker????) and not tolerate applications that do  
not  
> >>integrate well into the environment.
> >
> >As for not being able to copy RTF, this is a problem also shared by  
that
> >other "standard" app, WordPerfect. The reason is that neither program  
uses
> >the Text object.
> 
> Who cares "why", they _should_ be supporting the pasteboard.
> WriteNow, FrameMaker, and WordPerfect are the only 3 NeXTSTEP text
> processing applications available besides edit, and NONE of them have
> ANY RTF pboard support.  And I'll just kill Glenn if PasteUp doesn't.
> 

This is precisely why we used Concurrence for our docs.  It was the only  
way we could generate the RTF(D) we needed for our on-line docs with some  
sort of automatic formatting.  Unfortunately, when we put our text into  
Frame for the printed manual, we had to go through and manually apply all  
the appropriate paragraph and character formats.  A tremendous pain.  Now  
if we could only get the MIF->RTFD filter out of NeXT somehow...

Ray Ghanbari                                
Digital Tool Works
ray@dtw.com
From: wilson@mimsy.umd.edu (Anne Wilson)
Newsgroups: comp.sys.next.programmer
Subject: Including Extra Include Files in IB's Makefile
Date: 16 Aug 92 16:43:05 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742

Within the context of the Interface Builder's Makefile, which macro 
do people use to indicate that there are extra include files needed 
by a program?  IB gives us the following macros to customize:

#	MAKEFILEDIR
#	SOURCEMODE
#	CFLAGS
#	OBJCFLAGS
#	PSWFLAGS
#	LDFLAGS
#	INSTALLFLAGS
#	OTHER_LIBS
#	OTHER_DEBUG_LIBS
#	OTHER_PROF_LIBS
#	OTHER_SOURCEFILES
#	OTHER_OFILES
#	OTHER_PRODUCT_DEPENDS
#	OTHER_INSTALL_DEPENDS
#	OTHER_GARBAGE
#

I have been using CFLAGS to list my extra include files, as in
	CFLAGS =  -I$(CWD) -I$(CWD)/$(CONNDIR) -I$(CWD)/$(NETDIR)

but CFLAGS really connotes other things to me (like -g for example). 
So, I'm just wondering how other people handle this.  What do you do??

Thanks!

Anne
wilson@cs.umd.edu
From: greg@afs.com (Gregory H. Anderson)
Newsgroups: comp.sys.next.programmer
Subject: Re: TextField: can't change textGray and seemingly weird side effects
Date: 19 Aug 92 01:00:43 GMT
Article-I.D.: afs.1992Aug19.010043.820

Reply-To: greg@afs.com

In article <1992Aug15.205626.2573@pkyn.questor.wimsey.bc.ca>  
ldp@pkyn.questor.wimsey.bc.ca (Lyle Parkyn) writes:
> I found I couldn't change the textGray of a Textfield programmatically. 
> I eventually discovered that the following code seemed to prevent 
> changes to textGray.
> 
> [stuff deleted]
> 
> I am left with the conclusion that TextField has some methods with 
> undocumented and undesirable side effects. Did anyone else have similar 
> experiences? 
> 

The only thing that tripped you up was the setEnabled: messge. All NeXT  
controls respond to this method by graying themselves down in some way, to  
indicate their disabled state. This is a desirable user interface clue  
which would be defeated if you could subsequently change the color back  
under program control. For the record, here is the hierarchy:

  setEditable: - can the text be changed?

  setSelectable: - regardless of editable state, can the text be selected  
and copied with the selectText: and copy: methods?

  setEnabled: - will the control react to or send any actions? (NO always  
implies setEditable:NO and setSelectable:NO)

There is a "gotcha" in the interactions of the first two methods. Sending  
setEditable:NO automatically performs setSelectable:NO, which I consider a  
mistake. So if you want the text to stay selectable, you must follow any  
setEditable:NO with a setSelectable:YES.

--
Gregory H. Anderson          | "We're very tolerant around here,
Benevolent Dictator-for-Life |  being only amateurs ourselves."
Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
greg@afs.com  (Nextmail OK)  |
From: rpomeroy@aunext3.cam.amd.com (Ron Pomeroy x(Coop))
Newsgroups: comp.sys.next.programmer
Subject: Re: Look for a serial port solution
Date: 16 Aug 92 21:17:02 GMT
Reply-To: rpomeroy@aunext3.cam.amd.com
Distribution: usa
Organization: Advanced Micro Devices, Inc.; Austin, Texas

In article <6564@tekig7.PEN.TEK.COM> danh@tekig6.PEN.TEK.COM (Dan Hartman)  
writes:
>>I'm trying to find an 'easy' way to communicate with the serial ports.
>>Unfortunately, I'm too lazy to learn how to do it the 'correct' way
>>and have been unable to find an example to recycle code from.  Are there
>>any objects made for doing this sort of thing, or at least a simple example
>>of data input/output and checking to see if more data is present?
>>
>>Thanks for any info!
>>
>>Dan Hartman
>>omv@athena.mit.edu
>>danh@tekig6.pen.tek.com (Until Aug 19)

Call BenaTong at (614) 276-7859 and ask for Serial Solution (tm), an  
Objective-C wrapper around all of the low level serial driver stuff.

--
Ronald Pomeroy
Advanced Micro Devices
CAM Applications Group
rpomeroy@aunext3.amd.com
Newsgroups: comp.sys.next.programmer
From: ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson)
Subject: Re: Playing with PopUp's
Organization: Monash University, Caulfield Campus
Date: Wed, 19 Aug 1992 05:30:49 GMT

ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:

>I wish to set the title of my popUp and this is working properly but for one thing.  I basically just want to select an item programatically but also have its action sent to its target.  Currently the action is not sent.

>I have this code.

>popUp = [[NXApp employeePanel] popUp];
>if (popUp) {
>   Matrix *popUpMatrix = [[popUp target] itemList]; 
>   [popUp setTitle: [[popUpMatrix findCellWithTag:1] title]];
>}    

>This code just has a cosmetic affect it doesn't actually message the target.

>Is this how setTitle is suppose to work?

Ok the following works for me.

Correct me if you know a more efficient way.

popUp = [[NXApp employeePanel] popUp];
if (popUp) {
         Matrix *popUpMatrix = [[popUp target] itemList]; 
											 MenuCell *selectCell = [popUpMatrix findCellWithTag:1]; 
         [popUpMatrix selectCell:selectCell];
											 [popUpMatrix sendAction]; 
										}
Newsgroups: comp.sys.next.programmer
Subject: Re: How do you play a scorefile under 2.x?
From: zazula@pri.com (Ralph Zazula)
Date: 12 Aug 92 15:09:05 MST
Reply-To: zazula@pri.com
Distribution: world,local


Hi -

In article <1992Aug12.152802.17138@news.media.mit.edu>  writes:
> Hi,
> 
> I'm interested in playing a scorefile in my program. [...] I did something 
> like this for the first method (and something similar for the second method):
> 
> score = [[Score alloc] init];
> [score readScorefile:"/NextLibrary/Music/Scores/Emma.score"];
> sp = [ScorePerformer new];
> [sp setScore: score];
> [sp activate];
> [Conductor startPerformance];
> 
You are missing a connection from the ScorePerformer (actually, its  
PartPerformer's NoteSenders) to some Instrument object (e.g., Midi or a  
SynthInstrument or two...).  You should take a look at the examples:

/NextDeveloper/Examples/MusicKit/playscorefile
/NextDeveloper/Examples/MusicKit/playscorefilemidi

They show how to connect the individual parts in a Score file to  
SynthInstrument or Midi instances and how to configure the Orchestra and  
Conductor objects to work together.

Ralph
---
Ralph Zazula
Pinnacle Research, Inc.
zazula@pri.com (NeXT Mail)
(602)529-1135
Newsgroups: comp.sys.next.programmer
From: andrew@cubetech.com (Andrew Loewenstern)
Subject: Re: NeXT project management software
Organization: Cube Technologies, Inc.
Date: Wed, 12 Aug 1992 04:05:45 GMT

In article <1992Aug11.070213.9062@pkyn.questor.wimsey.bc.ca> ldp@pkyn.questor.wimsey.bc.ca (Lyle Parkyn) writes:
>It would be nice if the project management software could be CVS aware. Then  
>those that want to use it could and those that don't won't have to.
>
>Really makes you curious about how others are handling large projects,  
>including NeXT. (Bet they don't even use ProjectManager)


I hear that you can use Boss Logic Document Manager for project
management.  I've never seen it though...


andrew
-- 
andrew@cubetech.com     | "We shall not cease from exploration
Andrew Loewenstern      |  And the end of our exploring
Cube Technologies, Inc. |  Will be to arrive where we started
                        |  And know the place for the first time." -T.S. Eliot
From: glenn@rightbrain.com (Glenn Reid)
Newsgroups: comp.sys.next.programmer
Subject: Re: Packages
Date: 16 Aug 92 18:40:15 GMT
Reply-To: glenn@rightbrain.com

Gordon Van Huizen writes
> In article <1992Aug15.001900.1465@csus.edu> eps@futon.SFSU.EDU (Eric P.  
> Scott) writes:
> > In article <1992Aug13.220229.15234@sunova.ssc.gov>
> > 	sapp@falcon.ssc.gov (Kevin Sapp) writes:
> > >How does one create a file package from an app?  
> Again, what I think Kevin meant is a file package, not an app wrapper. I'd  
> like yo know how to do this too. (I already knew how to make an app  
> wrapper, besides in 3.0 it's the only thing you can do).

You have to create the file package yourself, by creating a directory
named "YourFilePackage.ext", where "ext" is the extension you wish to
use for your file packages. You then write files into this directory
as usual, or read from them.  I recommend a single file name inside
the wrapper; we use "PasteUpDoc.pub" inside the wrapper, following the
lead of WriteNow and others.  The main reason for this is so that a
user can rename the file package without knowing about anything inside
or worrying about keeping names in sync (contrast this with app wrappers,
which cannot be renamed unless you also rename the app inside the
wrapper).

The open/save panel will automatically handle the file packages, but
it will give you back the name of the package (directory). It's up to
you to deal with the internals of the file package.  3.0 might improve
upon this; I haven't checked.

--
 Glenn Reid        		NeXTmail: glenn@rightbrain.com
 RightBrain Software		415-326-2974 (NeXTfax 326-2977)
 Palo Alto, California
From: wolpert@mars (Florian Wolpert)
Newsgroups: comp.sys.next.programmer
Subject: How can i get an object-id via tag from a panel ?
Date: 20 Aug 92 14:12:49 GMT
Organization: PPG Hellige, Freiburg, GERMANY
X-Newsreader: Tin 1.1 PL4

Hi NeXTers,

in my application, i have a lot of panels with a lot of buttons
on it. i don't want to draw conections (via IB) from every button
to my control-object and visa versa. Now i have set the tag-numbers
of all buttons but how can i access the button-id while only having
the panel-id. I want to do something like this :
   for (i=0;i<30;i++) {
      [[panel getIdForTag:i] setState:0];
   }
How can i do this or how can i emulate this getIdForTag-method ? 

Flo.
--
Reply-To: wolpert%ppgfr.uucp@germany.eu.net
2i-d&s : wolpert%dandsnx.uucp@germany.eu.net (NeXTmail preferred)
Hellige : wolpert%ppgfr.uucp@germany.eu.net
uni-fr  : wolpert@informatik.uni-freiburg.de
snail-mail to 2i Industrial Informatics, Haierweg 20e, D-7800 Freiburg
Newsgroups: comp.sys.next.programmer
From: flan@starling.wustl.edu (Ian Flanigan)
Subject: Is @selector(foo:) constant?
Keywords: @selector, Objective-C, constant
Organization: Washington University, School of Engineering, St. Louis MO
Date: Fri, 21 Aug 1992 18:08:54 GMT

Today I was trying to manually initialize an array that would associate a bunch  
of selectors.  I tried:

static unsigned int my_array[][3] =
{
   { 1, @selector(foo:), @selector(bar) },
   ...
}

The compiler came back and said:
   initializer for static variable is not constant
So I tried making it non-static.  No good.  (Didn't think it would help :-)  It  
therefore appears that @selector(foo:) does not generate something constant.   
Does anyone know what it _does_ generate?  Anyone have a better idea than to  
use strings and sel_getUid() instead?

Thanks.

--
Ian Flanigan		"You can never have too many napkins."

Project Zeus
Washington University in St. Louis
flan@starling.wustl.edu
From: fermat@fermat.dartmouth.edu (Michael Glenn)
Newsgroups: comp.sys.next.programmer
Subject: Updating workspace file viewer.
Date: 14 Aug 92 12:40:45 GMT
Organization: Dartmouth College, Hanover, NH


I apologize if this is a FAQ or has been asked before.  If it is a FAQ,  
just tell me so. :)

I have (am writing) an application that will launch when files with the  
appropriate extension are double-clicked from the file viewer.  The  
program will usually create/remove files in the same directory as the file  
being opened, but the file viewer doesn't update itself right away to show  
the changes in the directory.  It *does* work fine if I open a file via an  
Open Panel from within the application.  After selecting the file this  
way, the file viewer immediately fixes itself.  So, I'm looking for two  
things:

1) An explanation as to why there is any difference here...

2) How to "poke" the workspace manager to tell it that it needs to update  
the file viewer.

Ok, second question thread:  Is there a convenient way of specifying more  
than three document file extensions for a single application?  I can do so  
by modifying the Makefile (DOCICONS and ICONSECTIONS) and then modifying  
the .iconheader file.  But this seems the wrong way, as the IB will  
overwrite these...  From inside the IB, it seems to allow only 3.

Michael Glenn (fermat@fermat.dartmouth.edu - NeXT mail welcome!)
Newsgroups: comp.sys.next.programmer
From: jutta@opal.cs.tu-berlin.de (Jutta Degener)
Subject: Re: Can C preprocessor handle #include "fooa" "foob"
Followup-To: comp.lang.c
Organization: Techn. University of Berlin, Germany
Date: Fri, 21 Aug 1992 14:54:51 GMT

ernest@pundit.cithep.caltech.edu (Ernest Prabhakar) writes:
> There is a funky trick which works under the 3.0 NeXT preprocessor, but not  
> under GNU 2.1 or 2.2.  It is:
> #include "string1" "string2"
[..]
> Does stringification take place before includes?  Then GNU is broken.
> Is it the other way around?  Then NeXT's preprocessor supplies (and
> thus NeXT include files rely upon) non-standard behavior.

GNU's right, this trick is just too funky for ANSI C.

String concatenation takes place in translation phase 6, when
the inclusions (which are done in phase 4) have long since
happened.

The ANSI thing to do would be to glue identifiers, not strings,
and stringize them afterwards:

	#define	stringize(a)		#a
	#define	glue(base, version)	stringize(base ## version)

	#include glue(fish, 2.1.1.2)

Followups to comp.lang.c.

-Jutta
From: greg@afs.com (Gregory H. Anderson)
Newsgroups: comp.sys.next.programmer
Subject: Re: Getting a PopUpList's window
Date: 19 Aug 92 01:00:18 GMT
Article-I.D.: afs.1992Aug19.010018.767
Reply-To: greg@afs.com

In article <Bt05Mv.Mt8@ux1.cso.uiuc.edu> jeffo@ux1.cso.uiuc.edu (J.B.  
Nicholson-Owens) writes:
> One small PopUp problem I haven't seen addressed is having a lot of
> entries in a PopUp or PopDown (whatever those downward expanding PopUp
> menus are called).  There needs to be something that is able to,
> perhaps, scroll the choices up and down the way Mac pull-down menus do
> when the menu is too long to display on the screen.
> 
> Has anything been done in 3.0 to handle this situation?
> 
> I wish that merely using a scrollView were a suitable replacement for
> such problems, but the ability of the PopUp to give an infinite number
> of choices as well as show the chosen one in a very small space and
> almost instantly is *very* handy.  I would hate to have to revert to a
> button bringing up a panel that had a scrollView in it.  That would
> seem so cumbersome to me as a user.

We actually wrote a subclass of TextField called LookupField which solves  
this problem. The LookupField owns a ButtonCell which displays its label  
(non-bordered, so it appears to be a plain old static TextField). When you  
click on the ButtonCell region, a LookupPanel pops up with all acceptable  
values contained in a scrolling Matrix. Just like a PopUpList, this panel  
runs modal until you make a selection or cancel the operation. Our users  
don't find it cumbersome, perhaps because it is well integrated with the  
TextField: The same panel pops up automatically to validate data entry  
directly into the field.

The lookup table values are stored in a group of flat files and attached  
to the LookupField by name. That means you don't need to access the NIB  
file to change the contents of the table, as you would with PopUpLists. It  
also allows lookup tables to be built in-memory on the fly, for non-static  
data. (Yes, I know you can do both of these things with programmatic  
PopUps, but it's a lot more work.) A very convenient and intuitive  
alternative to PopUpLists, which we no longer use.

--
Gregory H. Anderson          | "We're very tolerant around here,
Benevolent Dictator-for-Life |  being only amateurs ourselves."
Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
greg@afs.com  (Nextmail OK)  | 
Newsgroups: comp.sys.next.programmer
From: ernest@pundit.cithep.caltech.edu (Ernest Prabhakar)
Newsgroups: comp.sys.next.programmer
Subject: Templates in NeXT's C++ (3.0)
Date: 18 Aug 92 22:12:00 GMT
Reply-To: ernest@pundit.cithep.caltech.edu (Ernest Prabhakar)
Organization: California Institute of Technology, Pasadena

Hello,
I am trying to use C++ templates on the NEXT (beta-PR2), which implies  
something like GCC version 1.96, I believe.  I've scoured the GNU  
documentation, but I've found very little information about their C++  
implementation.  Am I looking in the wrong place?

Apparently GCC 2.2.2 does support templates (in some fashion), but for the life  
of me I cannot get NeXT's c++ to do so.  Is this in fact possible?  How much  
ObjC functionality from 3.0 (protocols?) would I lose if I replaced my compiler  
with GCC 2.2.2?  Thanks,

- Ernie P.

--
Ernest N. Prabhakar                  Caltech High Energy Physics
Member, League for Programming Freedom (league@prep.ai.mit.edu)
CaJUN President        NeXTMail:ernest@pundit.cithep.caltech.edu
"...and ourselves, your servants for Jesus sake." - II Cor 4:5b
#import <std/disclaimer.h>
Newsgroups: comp.sys.next.programmer