OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:05 2019 UTC (4 years, 10 months ago) by deraadt
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, HEAD
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 28 05:35:35 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +1 -1 lines
Diff to previous 1.30 (colored)

mkstemp() returns -1 on failure

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jun 27 18:03:37 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Some asprintf() calls were checked < 0, rather than the precise == -1.
ok millert nicm tb, etc

Revision 1.29 / (download) - annotate - [select for diffs], Sun Apr 2 02:51:51 2017 UTC (7 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: 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
Changes since 1.28: +2 -10 lines
Diff to previous 1.28 (colored)

Replace snprintf(NULL, malloc, snprintf.... with the much better asprintf.
ok millert

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 15 01:00:17 2016 UTC (8 years, 2 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Replace two malloc casts that deraadt@ and I removed over the past year
or two. Upstream wants to keep them for C++ support, and it isn't worth
maintaining a larger diff. No binary change.

Upstream commit:

https://github.com/fanf2/unifdef/commit/87dfd91

I'll send more merging diffs to tech@ soon.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 10 22:52:12 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.26: +6 -2 lines
Diff to previous 1.26 (colored)

Merge a lexer fix from upstream:

https://github.com/fanf2/unifdef/commit/90ca2eee76db715943ec4b7ca2892d155ca64075

Fixes the supplied test case, as expected.

ok sthen@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 10 19:10:46 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.25: +7 -7 lines
Diff to previous 1.25 (colored)

Capitalize a few error messages to reduce diff with upstream.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Dec 4 21:23:19 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.24: +1 -1 lines
Diff to previous 1.24 (colored)

Document that the -M option doesn't save a backup when passed ''. Also
clean up the corresponding logic to avoid a useless rename(2) call.

ok deraadt sthen

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

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

Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 5 06:57:01 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +4 -1 lines
Diff to previous 1.22 (colored)

tame "stdio rpath wpath cpath fattr", because this creates new files,
fchmod's them, and possibly renames them.
ok doug

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 5 06:54:59 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +25 -5 lines
Diff to previous 1.21 (colored)

refactor, so we don't a C function in a .h file, yuck!

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 3 20:12:53 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.20: +2 -0 lines
Diff to previous 1.20 (colored)

you can't edit stdin in place. check for this before the hack that
increments argc when run with no arguments, causing a read past the end
of argv.

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

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

Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 18 18:28:38 2015 UTC (9 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.18: +5 -4 lines
Diff to previous 1.18 (colored)

Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert

Revision 1.18 / (download) - annotate - [select for diffs], Tue Feb 17 05:16:09 2015 UTC (9 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Convert a strcpy() call to strlcpy(); ok millert@ sthen@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 30 06:06:09 2014 UTC (10 years ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

tidy up SYNOPSIS, usage() and the options list; ok sthen

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 18 21:11:34 2014 UTC (10 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.15: +944 -540 lines
Diff to previous 1.15 (colored)

Since we've been making heavy use of unifdef recently: update it to the
recent 2.10 release.

"This code was derived from software contributed to Berkeley by Dave Yost.
It was rewritten to support ANSI C by Tony Finch. The original version
of unifdef carried the 4-clause BSD copyright licence. None of its code
remains in this version (though some of the names remain) so it now
carries a more liberal licence."

ok deraadt@

Revision 1.15 / (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_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
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:46 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.13: +1 -12 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Mon Jun 25 15:57:28 2007 UTC (16 years, 10 months ago) by jmc
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.12: +3 -3 lines
Diff to previous 1.12 (colored)

kill "is is"; from Charles Longeau

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 2 14:12:51 2007 UTC (17 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.11: +6 -4 lines
Diff to previous 1.11 (colored)

tidy up synopsis and usage(); sort options;
from Igor Sobrado, tweaked by myself

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 30 18:37:48 2003 UTC (20 years, 10 months ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.10: +13 -7 lines
Diff to previous 1.10 (colored)

sync with freebsd:
- avoid a coredump in 'line mode' and correct a comment
- stub for -I option (our manpage already mentions this)
- add author's copyright (tony finch)
millert@ ok

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

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

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 22 18:26:15 2003 UTC (21 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.8: +153 -57 lines
Diff to previous 1.8 (colored)

more sync from freebsd; tedu@Stanford.EDU

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 18 23:42:51 2003 UTC (21 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +681 -588 lines
Diff to previous 1.7 (colored)

merge; by tedu@Stanford.EDU

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 2 07:16:23 2002 UTC (21 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +737 -433 lines
Diff to previous 1.6 (colored)

freebsd diffs; merged by tedu@Stanford.EDU

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 4 20:27:16 2002 UTC (21 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +20 -21 lines
Diff to previous 1.5 (colored)

remove the BSS crud

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 10 19:13:07 2002 UTC (22 years ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.4: +4 -5 lines
Diff to previous 1.4 (colored)

In getlin(): match and handle EOF before checking isprint()
millert ok.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:56 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.3: +12 -12 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Mon Nov 16 21:58:29 1998 UTC (25 years, 6 months ago) by deraadt
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
Changes since 1.2: +504 -477 lines
Diff to previous 1.2 (colored)

clean; adding // comment support

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:42:10 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:29 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:29 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.