OpenBSD CVS

CVS log for src/usr.bin/rs/rs.c


[BACK] Up to [local] / src / usr.bin / rs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.30 / (download) - annotate - [select for diffs], Thu Dec 3 12:23:15 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, HEAD
Changes since 1.29: +69 -71 lines
Diff to previous 1.29 (colored)

UTF-8 support: In a UTF-8 locale, properly align columns in the
presence of zero-width and double-width characters and replace
non-printable codepoints and invalid bytes with ASCII question
marks.  No change in the C/POSIX locale.
As a side effect, get rid of all pointer to pointer variables
and simplify some of the code.

Partially based on ideas from tedu@.
Feedback and OK czarkoff@, OK tedu@.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Nov 14 17:03:02 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +7 -8 lines
Diff to previous 1.28 (colored)

Fix the obvious bug that with -z, every column was at least as wide
as the previous one.  While here, shorten the -z code by one line.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Nov 10 14:42:41 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +25 -31 lines
Diff to previous 1.27 (colored)

With -H, do not overrun your static buffer on files longer than 4 kB.
With -K, do not print bogus blank lines in case of premature EOF.

While here, completely rewrite get_line() in a modern style using
getline(3), ferror(3), strdup(3), and ssize_t for line lengths.
Completely get rid of the static buffer.
I wouldn't be very surprised if this fixes even more bugs
than the two ones mentioned above.

OK (and "amazing") deraadt@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:08 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.26 / (download) - annotate - [select for diffs], Tue Oct 6 03:26:31 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

data processing stdin to stdout; tame "stdout"

Revision 1.25 / (download) - annotate - [select for diffs], Thu Aug 20 22:32:41 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert

Revision 1.24 / (download) - annotate - [select for diffs], Wed Oct 8 04:07:24 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

userland reallocarray audit.

Replace malloc() and realloc() calls that may have integer overflow in the
multiplication of the size argument with reallocarray().

ok deraadt@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 15 15:47:53 2013 UTC (10 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Include unistd.h as it is the standard location for getopt().
From Eitan Adler

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 3 19:26:24 2012 UTC (11 years, 5 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (colored)

don't try to stuff ptr differences into an int; from Arto Jonsson; ok espie@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Mar 4 04:05:15 2012 UTC (12 years, 2 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.20: +6 -6 lines
Diff to previous 1.20 (colored)

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:42 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.19: +1 -15 lines
Diff to previous 1.19 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 14 20:51:47 2009 UTC (14 years, 7 months ago) by sobrado
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

sort flags.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:34 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 17 09:45:00 2006 UTC (18 years, 1 month ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.16: +4 -60 lines
Diff to previous 1.16 (colored)

Three undocumented options got lost in the conversion to getopt(3).
Remove their remaining code, since they were not working before.

Initial diff from Steffen Wendzel.

ok millert@

Revision 1.16 / (download) - annotate - [select for diffs], Sun May 15 13:19:14 2005 UTC (19 years ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

oops. grasp of alphabet...slipping...

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 15 01:36:13 2005 UTC (19 years ago) by millert
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Make usage/SYNOPSIS saner and sort the options.  With jmc@

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 14 23:08:47 2005 UTC (19 years ago) by millert
Branch: MAIN
Changes since 1.13: +48 -40 lines
Diff to previous 1.13 (colored)

Replace homegrown getnum() with strtonum() and replace atoi() with
strtonum() and strtol().

Revision 1.13 / (download) - annotate - [select for diffs], Sat May 14 17:12:51 2005 UTC (19 years ago) by millert
Branch: MAIN
Changes since 1.12: +4 -28 lines
Diff to previous 1.12 (colored)

kill commented out code

Revision 1.12 / (download) - annotate - [select for diffs], Sat May 14 17:01:41 2005 UTC (19 years ago) by millert
Branch: MAIN
Changes since 1.11: +122 -99 lines
Diff to previous 1.11 (colored)

make this use getopt()

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 13 20:08:21 2004 UTC (20 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

use NULL for pointers.  from Joris Vink

Revision 1.10 / (download) - annotate - [select for diffs], Thu Oct 16 16:57:14 2003 UTC (20 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.9: +10 -6 lines
Diff to previous 1.9 (colored)

better realloc.  ok deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:50 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.8: +14 -24 lines
Diff to previous 1.8 (colored)

mostly ansi cleanup; pval ok

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:15 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.7: +2 -6 lines
Diff to previous 1.7 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:52 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.6: +11 -11 lines
Diff to previous 1.6 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:16 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.5: +18 -18 lines
Diff to previous 1.5 (colored)

kill more registers

millert@ ok

Revision 1.5 / (download) - annotate - [select for diffs], Sun Oct 28 03:56:46 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

fix -z; jarle@uninett.no

Revision 1.4 / (download) - annotate - [select for diffs], Fri Sep 12 04:12:54 1997 UTC (26 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.3: +4 -2 lines
Diff to previous 1.3 (colored)

Kill extra newline in err()/warn().

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 05:38:47 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 21 21:37:11 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.1: +46 -45 lines
Diff to previous 1.1 (colored)

avoid divide-by-zero trap when specifying small widths
do not overrun entry array when printing output tables
cleanup storage allocation for entries
use err/warn etc.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:03 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:46:03 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.