Sender: ml AT delorie DOT com Message-ID: <34278408.7C0FEDF3@cdata.tvnet.hu> Date: Tue, 23 Sep 1997 10:55:36 +0200 From: Molnar Laszlo MIME-Version: 1.0 To: DJGPP workers Subject: a little popen patch Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Just to save some bytes in libc.a.... 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 */ if (!pl) ! l1->next = pl; ! pl = l1; /* stick in elements we know already */