HDTenEightyP/NetNews huggingface dataset:
From: eps@futon.SFSU.EDU (Eric P. Scott)
Subject: Re: Extracting cmdline and env of other processes
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
Date: Fri, 6 Nov 1992 10:51:27 GMT

In article <Bx6zu0.DAC@malihh.hanse.de> clu@malihh.hanse.de
	(Carsten Lutz) writes:
>I'm looking for a way to get the commandlines and environments ( at start-
>time ) of other processes. Has anyone done this before or knows what the
>best way to do this is ? 'ps' has to do this in some way 'cause it's able
>to display both cmdline and environment.

[Answered for 2.1]

ps uses the indispensible table() call for TBL_ARGUMENTS to
obtain this information.  Unfortunately, the return is somewhat
bizarre and lacking in useful information; the attached program
illustrates.  The strings comprising the argument list and the
environment are run together, separated only by their terminating
NULs.  There is no argc, argv, or envp.  The last 4 bytes will
always be zero, and can be ignored.  Up to 3 zeroed padding bytes
will preceed those as needed to longword-align the first argument.

ps finds the beginning of the argument list by searching
backwards for some number of consecutive 0 bytes.  It's easily
fooled, e.g. if I type

	sleep 30 "" "" "" "rm -rf *"&

and do a ps, guess what it appears to be doing!

By default, ps stops when it finds a string containing "="; the
-e option suppresses this behavior.  Try

	sleep 30 = these are hidden arguments&

Then do a ps and a ps -e

>One way I could imagine is to find the stacks of other processes via /dev/kmem.
>Undermost on this stacks there must be the commandlines and the environments
>( both arguments to main() ) somewhere around. Is there a better way ? 
>mach-hackers wanted !

You mean task_by_unix_pid() to obtain the task kernel port,
task_threads() to obtain the thread ports, thread_get_state()
against thread 0 for the registers, vm_region() to find the stack
bottom, and vm_read() to examine the address space?  Good luck!

You might be better off trying to locate the __DATA segment; the
first 3 longwords are usually _environ, _NXArgc, and _NXArgv.
Of course, any of those (or what they point to) can be smashed
by the user program, so there are no guarantees in any case.

[No, I haven't bothered figuring out exactly what TBL_ARGUMENTS
does.]

					-=EPS=-
------- compile with  cc -s -object -O -bsd
#include <stdio.h>
#include <sys/table.h>

main(argc, argv)
int argc;
char *argv[];
{
	char *malloc();
	register char *p, *q;
	register int s;

	if (argc<2||argc>3) {
	usage:
		(void)fprintf(stderr, "Usage: %s pid [bytes]\n", *argv);
		exit(1);
	}
	s=argc>2 ? atoi(argv[2]) : 1024;
	if (s<=0) goto usage;
	if (!(p=malloc(s))) {
		(void)fprintf(stderr, "%s: malloc failure\n", *argv);
		exit(1);
	}
	bzero(p, s);
	if (table(TBL_ARGUMENTS, atoi(argv[1]), p, 1, s)<0) {
		perror("table");
		exit(1);
	}
	q=p+s;
	do {
		putchar((*p<' '||*p>'~') ? '.' : *p);
	} while (++p<q);
	putchar('\n');
	exit(0);
}
From: mahoney@csulb.edu (Mike Mahoney)
Newsgroups: comp.sys.next.programmer
Subject: Re: The important book  (Simpson Garfinkel)
Keywords: programming, book, NeXTSTEP
Date: 5 Nov 92 21:28:09 GMT
Reply-To: mahoney@csulb.edu (Mike Mahoney)
Organization: Cal State Long Beach

Simson (not Simpson, Bart) and I decided to put Chapter 5 of the book on  
the NeXT CD-ROM so people could see what they would be getting if they  
ordered the book sight unseen.  The CD-ROM chapter not exactly the same as  
the one in the hardcopy of the book because it had to be submitted before  
the final edit.  However, it is essentially the same.  Thanx for your post  
and comment on the chapter.

- Mike Mahoney
  SCaN President and SCaNeWS co-editor
  Southern California NeXTSTEP Users' Group

  also ...
  Professor and Chair
  Computer Engineering and Computer Science Dept
  California State University, Long Beach
  Long Beach, CA  90840-8302

  mahoney@csulb.edu  (NeXTmail capable)


In article <1992Nov2.222341.23390@newshub.ccs.yorku.ca>  writes:
> I received a CD today called the "Education Software Sampler" from NeXT.   
> It contains a ream of Educational Software, source code and  
Documentation.   
> Amont the Docs was a file called
> 
> 	And it contained a sample of Simpson's book.  Chapter 5 and the  
> Book Index.  I'll have to chect and see if I can post it, but if I can I  
> will post the Index in this Newsgroup and the Chapter on an archive.
> 
> the following is taken from the README file:
> 
> > Included is Chapter 5 and the Table of Contents of the book
> > "NeXTSTEP Programming - STEP ONE: Object-Oriented Applications"
> > by Simson L. Garfinkel and Michael K. Mahoney
> > Copyright 1992 by Springer-Verlag Publishers
> > 
> > Chapter 5 shows readers how to build a NeXTSTEP programming project
> > using NeXT's Interface Builder and Project Builder.
> > 
> > The entire book, which includes a floppy disk with the source code
> > for the programs, can be ordered directly from Springer by calling 
> > 800-777-4643.  (800-SPRINGER)
> > 
> > You can also order the book from Simson Garfinkel and Associates,  
Inc.,
> > by calling 617-354-7888 or sending electronic mail to
> > orders@next.cambridge.ma.us.
> > 
> > For book comments, please send e-mail to nextbook@csulb.edu.
> > 
> > 
> 
> David
> PS. It Looks really Good !
> 
> --
> +--------David Aspinall------------+-------------------------------+
> |NeXT Campus Consultant, York U    |"Republicans understand the    |
> |E-mail  : cs911409@ariel.yorku.ca |importance of Bondage between  |
> |NeXTMail: dave@lizard.ccs.yorku.ca|mother and child"   -Dan Quayle|
> +-- over 250 NeXt Machines and Growing ----------------------------+
From: anderson@sapir.cog.jhu.edu (Stephen Anderson)
Newsgroups: comp.sys.next.programmer
Subject: Re: help compiling gnutar on NeXt 3.0
Date: 6 Nov 92 22:38:12 GMT
Organization: Dept. of Cognitive Science, The Johns Hopkins University
In-reply-to: jja@fnbc.com's message of 5 Nov 92 16:23:59 GMT

I built GNUtar (yes, that's tar-1.11.1.tar.Z) the other day. No
problem at all: unpack the distribution, cd tar-1.11.1, run the
included configure script, type make and that's it. This is for 3.0 -
the problems posed for some stuff by the new location of the includes
didn't turn up at all. Probably that's because I had just made and
installed gcc-2.3.1, which also compiled out of the box (only problem
I encountered was the need to change a couple of // style comments in
an include file to /* */ style to correct an "unterminated constant"
error). Whether gnutar would go through as well with the 3.0 version
of cc I don't know.

--Steve Anderson
Newsgroups: comp.sys.next.programmer
Subject: ProjectBuilder question
From: <HWTQC@CUNYVM.BITNET>
Date: Thursday, 5 Nov 1992 14:21:16 EST
Organization: City University of New York/ University Computer Center

Specifying a host to build on in PB doesn't work for me; I get a message
telling me that a connection can't be opened, whether I specify a domain
name or an IP number.
  * If I need rexec or rsh, my sysadmin is willing to activate these for me
    (they are currently disabled for security reasons)
  * Most machines on the network are NetBoot clients (for ease of updating)
    Could this affect trying to build on a host other than the currently
    logged-in console?
Please reply by email/NeXT Mail (note different addresses) or post if you
believe this to be of sufficient general interest.

Thank you in advance.
Newsgroups: comp.sys.next.programmer
From: bbum@object.com (Bill Bumgarner)
Subject: Re: RIBs, RenderMan, and Textures
Organization: Objective Technologies,Inc.
Date: Thu, 12 Nov 92 17:05:10 GMT

In article <101558@bu.edu> ambi@localhost.bu.edu (Mike Amirault) writes:
> 
>  I've been messing around with Renderman and RIB files for a couple
> of days and need some help. I can pretty much get everything to work
> except textures.  I've tried everything and can't get a simple texture
> to display from a RIB file I created. I can use 3DReality and add a
> texture fine, but I can't do it from my RIB file.
> 
>  I've tried things like:
> 
>  Surface "SD_Simple_tx" "txmap" "/NextLibrary/Textures/brick.tex"
>  Surface "texmap" "texname" "brick"
>  ...

I suspect that you need to declare the "txmap" variable type-- RenderMan isn't  
going to be able to figure it out by itself.... add something like this to it:

Declare "txmap" "string"
 
(I think it is "string"-- you might have to hack around a moment to figure it  
out)

BTW:  For those interested, pick up the latest release of SmartFieldsPalette  
from the archive sites (the 3.0 version should be available later  
today/tomorrow sometime) and check out the info panel-- it has a 3DReality  
created animation in it.... sort of cool.  Excuse the slowness on opening;  it  
is a jpeg compressed set of TIFF images....

--
Bill Bumgarner <bbum@object.com>
Objective Technologies, Inc.
-- 
Bill Bumgarner <bbum@object.com>
From: drm@esl.com (Don McGregor)
Newsgroups: comp.sys.next.programmer
Subject: Re: Maximum window width
Date: 6 Nov 92 23:00:15 GMT
Reply-To: drm@esl.com

In article <Bx9L7z.65@monitor.com> howard@monitor.com (Howard Brenner)  
writes:
> Is there a maximum width for a window?  I am creating a window with a
> width of 34000 and a height of 1200 and I am getting a DPS context error  
> on the command placewindow (origin of 0,0).The problem does not seem to  
> go away until I bring the width down to about 10000 or so.
> 
Been there, done that.  There's a little-known DPS limit to the width of a  
window of right around 10K.  

--
Don McGregor | Life is like high school, only with money and guns.
drm@esl.com  |
From: Robert_La_Ferla@hot.com
Newsgroups: comp.sys.next.programmer
Subject: Re: HELP: Providing services under 3.0?
Date: 13 Nov 92 13:25:50 GMT
Reply-To: Robert_La_Ferla@hot.com
Organization: Hot Technologies

Jason,

	Use the filename "services" not "services.text".  Remove the  
LDFLAGS entry from the Makefile.preamble.  Add services to the "Other  
Resources" suitcase in Project Builder.

Robert La Ferla
Newsgroups: comp.sys.next.programmer
From: orion@proxima.cc.colorado.edu (Orion Edward Poplawski)
Subject: DSP Message/DMA coexistence
Reply-To: orion@proxima.cc.colorado.edu
Organization: Colorado SuperNet, Inc.
Date: Thu, 5 Nov 1992 23:25:38 GMT

    Is it possible to have both complex DMA and DSPMSG protocol operating at  
the smae time?  This is probably not possible, because you request a DMA  
transfer by sending a certain word to the host.  Therefore, in DMA mode, the  
host would be looking for such a command, and would not know what to do with  
it.  
    However, if this is the case, is there documentation on all of the messages  
used in Complex DMA mode?  Perhaps you can prefix a standard DSP reply with a  
certain header?


--
Orion Poplawski
Physics Dept. Paraprofessional
The Colorado College
orion@proxima.cc.colorado.edu (NeXT mail OK)
(719)389-6750
Xref: sparky comp.sys.next.programmer:7159 comp.sys.next.misc:21892
From: jack@richsun.cpg.trs.reuter.com (Jack Gidding)
Newsgroups: comp.sys.next.programmer,comp.sys.next.misc
Subject: chunkPackage???
Date: 11 Nov 92 21:07:55 GMT
Followup-To: comp.sys.next.programmer



Hello all,

I am trying to split an Installer package into several chunks using  
/NextAdmin/Installer.app/chunkPackage. Unfortunately, I continually  
get the message:

destPkg: Undefined variable.

immediately before chunker croaks.  Has anyone encountered this  
and/or fixed their script?

Oh, BTW, I am using NeXTSTEP 3.0.

Thanks

Jack Gidding
Reuters
jack@richsun.cpg.trs.reuter.com
From: frank@glocke.hotb.sub.org (Frank Thomas)
Newsgroups: comp.sys.next.programmer
Subject: Re: Makefile.dependencies without system header files ??
Date: 3 Nov 92 22:24:49 GMT

In article <1cctv0INNimk@agate.berkeley.edu> izumi@mindseye.berkeley.edu  
(Izumi Ohzawa) writes:
> When you do "Make depend" in a project directory, Release 3.0
> make produces a huge Makefile.dependencies file.
> The file includes all the  system include files inaddition to
> those specific to the project.
> 
> I recall that this was not the case for 2.1, although it was
> that way for Rel 1.0.
> 
> How do I get rid of references to /NextDevloper/Headers/*
> from the file?
> 

This seems to be a bug in gnu-cc maybe this came with precompiled headers.
The makefile uses the correct switch -MM but output of cc seems to be  
wrong. Funnily there is a difference between -M and -MM
Newsgroups: comp.sys.next.programmer
From: marcel@opal.cs.tu-berlin.de (Marcel Weiher)
Subject: Re: Serial port communication difficulties 
Organization: Techn. University of Berlin, Germany
Date: Wed, 11 Nov 1992 22:47:15 GMT


>In article <1992Nov10.115012.29368@doug.cae.wisc.edu>  writes:
> 
> Friends,
> This may be more UNIX than NeXT, but here goes.
[...]
> But on the Next, it seems much harder.  I simply thought by opening
> a file being /dev/cua, I could check the ports status via feof().
                                                             ^^^^^^
> But alas, it always says theres more data there, and so it continially
> gets hung on reading after the lasst charachter is read.  I tried all 
> sorts of variations with the cable, conecting various permutaions of 
> RTS/CTS and so on, but to no avail.

If you want exact control over the serial lines, don't use buffered
I/O ( fopen,fclose,getchar,feof) but UNIX system calls like open,
write,read and:  ioctl().  This last call will let you set raw/cooked/
cbreak mode, change baud rates, tell write() to treat some parameters
as timers etc.  For more information:  man 4 tty.

(BTW:  Your e-mail bounced)

Marcel
Newsgroups: comp.sys.next.programmer
From: byer@adobe.com (Scott Byer)
Subject: Re: True color? Modifying Color at Bit map ...
Reply-To: byer@adobe.com (Scott Byer)
Organization: Adobe Systems Incorporated
Date: Mon, 9 Nov 1992 22:50:19 GMT

UTKD03@rhrz.uni-bonn.de writes

> I really have a problem.  When I was an unsatisfied User of an IBM
> Clone I had a couple buttons at my screen, where I could adjust
> the red/blue/green level.  It was essential for true color scans.
> Now I have this nice little box equipped with a dimension board
> (32 MB) , a couple different colour modells, but without the
> possibility to adjust the colour after it left the dimension board.
> I cannot recalculate the tiff image, becouse it will be correct
> when printed.  If I dont find any help, i probably have to switch
> to a silicon graphic or such a thing.  It is also no problem with
> a Mac.  Please give me a short e-mail note, If you have a suggestion.

Do you mean physical knobs, or software adjustments?

Most color monitors I have dealt with do not have exposed color
adjustment knobs, but all color monitors do have adjustment knobs
somewhere, usually hidden inside the case.  I don't recommend
messing around with them yourself, but...

If you mean software adjustment, then that is a problem with the
application displaying the tiff.  Doing color adjustments using
Display PostScript is fairly trivial, given the ease with which
transfer functions can be installed.

NeXTSTEP 3.0 also has a way of adjusting the default CIE-based
color space translations to RGB according to the ReadBook, 2nd ed.
Check out /NextLibrary/PS2Resources/ColorRendering/NXCalibratedRGB,
and the CIE chapters in the ne RedBook.

--
Scott Byer                             NeXTMail: byer@mv.us.adobe.com
Adobe Systems Incorporated               These are *my* opinions, and  
1585 Charleston Road, P.O. Box 7900        do not necessarily reflect
Mountain View, CA 94039-7900             the opinions of my employer.
---------------------------------------------------------------------
From: cc100aa@xray.gatech.edu (Ray Spalding)
Newsgroups: comp.sys.next.programmer
Subject: Re: zombies (was Re: What does a task with priority -1 mean?)
Date: 12 Nov 92 18:42:20 GMT
Distribution: usa
Organization: Georgia Institute of Technology

To avoid zombies, a UNIX process doing a fork (a parent process)
must reap it's child(ren).  This is done by some varient of the
wait(2) system call, and it may be helpful to install a SIGCHLD
handler.  The man pages seem to imply that wait() is an optional
feature, but failure to call it will result in a zombie.

It sounds like Terminal is not doing this properly.  The Subprocess
example does not seem to do this, either.

Most UNIXes I'm familiar with report zombies as <defunct>, but
Mach apparently doesn't, if what's been reported here is correct.
Also, on other UNIXes, killing them (from root) is no problem.

-- 
Ray Spalding, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
From: ambi@it-next2.bu.edu (Michael Amirault)
Newsgroups: comp.sys.next.programmer
Subject: Re: RIBs, RenderMan, and Textures
Date: 12 Nov 92 16:01:25 GMT

In article <1drsutINNpea@news.aero.org> strauss@aero.org (Daryll J.  
Strauss) writes:
> >
> > Surface "SD_Simple_tx" "txmap" "/NextLibrary/Textures/brick.tex"
> > Surface "texmap" "texname" "brick"
> 
> The minimal useful call to the texture map shader would be:
> 
> 	Surface "texmap" "texname" "brick.tx"
> 
> Notice that you need the extension on the brick file and that the
> extension is tx. RenderMan will complain that it doesn't know the token
> "texname" if you do this, so you should declare it:
> 	Declare "texname" "string"
> prior to the call to Surface.
> 

 Ah, this is what I was looking for. Amazingly, I came very close to
figuring this out through trial (and trial and trial...) and error.

 I think it was probably better if you *didn't* tell me how to do
it - I have other things I'm *supposed* to be doing!  :-)

 Anyone noticed that the brick texture looks inside out?  I was 
wondering if maybe I'm looking at the wrong side of the polygon??
The brick does look nice on a plane facing the camera, but on one
that's diagonal, it doesn't seem to draw individual bricks - just
rows.

ambi
Newsgroups: comp.sys.next.programmer
From: orion@proxima.cc.colorado.edu (Orion Edward Poplawski)
Subject: Text views (easy displaying of text)
Reply-To: orion@proxima.cc.colorado.edu
Organization: Colorado SuperNet, Inc.
Date: Wed, 11 Nov 1992 21:25:13 GMT

    I would like to have a little text view in one of my windows to display  
status information as it comes in, and add it to the end of the list.  I  
figured I would drop in a Text object in a scroll view from the IB palette.   
But, I have not been able to find an easy way to append text to the object.

Any suggestions would be appreciated.

Please email.

--
Orion Poplawski
Physics Dept. Paraprofessional
The Colorado College
orion@proxima.cc.colorado.edu (NeXT mail OK)
(719)389-6750
Newsgroups: comp.sys.next.programmer
From: ntomczak@vega.math.ualberta.ca (N Tomczak-Jaegermann)
Subject: Re: printf g format still broken under NeXTSTEP 3.0 
Organization: University Of Alberta, Edmonton Canada
Date: Thu, 12 Nov 1992 05:04:42 GMT

rca@cs.brown.edu (Ronald C. Antony) writes:

>Well, not to protect NeXT in regards to sleeping over important bug
>reports (sometimes I also wonder how they set the priorities, altough
>certainly nobody could claim they are otherwise lazy), I still wonder
>if they are not right. Maybe there are just two opinions what ANSI-C
>is supposed to do.

>The C-Bible "The C Programming Language" by K+R, 2nd edition, ANSI-C
>states the following on page 244:

>g,G	double; %e or %E is used if the exponent is less than -4 or
>	greater than or equal to the precision; otherwise %f is used.
>	Trailing zeros and a trailing decimal point are not printed.


>Now if they got it right, NeXT got it right. If K+R got it wrong,
>well, then NeXT should correct the bug and tell Prentice Hall to
>correct their bug as well.

Well, you cannot have two ways of defining standard and The Standard
says explicitely about g, G conversions "... the precision specyfying
the number of significant digits".  K&R/2 chopped 7 lines of a
description from The Standard into 3 lines dropping an essential
piece of an information in the process.

What is more I know of many computers around which got it right.
Look for example at gawk sources and find out how many of them
need -DGFMT_WORKAROUND to alleviate problems of buggy libraries.
Library correctness does not seem to be very high on NeXT list.
BTW - I was also reporting this problem in early days of 2.1.
Everybody can see results. :-)

    Michal Jaegermann
    ntomczak@vega.math.ualberta.ca
Newsgroups: comp.sys.next.programmer
From: jeffblum@phoenix.Princeton.EDU (Jeffrey R. Blum)
Subject: Re: Seeking Objective-c prettifier
Originator: news@nimaster
Keywords: indent, code prettifier
Reply-To: jeffblum@phoenix.princeton.edu
Organization: Princeton University
Date: Tue, 10 Nov 1992 00:55:49 GMT

In article <1992Nov7.191231.2637@netcom.com> garylang@netcom.com (Gary Lang)  
writes:
> "Anyone have or know of an Objective-C prettifier?"
> 
> man indent. It's actually not too bad...
> 
> -g

Indent is pretty cool, especially when you use it within Edit to reformat your  
code without going to the command line. The only problem is that indent does  
not handle comments that use the "//" syntax. Anyone have a fixed version?

-Jeff

--
"His eyes were eggs of unstable crystal, vibrating with a frequency whose
name was rain and the sound of trains, suddenly sprouting a humming
forest of hair-fine glass spines."   --Neuromancer
-- 
"His eyes were eggs of unstable crystal, vibrating with a frequency whose
name was rain and the sound of trains, suddenly sprouting a humming
forest of hair-fine glass spines."   --Neuromancer
Newsgroups: comp.sys.next.programmer
From: mferris@trirex.com (Mike Ferris)
Subject: Re: how to delete palette icon from IB preferences?
Organization: Trirex Systems Inc.
Date: Tue, 10 Nov 1992 21:32:50 GMT

Michael B. Johnson writes
>I think what he is asking is how to get it out of the list in 
>Preferences.  You can unload it, but it's still taking up space.  
>Why would this matter?  Well, in my case, I'm developing palettes, 
>and I might have a lot of versions of a palette floating around, 
>and I don't want the old grotty ones around to be clicked on.

If you don't keep compiling the new versions of a palette into different  
places, you'll only have one icon in the preferences panel which will be  
the latest version you compiled.

However, as someone else said, ~/.NeXT/defaults.nibd contains the defaults  
that IB uses to fill this panel.  Editing the file will work.

____________________________________________________________
Mike Ferris                 Once in a while
mferris@trirex.com          You can get shown the light
Trirex Systems, Inc.        In the strangest of places
(212) 856-9000              If you look at it right.   -RH
Newsgroups: comp.sys.next.programmer
From: ploeger@aplki.toppoint.de (Andreas Ploeger)
Subject: Re: Archiving objects with multiple references
Reply-To: ploeger@aplki.toppoint.de
Organization: Andreas Ploeger
Date: Fri, 6 Nov 92 15:32:51 GMT

In article <Bx6HEs.F1v@ns1.nodak.edu> glaeske@plains.NoDak.edu (Brian Glaeske)  
writes:
> 
> Pictorially, I have:
> 
> 	Obj1 ---> Obj2 ---> Obj3  and visa versa  Obj3 ---> Obj2 --1
> (...)
> Now, how do I archive this and restore this mess?  I haven't seen any source
> code that does anything like this (I might have missed something).
> 

I would do it this way:

    - read:(NXTypedStream*)stream
    {
      myTarget = NXReadObject(stream);
      return self;
    }
    
    - write:(NXTypedStream*)stream
    {
      NXWriteObject(stream, myTarget);
      return self;
    }

Look up NXWriteObject in Digital Librarian:
  "...These functions also ensure that objects are written only once."

So, even when multiple Objects (Obj1, Obj3) have references to a given object  
(Obj2) which are written this way, the target (obj2) is only written once.

Hope this helps,

Andreas

-- 
Andreas Ploeger, Kiel, Germany
Newsgroups: comp.sys.next.programmer,comp.lang.objective-c
From: garylang@netcom.com (Gary Lang)
Subject: Re: Seeking Objective-c prettifier
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Sat, 7 Nov 1992 19:12:31 GMT

"Anyone have or know of an Objective-C prettifier?"

man indent. It's actually not too bad...

-g