HDTenEightyP/NetNews huggingface dataset:
From: carlton@cs.berkeley.edu (Mike Carlton)
Newsgroups: comp.sys.next.programmer
Subject: malloc_debug question
Date: 15 Oct 1992 19:11:58 GMT
Organization: University of California, Berkeley
Distribution: world
Reply-To: carlton@cs.berkeley.edu
NNTP-Posting-Host: peets.berkeley.edu

I'm trying to track down a malloc() bug in one of my programs and have a
question about malloc_debug().

If I turn on debugging with malloc_debug(15) my program dies eventually 
when I am calling calloc(), with the error:
	**Bad free area not marked free
	Malloc corrupted entering malloc

My question is what the heck is this error supposed to mean?  Did I free
a block that wasn't allocated by malloc?  Did I write past the end of a
malloc'ed block and munge the header of a free block?  Or did I look at
the console cross-eyed?  BTW, this error isn't generated if I run with
only malloc_debug(7).

Once I figure out what went wrong, maybe I can track down the actual
bug.

cheers,
--mike (carlton@cs.berkeley.edu)
Newsgroups: comp.sys.next.programmer
From: Nate Sammons (The BLaCKSMiTHE) <ns111310@longs.LANCE.ColoState.Edu>
Subject: WANTED:  NS Programming information
X-Useragent: Nuntius v1.1.1d9
Date: Sat, 10 Oct 1992 20:31:29 GMT
X-Xxdate: Sat, 10 Oct 92 14:31:58 GMT
Organization: Colorado State U. Engineering College

I am looking for a good book about programming the NeXT...
Also, if there are any public-domain documents out there
that would be of ANY help, please tell me.  Thanks.

-nate sammons

+------------------------------------------------------------------+
|   Nate Sammons                                                   |
|   PLEASE EMAIL at <ns111310@longs.LANCE.ColoState.Edu>           |
|                                                                  |
|  "I don't want to achieve immortality through my work.           |     
      
|   I want to achieve immortality through not dying." -Woody Allen |
|                                                                  |
|  "We are the children of concrete and steele....                 |
|   ..everything is possible, but nothing is real." -Living Colour |
+------------------------------------------------------------------+
From: hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy))
Subject: Re: 3.0 glitch -- <sys/table.h> missing ?
In-reply-to: ram@ramsys.sta.sub.org's message of 6 Oct 92 07:28:51 GMT
Newsgroups: comp.sys.next.programmer
Organization: Department of Physics, UC Irvine, CA 92717-4575, USA
Date: 7 Oct 92 21:44:53 GMT
Followup-To: comp.sys.next.programmer

You did not spoil the upgrad, NeXT did not spoil the upgrade. 
They just changed the location of the include files. 
A simple way to work around this is to edit your Makefiles 
(or Imakefiles if you are using xmkmf, or the conguration files,
etc...) adding something like the following:
INCLUDES = -I/NextDeveloper/2.0CompatibleHeaders/next
(and other similar additions; use locate to find the new locations of
your headers -- assuming that you have the updatedb script working)
--
Hardy 
-----
Meinhard E. Mayer,  Department of Physics, UC Irvine 
e-mail: hardy@golem.ps.uci.edu (preferred) or MMAYER@UCI.BITNET

Newsgroups: comp.sys.next.programmer
From: pkim@cory.Berkeley.EDU (-)
Subject: Library makefiles under 3.0
Keywords: library, makefile
Organization: University of California, at Berkeley
Date: Mon, 12 Oct 1992 16:25:13 GMT

does anyone have a makefile to generate libraries under 3.0?  also, on a
related note, i know that /LocalDeveloper/Headers is automatically searched
for local headers but is /usr/local/lib automatically searched for libraries?
(or is there a directory you can create in /LocalDeveloper)?

if your Nextmailing me the makefile, mail it to the following address (do not
reply to this account):
mtcoak!paul@netcom.com

thanks in advance,
paul kim



Newsgroups: comp.sys.next.programmer
From: drew@fnbc.com (Drew Davidson)
Subject: Re: IB & Speed == 0
Reply-To: drew@fnbc.com
Organization: First National Bank Of Chicago, Chicago IL, USA
Date: Tue, 13 Oct 92 15:47:20 GMT

In article <1992Oct12.223242.1809@u.washington.edu>  
basiji@stein.u.washington.edu (David Basiji) writes:
> songer@lexmark.com (Christopher Songer) writes:
> 
> >Hi!
> 
> >     Has anyone else noticed that certain things with IB are 
> >unreasonably slow under 3.0? In specific I find that resizing
> >Forms / Boxes, to be unbelievably slow. The initial response to
> >the mouse down is bad and then subsequent response to mouse
> >dragging is unacceptable. Am I doing something wrong? What's
> >going on? I'm about ready to bring the 2.0 IB over to my 3.0 system
> >for interface creation. 
> 
> >Thanks!
> >-Chris
> 
> >PS: I don't think I'm memory starved. I'm running on a 25Mhz
> >040 Cube w/ 28 meg of memory.
> 
> Yes, it's slow to resize custom views on my 25MHz slab (32M ram).
> 
> Dave
> ..

A new View Category from within IB defines the following method for views in  
palettes:

- getMinSize:(NXSize *)minSize maxSize:(NXSize *)maxSize from:(int)where;

Either (a) IB is calling this WAY too much or (b) some objects implement this  
method inefficiently.  I have not yet written a palette under 3.0 that uses  
custom views (I have done Objects, though, and love it!), so I can't say which  
at this time.

--
+--------------------------------+-------------------------------------------+
|        Drew  Davidson          | "Never ask a programmer if he'll have     |
|         Software Guy           |  another cup of coffee because it's       |
| First National Bank of Chicago |  nobody's damn business how much he's     |
|     drew@fnbc.com  (NeXTmail)  |  already had!"       - me                 |
+--------------------------------+-------------------------------------------+
Newsgroups: comp.sys.next.programmer
From: hickman@cse.unl.edu (Hubert B. Hickman)
Subject: Need a MINIMAL app for a speaker
Organization: University of Nebraska - Lincoln
Date: Thu, 8 Oct 1992 05:00:12 GMT

I am attempting to write a simple program that uses speaker/listener.  This
little program does not need to be a full-scale applcation, but simply 
needs to be able to send some messages to a remote application.

My problem is that the port is never found.  As of now, all of the
code resides in the main.m file.  There is no need for a nib file 
since this little executable has no user interface.

Do I have to do somthing more to have a minimal "speaker"?

Thanks,

Hubert Hickman
hickman@cse.unl.edu
-----
#import <stdlib.h>
#import <appkit/appkit.h>
#import <sys/port.h>

void main(int argc, char *argv[]) {

	
 	port_t	websterPort;
	int scode,tcode,flag;

 	NXApp = [Application new];
	websterPort = NXPortFromName("Webster",NULL);
	if(websterPort == PORT_NULL) 
		{
		NXRunAlertPanel("Error",
			   			"Webster port not found, %s.\n",
						"OK",0,0,NXUserName());
		}
	
[munch rest of code]



---------
Newsgroups: comp.sys.next.programmer
From: rscott@spock.NMSU.Edu (Joseph Good)
Subject: C to DSP ASM??
Organization: New Mexico State University
Date: Thu, 15 Oct 1992 09:07:39 GMT


Is it possible to convert certain C functions to run on the 
Signal Processor??

-jdg
--

Joseph Good
+-------------------+ - More than just a band....
| Green Dot Brigade | - It's a whole damn army of dots...
+-------------------+ - And we've declared war on the 7-Up dots...

rscott@nmsu.edu (NeXT mail welcome!!) (main account)

atlantis@acca.nmsu.edu  (Just plain ol' Unix) (seldom used)
From: villy@uunet.uu.net (Will Hartung - Master Rallyeist)
Newsgroups: comp.sys.next.programmer
Subject: 300 dpi TIFFs
Date: 7 Oct 1992 19:13:04 -0500
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

Hi all,

     A friend of mine gave me an EPS file from a Mac that he wants
     converted to a TIFF so that he can stick it on a fax page. For
     some reason, PhotoShop is having a heck of a time dealing with
     the EPS.

     Anyway, I've got a Mono Slab, and with a little dickering with
     NXImage, I've been able to convert the EPS into a color TIFF for
     him to use. However, he'd like a TIFF that's at 300 dpi, rather
     than 72 dpi that I've generated.

     NXImage renders to the device, obviously in this case the Window
     Server. I'd like to know how to convince NXImage that it's
     rendering to a printer rather to the display. I'm not displaying
     the image, I'm doing solely as a conversion process. I'm sure
     that there are a bazillion little utilities floating around out
     there to do this, but I've got this far so I'd like to see it
     through. Plus, it would give me a little better understanding as
     to how this black this ticks.

     I guess a related question is what is the difference, as far as a
     TIFF goes, between an image rendered at 72 dpi, and one that is
     "threeish times bigger" so that if it was rendered "actual size"
     on a 300 dpi device, it would show up...well, actual size I
     guess.

     According to NXImage docs, I can use something like
     'prepareGState' (I think), and this sounds close to what I want,
     but it says it doesn't initialize the device or the CTM. So,
     anyway, it's kind of a half-Appkit and half-PostScript question.
     If you've got any ideas, I'd love to hear them.

     Please e-mail, I have no news access (this is being posted
     through a "mail in" news poster).

     Thanx!
     Will Hartung
     (uunet!la4gen!villy - or - me@zipbang.socal.com)
Newsgroups: comp.sys.next.programmer
From: goldly@u.washington.edu (Lloyd P. Goldwasser)
Subject: Help requested: Something about pointers still eludes me
Organization: University of Washington
Date: Thu, 15 Oct 1992 18:12:52 GMT

I'm trying to make a dynamically-declared pointer pointer

  float **x

point to a pre-existing 2-d array

  float x_init[][7]={ {1., 2., 3., ...}, {...}, {...} };

but everything I try crashes, even when it compiles.
I declare x_init and x differently because I want to be use x_init, a
pre-existing 2-dim array as a default to which x may initially point,
but I also want to be able to re-allocate x and put something else into
it as appropriate.
(I'm using the Numerical Recipes in C routines,

  x = matrix(m,n,o,p);
  free_matrix(x,m,n,o,p);

to re-allocate and de-allocate x.)


Here's this part of my program:


#import<stdio.h>

  float x_init[][7] =
    { {0.64, 0.13, 3.99, 1.49, 4.6, 4.94, 2.37},
      {1.31, 0.34, 3.07, 0.09, 0.43, 0.56, 1.1},
      {0.64, 0.11, 0.23, 5.59, 2.01, 2.63, 0.68} };
  float **x;

void main()
{
  printf("x_init[0][2] is %f\n", x_init[0][2]);    /* just checking */

  x[0] = x_init[0];             /* or x[0] = &x_init[0][0]; or ...  */

  printf("x[0][2] is %f\n", x[0][2]);        /* never gets this far */
}


I've tried what seems like every combination of *, &, and [] that I
can come up with, but to no avail.  The apparently analogous 1-d
pointer assignments work fine.  I'm not sure whether this is a
pointer thing, a 2-d thing, a NeXT thing, or what.  Or am I just
trying to do something wrong?


Thanks in advance,

Lloyd Goldwasser
goldly@u.washington.edu
From: kate_smith@next.com (Kate Smith)
Newsgroups: comp.sys.next.programmer
Subject: Yet another New NeXTanswer: services activation
Keywords: nextanswer service activation
Date: 14 Oct 92 00:09:39 GMT

Q:  My app provides a Service, but I want it to behave a little  
differently than usual.  Specifically, I don't want the app requesting the  
Service to deactivate, and I don't want my app to become the active app  
when it receives the data.  This way, users can send data to this service  
without being thrown out of whatever app they're in.  Is this possible?

A:  Yes!  Service providers can dictate whether or not they're activated  
when providing a Service, as well as whether or not the requesting app  
deactivates, through the following two options in the Services message  
description:

	Activate Provider: <YES or NO>
	Deactivate Requestor: <YES or NO>
  
Specifying NO in the Activate Provider field instructs the Services  
machinery to launch the Service provider (if not already launched) but not  
make it the active application.  Specifying NO in the Deactivate Requestor  
field instructs the Services machinery not to deactivate the application  
requesting the Service.  

Omitting one of these two fields is equivalent to specifying YES.

N.B.  Be careful how you use this feature.  Technically, you can have any  
combination of provider and requester activation but it would violate user  
interface guidelines.  It really only makes sense to set these both to  
either YES or NO, but not a combination of the two.

QAxx

Valid for 2.0
Valid for 3.0
From: xepo@csd4.csd.uwm.edu (Scott R Violet)
Newsgroups: comp.sys.next.programmer
Subject: Problem with header <netinet/in.h>
Date: 16 Oct 92 16:31:36 GMT
Article-I.D.: uwm.1bmqp8INN20s
Distribution: usa
Organization: Computing Services Division, University of Wisconsin - Milwaukee
NNTP-Posting-Host: 129.89.7.4
Originator: xepo@csd4.csd.uwm.edu


Hi,
	Last night I was playing around with sockets and needed the
in_addr structure that is defined in the file <netinet/in.h>, of
course now it is in the direcotry /NextDeveloper/headers/bsd.  But
anyway, when I included this file I got errors in the header file upon
compilation.  The errors were on line 116,117,118, and 179 (I don't
have them handy, but I am pretty sure that the numbers are correct,)
and the errors were u_char, u_short, and u_long undefined...  How
would such an error come up?  The only remedy I could come up with was
to edit the in.h header file and stick in the line 
#import <sys/types.h>
	Why should I have had to do that?  Am I missing something, or
is it another bug?
Thanks,
-- 

		-Scott Violet (xepo@csd4.csd.uwm.edu)
Newsgroups: comp.sys.next.programmer,comp.sys.next.sysadmin,comp.sys.next.misc
From: songer@lexmark.com (Christopher Songer)
Subject: Re: Distributed Objects Experiment - Results
X-Disclaimer: These views are the poster's and not necessarily those of Lexmark
Organization: Lexington, KY
Date: Thu, 15 Oct 1992 16:24:55 GMT

In article <1992Oct14.052047.7056@cubetech.com> andrew@cubetech.com writes:
>
>Distributed Objects take all of the pain out of writing distributed or
>client/server apps. 
>

I agree with this completely! Distributed Objects seem to be the best
feature to 3.0 that I have seen. They are completely amazing. For
slight changes in your code structure, you can make your work
distributed and available.

However, I would comment that the documentation for threaded Servers 
under 3.0 looks terrible!

-Chris
From: basiji@stein.u.washington.edu (David Basiji)
Newsgroups: comp.sys.next.programmer
Subject: Undocumented IB
Date: 16 Oct 92 14:24:59 GMT
Organization: University of Washington, Seattle


Alright, I've put my custom view in my main window and selected
"Format" -> "layout" -> "group in ScrollView". It put my view in
the scrollview and drew the scollers.  Now how do I get the two 
views to cooperate?  The scrollers don't respond to the size of the
view or anything.  The docs have a good example of a text view acting
as the document view of a scrollview but it's all done through the
_main.m file, not IB.  Since my _main.m file is maintained by PB, there's a 
message at the top of the file saying not to screw with it.

How do I assign the scrollview's document view (I assumed it would be
done automatically by IB)?

How do I refer to it in my custom view?

There's a helpful little message in the online docs that sez IB's not
documented yet. How Nice.

NeXT, are you out there? I don't want to be charged $250 for a call on this
one!


David Basiji
basiji@larry.pathology.washington.edu
From: gbol@rglnext.geol.vt.edu (Gregory B. Lampshire)
Newsgroups: comp.sys.next.programmer
Subject: pasteboard problem---multiple copies from my app don't seem to take affect
Date: 9 Oct 92 19:57:46 GMT
Reply-To: gbol@rglnext.geol.vt.edu


I am compositing an image into view.  I want to copy just that image into  
the pasteboard.  The code below shows what I am doing.  What happens  
unfortunately, is that even when the image itself has changed (which I  
know for sure), the pasteboard seems stuck with only the first copy to the  
pasteboard that I made.  Further copies to the pasteboard from the same  
program do not seem to affect its contents and I can only paste the same  
image from the one application.

Any pointers about what I am doing wrong would be helpful.



// pb is created with pb=[Pasteboard new] in initFrame:: above
- copy: sender 
{
	int i, length, maxlength=10000;
	char *data;
	id aList, anImageRep;

	// only want to copy EPS image data
	aList = [imageid representationList];
	anImageRep = nil;
	for(i=0;i<[aList count]; i++)
		if([[aList objectAt: i] class] == [NXEPSImageRep class])
			anImageRep = [aList objectAt: i];

	if(anImageRep==nil) return self;
	[pb declareTypes: &NXPostScriptPboardType num: 1 owner: sender];
	[anImageRep getEPS: &data length: &length];
	[pb writeType:NXPostScriptPboardType data:data length:length];
	return self;
}







--
Gregory Lampshire 
Virginia Tech 
Bradley Department of Electrical Engineering
gbol@rglnext.geol.vt.edu (NeXTmail welcome)
------------------------
My opinions are my very own and do not reflect the opinions of any  
employer
Newsgroups: comp.sys.next.programmer
From: hugh@ear.mit.edu (Hugh Secker-Walker)
Subject: Ignoring SIGINT in popen(3)
Organization: Massachusetts Institute of Technology
Date: Thu, 15 Oct 1992 20:38:54 GMT

I am porting a simple signal-processing interpreter to NeXT.  Before I
give it an application interface I'm ironing out the bugs in the core
interpreter.  The interpreter itself compiles and runs under almost
any C compiler.  It uses popen(3) to create and manage subprocesses
for certain parts of its work.  Since the interpreter catches signals,
I preface the popen(3) call with calls to signal(3c) to ignore
SIGINT, etc. so that the child process is protected.  This works on
other systems I'm using, e.g. Ultrix.  Under NS 2.1 though, the
subprocess receives interrupts, and dies.  What have I overlooked?
I've read the manpages for popen(3), signal(3c), sh(1), and execve(2)
but haven't found any insights.  I wish my problem were more NeXTstep
than Unix, but I've got to start somewhere.

--
Hugh Secker-Walker                    INTERNET:  hugh@ear-ache.mit.edu
MIT, Research Lab of Electronics      UUCP:      mit-eddie!mit-athena!hugh
     "The good news is the ear has 30,000 channels to the brain,
      the bad news [sic] is they're all nonlinear" -- M.B. Sachs
Newsgroups: comp.sys.next.programmer
From: songer@lexmark.com (Christopher Songer)
Subject: IB & Speed == 0
X-Disclaimer: These views are the poster's and not necessarily those of Lexmark
Organization: Lexington, KY
Date: Mon, 12 Oct 1992 18:36:24 GMT

Hi!

     Has anyone else noticed that certain things with IB are 
unreasonably slow under 3.0? In specific I find that resizing
Forms / Boxes, to be unbelievably slow. The initial response to
the mouse down is bad and then subsequent response to mouse
dragging is unacceptable. Am I doing something wrong? What's
going on? I'm about ready to bring the 2.0 IB over to my 3.0 system
for interface creation. 

Thanks!
-Chris

PS: I don't think I'm memory starved. I'm running on a 25Mhz
040 Cube w/ 28 meg of memory.
From: ti6ls@tuhhco.rz.tu-harburg.de (Ludger Solbach)
Newsgroups: comp.sys.next.programmer
Subject: where is <stream.h>?
Date: 9 Oct 92 16:54:47 GMT


On our machine (NS 2.1) I couldn't find <stream.h> and was unable to compile
even simple C++ programs. Where can I get it?
From: pjm@SPEECH.CS.CMU.EDU (Pedro J. Moreno)
Newsgroups: comp.sys.next.programmer
Subject: MallocDebug
Date: 15 Oct 92 15:55:37 GMT
Article-I.D.: cs.Bw66wp.67o.2
Reply-To: pjm@stevens.SPEECH.CS.CMU.EDU (Pedro J. Moreno)
Organization: School of Computer Science, Carnegie Mellon


I know it has been asked before, but I am a novice in this part.

I am trying to use MallocDebug in a numeric application (I don't use
any windows at all), I have added in my makefile the -lMallocDebug line
and recompiled.

When I execute my program, I get in the screen lots of lines like this:

nmalloced pointerfreed unmalloced pointerfreed unmalloced pointerfreed  
unmalloced pointerfreed unmalloced pointerfreed unmalloced pointerfreed  
unmalloced pointerfreed unmalloced pointerfreed unmalloced pointerfreed  
unmalloced pointerfreed u....

however the MallocDebug application doesn't show up...

If I call directly Malloc debug and try to open my program, I get a window
saying I do not have any application configured to use MallocDebug....


Please help.....

A mail reply would be appreciated...

thanks in advance

--
Pedro J. Moreno			(NeXTMail yes!!)
Graduate Student
Electrical and Computer Engineering
Speech Group
pjm@stevens.speech.cs.cmu.edu 
Carnegie Mellon University
Newsgroups: comp.sys.next.programmer
From: bvrotney@ADS.COM (Bill Vrotney)
Subject: Re: Fixing Allegro CL 3.1.20 to work under NS 3.0
Organization: Advanced Decision Systems, Mtn. View, CA (415) 960-7300
Date: Fri, 9 Oct 1992 11:15:47 GMT


I am reposting some of this for clarification:

>   I though it was going to take me longer to get a method out for doing this
>   but the ucl.o file that I had was not the Franz patched file, so it is
>   actually pretty simple as long as you update to the Franz patched ucl.o.
>
>   The following is a procedure for fixing Allegro CL 3.1.20 so that it works
>   under NeXTstep 3.0. I don't have 3.0 so I need someone to try this out and
>   report back to this news group.
>
>     Warning!!! (from Franz) This procedure results in creating a new ucl.o
>     binary file. You may distribute this method but not the resulting ucl.o
>     file. 
>
>     You should find all of the files mentioned here on your ACL distribution
>     floppies. If you do not have the Franz patch mentioned below you will
>     have to ask Franz for it.
>
>           1. You need to patch your existing ucl.o file, if it is not
>              already patched, with an existing patch from Franz. This is
>              done with an existing shell script called
>
>                   install_patch.sh
>
>              and an existing patch file called
>
>                   patch.uu
>
>              To verify that you have done the right thing, after this patch
>              is installed the ucl.o file should be 612364 bytes.

For step (1.), I believe for most of you if you go to your distribution
directory called ACL there is a file called

                dumplispPatch

this is a shell archive file and if you follow the instructions there you
should get the same results, ie. a new ucl.o file resulting in 612364 bytes.
If your existing ucl.o file is already 612364 bytes it probably already had
been patched with the "dump lisp" patch.


--
Bill Vrotney
BAH/Advanced Decision Systems
Newsgroups: comp.sys.next.programmer