summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2014-10-30Major bugsquashing with respect to -offset and -width:Ingo Schwarze
1. Support specifying the .Bd and .Bl -offset as a macro default width; while here, simplify the code handling the same for .Bl -width. 2. Correct handling of .Bl -offset arguments: unlike .Bd -offset, the arguments "left", "indent", and "indent-two" have no special meaning. 3. Fix the scaling of string length -offset and -width arguments in -Thtml. Triggered by an incomplete documentation patch from bentley@.
2014-10-30my mistake. we already did increase buffers to 16k; increasing to 64kTed Unangst
would be the next stage of embiggening. restore 16k.
2014-10-30rework the poll loop to poll in both directions so it doesn't get stuckTed Unangst
if one pipe stalls out. from a diff by Arne Becker. (buffer size left alone for now)
2014-10-30use ressl constant; from Jan KlemkowTed Unangst
2014-10-30mandoc.1: fix a macro error in previousJason McIntyre
main.c: add -K to usage() and wrap nicely ok schwarze
2014-10-30support UTF-8 and ISO-8859-1 input by integrating modified partsIngo Schwarze
of kristaps@' version of the preconv(1) utility into mandoc(1); positive feedback from bentley@ and no concern raised when shown on tech@
2014-10-29Some fine tuning of console rendering of named special characters.Ingo Schwarze
Correct ASCII rendering: \(lb \(<> \(sd Make ASCII rendering agree with groff, using backspace overstrike: \(da \(ua \(dA \(uA \(fa \(c* \(c+ \(ib \(ip \(/_ \(pp \(is \(dd \(dg
2014-10-29In terminal output, unify handling of Unicode and numbered characterIngo Schwarze
escape sequences just like it was earlier implemented for -Thtml. Do not let control characters other than ASCII 9 (horizontal tab) propagate to the output, even though groff allows them; but that really doesn't look like a great idea. Let mchars_num2char() return int such that we can distinguish invalid \N syntax from \N'0'. This also reduces the danger of signed char issues popping up.
2014-10-28In -Tascii mode, print "<?>" only for Unicode escapes of unknownIngo Schwarze
representation, not for character escapes with unknown names. According to groff, the latter produce no output, and we now warn about them.
2014-10-28Make the character table available to libroff so it can check theIngo Schwarze
validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
2014-10-28Tighten Unicode escape name parsing.Ingo Schwarze
Accept only 0xXXXX, 0xYXXXX, 0x10XXXX with Y != 0. This simplifies mchars_num2uc().
2014-10-28Refine -Tascii rendering of Unicode characters, mostly to better agreeIngo Schwarze
with groff, in particular in cases where groff uses backspace overstrike. In two cases, agreement is impossible because groff clobbers the previous line: \(*G \(*S In a number of cases, groff rendering is so misleading that i chose to render differently: \(Sd \(TP \(Tp \(Po \(ps \(sc \(r! \(r? \(de While here, also correct the \(la and \(ra Unicode code points.
2014-10-27Merge linkw and movew which are virtually identical.Nicholas Marriott
2014-10-27Move cfg_causes local into cfg.c and remove struct causelist.Nicholas Marriott
2014-10-27Support overstriking by backspace in PostScript and PDF output.Ingo Schwarze
Of course, this is only a minor improvement; it would be much better to support non-ASCII characters in these output modes, but that would require major changes that i'm not going to work on right now. The main reason for doing this is that it allows to get ASCII output closer to groff.
2014-10-27Handle output encoding for unicode, numbered and named escape sequencesIngo Schwarze
in one common, safe way instead of three different ways. In particular, * skip NUL, it is used to mean "no output desired" * deny 0x01-0x1F and 0x7F-0x9F, print REPLACEMENT CHARACTER instead * print 0x20-0x7E literally or name-encoded, as required * print characters above 0x9F numerically
2014-10-27Fix a regression in term.c rev. 1.89 reported by bentley@:Ingo Schwarze
In UTF-8 output, do not print anything if mchars_spec2cp() returns 0. In particular, this repairs handling of zero-width spaces (\&). While here, let mchars_spec2cp() return 0xFFFD instead of -1 if the character is not found, simplifying the using code. In HTML output, do not print obfuscated ASCII characters and do not test for one-char escapes, mchars_spec2cp() already does that.
2014-10-26Prefer mkostemp(O_CLOEXEC) over mkstemp()+fcntl(F_SETFD)Philip Guenther
Prefer fopen("re") over fopen("r")+fcntl(F_SETFD) ok otto@ millert@
2014-10-26In -Tascii mode, provide approximations even for some Unicode escapeIngo Schwarze
sequences above codepoint 512 by doing a reverse lookup in the existing mandoc_char(7) character table. Again, groff isn't smart enough to do this and silently discards such escape sequences without printing anything.
2014-10-26Improve -Tascii output for Unicode escape sequences: For the first 512Ingo Schwarze
code points, provide ASCII approximations. This is already much better than what groff does, which prints nothing for most code points. A few minor fixes while here: * Handle Unicode escape sequences in the ASCII range. * In case of errors, use the REPLACEMENT CHARACTER U+FFFD for -Tutf8 and the string "<?>" for -Tascii output. * Handle all one-character escape sequences in mchars_spec2{cp,str}() and remove the workarounds on the higher level.
2014-10-26remove unused variablesCharles Longeau
ok schwarze@
2014-10-26POLLIN is not guaranteed to be set in revents for EOF so check forTodd C. Miller
POLLHUP too. OK deraadt@
2014-10-26Move the #define _KERNEL wrapping to only cover <sys/file.h>Philip Guenther
2014-10-26Add parentheses to suppress compiler warning.Brad Smith
sort.c:295:35: warning: '&&' within '||' [-Wlogical-op-parentheses] ok guenther@
2014-10-26Place additional parantheses around readdir() and check return does notBrad Smith
equal NULL. apprentice.c:645:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] With input and ok guenther@
2014-10-25With the current architecture, we can't support inline equationsIngo Schwarze
inside tables, sorry. So don't even try to parse tbl(7) blocks for eqn(7) delimiters. Broken table layout found in glPixelMap(3) while investigating a bug report by Theo Buehler <theo at math dot ethz dot ch>.
2014-10-25Fix a NULL pointer dereference reportedIngo Schwarze
by Theo Buehler <theo at math dot ethz dot ch> on tech@: Do not attempt to parse empty equations.
2014-10-25Report arguments to .EQ as an error, and simplify the code:Ingo Schwarze
* drop trivial wrapper function roff_openeqn() * drop unused first arg of function eqn_alloc() * drop usused member "name" of struct eqn_node
2014-10-25Add pane_input_off format, from Anish R Athalye.Nicholas Marriott
2014-10-24tedu networks(5) support;Ingo Schwarze
OK florian@ henning@
2014-10-24This tool doesn't actually support networks(5).Ingo Schwarze
So remove the call to setnetent(3) which is a no-op here (except for consuming a file descriptor) and the call sethostent(3) which is a no-op in general. Also remove the misleading reference to networks(5) from the manual. OK okan@ henning@
2014-10-24Remove unnecessary include: netinet/in_systm.h is not needed by theseLawrence Teo
programs. ok deraadt@ millert@
2014-10-23Remove networks(5) support.Ingo Schwarze
In particular, do not call getnetbyaddr(3), use gethostbyaddr(3) only. Do not call setnetent(3) and the dummy sethostent(3). OK henning@; and deraadt@ agrees with the general direction.
2014-10-22make the description of the syntax of function lists agreeIngo Schwarze
with our actual implementation, which also agrees with POSIX; triggered by guenther@'s answer to a question from chrisz@; ok chrisz@ guenther@
2014-10-22Fix some spacing nits.Nicholas Marriott
2014-10-22Merge unlink-window into kill-window.Nicholas Marriott
2014-10-22document the special \c escape sequence that can only be used with %b;Ingo Schwarze
gap found by guenther@ following a question asked by Frank Brodbeck <fab at split dash brain dot de>; while here, sort escape sequences, this part of the patch from Frank Brodbeck; ok guenther@
2014-10-22Use arc4random_buf() instead of RAND(_pseudo)?_bytes().Joel Sing
ok bcook@
2014-10-22None of these need <openssl/rand.h>Joel Sing
2014-10-21Only redraw pane when it has actually changed.Nicholas Marriott
2014-10-21Save next item after firing command in case it has added to the queue.Nicholas Marriott
2014-10-21cope with sending or receiving files beyond 65536 blocks in length.David Gwynne
reported by justin mayes on misc@ ok deraadt@
2014-10-20Better format for printf format attributes.Nicholas Marriott
2014-10-20Move template defines back into .c files.Nicholas Marriott
2014-10-20Tidy up some includes.Nicholas Marriott
2014-10-20Move suspend-client code into detach-client.Nicholas Marriott
2014-10-20Move tiny has-session function into cmd-new-session.c.Nicholas Marriott
2014-10-20superseded by usr.bin/mandoc/mansearch.cIngo Schwarze
removal suggested by daniel@; ok deraadt@
2014-10-20Argh, meant to remove this file...Nicholas Marriott
2014-10-20Move list-commands into list-keys.Nicholas Marriott