head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2010Q4:1.2.0.30 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.28 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.2.0.26 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.24 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.22 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.20 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.18 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.16 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.14 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.12 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.10 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.8 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.6 pkgsrc-2008Q1:1.2.0.4 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.2 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.1.0.34 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.32 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.30 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.28 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.26 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.24 pkgsrc-2006Q2-base:1.1 pkgsrc-2006Q1:1.1.0.22 pkgsrc-2006Q1-base:1.1 pkgsrc-2005Q4:1.1.0.20 pkgsrc-2005Q4-base:1.1 pkgsrc-2005Q3:1.1.0.18 pkgsrc-2005Q3-base:1.1 pkgsrc-2005Q2:1.1.0.16 pkgsrc-2005Q2-base:1.1 pkgsrc-2005Q1:1.1.0.14 pkgsrc-2005Q1-base:1.1 pkgsrc-2004Q4:1.1.0.12 pkgsrc-2004Q4-base:1.1 pkgsrc-2004Q3:1.1.0.10 pkgsrc-2004Q3-base:1.1 pkgsrc-2004Q2:1.1.0.8 pkgsrc-2004Q2-base:1.1 pkgsrc-2004Q1:1.1.0.6 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.4 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.2 netbsd-1-6-1-base:1.1; locks; strict; comment @# @; 1.3 date 2011.02.05.17.47.22; author ryoon; state dead; branches; next 1.2; 1.2 date 2007.12.23.04.50.30; author minskim; state Exp; branches; next 1.1; 1.1 date 2003.01.24.14.12.04; author itohy; state Exp; branches; next ; desc @@ 1.3 log @Update to 0.6.5. Fix PR pkg/44519 Changelog: * Version 0.6.5 - December 2010, by Martin von Gagern * Never initialize or deinitialize terminals, as we do no cursor movement * Deprecated --no-init-term (-K) command line option * Avoid relative path in man pages * Updated gnulib, might be particularly important for uClibc users * Version 0.6.4 - November 2010, by Martin von Gagern * Updated Catalan translations * Updated gnulib * Version 0.6.3 - June 2010, by Martin von Gagern * Updated Italian and Swedish translations * Updated gnulib * Version 0.6.2 - May 2010, by Martin von Gagern * Fix shell syntax in configure script * Updated gnulib and gettext, the latter to 0.18 * Updated Dutch translation * Fixed a number of portability issues reported by maint.mk syntax checks * Version 0.6.1 - April 2010, by Martin von Gagern * Introduce --with-default-pager=PAGER configure switch. * Fix missing newline in info dir entry list. * Version 0.6.0 - March 2010, by Martin von Gagern First official release in a long time. Everything since 0.5 was inofficial. * `wdiff -d' to read input from single unified diff, perhaps stdin. * Updated texinfo documentation taking experimental switch into account. * Experimental programs (mdiff & friends) and a configure switch --enable-experimental to control them. * Recent imports from gnulib, use of recent autotools. * Improved autodetection of termcap library like ncurses. * Reformatted translations, still a number of fuzzy translations. * Changed from CVS to bzr for source code version control. * Various bug fixes. See ChangeLog for a more exhaustive list. * Known bugs: this NEWS file here was outdated in the release tarball. * Version 0.5.4 - June 2007, by Denver Gingerich Integrated following changes from 0.5g (Francois Pinard, November 1998): * Messages from programs may be output in many natural languages. * Short `man' pages get installed for `mdiff', `unidiff' and `wdiff'. * The original man page for `wdiff' gets withdrawn, for legalistic reasons. * New `unify' converts context diffs to unidiffs or vice-versa. * New `mdiff' finds identical line clusters in one or more files. * A new `-K' option inhibits termcap initialization and termination. * Version 0.5.3 - June 2007, by Denver Gingerich No user-visible changes; see ChangeLog for details @ text @$NetBSD: patch-ae,v 1.2 2007/12/23 04:50:30 minskim Exp $ --- wdiff.c.orig 1994-11-05 23:57:23.000000000 -0800 +++ wdiff.c @@@@ -168,6 +168,10 @@@@ int interrupted; /* set when some signa # define L_tmpnam PATH_MAX #endif +#ifdef HAVE_MKSTEMP +# define MKSTEMP_TEMPLATE "/tmp/wdiffXXXXXXXX" +#endif + typedef struct side SIDE; /* all variables for one side */ struct side { @@@@ -555,6 +559,9 @@@@ static void split_file_into_words (SIDE *side) { struct stat stat_buffer; /* for checking if file is directory */ +#ifdef HAVE_MKSTEMP + int fd; +#endif /* Open files. */ @@@@ -566,10 +573,23 @@@@ 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. */ +#ifdef HAVE_MKSTEMP + strcpy (side->temp_name, MKSTEMP_TEMPLATE); + if ((fd = mkstemp(side->temp_name)) < 0) + error (EXIT_OTHER_REASON, 0, "mkstemp failed"); + side->file = fdopen (fd, "w+"); + if (side->file == NULL) + { + int e = errno; + (void) unlink (side->temp_name); + error (EXIT_OTHER_REASON, e, side->temp_name); + } +#else tmpnam (side->temp_name); side->file = fopen (side->temp_name, "w+"); if (side->file == NULL) error (EXIT_OTHER_REASON, errno, side->temp_name); +#endif if (unlink (side->temp_name) != 0) error (EXIT_OTHER_REASON, errno, side->temp_name); while (side->character = getchar (), side->character != EOF) @@@@ -593,10 +613,23 @@@@ split_file_into_words (SIDE *side) side->character = getc (side->file); side->position = 0; +#ifdef HAVE_MKSTEMP + strcpy (side->temp_name, MKSTEMP_TEMPLATE); + if ((fd = mkstemp(side->temp_name)) < 0) + error (EXIT_OTHER_REASON, 0, "mkstemp failed"); + side->temp_file = fdopen (fd, "w"); + if (side->temp_file == NULL) + { + int e = errno; + (void) unlink (side->temp_name); + error (EXIT_OTHER_REASON, e, side->temp_name); + } +#else 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); +#endif /* Complete splitting input file into words on output. */ @@@@ -1135,7 +1168,7 @@@@ Mandatory arguments to long options are | Main program. | `---------------*/ -void +int main (int argc, char *const argv[]) { int option_char; /* option character */ @@@@ -1304,12 +1337,13 @@@@ main (int argc, char *const argv[]) reformat_diff_output (); fclose (input_file); } - - /* Clean up. Beware that input_file and output_file might not exist, - if a signal occurred early in the program. */ - - if (input_file) - complete_input_program (); + else + { + /* Clean up. Beware that input_file and output_file might not + exist, if a signal occurred early in the program. */ + if (input_file) + complete_input_program (); + } if (*left_side->temp_name) unlink (left_side->temp_name); @@@@ -1329,5 +1363,5 @@@@ main (int argc, char *const argv[]) || count_changed_left || count_changed_right) exit (EXIT_ANY_DIFFERENCE); - exit (EXIT_NO_DIFFERENCES); + return EXIT_NO_DIFFERENCES; } @ 1.2 log @Fix segmentation fault on Linux. Patch borrowed from Debian. Suggested by Aleksey Cheusov in PR 35537. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @- Enable termcap. Chack tputs() after -ltermcap is detected (configure*). - Use mkstemp() instead of tmpnam(), for safety. @ text @d3 3 a5 3 --- wdiff.c.orig Sun Nov 6 16:57:23 1994 +++ wdiff.c Fri Jan 24 22:41:01 2003 @@@@ -168,6 +168,10 @@@@ d16 1 a16 1 @@@@ -555,6 +559,9 @@@@ d26 1 a26 1 @@@@ -566,10 +573,23 @@@@ d50 1 a50 1 @@@@ -593,10 +613,23 @@@@ d74 1 a74 1 @@@@ -1135,7 +1168,7 @@@@ d83 21 a103 1 @@@@ -1329,5 +1362,5 @@@@ @