OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 23 13:34:50 2024 UTC (3 weeks, 5 days ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

correct indentation; no functional change
ok tb@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Dec 6 13:48:05 2017 UTC (6 years, 5 months ago) by otto
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
Changes since 1.19: +2 -3 lines
Diff to previous 1.19 (colored)

strdup -> bstrdup; from Michael W. Bombardieri

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 29 14:34:17 2017 UTC (6 years, 5 months ago) by otto
Branch: MAIN
Changes since 1.18: +6 -4 lines
Diff to previous 1.18 (colored)

Pledge can be done earlier; from kshe

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 17 17:30:47 2016 UTC (7 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.17: +3 -1 lines
Diff to previous 1.17 (colored)

getopt(3) can be called twice (once for bc and once for dc), so reinit getopt
ok deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Nov 3 04:58:58 2015 UTC (8 years, 6 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored)

Surround pledge calls with blank lines.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 10 19:28:54 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +2 -5 lines
Diff to previous 1.15 (colored)

Rather than invoking fork/execve of dc(1) on a pipe, compile in the dc(1)
code directly and use it as a subfunction.  This refactoring allows use of
pledge "stdio rpath proc tty" in the main bc(1) process before fork, pledge
"stdio rpath tty" after fork, and fully reduced to "stdio" in the dc(1)
child.

This requires two recent to the kernel code (allowing sigsuspend(),
and kill() self as pid 0).
ok otto

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

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

Revision 1.14 / (download) - annotate - [select for diffs], Sat Oct 3 18:39:13 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +7 -1 lines
Diff to previous 1.13 (colored)

Now that dc(1) no longer supports !command with popen(), we can start
off with tame "stdio rpath".  Once the (optional) file is opened, a
further drop down to tame "stdio" works.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 26 18:34:51 2014 UTC (9 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Prefer setvbuf() to setlinebuf() for portability; ok deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Tue May 20 01:25:23 2014 UTC (10 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.11: +3 -5 lines
Diff to previous 1.11 (colored)

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:37 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, 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.10: +1 -5 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Sun Jul 29 17:12:18 2007 UTC (16 years, 9 months ago) by sobrado
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, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.9: +4 -3 lines
Diff to previous 1.9 (colored)

sync the command usage with its synopsis

ok jmc@

Revision 1.9 / (download) - annotate - [select for diffs], Sat Mar 25 07:49:56 2006 UTC (18 years, 1 month ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.8: +6 -7 lines
Diff to previous 1.8 (colored)

Use fstat(3) instead of stat(3) as a matter of principle. We don't
like race conditions, even if the effects of these are void and empty.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Mar 24 21:13:45 2006 UTC (18 years, 2 months ago) by otto
Branch: MAIN
Changes since 1.7: +13 -2 lines
Diff to previous 1.7 (colored)

For those of us (including me) who can't type: show an error message if
the argument is a dir. ok tom@

commit #1000 in slighlty less than 1000 days of commit access :-)

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jan 15 19:11:59 2006 UTC (18 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

delint wrt return values, including some missing BN return
values checks.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 18 07:49:00 2004 UTC (19 years, 7 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.5: +29 -10 lines
Diff to previous 1.5 (colored)

Implement command line evaluation of expressions by implementing the -e option.
ok weingart@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 13 08:17:41 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored)

Add missing include. From espie@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 1 09:13:24 2003 UTC (20 years, 5 months ago) by otto
Branch: MAIN
Changes since 1.3: +27 -11 lines
Diff to previous 1.3 (colored)

Allow for more registers using a 2 byte index. This feature is
enabled by supplying the -x option on the command line. Allows long
variable names in bc(1) (to appear soon). If no -x option is given,
behave exactly as before.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Sep 19 19:06:29 2003 UTC (20 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

blanks

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 19 19:00:36 2003 UTC (20 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

spaces

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 19 17:58:25 2003 UTC (20 years, 8 months ago) by otto
Branch: MAIN

A complete, BSD licensed rewrite of dc(1), using the bn(3) big number routines.

ok toby@ deraadt@

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.