- Remove FreeBSDisms, cleanup Makefile

- Trim DESCR to a reasonable level and format it nicely
- Rename & sync patches to unified diff with update-patches
This commit is contained in:
pvalchev 2002-12-23 09:09:12 +00:00
parent 2b113ab8f8
commit e4c810b834
8 changed files with 56 additions and 91 deletions

View File

@ -1,10 +1,4 @@
# OpenBSD makefile for: wdiff
# Version required: 0.5
# Date created: May 16 1998
# Whom: Angelos D. Keromytis
#
# $OpenBSD: Makefile,v 1.15 2002/12/23 00:37:52 pvalchev Exp $
#
# $OpenBSD: Makefile,v 1.16 2002/12/23 09:09:12 pvalchev Exp $
COMMENT= "word differences between text files"
@ -18,7 +12,6 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MAN1= wdiff.1
CONFIGURE_STYLE= gnu dest old
CONFIGURE_STYLE=gnu dest old
.include <bsd.port.mk>

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Makefile_in,v 1.1 2002/12/23 09:09:12 pvalchev Exp $
--- Makefile.in.orig Sun Nov 6 00:45:13 1994
+++ Makefile.in Mon Dec 23 02:06:10 2002
@@ -129,7 +129,7 @@ getopt.o getopt1.o: getopt.h
check: wdiff
$(srcdir)/check_it
-install: all
+install: all install-man
$(srcdir)/mkinstalldirs $(bindir) $(infodir)
for name in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$name \

View File

@ -1,11 +0,0 @@
--- Makefile.in.org Sun Nov 6 16:45:13 1994
+++ Makefile.in Thu Sep 18 01:40:06 1997
@@ -129,7 +129,7 @@
check: wdiff
$(srcdir)/check_it
-install: all
+install: all install-man
$(srcdir)/mkinstalldirs $(bindir) $(infodir)
for name in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$name \

View File

@ -1,10 +0,0 @@
--- configure.orig Sun Nov 6 16:59:26 1994
+++ configure Thu Sep 18 02:08:30 1997
@@ -1159,6 +1159,7 @@
+LIBS="$saved_LIBS -ltermcap"
for ac_func in strerror tputs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&4

View File

@ -1,40 +0,0 @@
*** wdiff.c.orig Sun Nov 6 02:57:23 1994
--- wdiff.c Sun May 17 00:48:07 1998
***************
*** 566,573 ****
this temporary local file. Once done, prepare it for reading.
We do not need the file name itself anymore. */
! tmpnam (side->temp_name);
! side->file = fopen (side->temp_name, "w+");
if (side->file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);
if (unlink (side->temp_name) != 0)
--- 566,573 ----
this temporary local file. Once done, prepare it for reading.
We do not need the file name itself anymore. */
! sprintf(side->temp_name, "/tmp/wd.XXXXXXXX");
! side->file = fdopen (mkstemp(side->temp_name), "w+");
if (side->file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);
if (unlink (side->temp_name) != 0)
***************
*** 593,600 ****
side->character = getc (side->file);
side->position = 0;
! tmpnam (side->temp_name);
! side->temp_file = fopen (side->temp_name, "w");
if (side->temp_file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);
--- 593,600 ----
side->character = getc (side->file);
side->position = 0;
! sprintf(side->temp_name, "/tmp/wd.XXXXXXXX");
! side->temp_file = fdopen (mkstemp(side->temp_name), "w");
if (side->temp_file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-configure,v 1.1 2002/12/23 09:09:12 pvalchev Exp $
--- configure.orig Sun Nov 6 00:59:26 1994
+++ configure Mon Dec 23 02:06:10 2002
@@ -1159,6 +1159,7 @@ EOF
+LIBS="$saved_LIBS -ltermcap"
for ac_func in strerror tputs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&4

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-wdiff_c,v 1.1 2002/12/23 09:09:12 pvalchev Exp $
--- wdiff.c.orig Sun Nov 6 00:57:23 1994
+++ wdiff.c Mon Dec 23 02:06:10 2002
@@ -566,8 +566,8 @@ split_file_into_words (SIDE *side)
this temporary local file. Once done, prepare it for reading.
We do not need the file name itself anymore. */
- tmpnam (side->temp_name);
- side->file = fopen (side->temp_name, "w+");
+ sprintf(side->temp_name, "/tmp/wd.XXXXXXXX");
+ side->file = fdopen (mkstemp(side->temp_name), "w+");
if (side->file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);
if (unlink (side->temp_name) != 0)
@@ -593,8 +593,8 @@ split_file_into_words (SIDE *side)
side->character = getc (side->file);
side->position = 0;
- tmpnam (side->temp_name);
- side->temp_file = fopen (side->temp_name, "w");
+ sprintf(side->temp_name, "/tmp/wd.XXXXXXXX");
+ side->temp_file = fdopen (mkstemp(side->temp_name), "w");
if (side->temp_file == NULL)
error (EXIT_OTHER_REASON, errno, side->temp_name);

View File

@ -1,21 +1,6 @@
<< wdiff >>
From man page of wdiff:
wdiff compares two files, finding which words have been
deleted or added to old_file to get new_file. A word is
anything between whitespace. The output is collected and
used to produce an annotated copy of new_file on standard
output. Suitable annotations produce a nice display of
word differences between the original files.
Example:
text-a
I like FreeBSD.
text-b
I love FreeBSD.
% wdiff -n text-a text-b
I [-like-] {+love+} FreeBSD.
- Yoshiro MIHIRA
(sanpei@yy.cs.keio.ac.jp)
wdiff compares two files, finding which words have been
deleted or added to old_file to get new_file. A word is
anything between whitespace. The output is collected and
used to produce an annotated copy of new_file on standard
output. Suitable annotations produce a nice display of
word differences between the original files.