History log of /freebsd-10-stable/usr.bin/comm/comm.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 227235 06-Nov-2011 ed

Mark global functions and/or variables in comm(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 204928 09-Mar-2010 ache

Add SIZE_MAX overflow check


# 204896 08-Mar-2010 ache

Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary comparison" instead.

POSIX says: "The input files shall be text files", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.


# 200604 16-Dec-2009 jh

- Prevent overflowing of the buffer length variable in getline() by
limiting its maximum value.
- Exit if reallocf(3) fails in getline(). Failure was silently
considered as end-of-file.

Reviewed by: ghelmer
Approved by: trasz (mentor)


# 200442 12-Dec-2009 jh

Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR: bin/140976
Submitted by: D'Arcy Cain (original version) [1]
Approved by: trasz (mentor)


# 179374 28-May-2008 ghelmer

Similar to changes previously made to src/usr.bin/uniq/uniq.c,
fix truncation of lines at LINE_MAX characters by dynamically
extending line buffers.


# 131497 02-Jul-2004 tjr

Add support for multibyte characters.


# 100819 28-Jul-2002 dwmalone

ANSIify function definitions to avoid a warning.
Minor constness changes.


# 97393 28-May-2002 tjr

No need to handle '-' explicitly in getopt() loop.

Obtained from: NetBSD


# 92920 21-Mar-2002 imp

remove __P


# 88717 30-Dec-2001 ache

Use LC_ALL to pick LC_COLLATE too (for strcoll())


# 87628 10-Dec-2001 dwmalone

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.


# 87246 02-Dec-2001 markm

Use __FBSDID().


# 87213 02-Dec-2001 markm

WARNS=2 fixup.


# 78718 24-Jun-2001 dd

Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).


# 72107 06-Feb-2001 charnier

Rework diagnostics text
Remove unused #include


# 54403 10-Dec-1999 ache

fix the same typo as in uniq


# 52616 29-Oct-1999 ache

toupper -> tolower to match changed behaviour of new grep case fold


# 52461 24-Oct-1999 ache

Cosmetique: use standard prototypes scheme
Back out prev change: toupper is more compatible with sort -f


# 52457 24-Oct-1999 ache

toupper->tolower to match what strcasecmp does


# 52453 24-Oct-1999 ache

Localize it

PR: 11221
Submitted by: Grigoriy Strokin <grg@philol.msu.ru>


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 41568 06-Dec-1998 archie

Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).


# 29207 07-Sep-1997 joerg

Teach comm(1) and uniq(1) about an option for case-insensitive work.

PR: 3042
Submitted by: graphix@iastate.edu (Kent Vander Velden)


# 27094 30-Jun-1997 charnier

Use err(3). Add DIAGNOSTIC section name in man page.


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 23691 11-Mar-1997 peter

This commit was generated by cvs2svn to compensate for changes in r23690,
which included commits to RCS files with non-trunk default branches.


# 23690 11-Mar-1997 peter

Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources