Commit Graph

15 Commits

Author SHA1 Message Date
FRIGN eee98ed3a4 Fix coding style
It was about damn time. Consistency is very important in such a
big codebase.
2014-11-13 18:08:43 +00:00
sin 6449db8691 Make both arguments to cmp(1) mandatory and handle "-" properly 2014-11-13 16:01:10 +00:00
Hiltjo Posthuma 6dd138613e cmp: suppress file open error with sflag
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:44 +01:00
Hiltjo Posthuma eee182cdd7 cmp: fix missing braces
just a style fix, this doesn't change any behaviour since fp[1] is set to stdin above.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:21:06 +01:00
Hiltjo Posthuma 6b45824463 cmp: fix wrong rebase, missing line, sorry
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:59 +01:00
Hiltjo Posthuma ce28f6ca90 cmp: dont output EOF difference is sflag is set
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:36 +01:00
Hiltjo Posthuma a7954e8cab cmp: fix line numbers
test case:
	printf 'a\n\na' > t1
	printf 'a\na' > t2
	cmp t1 t2

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:28 +01:00
Hiltjo Posthuma 1059cf5f17 cmp: make EOF check more clear
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:21 +01:00
sin 760690c85e Make code a bit more clear 2014-03-04 10:43:51 +00:00
sin c28e2a39ec We should not require both files to be present for cmp(1)
If the second file is not present, read from standard input.
2014-03-04 10:36:54 +00:00
stateless 7216a53a7e Remove unnecessary exit(1) in usage()
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-06-19 19:58:19 +02:00
Christoph Lohmann 4d38f60685 Eliminating the getopt disgrace. 2013-06-14 20:20:47 +02:00
Connor Lane Smith 8ec404cdec update cmp, grep 2011-06-18 06:42:24 +01:00
Connor Lane Smith 8d087ae4fb cmp: cleanup 2011-06-10 02:00:27 +01:00
Connor Lane Smith 188d8ff93a add cmp, thanks stateless 2011-06-10 01:55:12 +01:00