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

Sender: ml AT delorie DOT com
Message-ID: <3428DDF1.36288973@cdata.tvnet.hu>
Date: Wed, 24 Sep 1997 11:31:29 +0200
From: Molnar Laszlo <molnarl AT cdata DOT tvnet DOT hu>
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: a little popen patch v2

Eli was right, I messed it up a little. Sorry.

Laszlo

*** ~popen.c    Sun Aug 31 15:11:18 1997
--- popen.c     Sat Sep 20 17:34:50 1997
***************
*** 77,81 ****
  popen (const char *cm, const char *md) /* program name, pipe mode */
  {
!   struct pipe_list *l1, *l2;
  
    /* make new node */
--- 77,81 ----
  popen (const char *cm, const char *md) /* program name, pipe mode */
  {
!   struct pipe_list *l1;
  
    /* make new node */
***************
*** 90,107 ****
    /* if empty list - just grab new node */
    if (!pl)
!     pl = l1;
!   else
!   {
!     /* otherwise, find last node in list */
!     ++(l1->fd);
!     l2 = pl;
!     while (l2->next)
!     {
!       ++(l1->fd);
!       l2 = l2->next;
!     };
!     /* add new node to list */
!     l2->next = l1;
!   }
  
    /* stick in elements we know already */
--- 90,95 ----
    /* if empty list - just grab new node */
 
!    l1->next = pl;
!    pl = l1;
  
    /* stick in elements we know already */

- Raw text -


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