Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Nov 1996 00:25:17 -0800 (PST)
From:      John-Mark Gurney <jmg@nike.efn.org>
To:        FreeBSD Hackers <hackers@freebsd.org>
Subject:   help with lorder and tsort not giving proper output...
Message-ID:  <Pine.NEB.3.95.961128234259.12656H-100000@nike>

next in thread | raw e-mail | index | archive | help
well.. after looking at the source to tsort it looks like tsort imports
the dependances backwards... either that... or when making libs another
program is needed to reverse the output of tsort...  I have a fix at the
end of this message..  if you want me to submit a pr I will...

output from lorder:
fdprintf.o fdprintf.o
genconvert.o genconvert.o
linklist.o linklist.o
genconvert.o linklist.o

as you can see genconvert.o depends on linklist.o... but when you run this
output through tsort you get:
genconvert.o
fdprintf.o
linklist.o


Index: tsort.c
===================================================================
RCS file: /usr/cvs/src/usr.bin/tsort/tsort.c,v
retrieving revision 1.4
diff -c -r1.4 tsort.c
*** tsort.c	1996/08/02 04:50:44	1.4
--- tsort.c	1996/11/29 08:19:39
***************
*** 174,180 ****
  		b->b_buf[nused] = '\0';
  		b->b_bsize = bsize;
  		if (n)
! 			add_arc(bufs[0].b_buf, bufs[1].b_buf);
  		n = !n;
  	}
  	(void)fclose(fp);
--- 174,180 ----
  		b->b_buf[nused] = '\0';
  		b->b_bsize = bsize;
  		if (n)
! 			add_arc(bufs[1].b_buf, bufs[0].b_buf);
  		n = !n;
  	}
  	(void)fclose(fp);


John-Mark

gurney_j@efn.org
http://resnet.uoregon.edu/~gurney_j/
Modem/FAX: (541) 683-6954   (FreeBSD Box)

Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.961128234259.12656H-100000>