delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/09/24/05:51:26

Date: Wed, 24 Sep 1997 12:48:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Molnar Laszlo <molnarl AT cdata DOT tvnet DOT hu>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: a little popen patch v2
In-Reply-To: <3428DDF1.36288973@cdata.tvnet.hu>
Message-ID: <Pine.SUN.3.91.970924124341.18049V-100000@is>
MIME-Version: 1.0

On Wed, 24 Sep 1997, Molnar Laszlo wrote:

>     if (!pl)

Shouldn't this if go away?  This patch leaves the following code:

	if (!pl)
	  l1->next = pl;
	pl = l1;

I think it should be just this:

	l1->next = pl;
	pl - l1;

The first time through, l1->next gets set to NULL, since pl is NULL.  
Then each new node gets inserted at the beginning.

Oh, and btw, pl should be reinitialized to NULL with the __bss_count 
trick, in case it one day gets linked into Emacs (or any other program 
that restarts itsels).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019