summaryrefslogtreecommitdiffstats
path: root/usr.bin/unifdef/unifdef.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace snprintf(NULL, malloc, snprintf.... with the much better asprintf.deraadt2017-04-021-12/+4
| | | | ok millert
* Replace two malloc casts that deraadt@ and I removed over the past yearmmcc2016-03-151-2/+2
| | | | | | | | | | | 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.
* Merge a lexer fix from upstream:mmcc2015-12-101-2/+6
| | | | | | | | https://github.com/fanf2/unifdef/commit/90ca2eee76db715943ec4b7ca2892d155ca64075 Fixes the supplied test case, as expected. ok sthen@
* Capitalize a few error messages to reduce diff with upstream.mmcc2015-12-101-6/+6
|
* Document that the -M option doesn't save a backup when passed ''. Alsommcc2015-12-041-2/+2
| | | | | | clean up the corresponding logic to avoid a useless rename(2) call. ok deraadt sthen
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-2/+2
|
* tame "stdio rpath wpath cpath fattr", because this creates new files,deraadt2015-10-051-0/+3
| | | | | fchmod's them, and possibly renames them. ok doug
* refactor, so we don't a C function in a .h file, yuck!deraadt2015-10-051-5/+25
|
* you can't edit stdin in place. check for this before the hack thattedu2015-10-031-1/+3
| | | | | increments argc when run with no arguments, causing a read past the end of argv.
* Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopederaadt2015-08-201-1/+1
| | | | ok krw millert
* Convert many atoi() calls to strtonum(), adding range checks and failurederaadt2015-04-181-4/+5
| | | | | handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
* Convert a strcpy() call to strlcpy(); ok millert@ sthen@miod2015-02-171-2/+2
|
* tidy up SYNOPSIS, usage() and the options list; ok sthenjmc2014-04-301-3/+3
|
* Since we've been making heavy use of unifdef recently: update it to thesthen2014-04-181-541/+945
| | | | | | | | | | | | 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@
* In preparation for getline and getdelim additions to libc, rename getline()fgsch2012-03-041-4/+4
| | | | | occurrences to get_line(). Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-12/+1
| | | | | | | 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
* kill "is is"; from Charles Longeaujmc2007-06-251-3/+3
|
* tidy up synopsis and usage(); sort options;jmc2007-04-021-4/+6
| | | | from Igor Sobrado, tweaked by myself
* sync with freebsd:avsm2003-06-301-7/+13
| | | | | | | - 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
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* more sync from freebsd; tedu@Stanford.EDUderaadt2003-01-221-57/+153
|
* merge; by tedu@Stanford.EDUderaadt2003-01-181-586/+679
|
* freebsd diffs; merged by tedu@Stanford.EDUderaadt2002-12-021-433/+737
|
* remove the BSS crudderaadt2002-10-041-21/+20
|
* In getlin(): match and handle EOF before checking isprint()jason2002-05-101-5/+4
| | | | millert ok.
* 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.millert2002-02-161-12/+12
|
* clean; adding // comment supportderaadt1998-11-161-474/+501
|
* rcsidderaadt1996-06-261-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+654