summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2014-10-20protect the roff parser from dividing by zero;Ingo Schwarze
issue found and patch written by kristaps@
2014-10-20As reported by Marcus Merighi, hosts enumeration no longer works.Ingo Schwarze
The asr library no longer supports gethostent(3), and there is no reasonable way to implement it. Consequently, as suggested by guenther@, error out when hosts enumeration is requested. OK deraadt@ guenther@ florian@ Also remove the now useless calls to sethostent(3) and endhostend(3) as suggested by florian@.
2014-10-20correct the spacing after in-line equationsIngo Schwarze
that start at the beginning of an input line but end before the end of an input line
2014-10-20correctly parse spacing around in-line equationsIngo Schwarze
at the beginning and at the end of input lines; issue reported by kristaps@
2014-10-20document sinclude/-includeMarc Espie
2014-10-20fix if (statement);Jonathan Gray
ok dlg@
2014-10-20whitespaceDamien Miller
2014-10-20correct spacing *after* inline equations (much simpler than expected)Ingo Schwarze
2014-10-20correct spacing before inline equationsIngo Schwarze
2014-10-20s_client: don't call shutdown on a non-existent socket descriptor.Brent Cook
from Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> ok beck@, deraadt@
2014-10-20show the {MDOC,MAN}_EQN node, it contains interesting information,Ingo Schwarze
in particular line and column numbers and flags; but hide the uninteresting EQN_ROOT box
2014-10-19Move the description of mg automatic recentering further down theMark Lumsden
tutorial, next to the C-l (recenter) command description. This also removes confusion if you read the tutorial on a screen larger than 24 lines. Input jmc@ ok florian@
2014-10-19rearrange -d, again, after giving ingo some dodgy advice;Jason McIntyre
ok ingo
2014-10-19in usage() and SYNOPSIS, sort options as suggested by jmc@Ingo Schwarze
2014-10-18Fix description of Ss and Se.Nicholas Marriott
2014-10-18plug file descriptor leaks on read or write failure;Ingo Schwarze
hinted at by Steffen Nurpmeso <sdaoden at yandex dot com>.
2014-10-18enable the sinclude/-include feature support I wrote long ago.Marc Espie
Other systems now have it, xenocara is using it. talked over with kettenis@ who checked release still works. I did a full bulk build with this and did not notice any issue.
2014-10-17Correctly encode half line feed in the output stream for -f;Ingo Schwarze
this patch only changes two bits, note that '\011' != '9' == '\071'. Bug introduced by the original author, Michael Rendell, and committed by Keith Bostic on May 22, 1990 (CSRG SCCS rev. 5.1). The following operating systems are affected: 4.3BSD Reno, BSD Net/2, 4.4BSD, 4.4BSD Lite1, 4.4BSD Lite2, and all versions of 386BSD, NetBSD, OpenBSD, FreeBSD, DragonFly, Debian GNU/Linux (package bsdmainutils) and probably many others. "that's a fun one" millert@, "nice find" deraadt@
2014-10-17Partial revert of rev. 1.7 (Nov. 21, 2000):Ingo Schwarze
The half line feed escape codes are decimal 8 and 9 (octal 010 and 011). While here, make it clear that the numbers are ASCII, and consistently use lower cases character names in the first column and decimal numbers in the parentheses at the end of the second column. OK millert@
2014-10-17Instead of doing strvis() of gecos string on output, do it whenTodd C. Miller
storing them in struct person since they are only used for output. Uses reallocarray() for overflow detection. OK deraadt@
2014-10-17Use strlcpy() instead of strncpy() when making a copy of pw_gecos.Todd C. Miller
2014-10-17Add the -d flag (limit display depth) for compatibility with FreeBSD,Ingo Schwarze
DragonFly, NetBSD and GNU coreutils, even though it's not POSIX. Actually, this simplifies the code rather than complicating it. Because -a and -d need not be mutually exclusive (as observed by millert@) and -s is identical to -d 0, -a and -s are no longer mutually exclusive, but -as and -sa are now the same as -s. That is explicitly allowed by POSIX. Based on a patch from William Orr <will at worrbase dot com>, but extensively massaged and HISTORY added by me. feedback and ok millert@
2014-10-17If gotoeop() is called requiring more than one iteration, it behavesMark Lumsden
oddly if it reaches the end of buffer before completing all iterations. This diff makes the kill-paragraph and forward-paragraph commands stop once they can go no further. ok florian@
2014-10-17strvis() requires that the buffer is at least 4 * srclen + 1.Doug Hogan
ok deraadt@
2014-10-16Use reallocarray() where possible. There are further possible overflowsTheo de Raadt
in the region, but my time is limited...
2014-10-161) Fix a segfault triggered by an input line containing two consecutiveIngo Schwarze
backspace characters beyond column MAX_SHRT, overflowing c_column. 2) Fix imcomplete initialization of the final element of the *count array by adding a missing pair of parentheses. 3) For code clarity and extra safety, change all variables dealing with column numbers from int to size_t such that they cannot overflow. Found while reviewing the patch from deraadt@'s reallocarray() rampage. Feedback and OK millert@.
2014-10-16Repair BUF_strdup() breakage.Joel Sing
2014-10-16Use reallocarray() to get integer overflow detection.Lawrence Teo
ok deraadt@ djm@
2014-10-16oops, don't escape the first token of inline equationsIngo Schwarze
2014-10-16Implement in-line equations, much needed by Xenocara manuals.Ingo Schwarze
Put the steering into the roff parser rather than into the mdoc parser such that it works for all macro languages and on both text and macro lines. Line breaks and blank characters generated before and after in-line equations are not perfect yet, but let's do one thing at a time.
2014-10-15some choice thoughts on back compatTed Unangst
2014-10-14create a REALLOCARRAY macro, and use it where it gives us overflowTheo de Raadt
protection for free ok guenther
2014-10-14even if a table has zero columns, do not segfault in the formatter;Ingo Schwarze
bug reported by bentley@
2014-10-14obvious use of reallocarray()Theo de Raadt
2014-10-14plug a memory leak; from Maxime Villard.Daniel Dickman
ok djm@
2014-10-14Rudimentary implementation of the e, x, and z table layout modifiersIngo Schwarze
to equalize, maximize, and ignore the width of columns. Does not yet take vertical rulers into account, and does not do line breaks within table cells. Considerably improves the lftp(1) manual; issue noticed by sthen@.
2014-10-13implement font modifiers in table layoutsIngo Schwarze
2014-10-13Properly scale string length measurements for PostScript and PDF output;Ingo Schwarze
this doesn't change anything for ASCII and UTF-8. Problem reported by bentley@.
2014-10-13Add missing */ after $OpenBSD$ tagCharles Longeau
ok schwarze@
2014-10-13gotoeop() does not behave as expected when there is no '\n' at the end of theMark Lumsden
buffer. ok florian@
2014-10-13Stricter syntax checking of Unicode character names:Ingo Schwarze
Require exactly 4, 5 or 6 hex digits and allow nothing else. This avoids mishandling stuff like \[ua] and \C'uA' as Unicode and also fixes underlining in eqn(7) -Thtml output which uses \[ul]. Problem found and semantics suggested by kristaps@.
2014-10-13Do not warn about declarations of functions returning function pointers,Ingo Schwarze
getting rid of a false positive noticed by bentley@.
2014-10-13Add dumping of struct dqblk done by quotactl(2)Philip Guenther
ok millert@
2014-10-13prefer C99 array initialization syntax.Brent Cook
use C99 array initialization syntax for strict C compilers. from kinichiro, found building with HP/UX compiler ok deraadt@, guenther@
2014-10-13Use O_NONBLOCK over FIONBIO.Brent Cook
Prefer this because it is the POSIX standard and has consistent behavior across platforms. Use BIO_socket_nbio consistently across the tree. from Jonas 'Sortie' Termansen, ok deraadt@
2014-10-13whitespaceDamien Miller
2014-10-12Don't assume that right-shift sign-extends integers.Alexandre Ratchov
2014-10-12add missing entry for .ll to the dispatch table;Ingo Schwarze
patch from Martin <Natano at natano dot net>, thanks
2014-10-12bugfix: do not parse quoted strings for tokens; fixes glFrustum(3)Ingo Schwarze
2014-10-12Improve error handling in the eqn(7) parser.Ingo Schwarze
Get rid of the first fatal error, MANDOCERR_EQNSYNT. In eqn(7), there is no need to be bug-compatible with groff, so there is no need to abondon the whole equation in case of a syntax error. In particular: * Skip "back", "delim", "down", "fwd", "gfont", "gsize", "left", "right", "size", and "up" without arguments. * Skip "gsize" and "size" with a non-numeric argument. * Skip closing delimiters that are not open. * Skip "above" outside piles. * For diacritic marks and binary operators without a left operand, default to an empty box. * Let piles and matrices take one argument rather than insisting on a braced list. Let HTML output handle that, too. * When rewinding, if the root box is guaranteed to match the termination condition, no error handling is needed.