Commit Graph

55 Commits

Author SHA1 Message Date
jsg d905fc10a3 prefer https links in man pages
ok gnezdo@ miod@ jmc@
2022-02-18 10:24:32 +00:00
deraadt 3aaa63eb46 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.
2019-06-28 13:34:58 +00:00
deraadt c2d43eca3f mkstemp() returns -1 on failure 2019-06-28 05:35:34 +00:00
deraadt 95af8abf27 Some asprintf() calls were checked < 0, rather than the precise == -1.
ok millert nicm tb, etc
2019-06-27 18:03:36 +00:00
anton ce9d60cac2 Pa -> Lk; ok jmc@ 2017-10-23 17:19:21 +00:00
deraadt bb25689d00 Replace snprintf(NULL, malloc, snprintf.... with the much better asprintf.
ok millert
2017-04-02 02:51:51 +00:00
mmcc f6de66e981 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.
2016-03-15 01:00:17 +00:00
mmcc 3e4407e961 Merge a lexer fix from upstream:
90ca2eee76

Fixes the supplied test case, as expected.

ok sthen@
2015-12-10 22:52:12 +00:00
mmcc 1aa225ce2b Remove extraneous punctuation in DIAGNOSTICS. Reduces diff with
upstream.

ok sthen@
2015-12-10 19:43:48 +00:00
mmcc 06d81d83ec Swap two DIAGNOSTICS entries to alphabetize. Reduces diff with upstream. 2015-12-10 19:13:46 +00:00
mmcc 64ac245def Capitalize a few error messages to reduce diff with upstream. 2015-12-10 19:10:46 +00:00
mmcc 09bd2acfad Fix previous by using the right argument name. 2015-12-05 23:27:35 +00:00
mmcc 1c51b8a569 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
2015-12-04 21:23:19 +00:00
deraadt 0bd1216cbf Change all tame callers to namechange to pledge(2). 2015-10-09 01:37:06 +00:00
deraadt 234ea76731 tame "stdio rpath wpath cpath fattr", because this creates new files,
fchmod's them, and possibly renames them.
ok doug
2015-10-05 06:57:01 +00:00
deraadt 5210fbc99b refactor, so we don't a C function in a .h file, yuck! 2015-10-05 06:54:59 +00:00
tedu cbd6e35a56 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.
2015-10-03 20:12:53 +00:00
schwarze 8b8da936ad don't use literal brackets to indicate optional syntax elements,
use the .Op macro (or in this case, .Oo/.Oc)
2015-09-12 15:27:38 +00:00
deraadt cfff592fdc Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
2015-08-20 22:32:41 +00:00
deraadt a47b6461a1 Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-18 18:28:36 +00:00
bentley 01a6998a3e Mark up email addresses semantically with Mt.
ok schwarze@
2015-02-17 16:29:16 +00:00
miod 4990e30766 Convert a strcpy() call to strlcpy(); ok millert@ sthen@ 2015-02-17 05:16:09 +00:00
jmc d893dc76a3 more tweaking; ok sthen 2014-05-03 14:13:52 +00:00
jmc 9aa4ed1c46 tidy up SYNOPSIS, usage() and the options list; ok sthen 2014-04-30 06:06:09 +00:00
sthen c3f747c90e Re-add rcsid, and switch back to our previous descriptions for -iDsym[=value]
and -iUsym which jmc and I find a bit easier to understand. ok jmc
2014-04-24 21:22:05 +00:00
sthen ebe1fdbdac 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@
2014-04-18 21:11:34 +00:00
jmc 64d9d867cd remove uesless Pp; 2013-01-17 21:29:14 +00:00
fgsch f9bbbf4534 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.
2012-03-04 04:05:15 +00:00
jmc f1c64ac4de add an EXIT STATUS section for /usr/bin; 2010-09-03 11:09:28 +00:00
deraadt 043fbe51c1 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
2009-10-27 23:59:19 +00:00
jmc c353573819 kill "is is"; from Charles Longeau 2007-06-25 15:57:28 +00:00
jmc 9490d37cb6 convert to new .Dd format; 2007-05-31 19:19:00 +00:00
jmc d93309c1aa tidy up synopsis and usage(); sort options;
from Igor Sobrado, tweaked by myself
2007-04-02 14:12:51 +00:00
avsm 5ff19d39ad remove -Werror from userland builds, to give us a chance to
use more verbose warning options if desired.
ok millert@, henning@, david@
2003-11-20 23:23:09 +00:00
jmc 7874e4d426 macros with too many args; 2003-10-23 09:09:13 +00:00
avsm 2b58363c5e 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
2003-06-30 18:37:48 +00:00
jmc 2aeff9fb4d - section reorder
- COMPATIBILITY merge
- macro cleanup
- kill whitespace at EOL
- new sentence, new line

ssh pages ok markus@
2003-06-10 09:12:09 +00:00
millert f75387cb26 Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.
2003-06-03 02:56:05 +00:00
deraadt 5603ab6bb3 more sync from freebsd; tedu@Stanford.EDU 2003-01-22 18:26:15 +00:00
deraadt ccd9ebdfd1 merge; by tedu@Stanford.EDU 2003-01-18 23:42:51 +00:00
deraadt 0fa2da06da nuke unifdefall 2002-12-02 07:18:50 +00:00
deraadt 46da93c0e6 freebsd diffs; merged by tedu@Stanford.EDU 2002-12-02 07:16:23 +00:00
deraadt 0686298c46 remove the BSS crud 2002-10-04 20:27:16 +00:00
jason 1f2c089e77 In getlin(): match and handle EOF before checking isprint()
millert ok.
2002-05-10 19:13:07 +00:00
millert c72b5b24e1 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. 2002-02-16 21:27:05 +00:00
aaron 05c781429d Various cleanups and standardizations. 2000-03-11 21:40:02 +00:00
aaron a3112c8a7c Some section re-ordering. 2000-03-06 03:17:38 +00:00
aaron 22eba60435 Remove some redundant .Pp. 1999-10-17 20:35:45 +00:00
aaron 4c2c4eb0f3 More consistent introduction to options. 1999-10-17 20:24:33 +00:00
aaron 2e0eb34f9e - remove trailing white space
- remove arguments from .Os macros
- remove arguments from .Nm macros, where appropriate
- some more Dq/Sq/Ql insanity
- still lots to do in the usr.bin tree... :/
1999-06-05 01:21:16 +00:00