9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* fixes
@ 1995-08-18  3:41 dhog
  0 siblings, 0 replies; 6+ messages in thread
From: dhog @ 1995-08-18  3:41 UTC (permalink / raw)


>Did anybody port "patch" to plan9?  That would make
>diffs a lot more useful.

Yes, and it's not too hard either.  You can run patch's configure script
under ape, and it works suprisingly well.  Then you just have to edit the
Makefile, adding "LIBS = -lap" and deleting "rename.o" from OBJS, and
edit util.c, replacing ask() with something sensible.  Oh, and you need
to apply the fix to ape's rename() function that I posted to the list.

So, just run "ape/psh", then type "sh configure", edit the Makefile and util.c
as suggested above, then type make, and you should get a patch binary.
If patch corrupts your files, then you need to fix rename() (don't try this
at home kids!)

Here is the hacked version of ask() that I use, which doesn't try to read
standard output or standard error:

void
ask(pat,arg1,arg2,arg3)
char *pat;
long arg1,arg2,arg3;
{
    static int ttyfd = -1;
    int r;

    Sprintf(buf, pat, arg1, arg2, arg3);
    Fflush(stderr);
    if (ttyfd >= 0 || (ttyfd = open("/dev/cons", 2)) >= 0) {
	write(ttyfd, buf, strlen(buf));
	r = read(ttyfd, buf, sizeof buf);
	Close(ttyfd);
    }
    else {				/* no terminal at all--default it */
	buf[0] = '\n';
	r = 1;
    }
    if (r <= 0)
	buf[0] = 0;
    else
	buf[r] = '\0';
}






^ permalink raw reply	[flat|nested] 6+ messages in thread

* fixes
@ 1995-08-18 13:57 Scott
  0 siblings, 0 replies; 6+ messages in thread
From: Scott @ 1995-08-18 13:57 UTC (permalink / raw)


avg@postman.ncube.com (Vadim Antonov) writes:
| Did anybody port "patch" to plan9?  That would make
| diffs a lot more useful.

I just compiled it, using ape and _BSD_EXTENSIONS.  It's confused about
prompting from /dev/tty, but that's probably easy to repair. Other than
that, a few tests seemed to work.







^ permalink raw reply	[flat|nested] 6+ messages in thread

* fixes
@ 1995-08-18  1:34 Bruce
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce @ 1995-08-18  1:34 UTC (permalink / raw)


    ..
    From:	forsyth@plan9.cs.york.ac.uk
    ..
    Date:	Thu, 17 Aug 1995 21:02:22 -0400
    Message-Id: <95Aug17.210455edt.34181@psuvax1.cse.psu.edu>
    ..
    >>if people are going to post source, please post diffs
    >>as they highlight the fix rather than hiding it.
    
    yes, and it is probably ill-advised to put too much of THE SOURCE
    out in public, since it is subject to licence.   diffs sometimes
    ..

Use the source Luke.  Specifically, nominate a particular fragment of
the original source (shared by all legal players) as a key to encrypt
and decrypt pieces of newer source.  Such encrypted newer source could
be posted or made available for anon ftp.  The efficacy of this scheme
would degrade over time as fragments of the original source `escaped',
but this might be secure enough to keep the lawyers happy.

Cheers,
Bruce Janson					Email:	bruce@cs.usyd.edu.au
Basser Department of Computer Science		Phone:	+61-2-351-3423/4
University of Sydney, N.S.W., 2006, AUSTRALIA	Fax:	+61-2-351-3838






^ permalink raw reply	[flat|nested] 6+ messages in thread

* fixes
@ 1995-08-18  1:02 forsyth
  0 siblings, 0 replies; 6+ messages in thread
From: forsyth @ 1995-08-18  1:02 UTC (permalink / raw)


>>if people are going to post source, please post diffs
>>as they highlight the fix rather than hiding it.

yes, and it is probably ill-advised to put too much of THE SOURCE
out in public, since it is subject to licence.   diffs sometimes
beg the question of a reference source (if you haven't got the
CDROM on line), and they do not always avoid excessive detail, esp. without -b,
but seem a reasonable compromise.  diff -e is quite
effective at hiding detail, but troublesome and downright confusing
if the reference source turns out to be wrong!

in Old Unix days there was some light-hearted discussion about whether
it would be possible to reconstruct THAT SOURCE by accumulating
all the diffs that had been published; enough people took
the possibility seriously enough to try to ensure that only
people with a licence could subscribe to the newsletters with the diffs.

during the discussion about comp.os.plan9, it struck me
that one of the advantages of a moderated newsgroup
was that a moderator might spot the more obvious violations.

even so, i don't mean to dent Vadim Antonov's enthusiasm, since it is
natural to want to share joys; or, in Bill Hogan's case, misery.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* fixes
@ 1995-08-17 11:32 Vadim
  0 siblings, 0 replies; 6+ messages in thread
From: Vadim @ 1995-08-17 11:32 UTC (permalink / raw)


>From the legal point of view posting "old lines" in
the diff and posting a single source file are identical,
and both are covered by "fair use", as in both cases
the "original bytes" are present and are useless without
the rest of the system.  Even *names of files* can
be considered "violation", see also the text of USL's
complaint against BSD Inc.

Can somebody from Bell Labs explain their policy on
posting fixes and additions in the public mailing lists?
Just to put the discussion to the rest.

--vadim






^ permalink raw reply	[flat|nested] 6+ messages in thread

* fixes
@ 1995-08-17 11:13 Vadim
  0 siblings, 0 replies; 6+ messages in thread
From: Vadim @ 1995-08-17 11:13 UTC (permalink / raw)


Did anybody port "patch" to plan9?  That would make
diffs a lot more useful.

--vadim






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1995-08-18 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-08-18  3:41 fixes dhog
  -- strict thread matches above, loose matches on Subject: below --
1995-08-18 13:57 fixes Scott
1995-08-18  1:34 fixes Bruce
1995-08-18  1:02 fixes forsyth
1995-08-17 11:32 fixes Vadim
1995-08-17 11:13 fixes Vadim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).