Commit Graph

22 Commits

Author SHA1 Message Date
bapt
5adbcfc208 Remove extra entries from the option enum
MFC after:	3 days
2016-12-30 23:46:11 +00:00
bapt
cff1941413 Make sdiff --left-column work as expected
MFC after:	3 days
2016-12-30 23:41:33 +00:00
bapt
f1028aefeb Fix typos in sdiff(1) message and improve display 2016-10-15 19:55:07 +00:00
bapt
a3cb40286e Move cleanup() into the edit.c file which is the only users of that function
Remove common.{c,h}
2016-10-15 13:45:09 +00:00
bapt
f7a9447d0e Turn editit into a static function 2016-10-15 13:42:38 +00:00
bapt
5caa25d51a Remove the common.h include which is actually not used in sdiff.c 2016-10-15 13:41:58 +00:00
bapt
1d6d82b582 Remove reference of z(s)diff which was dropped before importing 2016-09-18 10:06:35 +00:00
emaste
a1a3735a51 sdiff: improve errx string
errx() appends a newline so \n is superfluous. Also switch to lower case
with no period for consistency with other errx strings.
2016-09-15 02:48:56 +00:00
bdrewery
33f1090a42 DIRDEPS_BUILD: Add some missing dirctories to the build.
Sponsored by:	EMC / Isilon Storage Division
2016-08-31 19:30:59 +00:00
bapt
767fa24126 sdiff: remove non finish/function code
2 extra options not available neither on other BSD nor in GNU sdiff:
--diff-pid and --pipe-fd were present in the SoC code, none were usable

Just remove it
2016-08-05 19:14:55 +00:00
bapt
4ecca13b4c Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
bdrewery
5a79715940 DIRDEPS_BUILD: Connect new directories and update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-06-03 19:25:30 +00:00
cem
0a07aade42 sdiff(1): Fix potential NULL deref in cleanup path
In the presence of the --diff-pid argument, it is possible for 'diffpipe' to be
NULL.  Only fclose() it if it was initialized.

Reported by:	Coverity
CID:		1355183
Sponsored by:	EMC / Isilon Storage Division
2016-05-10 20:09:40 +00:00
bapt
15411e495d Only one program is build in usr.bin/sdiff use the right include 2016-05-07 20:23:26 +00:00
bapt
3e534bbcb8 Revert r299218 VISUAL is actually a perfecly valid env to specify an editor 2016-05-07 18:58:07 +00:00
bapt
df74ac413b Only use EDITOR as a variable to specify which text editor to use 2016-05-07 18:48:48 +00:00
bapt
f325e54255 Directly call the editor if needed instead of spawning /bin/sh 2016-05-07 18:44:30 +00:00
bapt
bb619f9f53 Replace fparseln(3) with getline(3)
It removes a dependency on libutil.
2016-05-07 18:21:58 +00:00
ngie
92100036c8 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
  namespacing is kept with FILES appropriately, and that this shouldn't need
  to be repeated if the namespace changes -- only the definition of PACKAGE
  needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
  `tests`. In the event we get to the point where things can be split up
  enough in the base system, it would make more sense to group the tests
  with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
  previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
  bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
  ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
  and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
2016-05-04 23:20:53 +00:00
bz
31a46ef3a0 fgetc returns an int not a char.
Found by:   powerpc builds failing due to comparing with EOF raised:
"comparison is always false due to limited range of data type"
2016-05-02 15:07:43 +00:00
bapt
47bc90320f When checking for binary file, check if ch is not EOF only ch actually got
a value assigned

Reported by:	pfg
2016-04-30 14:48:30 +00:00
bapt
8f5c11fdbe import sdiff(1) from GSoC 2012
Import sdiff(1) from the diff version written by Raymond Lai,
improved during GSoC 2012 by Jesse Hagewood.

Compared to the version done in during that summer of code:
- Remove the zlib frontend: zsdiff
- Compatible output (column size and separators) with GNU sdiff

Compared to GNU sdiff in ports:
- The only difference is padding using spaces vs tabs

Compared to OpenBSD and NetBSD import:
- Implement missing options (including long options) from GNU sdiff
- Improved support for the edition mode (signal handling)
- Output visually compatible with GNU sdiff: size of columns

While here import regression tests from NetBSD adapted to fit the output as
expected by GNU sdiff

Reviewed by:	emaste (in part)
Obtained from:	OpenBSD, NetBSD, GSoC 2012
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5981
Differential Revision:	https://reviews.freebsd.org/D6032 (diff with NetBSD version)
Differential Revision:	https://reviews.freebsd.org/D6033 (diff with OpenBSD version)
2016-04-29 23:27:15 +00:00