Browse Source

Plan 9 from Bell Labs 2003-02-26

David du Colombier 17 years ago
parent
commit
c7188eaa2e
96 changed files with 39419 additions and 71 deletions
  1. 5 0
      acme/bin/wnew
  2. 105 22
      dist/replica/plan9.db
  3. 106 0
      dist/replica/plan9.log
  4. 4 1
      lib/ndb/common
  5. 2 0
      lib/vgadb
  6. 20 0
      sys/man/1/acid
  7. 8 0
      sys/src/9/pc/vgas3.c
  8. 6 3
      sys/src/9/pc/vgasavage.c
  9. 339 0
      sys/src/ape/cmd/diff/COPYING
  10. 1766 0
      sys/src/ape/cmd/diff/ChangeLog
  11. 24 0
      sys/src/ape/cmd/diff/FREEBSD-upgrade
  12. 126 0
      sys/src/ape/cmd/diff/NEWS
  13. 9 0
      sys/src/ape/cmd/diff/README
  14. 1084 0
      sys/src/ape/cmd/diff/analyze.c
  15. 40 0
      sys/src/ape/cmd/diff/cmpbuf.c
  16. 20 0
      sys/src/ape/cmd/diff/cmpbuf.h
  17. 118 0
      sys/src/ape/cmd/diff/config.h
  18. 468 0
      sys/src/ape/cmd/diff/context.c
  19. 71 0
      sys/src/ape/cmd/diff/diagmeet.note
  20. 1124 0
      sys/src/ape/cmd/diff/diff.c
  21. 344 0
      sys/src/ape/cmd/diff/diff.h
  22. 3916 0
      sys/src/ape/cmd/diff/diff.texi
  23. 1778 0
      sys/src/ape/cmd/diff/diff3.c
  24. 216 0
      sys/src/ape/cmd/diff/dir.c
  25. 200 0
      sys/src/ape/cmd/diff/ed.c
  26. 181 0
      sys/src/ape/cmd/diff/fnmatch.c
  27. 40 0
      sys/src/ape/cmd/diff/fnmatch.h
  28. 748 0
      sys/src/ape/cmd/diff/getopt.c
  29. 129 0
      sys/src/ape/cmd/diff/getopt.h
  30. 180 0
      sys/src/ape/cmd/diff/getopt1.c
  31. 428 0
      sys/src/ape/cmd/diff/ifdef.c
  32. 238 0
      sys/src/ape/cmd/diff/install-sh
  33. 714 0
      sys/src/ape/cmd/diff/io.c
  34. 47 0
      sys/src/ape/cmd/diff/mkfile
  35. 71 0
      sys/src/ape/cmd/diff/normal.c
  36. 87 0
      sys/src/ape/cmd/diff/prepend_args.c
  37. 21 0
      sys/src/ape/cmd/diff/prepend_args.h
  38. 6374 0
      sys/src/ape/cmd/diff/regex.c
  39. 510 0
      sys/src/ape/cmd/diff/regex.h
  40. 1109 0
      sys/src/ape/cmd/diff/sdiff.c
  41. 284 0
      sys/src/ape/cmd/diff/side.c
  42. 272 0
      sys/src/ape/cmd/diff/system.h
  43. 759 0
      sys/src/ape/cmd/diff/util.c
  44. 5 0
      sys/src/ape/cmd/diff/version.c
  45. 81 0
      sys/src/ape/cmd/diff/xmalloc.c
  46. 340 0
      sys/src/ape/cmd/patch/COPYING
  47. 1704 0
      sys/src/ape/cmd/patch/ChangeLog
  48. 34 0
      sys/src/ape/cmd/patch/FREEBSD-upgrade
  49. 183 0
      sys/src/ape/cmd/patch/INSTALL
  50. 158 0
      sys/src/ape/cmd/patch/Makefile.in
  51. 173 0
      sys/src/ape/cmd/patch/NEWS
  52. 52 0
      sys/src/ape/cmd/patch/README
  53. 14 0
      sys/src/ape/cmd/patch/acconfig.h
  54. 106 0
      sys/src/ape/cmd/patch/addext.c
  55. 92 0
      sys/src/ape/cmd/patch/argmatch.c
  56. 12 0
      sys/src/ape/cmd/patch/argmatch.h
  57. 252 0
      sys/src/ape/cmd/patch/backupfile.c
  58. 50 0
      sys/src/ape/cmd/patch/backupfile.h
  59. 32 0
      sys/src/ape/cmd/patch/basename.c
  60. 307 0
      sys/src/ape/cmd/patch/common.h
  61. 120 0
      sys/src/ape/cmd/patch/config.h
  62. 118 0
      sys/src/ape/cmd/patch/config.hin
  63. 2364 0
      sys/src/ape/cmd/patch/configure
  64. 134 0
      sys/src/ape/cmd/patch/configure.in
  65. 1054 0
      sys/src/ape/cmd/patch/getopt.c
  66. 133 0
      sys/src/ape/cmd/patch/getopt.h
  67. 189 0
      sys/src/ape/cmd/patch/getopt1.c
  68. 462 0
      sys/src/ape/cmd/patch/inp.c
  69. 10 0
      sys/src/ape/cmd/patch/inp.h
  70. 250 0
      sys/src/ape/cmd/patch/install-sh
  71. 391 0
      sys/src/ape/cmd/patch/maketime.c
  72. 39 0
      sys/src/ape/cmd/patch/maketime.h
  73. 41 0
      sys/src/ape/cmd/patch/mkfile
  74. 742 0
      sys/src/ape/cmd/patch/partime.c
  75. 67 0
      sys/src/ape/cmd/patch/partime.h
  76. 1064 0
      sys/src/ape/cmd/patch/patch.1
  77. 1302 0
      sys/src/ape/cmd/patch/patch.c
  78. 1 0
      sys/src/ape/cmd/patch/patchlevel.h
  79. 1865 0
      sys/src/ape/cmd/patch/pch.c
  80. 25 0
      sys/src/ape/cmd/patch/pch.h
  81. 125 0
      sys/src/ape/cmd/patch/quotearg.c
  82. 9 0
      sys/src/ape/cmd/patch/quotearg.h
  83. 1079 0
      sys/src/ape/cmd/patch/util.c
  84. 32 0
      sys/src/ape/cmd/patch/util.h
  85. 30 0
      sys/src/ape/cmd/patch/version.c
  86. 5 0
      sys/src/ape/cmd/patch/version.h
  87. 1 0
      sys/src/cmd/acid/acid.h
  88. 11 5
      sys/src/cmd/acid/dbg.y
  89. 5 1
      sys/src/cmd/acid/expr.c
  90. 1 0
      sys/src/cmd/acid/lex.c
  91. 11 5
      sys/src/cmd/acid/main.c
  92. 10 2
      sys/src/cmd/acid/mkfile
  93. 14 7
      sys/src/cmd/aux/vga/virge.c
  94. 18 15
      sys/src/cmd/vnc/vncs.c
  95. 1 0
      sys/src/cmd/vnc/vncs.h
  96. 10 10
      sys/src/libsunrpc/client.c

+ 5 - 0
acme/bin/wnew

@@ -0,0 +1,5 @@
+#!/bin/rc -e
+
+id=`{mkwnew $*}
+cat >/mnt/acme/$id/body
+echo clean >/mnt/acme/$id/ctl

+ 105 - 22
dist/replica/plan9.db

@@ -27,10 +27,13 @@
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1038443079 135228
 386/bin/ape/cc - 775 sys sys 1045537935 68930
+386/bin/ape/diff - 775 sys sys 1046198795 345686
+386/bin/ape/diff3 - 775 sys sys 1046198796 187364
 386/bin/ape/dirname - 775 sys sys 1039673023 135007
 386/bin/ape/expr - 775 sys sys 1038443080 144796
 386/bin/ape/kill - 775 sys sys 1038443080 140422
 386/bin/ape/make - 775 sys sys 1045537935 205170
+386/bin/ape/patch - 775 sys sys 1046198797 298449
 386/bin/ape/psh - 775 sys sys 1042220689 34
 386/bin/ape/sed - 775 sys sys 1038443081 160382
 386/bin/ape/sh - 775 sys sys 1045537937 477563
@@ -105,13 +108,13 @@
 386/bin/aux/ms2 - 775 sys sys 1045537953 84053
 386/bin/aux/mswordstrings - 775 sys sys 1039758542 64268
 386/bin/aux/na - 775 sys sys 1045537953 152774
-386/bin/aux/nfsmount - 775 sys sys 1045776646 231149
+386/bin/aux/nfsmount - 775 sys sys 1046182497 231137
 386/bin/aux/nfsserver - 775 sys sys 1045537954 171046
 386/bin/aux/olefs - 775 sys sys 1045537954 144352
 386/bin/aux/p9bitpost - 775 sys sys 1039758543 127979
 386/bin/aux/pcmcia - 775 sys sys 1039758543 46790
 386/bin/aux/pcnfsd - 775 sys sys 1045537955 126750
-386/bin/aux/portmap - 775 sys sys 1045776646 140702
+386/bin/aux/portmap - 775 sys sys 1046182498 140690
 386/bin/aux/portmapper - 775 sys sys 1045537955 125638
 386/bin/aux/postgif - 775 sys sys 1038443100 177440
 386/bin/aux/postprint - 775 sys sys 1038443101 161939
@@ -296,7 +299,7 @@
 386/bin/netkey - 775 sys sys 1039758579 70753
 386/bin/netstat - 775 sys sys 1045538036 81379
 386/bin/news - 775 sys sys 1045538036 70512
-386/bin/nfs - 775 sys sys 1045776647 315503
+386/bin/nfs - 775 sys sys 1046182499 315491
 386/bin/nm - 775 sys sys 1045538037 123227
 386/bin/nntpfs - 775 sys sys 1045538038 161729
 386/bin/ns - 775 sys sys 1039758580 63830
@@ -436,7 +439,7 @@
 386/bin/venti/verifyarena - 775 sys sys 1045538088 105156
 386/bin/venti/wrarena - 775 sys sys 1045538089 178907
 386/bin/venti/write - 775 sys sys 1045538089 100592
-386/bin/vncs - 775 sys sys 1045776648 437987
+386/bin/vncs - 775 sys sys 1046182501 438050
 386/bin/vncv - 775 sys sys 1045776649 266165
 386/bin/vt - 775 sys sys 1045538092 170883
 386/bin/vtdump - 775 sys sys 1045538093 160937
@@ -488,7 +491,7 @@
 386/lib/libl.a - 664 sys sys 1045538121 5412
 386/lib/libmach.a - 664 sys sys 1045538123 743792
 386/lib/libmemdraw.a - 664 sys sys 1045538124 292324
-386/lib/libmemlayer.a - 664 sys sys 1045538125 47116
+386/lib/libmemlayer.a - 664 sys sys 1046182506 47256
 386/lib/libmp.a - 664 sys sys 1045538125 77064
 386/lib/libndb.a - 664 sys sys 1045538125 52836
 386/lib/libplumb.a - 664 sys sys 1045538125 19000
@@ -496,7 +499,7 @@
 386/lib/libscribble.a - 664 sys sys 1045538126 108138
 386/lib/libsec.a - 664 sys sys 1045538128 635686
 386/lib/libstdio.a - 664 sys sys 1045538128 125144
-386/lib/libsunrpc.a - 664 sys sys 1045776662 355322
+386/lib/libsunrpc.a - 664 sys sys 1046182507 355304
 386/lib/libthread.a - 664 sys sys 1045538129 71494
 386/lib/libventi.a - 664 sys sys 1045538129 97938
 386/mbr - 775 sys sys 1022125974 407
@@ -563,7 +566,6 @@ acme/bin/386/adict - 775 sys sys 1015011247 99806
 acme/bin/386/mkwnew - 775 sys sys 1045538113 39475
 acme/bin/386/spout - 775 sys sys 1045538113 60277
 acme/bin/386/win - 775 sys sys 1045538114 178505
-acme/bin/386/wnew - 775 sys sys 1015011247 51934
 acme/bin/Battery - 775 sys sys 1017457907 451
 acme/bin/Perl - 775 sys sys 1015011260 230
 acme/bin/README - 664 sys sys 1015011256 174
@@ -617,6 +619,7 @@ acme/bin/source/win/pipe.c - 664 sys sys 1017679345 2807
 acme/bin/source/win/util.c - 664 sys sys 1017679346 1169
 acme/bin/source/win/win.c - 664 sys sys 1015011255 4240
 acme/bin/unind - 755 sys sys 1015011256 27
+acme/bin/wnew - 775 sys sys 1046184422 84
 acme/mail - 20000000775 sys sys 1015011265 0
 acme/mail/386 - 20000000775 sys sys 1015011538 0
 acme/mail/386/Mail - 775 sys sys 1045538114 176629
@@ -2667,7 +2670,7 @@ lib/namespace.ftp - 664 sys sys 1020313578 373
 lib/namespace.httpd - 664 sys sys 984695868 1209
 lib/ndb - 20000000775 sys sys 959260770 0
 lib/ndb/auth - 664 sys sys 959260674 586
-lib/ndb/common - 664 sys sys 1021579967 5168
+lib/ndb/common - 664 sys sys 1046232038 5226
 lib/ndb/consoledb - 664 sys sys 960222421 95
 lib/ndb/dhcp - 20000000775 sys sys 959260749 0
 lib/ndb/dnsdump - 664 sys sys 1032057649 61
@@ -2695,7 +2698,7 @@ lib/tftpd - 20000000775 sys sys 944944178 0
 lib/unicode - 664 sys sys 958440028 223312
 lib/unicode.notice - 664 sys sys 958504386 1398
 lib/units - 664 sys sys 1014923483 9984
-lib/vgadb - 664 sys sys 1039156374 28040
+lib/vgadb - 664 sys sys 1046203906 28125
 lib/volcanoes - 664 sys sys 944944024 119831
 lib/words - 664 sys sys 1014923442 247097
 lp - 20000000775 sys sys 958199268 0
@@ -4411,7 +4414,7 @@ sys/man/1/2c - 664 sys sys 1016731553 7349
 sys/man/1/2l - 664 sys sys 944959675 4074
 sys/man/1/INDEX - 664 sys sys 1045538129 2900
 sys/man/1/INDEX.html - 664 sys sys 1026845791 15882
-sys/man/1/acid - 664 sys sys 1016833872 9422
+sys/man/1/acid - 664 sys sys 1046201556 9731
 sys/man/1/acme - 664 sys sys 1019828741 17587
 sys/man/1/ar - 664 sys sys 1030970308 3109
 sys/man/1/ascii - 664 sys sys 957920005 2733
@@ -5194,8 +5197,8 @@ sys/src/9/pc/vgamga4xx.c - 664 sys sys 1015014527 11122
 sys/src/9/pc/vganeomagic.c - 664 sys sys 1032375144 10693
 sys/src/9/pc/vganvidia.c - 664 sys sys 1020284821 6841
 sys/src/9/pc/vgargb524.c - 664 sys sys 1015014527 4235
-sys/src/9/pc/vgas3.c - 664 sys sys 1015014527 11832
-sys/src/9/pc/vgasavage.c - 664 sys sys 1026847655 16130
+sys/src/9/pc/vgas3.c - 664 sys sys 1046203924 11986
+sys/src/9/pc/vgasavage.c - 664 sys sys 1046203931 16194
 sys/src/9/pc/vgat2r4.c - 664 sys sys 1015014528 10355
 sys/src/9/pc/vgatvp3020.c - 664 sys sys 1015014528 4491
 sys/src/9/pc/vgatvp3026.c - 664 sys sys 1015014528 3940
@@ -5298,6 +5301,44 @@ sys/src/ape/cmd - 20000000775 sys sys 1014921977 0
 sys/src/ape/cmd/README - 664 sys sys 1014921974 2953
 sys/src/ape/cmd/basename.c - 664 sys sys 1014921974 729
 sys/src/ape/cmd/cc.c - 664 sys sys 1023741702 7363
+sys/src/ape/cmd/diff - 20000000775 sys sys 1046198752 0
+sys/src/ape/cmd/diff/COPYING - 664 sys sys 1046198741 17982
+sys/src/ape/cmd/diff/ChangeLog - 664 sys sys 1046198741 66704
+sys/src/ape/cmd/diff/FREEBSD-upgrade - 664 sys sys 1046198741 354
+sys/src/ape/cmd/diff/NEWS - 664 sys sys 1046198742 4827
+sys/src/ape/cmd/diff/README - 664 sys sys 1046198742 424
+sys/src/ape/cmd/diff/analyze.c - 664 sys sys 1046198742 31324
+sys/src/ape/cmd/diff/cmpbuf.c - 664 sys sys 1046198743 1185
+sys/src/ape/cmd/diff/cmpbuf.h - 664 sys sys 1046198743 833
+sys/src/ape/cmd/diff/config.h - 664 sys sys 1046198743 3406
+sys/src/ape/cmd/diff/context.c - 664 sys sys 1046198743 13241
+sys/src/ape/cmd/diff/diagmeet.note - 664 sys sys 1046198743 1069
+sys/src/ape/cmd/diff/diff.c - 664 sys sys 1046198744 30831
+sys/src/ape/cmd/diff/diff.h - 664 sys sys 1046198744 11767
+sys/src/ape/cmd/diff/diff.texi - 664 sys sys 1046198745 150414
+sys/src/ape/cmd/diff/diff3.c - 664 sys sys 1046198745 50145
+sys/src/ape/cmd/diff/dir.c - 664 sys sys 1046198745 6178
+sys/src/ape/cmd/diff/ed.c - 664 sys sys 1046198745 5288
+sys/src/ape/cmd/diff/fnmatch.c - 664 sys sys 1046198746 4105
+sys/src/ape/cmd/diff/fnmatch.h - 664 sys sys 1046198746 1416
+sys/src/ape/cmd/diff/getopt.c - 664 sys sys 1046198746 21723
+sys/src/ape/cmd/diff/getopt.h - 664 sys sys 1046198746 4412
+sys/src/ape/cmd/diff/getopt1.c - 664 sys sys 1046198747 4228
+sys/src/ape/cmd/diff/ifdef.c - 664 sys sys 1046198747 10041
+sys/src/ape/cmd/diff/install-sh - 775 sys sys 1046198747 4771
+sys/src/ape/cmd/diff/io.c - 664 sys sys 1046198748 20341
+sys/src/ape/cmd/diff/mkfile - 664 sys sys 1046198748 557
+sys/src/ape/cmd/diff/normal.c - 664 sys sys 1046198748 2214
+sys/src/ape/cmd/diff/prepend_args.c - 664 sys sys 1046198748 2538
+sys/src/ape/cmd/diff/prepend_args.h - 664 sys sys 1046198749 979
+sys/src/ape/cmd/diff/regex.c - 664 sys sys 1046198749 186345
+sys/src/ape/cmd/diff/regex.h - 664 sys sys 1046198749 19353
+sys/src/ape/cmd/diff/sdiff.c - 664 sys sys 1046198750 23417
+sys/src/ape/cmd/diff/side.c - 664 sys sys 1046198750 7012
+sys/src/ape/cmd/diff/system.h - 664 sys sys 1046198750 5744
+sys/src/ape/cmd/diff/util.c - 664 sys sys 1046198750 18335
+sys/src/ape/cmd/diff/version.c - 664 sys sys 1046198750 94
+sys/src/ape/cmd/diff/xmalloc.c - 664 sys sys 1046198751 1828
 sys/src/ape/cmd/dirname.c - 664 sys sys 1039388400 539
 sys/src/ape/cmd/expr - 20000000775 sys sys 1014921975 0
 sys/src/ape/cmd/expr/expr.y - 664 sys sys 1014921975 5394
@@ -5407,6 +5448,48 @@ sys/src/ape/cmd/make/main.c - 664 sys sys 1014921974 7652
 sys/src/ape/cmd/make/misc.c - 664 sys sys 1014921974 7176
 sys/src/ape/cmd/make/mkfile - 664 sys sys 1014921974 337
 sys/src/ape/cmd/mkfile - 664 sys sys 1014921973 522
+sys/src/ape/cmd/patch - 20000000775 sys sys 1046198789 0
+sys/src/ape/cmd/patch/COPYING - 664 sys sys 1046198780 18007
+sys/src/ape/cmd/patch/ChangeLog - 664 sys sys 1046198780 66042
+sys/src/ape/cmd/patch/FREEBSD-upgrade - 664 sys sys 1046198780 1113
+sys/src/ape/cmd/patch/INSTALL - 664 sys sys 1046198781 7832
+sys/src/ape/cmd/patch/Makefile.in - 664 sys sys 1046198781 4495
+sys/src/ape/cmd/patch/NEWS - 664 sys sys 1046198781 7498
+sys/src/ape/cmd/patch/README - 664 sys sys 1046198781 2385
+sys/src/ape/cmd/patch/acconfig.h - 664 sys sys 1046198781 452
+sys/src/ape/cmd/patch/addext.c - 664 sys sys 1046198782 2605
+sys/src/ape/cmd/patch/argmatch.c - 664 sys sys 1046198782 2652
+sys/src/ape/cmd/patch/argmatch.h - 664 sys sys 1046198782 357
+sys/src/ape/cmd/patch/backupfile.c - 664 sys sys 1046198782 6739
+sys/src/ape/cmd/patch/backupfile.h - 664 sys sys 1046198783 1662
+sys/src/ape/cmd/patch/basename.c - 664 sys sys 1046198783 675
+sys/src/ape/cmd/patch/common.h - 664 sys sys 1046198783 6153
+sys/src/ape/cmd/patch/config.h - 664 sys sys 1046198783 3428
+sys/src/ape/cmd/patch/config.hin - 664 sys sys 1046198783 3406
+sys/src/ape/cmd/patch/configure - 775 sys sys 1046198784 70943
+sys/src/ape/cmd/patch/configure.in - 664 sys sys 1046198784 3545
+sys/src/ape/cmd/patch/getopt.c - 664 sys sys 1046198784 30164
+sys/src/ape/cmd/patch/getopt.h - 664 sys sys 1046198784 4558
+sys/src/ape/cmd/patch/getopt1.c - 664 sys sys 1046198784 4518
+sys/src/ape/cmd/patch/inp.c - 664 sys sys 1046198785 11253
+sys/src/ape/cmd/patch/inp.h - 664 sys sys 1046198785 340
+sys/src/ape/cmd/patch/install-sh - 775 sys sys 1046198785 5490
+sys/src/ape/cmd/patch/maketime.c - 664 sys sys 1046198786 10415
+sys/src/ape/cmd/patch/maketime.h - 664 sys sys 1046198786 1356
+sys/src/ape/cmd/patch/mkfile - 664 sys sys 1046198786 487
+sys/src/ape/cmd/patch/partime.c - 664 sys sys 1046198787 18935
+sys/src/ape/cmd/patch/partime.h - 664 sys sys 1046198787 2136
+sys/src/ape/cmd/patch/patch.1 - 664 sys sys 1046198787 29906
+sys/src/ape/cmd/patch/patch.c - 664 sys sys 1046198787 33892
+sys/src/ape/cmd/patch/patchlevel.h - 664 sys sys 1046198788 28
+sys/src/ape/cmd/patch/pch.c - 664 sys sys 1046198788 47529
+sys/src/ape/cmd/patch/pch.h - 664 sys sys 1046198788 893
+sys/src/ape/cmd/patch/quotearg.c - 664 sys sys 1046198788 2844
+sys/src/ape/cmd/patch/quotearg.h - 664 sys sys 1046198788 234
+sys/src/ape/cmd/patch/util.c - 664 sys sys 1046198789 24520
+sys/src/ape/cmd/patch/util.h - 664 sys sys 1046198789 1553
+sys/src/ape/cmd/patch/version.c - 664 sys sys 1046198789 869
+sys/src/ape/cmd/patch/version.h - 664 sys sys 1046198789 125
 sys/src/ape/cmd/pax - 20000000775 sys sys 1014921975 0
 sys/src/ape/cmd/pax/Makefile - 664 sys sys 1014921975 3654
 sys/src/ape/cmd/pax/PATCHLEVEL - 664 sys sys 1014921975 64
@@ -6373,16 +6456,16 @@ sys/src/cmd/9nfs/unixnames.c - 664 sys sys 1040952457 5974
 sys/src/cmd/9nfs/xfile.c - 664 sys sys 1017337816 1847
 sys/src/cmd/aan.c - 664 sys sys 1019856827 9758
 sys/src/cmd/acid - 20000000775 sys sys 944960739 0
-sys/src/cmd/acid/acid.h - 664 sys sys 1014924907 4340
+sys/src/cmd/acid/acid.h - 664 sys sys 1046198958 4354
 sys/src/cmd/acid/builtin.c - 664 sys sys 1014924908 19979
-sys/src/cmd/acid/dbg.y - 664 sys sys 944960739 5417
+sys/src/cmd/acid/dbg.y - 664 sys sys 1046198962 5450
 sys/src/cmd/acid/dot.c - 664 sys sys 944960739 2161
 sys/src/cmd/acid/exec.c - 664 sys sys 1016833876 8187
-sys/src/cmd/acid/expr.c - 664 sys sys 953242926 14981
-sys/src/cmd/acid/lex.c - 664 sys sys 1016731555 7839
+sys/src/cmd/acid/expr.c - 664 sys sys 1046198961 15093
+sys/src/cmd/acid/lex.c - 664 sys sys 1046198960 7861
 sys/src/cmd/acid/list.c - 664 sys sys 944960738 3671
-sys/src/cmd/acid/main.c - 664 sys sys 1014924908 8413
-sys/src/cmd/acid/mkfile - 664 sys sys 952627560 288
+sys/src/cmd/acid/main.c - 664 sys sys 1046198959 8475
+sys/src/cmd/acid/mkfile - 664 sys sys 1046199006 366
 sys/src/cmd/acid/print.c - 664 sys sys 984756705 6840
 sys/src/cmd/acid/proc.c - 664 sys sys 1014924908 4513
 sys/src/cmd/acid/util.c - 664 sys sys 944960738 4297
@@ -6643,7 +6726,7 @@ sys/src/cmd/aux/vga/tvp3026.c - 664 sys sys 1014925013 3580
 sys/src/cmd/aux/vga/tvp3026clock.c - 664 sys sys 1014925013 1960
 sys/src/cmd/aux/vga/vga.c - 664 sys sys 1014925013 9305
 sys/src/cmd/aux/vga/vga.h - 664 sys sys 1025416295 10154
-sys/src/cmd/aux/vga/virge.c - 664 sys sys 1025416299 16801
+sys/src/cmd/aux/vga/virge.c - 664 sys sys 1046203911 17106
 sys/src/cmd/aux/vga/vision864.c - 664 sys sys 1014925014 2325
 sys/src/cmd/aux/vga/vision964.c - 664 sys sys 1014925014 3426
 sys/src/cmd/aux/vga/vision968.c - 664 sys sys 1014925014 3959
@@ -10515,8 +10598,8 @@ sys/src/cmd/vnc/rre.c - 664 sys sys 1044880750 11496
 sys/src/cmd/vnc/screen.c - 664 sys sys 1044880750 7537
 sys/src/cmd/vnc/screen.h - 664 sys sys 1044880750 880
 sys/src/cmd/vnc/vnc.h - 664 sys sys 1044880750 2626
-sys/src/cmd/vnc/vncs.c - 664 sys sys 1045758533 20939
-sys/src/cmd/vnc/vncs.h - 664 sys sys 1044880750 890
+sys/src/cmd/vnc/vncs.c - 664 sys sys 1046184848 21022
+sys/src/cmd/vnc/vncs.h - 664 sys sys 1046200146 908
 sys/src/cmd/vnc/vncv.c - 664 sys sys 1044880750 3093
 sys/src/cmd/vnc/vncv.h - 664 sys sys 1044880750 643
 sys/src/cmd/vnc/wsys.c - 664 sys sys 1045758533 4049
@@ -11675,7 +11758,7 @@ sys/src/libstdio/vsprintf.c - 664 sys sys 1022112162 246
 sys/src/libsunrpc - 20000000775 sys sys 1045589225 0
 sys/src/libsunrpc/COPYING - 664 sys sys 1045589219 1269
 sys/src/libsunrpc/authunix.c - 664 sys sys 1045589219 1477
-sys/src/libsunrpc/client.c - 664 sys sys 1045941140 8862
+sys/src/libsunrpc/client.c - 664 sys sys 1046184855 8902
 sys/src/libsunrpc/emalloc.c - 664 sys sys 1045589220 397
 sys/src/libsunrpc/error.c - 664 sys sys 1045589221 819
 sys/src/libsunrpc/fd.c - 664 sys sys 1045589221 1734

+ 106 - 0
dist/replica/plan9.log

@@ -17962,3 +17962,109 @@
 1045935042 0 c sys/src/libmemlayer/draw.c - 664 sys sys 1045933975 4082
 1045941599 0 c sys/src/libsunrpc/client.c - 664 sys sys 1045941140 8862
 1046043045 0 c sys/man/2/sechash - 664 sys sys 1046042040 3016
+1046183430 0 c 386/bin/vncs - 775 sys sys 1046182501 438050
+1046183430 1 c 386/bin/aux/nfsmount - 775 sys sys 1046182497 231137
+1046183430 2 c 386/bin/aux/portmap - 775 sys sys 1046182498 140690
+1046183430 3 c 386/bin/nfs - 775 sys sys 1046182499 315491
+1046183430 4 c 386/lib/libmemlayer.a - 664 sys sys 1046182506 47256
+1046183430 5 c 386/lib/libsunrpc.a - 664 sys sys 1046182507 355304
+1046184225 0 d acme/bin/386/wnew - 775 sys sys 1015011247 0
+1046184448 0 a acme/bin/wnew - 775 sys sys 1046184422 84
+1046185230 0 c sys/src/cmd/vnc/vncs.c - 664 sys sys 1046184848 21022
+1046185230 1 c sys/src/libsunrpc/client.c - 664 sys sys 1046184855 8902
+1046198844 0 a 386/bin/ape/diff - 775 sys sys 1046198795 345686
+1046198844 1 a 386/bin/ape/diff3 - 775 sys sys 1046198796 187364
+1046198844 2 a 386/bin/ape/patch - 775 sys sys 1046198797 298449
+1046198844 3 a sys/src/ape/cmd/diff - 20000000775 sys sys 1046198752 0
+1046198844 4 a sys/src/ape/cmd/diff/COPYING - 664 sys sys 1046198741 17982
+1046198844 5 a sys/src/ape/cmd/diff/ChangeLog - 664 sys sys 1046198741 66704
+1046198844 6 a sys/src/ape/cmd/diff/FREEBSD-upgrade - 664 sys sys 1046198741 354
+1046198844 7 a sys/src/ape/cmd/diff/NEWS - 664 sys sys 1046198742 4827
+1046198844 8 a sys/src/ape/cmd/diff/README - 664 sys sys 1046198742 424
+1046198844 9 a sys/src/ape/cmd/diff/analyze.c - 664 sys sys 1046198742 31324
+1046198844 10 a sys/src/ape/cmd/diff/cmpbuf.c - 664 sys sys 1046198743 1185
+1046198844 11 a sys/src/ape/cmd/diff/cmpbuf.h - 664 sys sys 1046198743 833
+1046198844 12 a sys/src/ape/cmd/diff/config.h - 664 sys sys 1046198743 3406
+1046198844 13 a sys/src/ape/cmd/diff/context.c - 664 sys sys 1046198743 13241
+1046198844 14 a sys/src/ape/cmd/diff/diagmeet.note - 664 sys sys 1046198743 1069
+1046198844 15 a sys/src/ape/cmd/diff/diff.c - 664 sys sys 1046198744 30831
+1046198844 16 a sys/src/ape/cmd/diff/diff.h - 664 sys sys 1046198744 11767
+1046198844 17 a sys/src/ape/cmd/diff/diff.texi - 664 sys sys 1046198745 150414
+1046198844 18 a sys/src/ape/cmd/diff/diff3.c - 664 sys sys 1046198745 50145
+1046198844 19 a sys/src/ape/cmd/diff/dir.c - 664 sys sys 1046198745 6178
+1046198844 20 a sys/src/ape/cmd/diff/ed.c - 664 sys sys 1046198745 5288
+1046198844 21 a sys/src/ape/cmd/diff/fnmatch.c - 664 sys sys 1046198746 4105
+1046198844 22 a sys/src/ape/cmd/diff/fnmatch.h - 664 sys sys 1046198746 1416
+1046198844 23 a sys/src/ape/cmd/diff/getopt.c - 664 sys sys 1046198746 21723
+1046198844 24 a sys/src/ape/cmd/diff/getopt.h - 664 sys sys 1046198746 4412
+1046198844 25 a sys/src/ape/cmd/diff/getopt1.c - 664 sys sys 1046198747 4228
+1046198844 26 a sys/src/ape/cmd/diff/ifdef.c - 664 sys sys 1046198747 10041
+1046198844 27 a sys/src/ape/cmd/diff/install-sh - 775 sys sys 1046198747 4771
+1046198844 28 a sys/src/ape/cmd/diff/io.c - 664 sys sys 1046198748 20341
+1046198844 29 a sys/src/ape/cmd/diff/mkfile - 664 sys sys 1046198748 557
+1046198844 30 a sys/src/ape/cmd/diff/normal.c - 664 sys sys 1046198748 2214
+1046198844 31 a sys/src/ape/cmd/diff/prepend_args.c - 664 sys sys 1046198748 2538
+1046198844 32 a sys/src/ape/cmd/diff/prepend_args.h - 664 sys sys 1046198749 979
+1046198844 33 a sys/src/ape/cmd/diff/regex.c - 664 sys sys 1046198749 186345
+1046198844 34 a sys/src/ape/cmd/diff/regex.h - 664 sys sys 1046198749 19353
+1046198844 35 a sys/src/ape/cmd/diff/sdiff.c - 664 sys sys 1046198750 23417
+1046198844 36 a sys/src/ape/cmd/diff/side.c - 664 sys sys 1046198750 7012
+1046198844 37 a sys/src/ape/cmd/diff/system.h - 664 sys sys 1046198750 5744
+1046198844 38 a sys/src/ape/cmd/diff/util.c - 664 sys sys 1046198750 18335
+1046198844 39 a sys/src/ape/cmd/diff/version.c - 664 sys sys 1046198750 94
+1046198844 40 a sys/src/ape/cmd/diff/xmalloc.c - 664 sys sys 1046198751 1828
+1046198844 41 a sys/src/ape/cmd/patch - 20000000775 sys sys 1046198789 0
+1046198844 42 a sys/src/ape/cmd/patch/COPYING - 664 sys sys 1046198780 18007
+1046198844 43 a sys/src/ape/cmd/patch/ChangeLog - 664 sys sys 1046198780 66042
+1046198844 44 a sys/src/ape/cmd/patch/FREEBSD-upgrade - 664 sys sys 1046198780 1113
+1046198844 45 a sys/src/ape/cmd/patch/INSTALL - 664 sys sys 1046198781 7832
+1046198844 46 a sys/src/ape/cmd/patch/Makefile.in - 664 sys sys 1046198781 4495
+1046198844 47 a sys/src/ape/cmd/patch/NEWS - 664 sys sys 1046198781 7498
+1046198844 48 a sys/src/ape/cmd/patch/README - 664 sys sys 1046198781 2385
+1046198844 49 a sys/src/ape/cmd/patch/acconfig.h - 664 sys sys 1046198781 452
+1046198844 50 a sys/src/ape/cmd/patch/addext.c - 664 sys sys 1046198782 2605
+1046198844 51 a sys/src/ape/cmd/patch/argmatch.c - 664 sys sys 1046198782 2652
+1046198844 52 a sys/src/ape/cmd/patch/argmatch.h - 664 sys sys 1046198782 357
+1046198844 53 a sys/src/ape/cmd/patch/backupfile.c - 664 sys sys 1046198782 6739
+1046198844 54 a sys/src/ape/cmd/patch/backupfile.h - 664 sys sys 1046198783 1662
+1046198844 55 a sys/src/ape/cmd/patch/basename.c - 664 sys sys 1046198783 675
+1046198844 56 a sys/src/ape/cmd/patch/common.h - 664 sys sys 1046198783 6153
+1046198844 57 a sys/src/ape/cmd/patch/config.h - 664 sys sys 1046198783 3428
+1046198844 58 a sys/src/ape/cmd/patch/config.hin - 664 sys sys 1046198783 3406
+1046198844 59 a sys/src/ape/cmd/patch/configure - 775 sys sys 1046198784 70943
+1046198844 60 a sys/src/ape/cmd/patch/configure.in - 664 sys sys 1046198784 3545
+1046198844 61 a sys/src/ape/cmd/patch/getopt.c - 664 sys sys 1046198784 30164
+1046198844 62 a sys/src/ape/cmd/patch/getopt.h - 664 sys sys 1046198784 4558
+1046198844 63 a sys/src/ape/cmd/patch/getopt1.c - 664 sys sys 1046198784 4518
+1046198844 64 a sys/src/ape/cmd/patch/inp.c - 664 sys sys 1046198785 11253
+1046198844 65 a sys/src/ape/cmd/patch/inp.h - 664 sys sys 1046198785 340
+1046198844 66 a sys/src/ape/cmd/patch/install-sh - 775 sys sys 1046198785 5490
+1046198844 67 a sys/src/ape/cmd/patch/maketime.c - 664 sys sys 1046198786 10415
+1046198844 68 a sys/src/ape/cmd/patch/maketime.h - 664 sys sys 1046198786 1356
+1046198844 69 a sys/src/ape/cmd/patch/mkfile - 664 sys sys 1046198786 487
+1046198844 70 a sys/src/ape/cmd/patch/partime.c - 664 sys sys 1046198787 18935
+1046198844 71 a sys/src/ape/cmd/patch/partime.h - 664 sys sys 1046198787 2136
+1046198844 72 a sys/src/ape/cmd/patch/patch.1 - 664 sys sys 1046198787 29906
+1046198844 73 a sys/src/ape/cmd/patch/patch.c - 664 sys sys 1046198787 33892
+1046198844 74 a sys/src/ape/cmd/patch/patchlevel.h - 664 sys sys 1046198788 28
+1046198844 75 a sys/src/ape/cmd/patch/pch.c - 664 sys sys 1046198788 47529
+1046198844 76 a sys/src/ape/cmd/patch/pch.h - 664 sys sys 1046198788 893
+1046198844 77 a sys/src/ape/cmd/patch/quotearg.c - 664 sys sys 1046198788 2844
+1046198844 78 a sys/src/ape/cmd/patch/quotearg.h - 664 sys sys 1046198788 234
+1046198844 79 a sys/src/ape/cmd/patch/util.c - 664 sys sys 1046198789 24520
+1046198844 80 a sys/src/ape/cmd/patch/util.h - 664 sys sys 1046198789 1553
+1046198844 81 a sys/src/ape/cmd/patch/version.c - 664 sys sys 1046198789 869
+1046198844 82 a sys/src/ape/cmd/patch/version.h - 664 sys sys 1046198789 125
+1046199016 0 c sys/src/cmd/acid/acid.h - 664 sys sys 1046198958 4354
+1046199016 1 c sys/src/cmd/acid/dbg.y - 664 sys sys 1046198962 5450
+1046199016 2 c sys/src/cmd/acid/expr.c - 664 sys sys 1046198961 15093
+1046199016 3 c sys/src/cmd/acid/lex.c - 664 sys sys 1046198960 7861
+1046199016 4 c sys/src/cmd/acid/main.c - 664 sys sys 1046198959 8475
+1046199016 5 c sys/src/cmd/acid/mkfile - 664 sys sys 1046199006 366
+1046200149 0 c sys/src/cmd/vnc/vncs.h - 664 sys sys 1046200146 908
+1046203231 0 c sys/man/1/acid - 664 sys sys 1046201556 9731
+1046205032 0 c lib/vgadb - 664 sys sys 1046203906 28125
+1046205032 1 c sys/src/9/pc/vgas3.c - 664 sys sys 1046203924 11986
+1046205032 2 c sys/src/9/pc/vgasavage.c - 664 sys sys 1046203931 16194
+1046205032 3 c sys/src/cmd/aux/vga/virge.c - 664 sys sys 1046203911 17106
+1046232065 0 c lib/ndb/common - 664 sys sys 1046232038 5226

+ 4 - 1
lib/ndb/common

@@ -135,7 +135,7 @@ tcp=x400-snd port=104
 tcp=csnet-ns port=105
 tcp=pop-2 port=109
 tcp=pop3 port=110
-tcp=sunrpc port=111
+tcp=portmap port=111
 tcp=uucp-path port=117
 tcp=nntp port=119
 tcp=netbios port=139
@@ -167,6 +167,7 @@ tcp=imaps port=993
 tcp=pop3s port=995
 tcp=ingreslock port=1524
 tcp=pptp port=1723
+tcp=nfs port=2049
 tcp=webster port=2627
 tcp=weather port=3000
 tcp=secstore port=5356
@@ -209,9 +210,11 @@ udp=bootpc port=68
 udp=bootp port=67
 udp=domain port=53
 udp=dns port=53
+udp=portmap port=111
 udp=ntp port=123
 udp=snmp port=161
 udp=rip port=520
+udp=nfs port=2049
 udp=bfs port=2201
 udp=virgil port=2202
 udp=bandt2 port=7331

+ 2 - 0
lib/vgadb

@@ -139,6 +139,8 @@ ctlr
 	# vid=0x5333 did=0x8A20		# Savage 3D, not supported
 	# vid=0x5333 did=0x8A21		# Savage 3DMV, not supported
 	vid=0x5333 did=0x8A22		# Savage 4
+	vid=0x5333 did=0x8A25		# ProSavage PN133
+	vid=0x5333 did=0x8A26		# ProSavage KN133 
 	vid=0x5333 did=0x883D		# ViRGE VX
 	vid=0x5333 did=0x8C01		# ViRGE MX
 	vid=0x5333 did=0x8C03		# ViRGE MXP

+ 20 - 0
sys/man/1/acid

@@ -158,12 +158,32 @@ Statements are
 .br
 .BI defn " name" ( args ") {" " statement \fP}
 .br
+.BI defn " name"
+.br
+.IB name ( args )
+.br
+.BI builtin " name" ( args )
+.br
 .BI local " name
 .br
 .BI return " expr
 .br
 .BR whatis " [ \fI name \fP]
 .PP
+The statement
+.B defn
+.I name
+clears the definition for
+.IR name .
+A
+.B defn
+may override a built-in function;
+prefixing a function call with
+.B builtin
+ignores any overriding
+.BR defn ,
+forcing the use of the built-in function.
+.PP
 Here is a partial list of functions; see the manual for a complete list.
 .TF asm(address)
 .TP

+ 8 - 0
sys/src/9/pc/vgas3.c

@@ -18,6 +18,8 @@ enum {
 	SAVAGE3D	= 0x8A20,	/* PCI DID */
 	SAVAGE3DMV	= 0x8A21,
 	SAVAGE4		= 0x8A22,
+	PROSAVAGEP	= 0x8A25,
+	PROSAVAGEK	= 0x8A26,
 	SAVAGEMXMV	= 0x8C10,
 	SAVAGEMX	= 0x8C11,
 	SAVAGEIXMV	= 0x8C12,
@@ -127,6 +129,8 @@ s3linear(VGAscr* scr, int* size, int* align)
 		id = (vgaxi(Crtx, 0x2D)<<8)|vgaxi(Crtx, 0x2E);
 		switch(id){			/* find mmio */
 		case SAVAGE4:
+		case PROSAVAGEP:
+		case PROSAVAGEK:
 		case SUPERSAVAGEIXC16:
 			/*
 			 * We could assume that the MMIO registers
@@ -227,6 +231,8 @@ s3load(VGAscr* scr, Cursor* curs)
 	case SAVAGEMXMV:
 	case SAVAGEIXMV:
 	case SAVAGE4:
+	case PROSAVAGEP:
+	case PROSAVAGEK:
 	case SUPERSAVAGEIXC16:
 		dolock = 0;
 		p += scr->storage;
@@ -577,6 +583,8 @@ s3drawinit(VGAscr *scr)
 		break;
 	case SUPERSAVAGEIXC16:
 	case SAVAGE4:
+	case PROSAVAGEP:
+	case PROSAVAGEK:
 		/* scr->mmio is set by s3linear */
 		savageinit(scr);
 		break;

+ 6 - 3
sys/src/9/pc/vgasavage.c

@@ -18,7 +18,8 @@ enum {
 	SAVAGE3D	= 0x8A20,	/* PCI DID */
 	SAVAGE3DMV	= 0x8A21,
 	SAVAGE4		= 0x8A22,
-	SAVAGE4A	= 0x8A26,
+	PROSAVAGEP	= 0x8A25,
+	PROSAVAGEK	= 0x8A26,
 	SAVAGEMXMV	= 0x8C10,
 	SAVAGEMX	= 0x8C11,
 	SAVAGEIXMV	= 0x8C12,
@@ -363,7 +364,8 @@ savagewaitidle(VGAscr *scr)
 
 	switch(scr->id){
 	case SAVAGE4:
-	case SAVAGE4A:
+	case PROSAVAGEP:
+	case PROSAVAGEK:
 		/* wait for engine idle and FIFO empty */
 		statw = (ulong*)((uchar*)scr->mmio+AltStatus0);
 		mask = CBEMask | Ge2Idle;
@@ -492,7 +494,8 @@ savageinit(VGAscr *scr)
 	/* if you add chip IDs here be sure to update savagewaitidle */
 	switch(scr->id){
 	case SAVAGE4:
-	case SAVAGE4A:
+	case PROSAVAGEP:
+	case PROSAVAGEK:
 	case SAVAGEIXMV:
 	case SUPERSAVAGEIXC16:
 	case SAVAGEMXMV:

+ 339 - 0
sys/src/ape/cmd/diff/COPYING

@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.

+ 1766 - 0
sys/src/ape/cmd/diff/ChangeLog

@@ -0,0 +1,1766 @@
+Sat Oct  1 05:24:19 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* Version 2.7 released.
+
+	* configure.in (AC_HEADER_SYS_WAIT): Add.
+	(AC_CHECK_HEADERS): Remove sys/wait.h.
+	(AC_CHECK_FUNCS): Add tmpnam.
+	* system.h (<sys/wait.h>, WEXITSTATUS): Use simpler scheme
+	now that HAVE_SYS_WAIT_H is not set on hosts
+	that are incompatible with Posix applications.
+
+	* util.c (dir_file_pathname): Use filename_lastdirchar not strrchr.
+	* sdiff.c (expand_name): Likewise.
+	(private_tempnam): Use tmpnam if HAVE_TMPNAM; this simplifies porting.
+	(exists, letters): Omit if HAVE_TMPNAM.
+
+	* diff3.c (read_diff): If STAT_BLOCKSIZE yields zero,
+	adjust it to a more reasonable value.
+
+Sat Sep 24 20:36:40 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* sdiff.c (exists, private_tempname): Adopt latest GNU libc algorithm.
+	(private_tempnam): Specialize for sdiff to avoid portability problems.
+
+Thu Sep 22 16:47:00 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* configure.in (AC_ARG_PROGRAM): Added.
+	(AC_OUTPUT): Add [date > stamp-h].
+
+	* Makefile.in (DEFAULT_EDITOR_PROGRAM, DIFF_PROGRAM, LIBOBJS,
+	NULL_DEVICE, PR_PROGRAM, PROGRAMS): New variables.
+	(check, stamp-h.in, cmp.o, util.o): New targets.
+	(edit_program_name): New variable; replaces old binprefix method.
+	(install, uninstall): Use it.
+	(binprefix): Removed.
+	(distfiles): Add stamp-h.in.
+	(clean): Clean stamp-h.
+	(config.hin, config.h): Use time stamp files.
+	(cmp_o): Add $(LIBOBJS).
+	(install): Install info files from srcdir if they're not in `.'.
+
+	* cmp.c, io.c (word): Don't define if already defined.
+
+	* comp.c (main): Use setmode, not open(..., O_BINARY); this gets stdin.
+	Use NULL_DEVICE instead of "/dev/null".
+	(cmp): Use %lu instead of %ld when it is more likely to be right.
+
+	* diff.h (PR_FILE_NAME): Rename to PR_PROGRAM and move to Makefile.in,
+	util.c.
+
+	* diff3.c (main): Give proper diagnostic if too many labels were given.
+	(read_diff): Use SYSTEM_QUOTE_ARG.
+
+	* system.h: <string.h>: Include if HAVE_STRING_H, too.
+	<ctype.h>: Include here.  All includers changed.
+	(CTYPE_DOMAIN, ISDIGIT, ISPRINT, ISSPACE, ISUPPER): New macros that
+	work around common <ctype.h> problems.
+	(O_BINARY): Remove.
+	(SYSTEM_QUOTE_ARG): New macros.
+
+	* diff.c: Add comment.
+
+	* util.c (PR_PROGRAM): Moved here from diff.h.
+	(begin_output): Use SYSTEM_QUOTE_ARG.
+
+	* io.c (read_files): Set mode to binary before returning 1.
+
+	* sdiff.c (TMPDIR_ENV): New macro.
+	(DEFAULT_EDITOR_PROGRAM): Renamed from DEFAULT_EDITOR for consistency.
+	(expand_name): Change `isdir' to `is_dir' to avoid theoretical ctype
+	namespace contamination.
+	(main): Use SYSTEM_QUOTE_ARG.
+	(private_tempnam): Don't access "/tmp" directly; use PVT_tmpdir.
+
+Tue Sep 13 18:46:43 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* configure.in (AC_FUNC_MEMCHR): Remove.  Autoconf didn't adopt this,
+	since we need not worry about an old experimental library
+	where memchr didn't work.
+	(AC_FUNC_MEMCMP): Not needed, since we only test for equality.
+	(AC_REPLACE_FUNCS): Add test for memchr.
+	(AC_CHECK_FUNCS): Check for memchr, not memcpy, since it'll be cached.
+	(AC_CHECK_HEADERS): Add string.h; regex.c uses on some old hosts.
+
+	* system.h (memcmp): Define in terms of bcmp.
+	Use HAVE_MEMCHR to test for all mem* routines.
+
+	* Makefile.in (srcs): Remove memcmp.c.
+	We use bcmp if memcmp doesn't work, since we only test for equality.
+
+Mon Sep 12 15:52:22 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* configure.in (AC_CONFIG_HEADER): Rename config.h.in to config.hin.
+	(AC_ISC_POSIX, AC_MINIX): Go back to these old names for Autoconf 2.
+	(AC_CHECK_HEADERS): Remove now-redundant check for <string.h>.
+	(AC_CHECK_FUNCS): Check for strchr.
+	(AC_FUNC_MEMCHR, AC_FUNC_MEMCMP, AC_CHECK_FUNCS): Use special-purpose
+	macros when suitable.
+	* memcmp.c: New file.
+	* Makefile.in (CPPFLAGS, DEFS, CFLAGS, LDFLAGS, prefix, exec_prefix):
+	Default to autoconf-specified strings.
+	(COMPILE): Use the defaults.
+	(srcs): Add memcmp.c.
+	(distfiles): Rename config.h.in->config.hin, install.sh->install-sh.
+	(Makefile, config.h, config.hin, config.status): Rework for
+	compatibility with Autoconf 2.
+	* io.c (binary_file_p): Assume non-broken memchr.
+	* memchr.c: Assume compiler understands void *; otherwise
+	we don't match GCC's internal declaration of memchr.
+	* system.h: Use more modern autoconf approach to standard C headers.
+	* version.c: Include <config.h>, not "config.h".
+
+	* diff.c, diff.h (ignore_some_line_changes):
+	New variable; replaces `length_varies'.
+	(line_end_char): Replace with '\n'; it wasn't being used consistently.
+
+	* io.c (find_and_hash_each_line): Fix inconsistencies with -b -w -i and
+	incomplete lines.  Put incomplete lines into their own bucket.
+	This means line_cmp no longer needs line length arguments,
+	and equivalence classes' line lengths no longer need to include \n.
+	Invoke line_cmp only if ignore_some_line_changes.
+	(prepare_text_end): -B no longer ignores missing newlines.
+	(read_files): Allocate another bucket for incomplete lines.
+
+	* util.c (line_cmp): Now takes just two arguments.  No longer
+	optimizes for common case of exact equality; the caller does that
+	optimization now.  The caller is changed accordingly.
+	Optimize for the common case of mostly equality.
+	Use isupper+tolower instead of islower+toupper, for consistency.
+
+	* waitpid.c (waitpid): Fix typo with internal scoping.
+
+Thu Sep  8 08:23:15 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* configure.in: Revamp for Autoconf 2.
+	* memchr.c, waitpid.c: New source files for substitute functions.
+	* Makefile.in (diff_o, diff3_o, sdiff_o): Add $(LIBOBJS).
+	(srcs): Add memchr.c, waitpid.c.
+	(distfiles): Add install.sh, memchr.c, waitpid.c, install.sh.
+	* system.h: Use Autoconf 2 style HAVE_DIRENT_H etc. macros for dirs.
+	* dir.c (dir_sort): Prefer NAMLEN (p) to strlen (p->d_name).
+	Change VOID_CLOSEDIR to CLOSEDIR_VOID for Autoconf 2.
+	* sdiff.c, util.c (memchr, waitpid): Remove; use new substitutes.
+	* diff3.c (read_diff): Use new waitpid substitute.
+
+	* cmp.c, diff.c, diff3.c, sdiff.c (check_stdout, try_help): New fns.
+	(usage): Just print more detailed usage message; let caller exit.
+	* diff.c (option_help): New variable.
+	(filetype): Add Posix.1b file types.
+
+Fri Sep  2 16:01:49 1994  Paul Eggert  <eggert@twinsun.com>
+
+	* configure.in: Switch to new autoconf names.  Add sys/file.h test.
+	* Makefile.in (distclean): Clean config.cache, config.log
+	(used by new autoconf).
+
+	* diff.c, diff3.c, (main), sdiff.c (trapsigs): If we'll have children,
+	make sure SIGCHLD isn't ignored.
+
+	* diff3.c (DIFF_CHUNK_SIZE): Removed.  Get size from STAT_BLOCKSIZE.
+	(INT_STRLEN_BOUND): New macro.
+
+	* ifdef.c (format_group, groups_letter_value):
+	Use * instead of [] in prototypes.
+
+	* system.h: Include <sys/file.h> only if HAVE_SYS_FILE_H.
+	(S_IXGRP, S_IXOTH, S_IXUSR): Remove unused macros.
+
+	* util.c (begin_output): Check fdopen result.
+
+	The following changes simplify porting to non-Posix environments.
+	* cmp.c, diff.c, diff3.c, sdiff.c, (main): Call initialize_main first.
+	* diff.c (binary_I_O): New variable for --binary option.
+	(main, usage, compare_files): Support --binary option.
+	(compare_files): Use filename_lastdirchar to find last
+	directory char in a file name.
+	* cmp.c (main), diff.c (compare_files), dir.c (compare_names,
+	diff_dirs): Use filename_cmp to compare file names.
+	Use same_file to determine whether two files are the same.
+	* context.c (print_context_label): Check whether ctime yields 0.
+	* diff3.c (read_diff), sdiff.c (cleanup, main, waitpid),
+	util.c (begin_output): Use popen+pclose if !HAVE_FORK.
+	* io.c (sip): If HAVE_SETMODE, test for binary files in O_BINARY mode.
+	* sdiff.c (ck_fdopen): Function removed.
+	(edit): Use system if !HAVE_FORK.
+	(execdiff): Now assumes caller has pushed all args, plus trailing 0.
+	All callers changed.
+	(private_tempnam): Try TMP if TMPDIR isn't defined.
+	Fit temporary filenames into 8.3 limit.
+	* system.h (STAT_BLOCKSIZE): Don't define if already defined.
+	(min, max): Undef if already defined.
+	(filename_cmp, filename_lastdirchar, HAVE_FORK, HAVE_SETMODE,
+	initialize_main O_BINARY, same_file): New macros.
+
+Fri Jun 17 11:23:53 1994  David J. MacKenzie  (djm@geech.gnu.ai.mit.edu)
+
+	* Makefile.in (info, dvi, diff.dvi): New targets.
+	(clean): Remove TeX output files.
+
+Fri Jun 17 05:37:52 1994  Paul Eggert  (eggert@twinsun.com)
+
+	* cmp.c, io.c (word): Change from typedef to #define, to avoid
+	collision with Unicos 8.0 <sys/types.h>, which also typedefs `word'.
+
+Thu Apr 15 00:53:01 1994  Paul Eggert  (eggert@twinsun.com)
+
+	* diff3.c (scan_diff_line), util.c (print_number_range): Don't
+	rely on promotion to make the old-style parameter type agree
+	with the prototype parameter type; this doesn't work on
+	Apollos running bsd4.3.
+
+Mon Jan  3 02:05:51 1994  Paul Eggert  (eggert@twinsun.com)
+
+	* Makefile.in (LDFLAGS): Remove -g.  Change all link commands
+	to use both $(CFLAGS) and $(LDFLAGS).
+
+Mon Dec 13 12:23:27 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* system.h: Don't assume dirent.h exists just because
+	_POSIX_VERSION is defined.
+
+Fri Dec  3 18:39:39 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main): allow -pu.
+
+Tue Nov 23 03:51:08 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Makefile.in (distclean): Remove config.h.
+
+Wed Nov 10 00:28:27 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Version 2.6 released.
+
+	* analyze.c (too_expensive): New variable, for heuristic to
+	limit the worst-case cost to O(N**1.5 log N) at the price of
+	producing suboptimal output for large inputs with many differences.
+	(diff_2_files): Initialize it.
+	(struct partition): New type.
+	(SNAKE_LIMIT): New macro; merely documents already-used number 20.
+	(diag): New `minimal' arg; all callers changed.  Put results into
+	struct partition.  Apply `too_expensive' heuristic.  Tune.
+	(compareseq): New `minimal' arg; all callers changed.  Tune.
+	(shift_boundaries): Improve heuristic to also coalesce adjacent runs
+	of changes more often.
+
+	* diff.c (long_options, main, usage): Add `--help'.
+	(main): Send version number to stdout, not stderr.
+	(usage): Send usage to stdout, not stderr.
+	(compare_files): Initialize `inf' properly.
+
+	* io.c (word): Change to `int'; it makes a big difference on x86.
+	(sip, slurp): Put off allocating room to hold the whole file until we
+	have to read the whole file.  This wins if the file turns out
+	to be binary.
+
+	* util.c (xmalloc, xrealloc): "virtual memory" -> "memory"
+	(primes): Omit large primes if INT_MAX is small.
+
+	* sdiff.c (usage): Send usage to stdout, not stderr.
+	(long_options, main, usage): Add `--help'.
+	(main): Send version number to stdout, not stderr.  Exit afterwards.
+
+	* diff3.c (usage): Send usage to stdout, not stderr.
+	(long_options, main, usage): Add `--help'.
+	(read_diff): Detect integer overflow in buffer size calculations.
+
+	* cmp.c (word): New type.  All uses of `long' for
+	word-at-a-time comparisons changed to `word'.
+	(long_options, main, usage): Add `--help'.
+	(usage): Send usage to stdout, not stderr.
+	(main): Add `-v'.  Send version number to stdout, not stderr.
+
+	* configure.in (AC_HAVE_HEADERS): Add unistd.h; remove AC_UNISTD_H.
+
+Mon Sep 27 07:20:24 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (add_exclude_file): Cast memchr to (char *)
+	to suppress bogus warnings on some nonstandard hosts.
+
+	* Makefile.in (cmp): Add version.o.
+
+	* analyze.c (diff_2_files): Work around memcmp bug with size=0.
+
+	* cmp.c (main, usage, version_string): Add --version option.
+
+	* system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H.
+	(memchr): Declare only if !HAVE_MEMCHR.  These changes are
+	needed to keep some nonstandard hosts happy.
+
+	* util.c (memchr): Make first arg char const *
+	to match standard.
+	(xmalloc, xrealloc): Cast malloc, realloc
+	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
+
+	* diff3.c (xmalloc, xrealloc): Cast malloc, realloc
+	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
+
+	* sdiff.c (xmalloc, xrealloc): Cast malloc, realloc
+	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
+	(lf_copy, lf_skip, lf_snarf): Cast memchr to (char *)
+	to suppress bogus warnings on some nonstandard hosts.
+	(memchr): Make first arg char const *
+	to match standard.
+
+Mon Sep 27 00:23:37 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Version 2.5 released.
+
+	* analyze.c (diff_2_files): Work around memcmp bug with size=0.
+
+	* cmp.c (main, usage, version_string): Add --version option.
+	* Makefile.in (cmp): Add version.o.
+
+	* diff.c (add_exclude_file): Cast memchr to (char *)
+	to suppress bogus warnings on some nonstandard hosts.
+	* sdiff.c (lf_copy, lf_skip, lf_snarf): Likewise.
+
+	* diff3.c, sdiff.c, util.c (xmalloc, xrealloc): Cast malloc, realloc
+	to (VOID *) to suppress bogus warnings on some nonstandard hosts.
+
+	* sdiff.c, util.c (memchr): Make first arg char const *
+	to match standard.
+
+	* system.h (malloc, realloc): Declare only if !HAVE_STDLIB_H.
+	(memchr): Declare only if !HAVE_MEMCHR.  These changes are
+	needed to keep some nonstandard hosts happy.
+
+	* xmalloc.c: Include <sys/types.h> always; some nonstandard hosts
+	need it for size_t even if STDC_HEADERS.
+
+Sat Sep 18 01:33:07 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* configure.in (AC_STAT_MACROS_BROKEN): Add.
+	* system.h (S_IS{BLK,CHR,DIR,FIFO,REG,SOCK}): Fix defns if
+	STAT_MACROS_BROKEN.
+
+	* Makefile.in (diff3, sdiff, cmp): Do not link $(ALLOCA).
+
+	* analyze.c (discard_confusing_lines): Make defn static, like decl.
+	* sdiff.c (xmalloc): Likewise.
+
+	* ifdef.c (format_group): Ensure isdigit argument isn't < 0.
+
+	* side.c (print_half_line): Use isprint, since some hosts lack isgraph.
+	* util.c (output_1_line): Likewise.  Ensure its argument isn't < 0.
+	(xmalloc, xrealloc): Remove needless casts.
+
+	* system.h (volatile, const):
+	Define these before including any system headers,
+	so that they're used consistently in all system includes.
+	(getenv, malloc, realloc): Declare even if HAVE_STDLIB_H, since some
+	<stdlib.h>s don't declare them.
+	(memchr): Likewise for <string.h>.
+
+	* cmp.c, diff3.c, diff.h, sdiff.c: Include "system.h" first.
+	* diff.c: Remove redundant "system.h" inclusion.
+
+	* diff3.c (xmalloc): Now static.
+	(xmalloc, realloc): Remove needless casts.
+	(READNUM): Ensure isdigit argument isn't negative.
+
+Wed Sep 14 07:14:15 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Version 2.4 released.
+
+	* ifdef.c (scan_char_literal): New function, for new %c'x' and
+	%c'\ooo' format specs.
+	(format_group, print_ifdef_lines): Use it.  Remove %0 format spec.
+
+	* cmp.c (cmp): Don't try to read past end of file; this doesn't
+	work on ttys.
+
+	* system.h, version.c: #include <config.h>, not "config.h", to allow
+	configuring in a separate directory when the source directory has
+	already been configured.
+	* Makefile.in (COMPILE): New defn, with proper -I options so that
+	`#include <config.h>' works.
+	(.c.o, diff3.o, sdiff.o): Use it.
+
+Mon Sep 13 06:45:43 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main, longopts): Add --line-format=FORMAT option.
+	(specify_format): Args no longer const pointers.  All callers changed.
+
+	* ifdef.c: Add support for %?c, %(A=B?T:E), PRINTF_SPECn formats.
+	(struct group): New struct.
+	(print_ifdef_lines): Use it to simplify argument passing.
+	Remove the convention that last arg -1 signifies that the lines
+	from file 2 are the same as the lines from file 1; this
+	convention no longer works, now that line numbers might be
+	printed out, since the line numbers may differ.
+	Add first FILE * argument to output to.  All callers changed.
+	Use a faster test for the single-fwrite optimization.
+	(format_group, scan_printf_spec, groups_letter_value): New functions.
+
+	* diff.h (group_format, line_format): No longer const pointers.
+	(format_ifdef): 1st arg is no longer const pointer.
+
+	* configure.in: Configure HAVE_LIMITS_H, HAVE_STDLIB_H.
+	* system.h <limits.h>, <stdlib.h>, <string.h>:
+	Include only if HAVE_LIMITS_H etc.
+
+	* system.h (memcmp, memcpy, strchr, strrchr, struct dirent): Prefer
+	these standard names to the traditional names (bcmp, bcpy, index,
+	rindex, struct direct).  All callers changed.
+
+	* system.h (PARAMS, VOID):
+	Define earlier so that malloc decl can use VOID.
+	(STAT_BLOCKSIZE): Simplify ersatz defn; just use 8K.
+
+Fri Sep  3 00:21:02 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (compare_files): Two files with the same name must be
+	the same file; avoid a needless `stat' in that case.
+
+Fri Aug 27 06:59:03 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Pervasive changes for portability to 64-bit hosts:
+	Add prototypes to function declarations.
+	Use size_t, not int, when needed.
+
+	* Other pervasive changes:
+	Use `const' more often.
+	Use STD{IN,OUT,ERR}_FILENO instead of [012].
+	Use 0, not NULL, for portability to broken hosts.
+
+	* Makefile.in: (srcs, objs, distfiles, cmp): New files cmpbuf.[ch].
+	(distfiles): New files config.h.in, mkinstalldirs.
+	(.c.o): Add -DHAVE_CONFIG_H.
+
+	* analyze.c: (diag): Pacify `gcc -Wall' with a useless assignment.
+	(diff_2_files): Use l.c.m., not max, of files' buffer sizes.
+
+	* cmp.c: Make globals static when possible.
+
+	(file): Now a 2-element array; replaces `file1' and `file2'.
+	(file_desc, buffer): Likewise, for file[12]_desc and buf[12].
+	(main): Likewise, for stat_buf[12].  Index these variables with `i'.
+
+	(ignore_initial): New var.
+	(long_options): Now const.  Add `--ignore-initial'.
+	(usage): Sort options and add `--ignore-initial'.
+	(main, cmp): Add `--ignore-initial' support.
+
+	(main): `cmp - -' now succeeds.
+	When comparing standard input to a file, and using a shortcut (e.g.
+	looking at file sizes or inode numbers), take the lseek offset into
+	account before deciding whether the files are identical.
+	Avoid mentioning `dev_t', `ino_t' for portability to nonstandard hosts.
+	Use l.c.m. of files' buffer sizes, not 8 * 1024.
+	ferror (stdout) does not imply errno has a useful value.
+	If 2nd file is "-", treat it first, in case stdin is closed.
+
+	(cmp): Always compute `char_number', `smaller' for speed and simplicity.
+	Say `cmp: EOF on input', not `/usr/gnu/bin/cmp: EOF on input',
+	as per Posix.2.
+
+	(block_compare_and_count): Increment line_number argument.
+	Remove end_char argument; it's always '\n'.  All callers changed.
+	Do not assume sizeof(long) == 4; this isn't true on some 64-bit hosts.
+	(block_compare): Minimize differences with block_compare_and_count.
+
+	(block_read): Coalesce `bp += nread's.
+
+	(printc): Remove `FILE *' arg; output to stdout.  All callers changed.
+
+	* configure.in: Configure HAVE_SIGACTION, RETSIGTYPE, HAVE_VPRINTF.
+	Configure into config.h.
+
+	* context.c (print_context_label):
+	Standard input's st_mtime is no longer a special case
+	here, since `compare_files' now sets it to the current time.
+
+	* diff.c (usage): Sort options.
+	(filetype): New function.
+	(compare_files): Set stdin's st_mtime to be the current time.
+	Leave its name "-" instead of changing it to "Standard Input";
+	to test whether a file is stdin, we must compare its name to "-" instead
+	of its desc to 0, since if it's closed other file descs may be 0.
+	When comparing standard input to a file, and using a shortcut (e.g.
+	looking at file sizes or inode numbers), take the lseek offset into
+	account before deciding whether the files are identical.
+	Pretend that nonexistent files have the same filetype as existing files.
+	Rename `errorcount' to `failed', since it's boolean.
+	In directory comparisons, if a file is neither a regular file nor a
+	directory, just print its type and the other file's type.
+
+	* diff.h (Is_space, textchar): Remove.
+	(struct msg, msg_chain, msg_chain_end): Move to util.c.
+	(VOID): Move to system.h.
+	(line_cmp, version_string, change_letter, print_number_range,
+	find_change): New decls.
+
+	* diff.texi:
+	whitespace -> white space.  It now stands for whatever isspace yields.
+	Add --ignore-initial.
+
+	* diff3.c (VOID): Move to system.h.
+	(version_string): Now char[].
+	(usage): Sort options.
+	(process_diff): Pacify `gcc -Wall' with a useless assignment.
+	(read_diff): pid is of type pid_t, not int.  Use waitpid if available.
+	(output_diff3): Simplify test for `\ No newline at end of file' message.
+
+	* dir.c (struct dirdata): Rename `files' to `names' to avoid confusion
+	with external struct file_data `files'.
+
+	* io.c (line_cmp): Move declaration to diff.h.
+	(textchar): Remove.
+	(find_and_hash_each_line): Use locale's definition of white space
+	instead of using one hardwired defn for -b and another for -w.
+
+	* normal.c (change_letter, print_number_range, find_change):
+	Move decls to diff.h.
+	(print_normal_hunk): Now static.
+
+	* sdiff.c (SEEK_SET): Move to system.h.
+	(version_string): Now char[], not char*.
+	(private_tempnam): Remove hardcoded limit on temporary file names.
+	(exiterr, perror_fatal, main): When exiting because of a signal,
+	exit with that signal's status.
+	(lf_refill, main, skip_white, edit, interact): Check for signal.
+	(ignore_SIGINT): Renamed from `ignore_signals'.
+	(NUM_SIGS, initial_handler): New macros.
+	(initial_action, signal_received, sigs_trapped): New vars.
+	(catchsig, trapsigs): Use sigaction if possible, since this closes the
+	windows of vulnerability that `signal' has.  Use RETSIGTYPE not void.
+	When a signal comes in, just set a global variable; this is safer.
+	(checksigs, untrapsig): New functions.
+	(edit): Pacify `gcc -Wall' with a useless assignment.
+	Respond to each empty line with help, not to every other empty line.
+	(private_tempnam): Remove hardcoded limit on temporary file name length.
+	Don't assume sizeof (pid_t) <= sizeof (int).
+
+	* system.h: (S_IXOTH, S_IXGRP, S_IXUSR,
+	SEEK_SET, SEEK_CUR,
+	STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
+	New macros, if system doesn't define them.
+	(volatile): Don't define if already defined.
+	(PARAMS): New macro.
+	(VOID): Move here from diff.h.
+
+	* util.c (struct msg, msg_chain, msg_chain_end): Moved here from diff.h.
+	(message5): New function.
+	(pr_pid): New var.
+	(begin_output): Allocate `name' more precisely.
+	Put child pid into pr_pid, so that we can wait for it later.
+	Don't check execl's return value, since any return must be an error.
+	(finish_output): Detect and report output errors.
+	Use waitpid if available.  Check pr exit status.
+	(line_cmp): Use locale's definition of white space
+	instead of using one hardwired defn for -b and another for -w.
+	(analyze_cmp): Avoid double negation with `! nontrivial'.
+	Pacify `gcc -Wall' be rewriting for-loop into do-while-loop.
+	(dir_file_pathname): New function.
+
+	* version.c (version_string): Now char[], not char*.
+
+Thu Jul 29 20:44:30 1993  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)
+
+	* Makefile.in (config.status): Run config.status --recheck, not
+	configure, to get the right args passed.
+
+Thu Jul 22 10:46:30 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Makefile.in (dist): Replace `if [ ! TEST ]; then ACTION; fi'
+	with `[ TEST ] || ACTION || exit' so that the containing for-loop exits
+	with proper status for `make'.
+
+Thu Jul  8 19:47:22 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+	* Makefile.in (installdirs): New target.
+	(install): Use it.
+	(Makefile, config.status, configure): New targets.
+
+Sat Jun  5 23:10:40 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Makefile.in (dist): Switch from .z to .gz.
+
+Wed May 26 17:16:02 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main): Cast args to compare_files, for traditional C.
+	* side.c (print_sdiff_common_lines_print_sdiff_hunk): Likewise.
+	* analyze.c, diff3.c, sdiff.c, util.c: Don't assume NULL is defined
+	properly.
+
+Tue May 25 14:54:05 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* analyze.c (diff_2_files):  With -q, do not report that files differ
+	if all their differences are ignored.
+	(briefly_report): New function.
+	* diff.h (ignore_some_changes): New variable.
+	* diff.c (compare_files): Don't use the file size shortcut if
+	ignore_some_changes is nonzero, since the file size may differ
+	merely due to ignored changes.
+	(main):  Set ignore_some_changes if we might ignore some changes.
+	Remove unsystematic assignment of 0 to static vars.
+	* io.c (read_files): New argument PRETEND_BINARY says whether to
+	pretend the files are binary.
+
+	* diff3.c (tab_align_flag): New variable, for new -T option.
+	(main, usage, output_diff3): Add support for -T.
+
+Sun May 23 15:25:29 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* dir.c (dir_sort): Always init `data' to avoid GCC warning.
+
+Sat May 22 15:35:02 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Makefile.in (dist): Change name of package from diff to diffutils.
+	Don't bother to build .Z dist; .z suffices.
+
+Fri May 21 16:35:22 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c: Include "system.h" to get memchr declaration.
+	* system.h (memchr): Declare if !HAVE_MEMCHR, not if
+	!HAVE_MEMCHR && !STDC_HEADERS.
+
+Wed May 19 17:43:55 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* Version 2.3 released.
+
+Fri Apr 23 17:18:44 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* io.c (find_identical_ends): Do not discard the last HORIZON_LINES
+	lines of the prefix, or the first HORIZON_LINES lines of the suffix.
+	* diff.c (main, longopts, usage): Add --horizon-lines option.
+	* diff3.c (main, process_diff, read_diff): Invoke second diff
+	with --horizon-lines determined by the first diff.
+	* diff.h, diff3.c (horizon_lines): New variable.
+
+Mon Mar 22 16:16:00 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
+
+	* system.h [HAVE_STRING_H || STDC_HEADERS] (bcopy, bcmp, bzero):
+	Don't define if already defined.
+
+Fri Mar  5 00:20:16 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* diff.c (main): Use NULL in arg to compare_files.
+
+Thu Feb 25 15:26:01 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
+
+	* system.h: Declare memchr #if !HAVE_MEMCHR && !STDC_HEADERS,
+	not #if !HAVE_MEMCHR || !STDC_HEADERS.
+
+Mon Feb 22 15:04:46 1993  Richard Stallman  (rms@geech.gnu.ai.mit.edu)
+
+	* io.c (find_identical_ends): Move complicated arg outside GUESS_LINES.
+
+Mon Feb 22 12:56:12 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
+
+	* Makefile.in (.c.o): Add -I$(srcdir); put $(CFLAGS) last before $<.
+
+Sat Feb 20 19:18:56 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* io.c (binary_file_p): Return zero if file size is zero.
+
+Fri Feb 19 17:31:32 1993  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
+
+	* Version 2.2 released.
+
+	* system.h [HAVE_STRING_H || STDC_HEADERS] (index, rindex): Don't
+	define if already defined.
+
+Wed Feb 17 17:08:00 1993  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
+
+	* Makefile.in (srcs): Remove limits.h.
+
+Thu Feb 11 03:36:00 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* diff3.c (xmalloc): No longer static.
+
+	* sdiff.c (edit): Allocate buf dynamically.
+
+	* dir.c (dir_sort): Handle VOID_CLOSEDIR.
+
+Wed Feb 10 00:15:54 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* limits.h: File deleted (should never have been there).
+
+Tue Feb  9 03:53:22 1993  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* Makefile.in (.c.o, diff3.o, sdiff.o): Put $(CFLAGS) last.
+
+Wed Feb  3 15:42:10 1993  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+	* system.h: Don't #define const; let configure do it.
+
+Mon Feb  1 02:13:23 1993  Paul Eggert  (eggert@hal.gnu.ai.mit.edu)
+
+	* Version 2.1 released.
+
+	* Makefile.in (dist): Survive ln failures.  Create .tar.z
+	(gzipped tar) file as well as .tar.Z (compressed tar) file.
+
+Fri Jan  8 22:31:41 1993  Paul Eggert  (eggert@twinsun.com)
+
+	* side.c (print_half_line): When the input position falls
+	outside the column, do not output a tab even if the output
+	position still falls within the column.
+
+Mon Dec 21 13:54:36 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
+
+	* Makefile.in (.c.o): Add -I.
+
+Fri Dec 18 14:08:20 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* configure.in: Add HAVE_FCNTL_H, since system.h uses it.
+
+Tue Nov 24 10:06:48 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+	* Makefile.in: Note change from USG to HAVE_STRING_H.
+
+Mon Nov 23 18:44:00 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* io.c (find_and_hash_each_line): When running out of lines,
+	double the number of allocated lines, instead of just doubling
+	that number minus the prefix lines.  This is more likely to
+	avoid the need for further memory allocation.
+
+Wed Nov 18 20:40:28 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* dir.c (dir_sort): Plug memory leak: space holding directory
+	contents was not being reclaimed.  Get directory size from
+	struct file_data for initial guess at memory needed.
+	Detect errors when reading and closing directory.
+	(diff_dirs): Pass struct file_data to dir_sort.  Finish plugging leak.
+	* diff.c (compare_files): Pass struct file_data to diff_dirs.
+
+	* io.c (find_and_hash_each_line): Don't assume alloc_lines is
+	nonzero when allocating more lines.
+
+Thu Nov 12 16:02:18 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main): Add `-U lines' as an alias for `--unified=lines'.
+
+	* diff3.c (usage): Add third --label option in example.
+
+	* util.c (analyze_hunk): Fix test for ignoring blank lines.
+
+	* configure.in, system.h: Avoid USG; use HAVE_TIME_H etc. instead.
+
+Mon Nov  9 05:13:25 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff3.c (main, usage): Add -A or --show-all.
+	-m now defaults to -A, not -E.  Allow up to three -L options.
+	(output_diff3_edscript, output_diff3_merge):
+	Remove spurious differences between these two functions.
+	Output ||||||| for -A.  Distinguish between conflicts and overlaps.
+	(dotlines, undotlines): New functions that output `Ns', not `N,Ns'.
+	(output_diff3_edscript, output_diff3_merge): Use them.
+
+	* io.c (find_identical_ends): shift_boundaries needs an extra
+	identical line at the end, not at the beginning.
+
+	* sdiff.c (edit): execvp wants char **, not const char **.
+
+Mon Oct 19 04:39:32 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* context.c (print_context_script, find_function): Context
+	line numbers start with - file->prefix_lines, not 0.
+
+	* io.c (binary_file_p): Undo last change; it was a library bug.
+
+Sun Oct 18 00:17:29 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* io.c (binary_file_p): Consider empty file as non-binary.
+
+Mon Oct  5 05:18:46 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff3.c (main, make_3way_diff, using_to_diff3_block): Don't
+	report bogus differences (for one of -mexEX3) just because the
+	file0-file1 diffs don't line up with the file0-file2 diffs.
+	(This is entirely possible since we don't use diff's -n
+	option.)  Always compare file1 to file2, so that diff3 sees
+	those changes directly.  Typically, file2 is now the common
+	file, not file0.
+	(output_diff3_merge): The input file is file 0, not the common file.
+
+	(FC, FO): New macros; they replace FILE1, FILE0 for two-way diffs,
+	to distinguish them from three-way diffs.
+
+	* diff3.c (using_to_diff3_block): Fold repeated code into loops.
+
+	* diff3.c (make_3way_diff, process_diff): Have the *_end
+	variable point to the next field to be changed, not to the last
+	object allocated; this saves an if-then-else.
+
+	* diff3.c (process_diff): Use D_NUMLINES instead of its definiens.
+
+	* diff3.c: Make fns and vars static unless they must be external.
+
+Wed Sep 30 09:21:59 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* analyze.c (diff_2_files): OUTPUT_IFDEF is now robust.
+	* diff.h (ROBUST_OUTPUT_STYLE): Likewise.
+	(default_line_format): Remove.  All refs removed.
+
+	* ifdef.c (print_ifdef_lines): Add %L.  Optimize %l\n even if user
+	specified it, as opposed to its being the default.
+
+Tue Sep 29 19:01:28 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (longopts, main): --{old,new,unchanged,changed}--group-format
+	are new options, so that -D is no longer overloaded.  Set
+	no_diff_means_no_output if --unchanged-{line,group}-format allows it.
+	* diff.h (enum line_class): New type.
+	(group_format, line_format): Use it to regularize option flags.
+	All refs changed.
+
+	* ifdef.c (format_ifdef, print_ifdef_lines): %n is no longer a format.
+
+Mon Sep 28 04:51:42 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main, usage): Replace --line-prefix with the more general
+	--{old,new,unchanged}-line-format options.
+	* ifdef.c (format_ifdef, print_ifdef_lines): Likewise.
+	* diff.h (line_format): Renamed from line_prefix.  All refs changed.
+	* diff.h, ifdef.c (default_line_format): New variable.
+	* util.c (output_1_line): New function.
+	(print_1_line): Use it.
+
+	* ifdef.c: (format_ifdef, print_ifdef_lines): Add %0 format.
+
+Sun Sep 27 05:38:13 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main): Add -E or --line-prefix option.  Add -D'=xxx'
+	for common lines.  Change default -D< format from copy of -D>
+	format to to -D<%<; similarly for default -D> format.
+	* diff.h (common_format, line_prefix): New variables.
+	* ifdef.c (format_ifdef): New function.
+	(print_ifdef_script, print_ifdef_hunk, print_ifdef_lines):
+	Use it for -D'=xxx', -E.
+
+	* context.c (find_hunk): Glue together two non-ignorable changes that
+	are exactly CONTEXT * 2 lines apart.  This shortens output, removes
+	a behavioral discontinuity at CONTEXT = 0, and is more compatible
+	with traditional diff.
+
+	* io.c (find_identical_ends): Slurp stdin at most once.
+
+	* util.c (print_line_line): line_flag is const char *.
+
+Thu Sep 24 15:18:07 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* ifdef.c (print_ifdef_lines): New function, which fwrites a sequence
+	of lines all at once for speed.
+	(print_ifdef_script, print_ifdef_hunk): Use it.
+
+Thu Sep 24 05:54:14 1992  Paul Eggert  (eggert@twinsun.com)
+
+	* diff.c (main): Support new -D options for if-then-else formats.
+	(specify_format): New function.
+	* diff.h (ifndef_format, ifdef_format, ifnelse_format): New variables.
+	* ifdef.c (print_ifdef_hunk): Use the new variables instead of
+	a hardwired format.
+
+	* side.c (print_1sdiff_line): Represent incomplete lines on output.
+	(print_sdiff_script): Likewise.  Don't print 'q' at end,
+	since that doesn't work with incomplete lines.
+	* sdiff.c (interact): Don't assume diff output ends with 'q' line.
+	* diff.h (ROBUST_OUTPUT_STYLE): OUTPUT_SDIFF is now robust.
+
+	* sdiff.c (lf_copy, lf_snarf): Use memchr instead of index,
+	to avoid dumping core when files contain null characters.
+	(memchr): New function (if memchr is missing).
+
+	* io.c (sip): New arg SKIP_TEST to skip test for binary file.
+	(read_files): Don't bother testing second file if first is binary.
+
+Thu Sep 17 21:17:49 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* system.h [!USG && !_POSIX_VERSION]: Protect from conflicting
+	prototype for wait in sys/wait.h.
+
+Wed Sep 16 12:32:18 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* Makefile.in: Include binprefix in -DDIFF_PROGRAM.
+
+Tue Sep 15 14:27:25 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* Version 2.0.
+
+Sat Sep 12 01:31:19 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* util.c, diff.h, system.h [!HAVE_MEMCHR]: Don't use void *
+	and const when declaring memchr replacement.  Declare memchr
+	if !STDC_HEADERS && !USG.
+
+Thu Sep 10 15:17:32 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* Makefile.in (uninstall): New target.
+
+	* diff.c (excluded_filename): Use fnmatch, not wildmat.
+	(usage): Document -x, -X, --exclude, --exclude-from.
+	Makefile.in: Use fnmatch.c, not wildmat.c.
+
+Sun Sep  6 23:46:25 1992  Paul Eggert (eggert@twinsun.com)
+
+	* configure.in: Add HAVE_MEMCHR.
+	* diff.h, util.c: Use it instead of MEMCHR_MISSING.
+
+Sun Sep  6 07:25:49 1992  Paul Eggert (eggert@twinsun.com)
+
+	* diff.h: (struct line_def): Replace this 3-word struct with char *.
+	This uses less memory, particularly for large files with short lines.
+	(struct file_data): New member linbuf_base counts number of lines
+	in common prefix that are not recorded in linbuf;
+	this uses less memory if files are identical or differ only at end.
+	New member buffered_lines counts possibly differing lines.
+	New member valid_lines counts valid data.
+	New member alloc_lines - linbuf_base replaces old linbufsize.
+	linbuf[0] now always points at first differing line.
+	Remove unused members ltran, suffix_lines.
+	Add const where appropriate.
+	(Is_space): New macro, for consistent definition of `white space'.
+	(excluded_filename, memchr, sip, slurp): New declarations.
+	* ed.c (print_ed_hunk): Adjust to diff.h's struct changes.
+	* context.c (pr_context_hunk): Likewise.
+	* ifdef.c (print_ifdef_script): Likewise.
+	* side.c (print_sdiff_script, print_half_line): Likewise.
+	* util.c (analyze_hunk, line_cmp, print_1_line): Likewise.
+
+	* analyze.c (shift_boundaries): Remove unneeded variable `end' and
+	unnecessary comparisons of `preceding' and `other_preceding' against 0.
+	(diff_2_files): When comparing files byte-by-byte for equality,
+	don't slurp them all in at once; just compare them a buffer at a time.
+	This can win big if they differ early on.
+	Move some code to compare_files to enable this change.
+	Use only one buffer for stdin with `diff - -'.
+	(discard_confusing_lines, diff_2_files): Coalesce malloc/free calls.
+	(build_script): Remove obsolete OUTPUT_RCS code.
+
+	* diff.c (add_exclude, add_exclude_file, excluded_filename): New fns.
+	(main): Use them for the new --exclude and --exclude-from options.
+	(compare_files): Don't open a file unless it must be read.
+	Treat `diff file file' and `diff file dir' similarly.
+	Move some code here from diff_2_files to enable this.
+	Simplify file vs dir warning.
+
+	* dir.c (dir_sort): Support new --exclude* options.
+
+	* io.c (struct equivclass): Put hash code and line length here instead
+	of struct line_def, so that they can be shared.
+	(find_and_hash_each_line): Compute equivalence class as we go,
+	instead of doing it in a separate pass; this thrashes memory less.
+	Make buckets realloc-able, since we can't preallocate them.
+	Record one more line start than there are lines, so that we can compute
+	any line's length by subtracting its start from the next line's,
+	instead of storing the length explicitly.  This saves memory.
+	Move prefix-handling code to find_identical_ends;
+	this wins with large prefixes.
+	Use Is_space, not is_space, for consistent treatment of white space.
+	(prepare_text_end): New function.
+	(find_identical_ends): Move slurping here, so it's only done when
+	needed.  Work even if the buffers are the same (because of `diff - -').
+	Compare prefixes a word at a time for speed.
+	(find_equiv_class): Delete; now done by find_and_hash_each_line.
+	(read_files): Don't slurp unless needed.
+	find_equiv_class's work is now folded into find_and_hash_each_line.
+	Don't copy stdin buffer if `diff - -'.
+	Check for running out of primes.
+	(sip, slurp): Split first part of `slurp' into another function `sip'.
+	`sip' sets things up and perhaps reads the first ST_BLKSIZE buffer to
+	see whether the file is binary; `slurp' now just finishes the job.
+	This lets diff_2_files compare binary files lazily.
+	Allocate a one-word sentinel to allow word-at-a-time prefix comparison.
+	Count prefix lines only if needed, only count the first file's prefix.
+	Don't bother to count suffix lines; it's never needed.
+	Set up linbuf[0] to point at first differing line.
+	(binary_file_p): Change test for binary files:
+	if it has a null byte in its first buffer, it's binary.
+	(primes): Add more primes.
+
+	* util.c (line_cmp): Use bcmp for speed.
+	Use Is_space, not is_space, for consistent treatment of white space.
+	(translate_line_number): Internal line numbers now count from 0
+	starting after the prefix.
+	(memchr): New function (if memchr is missing).
+
+	* Makefile.in: Document HAVE_ST_BLKSIZE.  Link with wildmat.o.
+	* system.h (STAT_BLOCKSIZE): New macro based on HAVE_ST_BLKSIZE.
+	* configure.in: Add AC_ST_BLKSIZE.
+	* wildmat.c: New file.
+
+Fri Sep  4 01:28:51 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* sdiff.c (xmalloc): Renamed from ck_malloc.  Callers changed.
+
+Thu Sep  3 15:28:59 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* diff.h: Don't declare free, index, rindex.
+
+Tue Aug 11 22:18:06 1992  John Gilmore  (gnu at cygnus.com)
+
+	* io.c (binary_file_p):  Use heuristic to avoid declaring info
+	files as binary files.  Allow about 1.5% non-printing
+	characters (in info's case, ^_).
+
+Tue Jul  7 01:09:26 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* diff.h: Replace function_regexp and ignore_regexp with lists
+	of compiled regexps.
+	* analyze.c, context.c, util.c: Test whether the lists, not
+	the old variables, are empty.
+	* util.c (analyze_hunk), context.c (find_function): Compare
+	lines with the lists of regexps.
+	* diff.c (add_regexp): New function.
+	(main): Use it.
+
+	* diff3: Add -v --version option.
+	* Makefile.in: Link with version.o.
+
+	* system.h: New file.
+	* diff.h, cmp.c, diff3.c, sdiff.c: Use it.
+
+	* diff.h, diff3.c: Include string.h or strings.h, as appropriate.
+	Declare malloc and realloc.
+
+	* diff3.c (perror_with_exit): Include program name in message.
+
+	* diff3.c: Lowercase error messages for GNU standards.
+
+	* sdiff.c [USG || STDC_HEADERS]: Define bcopy in terms of memcpy.
+
+	* sdiff.c: Use the version number from version.c.
+	* Makefile.in: Link with version.o.
+
+	* cmp.c error.c xmalloc.c: New files from textutils.
+	* Makefile.in: Add rules for them.
+
+	* diff.c (longopts): --unidirectional-new-file is like -P, not -N.
+	Rename --file-label to --label (leave old name, but undocumented).
+
+	* sdiff.c, diff.c (usage): Condense messages and fix some errors.
+
+	* diff3.c (main, usage): Add long-named options.
+
+Fri Jul  3 14:31:18 1992  David J. MacKenzie  (djm@nutrimat.gnu.ai.mit.edu)
+
+	* diff.h, diff3.c, sdiff.c: Change FOO_MISSING macros to HAVE_FOO.
+
+Thu Jun 25 16:59:47 1992  David J. MacKenzie  (djm@apple-gunkies.gnu.ai.mit.edu)
+
+	* diff.c: --reversed-ed -> --forward-ed.
+
+Wed Feb 26 12:17:32 1992  Paul Eggert  (eggert@yata.uucp)
+
+	* analyze.c, diff.c, diff.h, io.c: For -y, compare even if same file.
+
+Fri Feb 14 22:46:38 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* io.c, diff3.c, analyze.c: Add extra parentheses.
+
+Sun Feb  9 00:22:42 1992  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
+
+	* diff.h (unidirectional_new_file_flag): New variable.
+	* diff.c (main): Set that for -P.
+	(compare_files): Support -P, somewhat like -N.
+	(longopts): Support long name for -P.
+
+Sat Jan  4 20:10:34 1992  Paul Eggert (eggert at yata.uucp)
+
+	* Makefile.in: Distribute diff.info-* too.
+
+	* README, sdiff.c: version number now matches version.c.
+
+	* configure: Fix and document vfork test.
+
+	* ifdef.c: Don't dump core if `diff -Dx f f'.
+
+Mon Dec 23 23:36:08 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
+
+	* diff.h, diff3.c, sdiff.c: Change POSIX ifdefs to
+	HAVE_UNISTD_H and _POSIX_VERSION.
+
+Wed Dec 18 17:00:31 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
+
+	* Makefile.in (srcs): Add sdiff.c.
+	(tapefiles): Add diff.texi and diff.info.
+
+	* diff.h, diff3.c, sdiff.c: Use HAVE_VFORK_H instead of
+	VFORK_HEADER and VFORK_WORKS.
+
+Tue Dec 17 00:02:59 1991  Paul Eggert  (eggert at yata.uucp)
+
+	* Makefile.in (all): Add diff.info, sdiff.
+
+	* configure, diff.c, sdiff.c:
+	Prefix long options with `--', not `+'.
+	* diff.c: Regularize option names.
+
+	* configure: Fix check for vfork.
+	* configure, diff.c, diff.h, diff3.c, sdiff.c:
+	Use Posix definitions when possible.
+
+	* context.c: Align context with tab if -T is given.  Tune.
+	* diff.c, diff.h, side.c: Calculate column widths so that tabs line up.
+	* io.c: Add distinction between white space and printing chars.
+	* side.c: Don't expand tabs unless -t is given.
+	* side.c, util.c: Tab expansion now knows about '\b', '\f', '\r', '\v'.
+	* util.c: -w skips all white space.  Remove lint.  Tune.
+
+	* sdiff.c: Support many more diff options, e.g. `-', `sdiff file dir'.
+	Ignore interrupts while the subsidiary editor is in control.
+	Clean up temporary file and kill subsidiary diff if interrupted.
+	Ensure subsidiary diff doesn't ignore SIGPIPE.
+	Don't get confused while waiting for two subprocesses.
+	Don't let buffers overflow.  Check for I/O errors.
+	Convert to GNU style.  Tune.
+
+	* sdiff.c, util.c: Don't lose errno.
+	Don't confuse sdiff with messages like `Binary files differ'.
+	* sdiff.c, side.c: Don't assume that common lines are identical.
+	Simplify --sdiff-merge-assist format.
+
+Mon Sep 16 16:42:01 1991  Tom Lord  (lord at churchy.gnu.ai.mit.edu)
+
+	* Makefile.in, sdiff.c: introduced sdiff front end to diff.
+
+	* Makefile.in, analyze.c, diff.c, diff.h, io.c, side.c: Added
+	sdiff-style output format to diff.
+
+Mon Aug 26 16:44:55 1991  David J. MacKenzie  (djm at pogo.gnu.ai.mit.edu)
+
+	* Makefile.in, configure: Only put $< in Makefile if using VPATH,
+	because older makes don't understand it.
+
+Fri Aug  2 12:22:30 1991  David J. MacKenzie  (djm at apple-gunkies)
+
+	* configure: Create config.status.  Remove it and Makefile if
+	interrupted while creating them.
+
+Thu Aug  1 22:24:31 1991  David J. MacKenzie  (djm at apple-gunkies)
+
+	* configure: Check for +srcdir etc. arg and look for
+	Makefile.in in that directory.  Set VPATH if srcdir is not `.'.
+	* Makefile.in: Get rid of $(archpfx).
+
+Tue Jul 30 21:28:44 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
+
+	* Makefile.in (prefix): Renamed from DESTDIR.
+
+Wed Jul 24 23:08:56 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
+
+	* diff.h, diff3.c: Rearrange ifdefs to use POSIX,
+	STDC_HEADERS, VFORK_MISSING, DIRENT.  This way it works on
+	more systems that aren't pure USG or BSD.
+	Don't not define const if __GNUC__ is defined -- that would
+	break with -traditional.
+	* configure: Check for those features.
+
+Wed Jul 10 01:39:23 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)
+
+	* configure, Makefile.in: $(INSTALLPROG) -> $(INSTALL).
+
+Sat Jul  6 16:39:04 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
+
+	* Replace Makefile with configure and Makefile.in.
+	Update README with current compilation instructions.
+
+Sat Jul  6 14:03:29 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
+
+	* util.c (setup_output): Just save the args for later use.
+	(begin_output): Do the real work, with the values that were saved.
+	It's safe to call begin_output more than once.
+	Print the special headers for context format here.
+	* analyze.c (diff_2_files): Don't print special headers here.
+	* context.c (pr_context_hunk, pr_unidiff_hunk): Call begin_output.
+	* ed.c (print_ed_hunk, print_forward_ed_hunk, print_rcs_hunk):
+	* normal.c (print_normal_hunk): Likewise.
+	* ifdef.c (print_ifdef_hunk): Likewise.
+	* util.c (finish_output): Don't die if begin_output was not called.
+
+Thu Jun 20 23:10:01 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)
+
+	* Makefile: Add TAGS, distclean, and realclean targets.
+	Set SHELL.
+
+Tue Apr 30 13:54:36 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)
+
+	* diff.h (TRUE, FALSE): Undefine these before defining.
+
+Thu Mar 14 18:27:27 1991  Richard Stallman  (rms@mole.ai.mit.edu)
+
+	* Makefile (objs): Include $(ALLOCA).
+
+Sat Mar  9 22:34:03 1991  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.h: Include regex.h.
+
+Thu Feb 28 18:59:53 1991  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* Makefile (diff3): Link with GNU getopt.
+
+Sat Feb 23 12:49:43 1991  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* io.c (find_equiv_class): Make hash code unsigned before mod.
+
+	* diff.h (files): Add EXTERN.
+
+Sun Jan 13 21:33:01 1991  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c: +print option renamed +paginate.  Remove +all-text.
+
+Mon Jan  7 06:18:01 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)
+
+	* Makefile (dist): New target, replacing diff.tar and
+	diff.tar.Z, to encode version number in distribution directory
+	and tar file names.
+
+Sun Jan  6 18:42:23 1991  Michael I Bushnell  (mib at geech.ai.mit.edu)
+
+	* Version 1.15 released.
+
+	* version.c: Updated from 1.15 alpha to 1.15
+
+	* context.c (print_context_number_range,
+	print_unidiff_number_range): Don't print N,M when N=M, print
+	just N instead.
+
+	* README: Updated for version 1.15.
+	Makefile: Updated for version 1.15.
+
+	* diff3.c (main): Don't get confused if one of the arguments
+	is a directory.
+
+	* diff.c (compare_files): Don't get confused if comparing
+	standard input to a directory; print error instead.
+
+	* analyze.c (diff_2_files), context.c (print_context_header,
+	print_context_script), diff.c (main), diff.h (enum
+	output_style): Tread unidiff as an output style in its own
+	right.  This also generates an error when both -u and -c are
+	given.
+
+	* diff.c (main): Better error messages when regexps are bad.
+
+	* diff.c (compare_files): Don't assume stdin is opened.
+
+	* diff3.c (read_diff): Don't assume things about the order of
+	descriptor assignment and closes.
+
+	* util.c (setup_output): Don't assume things about the order
+	of descriptor assignment and closes.
+
+	* diff.c (compare_files): Set a flag so that closes don't
+	happen more than once.
+
+	* diff.c (main): Don't just flush stdout, do a close.  That
+	way on broken systems we can still get errors.
+
+Mon Dec 24 16:24:17 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c (usage): Use = for args of long options.
+
+Mon Dec 17 18:19:20 1990  Michael I Bushnell  (mib at geech.ai.mit.edu)
+
+	* context.c (print_context_label): Labels were interchanged badly.
+
+	* context.c (pr_unidiff_hunk): Changes to deal with files
+	ending in incomplete lines.
+	* util.c (print_1_line): Other half of the changes.
+
+Mon Dec  3 14:23:55 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c (longopts, usage): unidiff => unified.
+
+Wed Nov  7 17:13:08 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* analyze.c (diff_2_files): No warnings about newlines for -D.
+
+	* diff.c (pr_unidiff_hunk): Remove ref to output_patch_flag.
+
+Tue Oct 23 23:19:18 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c (compare_files): For -D, compare even args are same file.
+	* analyze.c (diff_2_files): Likewise.
+	Also, output even if files have no differences.
+
+	* analyze.c (diff_2_files): Print missing newline messages last.
+	Return 2 if a newline is missing.
+	Print them even if files end with identical text.
+
+Mon Oct 22 19:40:09 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c (usage): Return 2.
+
+Wed Oct 10 20:54:04 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.c (longopts): Add +new-files.
+
+Sun Sep 23 22:49:29 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* context.c (print_context_script): Handle unidiff_flag.
+	(print_context_header): Likewise.
+	(print_unidiff_number_range, pr_unidiff_hunk): New functions.
+	* diff.c (longopts): Add element for +unidiff.
+	(main): Handle +unidiff and -u.
+	(usage): Mention them.
+
+Wed Sep  5 16:33:22 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* io.c (find_and_hash_each_line): Deal with missing final newline
+	after buffering necessary context lines.
+
+Sat Sep  1 16:32:32 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* io.c (find_identical_ends): ROBUST_OUTPUT_FORMAT test was backward.
+
+Thu Aug 23 17:17:20 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff3.c (WIFEXITED): Undef it if WEXITSTATUS is not defined.
+	* context.c (find_function): Don't try to return values.
+
+Wed Aug 22 11:54:39 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* diff.h (O_RDONLY): Define if not defined.
+
+Tue Aug 21 13:49:26 1990  Richard Stallman  (rms at mole.ai.mit.edu)
+
+	* Handle -L option.
+	* context.c (print_context_label): New function.
+	(print_context_header): Use that.
+	* diff.c (main): Recognize the option.
+	(usage): Updated.
+	* diff.h (file_label): New variable.
+	* diff3.c (main): Recognize -L instead of -t.
+
+	* diff3.c (main): Support -m without other option.
+
+	* diff3.c (WEXITSTATUS, WIFEXITED): Define whenever not defined.
+
+	* diff3.c (bcopy, index, rindex): Delete definitions; not used.
+	(D_LINENUM, D_LINELEN): Likewise.
+	(struct diff_block): lengths includes newlines.
+	(struct diff3_block): Likewise.
+	(always_text, merge): New variables.
+	(read_diff): Return address of end, not size read.  Calls changed.
+	Pass -a to diff if given to diff3.
+	current_chunk_size now an int.  Detect error in `pipe'.
+	Check for incomplete line of output here.
+	(scan_diff_line): Don't make scan_ptr + 2 before knowing it is valid.
+	No need to check validity of diff output here.
+	Include newline in length of line.
+	(main): Compute rev_mapping here.  Handle -a and -m.
+	Error message if excess -t operands.  Error for incompatible options.
+	Error if `-' given more than once.
+	Fix error storing in tag_strings.
+	(output_diff3): REV_MAPPING is now an arg.  Call changed.
+	Change syntax of "missing newline" message.
+	Expect length of line to include newline.
+	(output_diff3_edscript): Return just 0 or 1.
+	REV_MAPPING is now an arg.  Call changed.
+	(output_diff3_merge): New function.
+	(process_diff): Better error message for bad diff format.
+	(fatal, perror_with_exit): Return status 2.
+
+	* analyze.c (diff_2_files): Report missing newline in either
+	or both files, if not robust output style.
+
+	* util.c (setup_output): Detect error from pipe.
+	No need to close stdin.
+
+	* util.c (print_1_line): Change format of missing-newline msg.
+	Change if statements to switch.
+
+	* io.c (slurp): Don't mention differences in final newline if -B.
+
+	* io.c (binary_file_p): Use ISO char set as criterion, not ASCII.
+
+	* io.c (find_identical_ends): Increase value of BEG0 by 1.
+	Other changes in backwards scan to avoid decrementing pointers
+	before start of array, and set LINES properly.
+
+	* diff.h (ROBUST_OUTPUT_STYLE): New macro.
+	* io.c (find_identical_ends, find_and_hash_each_line): Use that macro.
+
+	* diff.h (dup2): Don't define if XENIX.
+
+	* diff.c (main): Check for write error at end.
+
+	* context.c (find_function): Don't return a value.
+	Use argument FILE rather than global files.
+
+	* analyze.c: Add external function declarations.
+	* analyze.c (build_script): Turn off explicit check for final newline.
+
+	* analyze.c (discard_confusing_lines): Make integers unsigned.
+
+Tue Jul 31 21:37:16 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (find_and_hash_each_line): Correct the criterion
+	for leaving out the newline from the end of the line.
+
+Tue May 29 21:28:16 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* dir.c (diff_dirs): Free things only if nonzero.
+
+Mon Apr 16 18:31:05 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.h (NDIR_IN_SYS): New macro controls location of ndir.h.
+
+	* diff3.c (xmalloc, xrealloc): Don't die if size == 0 returns 0.
+
+Sun Mar 25 15:58:42 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* analyze.c (discard_confusing_lines):
+	`many' wasn't being used; use it.
+	Cancelling provisionals near start of run must handle already
+	cancelled provisionals.
+	Cancelling subruns of provisionals was cancelling last nonprovisional.
+
+Sat Mar 24 14:02:51 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* analyze.c (discard_confusing_lines):
+	Threshold for line occurring many times scales by square root
+	of total lines.
+	Within each run, cancel any long subrun of provisionals.
+	Don't update `provisional' while cancelling provisionals.
+	In big outer loop, handle provisional and nonprovisional separately.
+
+Thu Mar 22 16:35:33 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* analyze.c (discard_confusing_lines):
+	The first loops to discard provisionals from ends failed to step.
+	In second such loops, keep discarding all consecutive provisionals.
+	Increase threshold for stopping discarding, and also check for
+	consecutive nondiscardables as separate threshold.
+
+Fri Mar 16 00:33:08 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (read_diff): Pass -- as first arg to diff.
+
+	* diff3.c: Include wait.h or define equivalent macros.
+	(read_diff): Don't use stdio printing error in the inferior.
+	Remember the pid and wait for it.  Report failing status.
+	Report failure of vfork.
+
+Sun Mar 11 17:10:32 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (main): Accept -t options and pass to output_diff3_edscript.
+	(usage): Mention -t.
+	(read_diff): Use vfork.
+	(vfork): Don't use it on Sparc.
+
+	* diff.h (vfork): Don't use it on Sparc.
+
+Tue Mar  6 22:37:20 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (dup2): Don't define on Xenix.
+
+	* Makefile: Comments for Xenix.
+
+Thu Mar  1 17:19:23 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* analyze.c (diff_2_files): `message' requires three args.
+
+Fri Feb 23 10:56:50 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
+
+	* diff.h, util.c, diff3.c: Change 'void *' to 'VOID *', with
+	VOID defined as void if __STDC__, char if not.
+
+Sun Feb 18 20:31:58 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
+
+	* Makefile: Add rules for getopt.c, getopt1.c, getopt.h.
+
+	* getopt.c, getopt.h, getopt1.c: New files.
+
+	* main.c (main, usage): Add long options.
+
+	* analyze.c (shift_boundaries): Remove unused var 'j_end'.
+
+Thu Feb  8 02:43:16 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
+
+	* GNUmakefile: include ../Makerules before Makefile.
+
+Fri Feb  2 23:21:38 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* analyze.c (diif_2_files): If -B or -I, don't return 1
+	if all changes were ignored.
+
+Wed Jan 24 20:43:57 1990  Richard Stallman  (rms at albert.ai.mit.edu)
+
+	* diff3.c (fatal): Output to stderr.
+
+Thu Jan 11 00:25:56 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
+
+	* diff.c (usage): Mention -v.
+
+Wed Jan 10 16:06:38 1990  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (output_diff3_edscript): Return number of overlaps.
+	(main): If have overlaps, exit with status 1.
+
+Sun Dec 24 10:29:20 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (find_equiv_class): Fix typo that came from changing init of B
+	to an assigment.
+
+	* version.c: New file.
+	* diff.c (main): -v prints version number.
+
+	* io.c (binary_file_p): Null char implies binary file.
+
+Fri Nov 17 23:44:55 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* util.c (print_1_line): Fix off by 1 error.
+
+Thu Nov 16 13:51:10 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* util.c (xcalloc): Function deleted.
+
+	* io.c (slurp): Null-terminate the buffer.
+
+	* io.c (read_files): Delete unused vars.
+
+	* io.c (find_equiv_class): Don't index by N if too low.
+
+	* dir.c (dir_sort): Delete the extra declaration of compare_names.
+
+	* diff.h: Don't declare xcalloc.  Declare some other functions.
+
+	* analyze.c (shift_boundaries):
+	Test for END at end of range before indexing by it.
+	Fix typo `preceeding' in var names.
+
+Sat Nov 11 14:04:16 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (using_to_diff3_block): Delete unused vars.
+	(make_3way_diff, process_diff_control, read_diff, output_diff3): Likewise.
+
+Mon Nov  6 18:15:50 EST 1989 Jay Fenlason (hack@ai.mit.edu)
+
+	* README Fix typo.
+
+Fri Nov  3 15:27:47 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (usage): Mention -D.
+
+	* ifdef.c (print_ifdef_hunk): Write comments on #else and #endif.
+
+Sun Oct 29 16:41:07 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (compare_files): Don't fflush for identical files.
+
+Wed Oct 25 17:57:12 1989  Randy Smith  (randy at apple-gunkies.ai.mit.edu)
+
+	* diff3.c (using_to_diff3_block): When defaulting lines from
+	FILE0, only copy up to just under the *lowest* line mentioned
+	in the next diff.
+
+	* diff3.c (fatal): Add \n to error messages.
+
+Wed Oct 25 15:05:49 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* Makefile (tapefiles): Add ChangeLog.
+
+Tue Oct  3 00:51:17 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c (process_diff, create_diff3_block): Init ->next field.
+
+Fri Sep 29 08:16:45 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* util.c (line_cmp): Alter end char of line 2, not line 1.
+
+Wed Sep 20 00:12:37 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* Makefile (diff.tar): Expect ln to fail on some files;
+	copy them with cp.
+
+Mon Sep 18 02:54:29 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* Handle -D option:
+	* io.c (find_and_hash_each_line): Keep all lines of 1st file.
+	* diff.c (main): Handle -D option.
+	(compare_files): Reject -D if files spec'd are directories.
+	* analyze.c (diff_2_files): Handle OUTPUT_IFDEF case.
+
+Fri Sep  1 20:15:50 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (option_list): Rename arg VECTOR as OPTIONVEC.
+
+Mon Aug 28 17:58:27 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (compare_files): Clear entire inf[i].stat.
+
+Wed Aug 23 17:48:47 1989  Richard Stallman  (rms at apple-gunkies.ai.mit.edu)
+
+	* io.c (find_identical_ends): Sign was backward
+	determining where to bound the scan for the suffix.
+
+Wed Aug 16 12:49:16 1989  Richard Stallman  (rms at hobbes.ai.mit.edu)
+
+	* analyze.c (diff_2_files): If -q, treat all files as binary.
+	* diff.c (main): Detect -q, record in no_details_flag.
+
+Sun Jul 30 23:12:00 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (usage): New function.
+	(main): Call it.
+
+Wed Jul 26 02:02:19 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (main): Make -C imply -c.
+
+Thu Jul 20 17:57:51 1989  Chris Hanson  (cph at kleph)
+
+	* io.c (find_and_hash_each_line): Bug fix in context handling,
+	introduced by last change.
+
+Fri Jul 14 17:39:20 1989  Chris Hanson  (cph at kleph)
+
+	* analyze.c: To make RCS work correctly on files that don't
+	necessarily end in newline, introduce some changes that cause
+	diffs to be sensitive to missing final newline.  Because
+	non-RCS modes don't want to be affected by these changes, they
+	are conditional on `output_style == OUTPUT_RCS'.
+	(diff_2_files) [OUTPUT_RCS]: Suppress the "File X missing
+	newline" message.
+	(build_script) [OUTPUT_RCS]: Cause the last line to compare as
+	different if exactly one of the files is missing its final
+	newline.
+
+	* io.c (find_and_hash_each_line): Bug fix in
+	ignore_space_change mode.  Change line's length to include the
+	newline.  For OUTPUT_RCS, decrement last line's length if
+	there is no final newline.
+	(find_identical_ends) [OUTPUT_RCS]: If one of the files is
+	missing a final newline, make sure it's not included in either
+	the prefix or suffix.
+
+	* util.c (print_1_line): Change line output routine to account
+	for line length including the newline.
+
+Tue Jun 27 02:35:28 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
+
+	* Makefile: Inserted $(archpfx) where appropriate.
+
+Wed May 17 20:18:43 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff3.c [USG]: Include fcntl.h.
+
+	* diff.h [USG]: New compilation flags HAVE_NDIR, HAVE_DIRECT.
+
+Wed Apr 26 15:35:57 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* dir.c (diff_dirs): Two new args, NONEX1 and NONEX2, say to pretend
+	nonex dirs are empty.
+	(dir_sort): New arg NONEX, likewise.
+	* diff.c (compare_files): Pass those args.
+	Sometimes call diff_dirs if subdir exists in just one place.
+
+Wed Apr 12 01:10:27 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (find_identical_ends): Set END0 *after* last char
+	during backward scan for suffix.
+
+Sat Apr  8 15:49:49 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)
+
+	* diff3.c (using_to_diff3_block): Now find high marks in files 1
+	and 2 through mapping off of the last difference instead of the
+	first.
+
+	* diff3.c: Many trivial changes to spelling inside comments.
+
+Fri Feb 24 12:38:03 1989  Randall Smith  (randy at gluteus.ai.mit.edu)
+
+	* util.c, normal.c, io.c, ed.c, dir.c, diff.h, diff.c, context.c,
+	analyze.c, Makefile: Changed copyright header to conform with new
+	GNU General Public license.
+	* diff3.c: Changed copyright header to conform with new GNU
+	General Public license.
+	* COPYING: Made a hard link to /gp/rms/COPYING.
+
+Fri Feb 24 10:01:58 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (slurp): Leave 2 chars space at end of buffer, not one.
+	(find_identical_ends): Special case if either file is empty;
+	don't try to make a sentinel since could crash.
+
+Wed Feb 15 14:24:48 1989  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)
+
+	* diff3.c (message)  Re-wrote routine to avoid using alloca()
+
+Wed Feb 15 06:19:14 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (find_identical_ends): Delete the variable `bytes'.
+
+Sun Feb 12 11:50:36 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* io.c (slurp): ->bufsize is nominal amount we have room for;
+	add room for sentinel when calling xmalloc or xrealloc.
+
+	* io.c (find_identical_ends): Do need overrun check in finding suffix.
+
+Fri Feb 10 01:28:15 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.c (main): -C now takes arg to specify context length.
+	Now -p to show C function name--Damned IEEE!
+	Fatal error if context length spec'd twice.
+
+	* ed.c (print_ed_hunk): Now special treatment only for lines containing
+	precisely a dot and nothing else.  Output `..', end the insert,
+	substitute that one line, then resume the insert if nec.
+
+	* io.c (find_and_hash_lines): When backing up over starting context,
+	don't move past buffer-beg.
+
+	* io.c (find_identical_ends): Use sentinels to make the loops faster.
+	If files are identical, skip the 2nd loop and return quickly.
+	(slurp): Leave 1 char extra space after each buffer.
+
+	* analyze.c (diff_2_files): Mention difference in final newlines.
+
+Wed Jan 25 22:44:44 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* dir.c (diff_dirs): Use * when calling fcn ptr variable.
+
+Sat Dec 17 14:12:06 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* Makefile: New vars INSTALL and LIBS used in some rules;
+	provide default defns plus commented-put defns for sysV.
+
+Thu Nov 17 16:42:53 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* dir.c (dir_sort): Open-trouble not fatal; just say # files is -1.
+	(diff_dirs): If dir_sort does that, give up and return 2.
+
+	* diff.c (compare_files): Don't open directories.
+	Don't close them specially either.
+	Cross-propagate inf[i].dir_p sooner.
+
+Sun Nov 13 11:19:36 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
+
+	* diff.h: Declare index, rindex.
+
+	* diff.c (compare_files): If comparing foodir with b/f,
+	use foodir/f, not foodir/b/f.
+
+	* diff.c (compare_files): Don't print "are identical" msg for 2 dirs.
+	Status now 1 if one file is a dir and the other isn't, etc.
+
+Thu Nov  3 16:30:24 1988  Randall Smith  (randy at gluteus.ai.mit.edu)
+
+	* Makefile: Added a define for diff3 to define DIFF_PROGRAM.
+
+	* util.c: Added hack to make sure that perror was not called with
+	a null pointer.
+
+	* diff.c: Changed S_IFDIR to S_IFMT in masking type of file bits
+	out.
+
+	* diff3.c: Included USG compatibility defines.
+
+	* diff.h: Moved sys/file.h into #else USG section (not needed or
+	wanted on System V).
+
+	* ed.c, analyze.c, context.c: Shortened names to 12 characters for
+	the sake of System V (too simple not to do).
+
+Local Variables:
+mode: indented-text
+left-margin: 8
+version-control: never
+End:

+ 24 - 0
sys/src/ape/cmd/diff/FREEBSD-upgrade

@@ -0,0 +1,24 @@
+Import of GNU diff 2.7
+
+Original source available as ftp://prep.ai.mit.edu/pub/gnu/diffutils-2.7.tar.gz
+
+The following files and directories were removed for this import:
+
+Makefile.in
+INSTALL
+alloca.c
+cmp.c
+diff.info
+diff.info-1
+diff.info-2
+diff.info-3
+diff.info-4
+error.c
+fnmatch.c
+fnmatch.h
+memchr.c
+mkinstalldirs
+regex.c
+regex.h
+texinfo.tex
+waitpid.c

+ 126 - 0
sys/src/ape/cmd/diff/NEWS

@@ -0,0 +1,126 @@
+User-visible changes in version 2.7:
+
+* New diff option: --binary (useful only on non-Posix hosts)
+* diff -b and -w now ignore line incompleteness; -B no longer does this.
+* cmp -c now uses locale to decide which output characters to quote.
+* Help and version messages are reorganized.
+
+
+User-visible changes in version 2.6:
+
+* New cmp, diff, diff3, sdiff option: --help
+* A new heuristic for diff greatly reduces the time needed to compare
+  large input files that contain many differences.
+* Partly as a result, GNU diff's output is not exactly the same as before.
+  Usually it is a bit smaller, but sometimes it is a bit larger.
+
+
+User-visible changes in version 2.5:
+
+* New cmp option: -v --version
+
+
+User-visible changes in version 2.4:
+
+* New cmp option: --ignore-initial=BYTES
+* New diff3 option: -T --initial-tab
+* New diff option: --line-format=FORMAT
+* New diff group format specifications:
+  <PRINTF_SPEC>[eflmnEFLMN]
+      A printf spec followed by one of the following letters
+      causes the integer corresponding to that letter to be
+      printed according to the printf specification.
+      E.g. `%5df' prints the number of the first line in the
+      group in the old file using the "%5d" format.
+	e: line number just before the group in old file; equals f - 1
+	f: first line number in group in the old file
+	l: last line number in group in the old file
+	m: line number just after the group in old file; equals l + 1
+	n: number of lines in group in the old file; equals l - f + 1
+	E, F, L, M, N: likewise, for lines in the new file
+  %(A=B?T:E)
+      If A equals B then T else E.  A and B are each either a decimal
+      constant or a single letter interpreted as above.  T and E are
+      arbitrary format strings.  This format spec is equivalent to T if
+      A's value equals B's; otherwise it is equivalent to E.  For
+      example, `%(N=0?no:%dN) line%(N=1?:s)' is equivalent to `no lines'