]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
13 years agoClean up parsing of delimiters in -mdoc. First, remove the "dowarn"
Kristaps Dzonsons [Tue, 19 Apr 2011 16:38:48 +0000 (16:38 +0000)]
Clean up parsing of delimiters in -mdoc.  First, remove the "dowarn"
variable from mandoc_getarg() so that it prints the warning every time.
Then, remove the warning from args_checkpunct().  This way, warnings
are being posted at the correct time.  This makes the flag argument to
mdoc_zargs() superfluous, so make it be zero when it's invoked.  Finally,
move the args() flags into mdoc_argv.c and make them enums.

13 years agoAdd more documentation bits to mandoc.3.
Kristaps Dzonsons [Tue, 19 Apr 2011 16:30:00 +0000 (16:30 +0000)]
Add more documentation bits to mandoc.3.

13 years ago.Pp in .Bl -column
Ingo Schwarze [Sun, 17 Apr 2011 13:32:27 +0000 (13:32 +0000)]
.Pp in .Bl -column

13 years agoThe semantics of .Bk was described incorrectly
Ingo Schwarze [Sun, 17 Apr 2011 11:57:07 +0000 (11:57 +0000)]
The semantics of .Bk was described incorrectly
for the case of multiple sibling macros on a single input line.
Issue found investigating a question from sobrado@.
"I like this diff" kristaps@

13 years agoUse mandoc_getarg() for the regular case of processing unquoted
Kristaps Dzonsons [Sun, 17 Apr 2011 09:13:01 +0000 (09:13 +0000)]
Use mandoc_getarg() for the regular case of processing unquoted
arguments in -mdoc documents.

13 years agoGet mdoc_argv.c ready to use [some of] mandoc_getarg() by giving said
Kristaps Dzonsons [Sun, 17 Apr 2011 09:08:19 +0000 (09:08 +0000)]
Get mdoc_argv.c ready to use [some of] mandoc_getarg() by giving said
function a parameter to suppress warnings.

13 years agomini-bug at eol after .Bl -column .It
Ingo Schwarze [Sat, 16 Apr 2011 23:00:45 +0000 (23:00 +0000)]
mini-bug at eol after .Bl -column .It

13 years agolines in tables and .RS/.RE nesting
Ingo Schwarze [Sat, 16 Apr 2011 22:35:26 +0000 (22:35 +0000)]
lines in tables and .RS/.RE nesting

13 years agoCheck in fix to roff conditional if/else stack running out of space.
Kristaps Dzonsons [Wed, 13 Apr 2011 16:26:11 +0000 (16:26 +0000)]
Check in fix to roff conditional if/else stack running out of space.
This transforms the stack pop to occur prior to body execution, instead
of afterward.  Floated to tech@ without response, but it makes sense
that this is alright and doesn't cause problems during extensive
testing.

13 years agoBack out commit to roff.c that needs to go in on its own.
Kristaps Dzonsons [Wed, 13 Apr 2011 10:01:27 +0000 (10:01 +0000)]
Back out commit to roff.c that needs to go in on its own.

13 years agoRemove TODO from prior commit of lifting warnings from `Sh', `Ss', `SH',
Kristaps Dzonsons [Wed, 13 Apr 2011 09:57:41 +0000 (09:57 +0000)]
Remove TODO from prior commit of lifting warnings from `Sh', `Ss', `SH',
and `SS' bodies.

13 years agoRemove the warning for empty bodies of `Sh', `Ss', `SH', and `SS'. This
Kristaps Dzonsons [Wed, 13 Apr 2011 09:57:08 +0000 (09:57 +0000)]
Remove the warning for empty bodies of `Sh', `Ss', `SH', and `SS'.  This
prompted by a TODO by schwarze@, originally from Gleydson Soares, that
an empty `SS' was raising an error (it hasn't for some time).  It makes
sense these shouldn't warn, as omitting their contents doesn't change
anything in the structure of the document (groff and mandoc specifically
account for the whitespace between empty sections).

This doesn't change any manuals, which only refer to the line arguments
(or possibly next-line, in the case of man(7) syntax).

13 years agoempty .SS is ok
Ingo Schwarze [Tue, 12 Apr 2011 23:54:12 +0000 (23:54 +0000)]
empty .SS is ok

13 years agoLet mandoc-db also collect -man descriptions.
Kristaps Dzonsons [Tue, 12 Apr 2011 14:48:42 +0000 (14:48 +0000)]
Let mandoc-db also collect -man descriptions.

13 years agoUpdating mandoc-db manual page with new recno contents.
Kristaps Dzonsons [Mon, 11 Apr 2011 23:01:44 +0000 (23:01 +0000)]
Updating mandoc-db manual page with new recno contents.

13 years agoUpdate example.style.css to be a bit more readable by default.
Kristaps Dzonsons [Mon, 11 Apr 2011 22:58:28 +0000 (22:58 +0000)]
Update example.style.css to be a bit more readable by default.

13 years agoHave mandoc-db accumulate manual page descriptions (`Nd' in -mdoc parlance)
Kristaps Dzonsons [Mon, 11 Apr 2011 22:56:25 +0000 (22:56 +0000)]
Have mandoc-db accumulate manual page descriptions (`Nd' in -mdoc parlance)
in the index.  This allows, with both the btree and index, full emulation
of apropos(1) and other goodies.

13 years agoIgnore \# lines alongside \". From groff(7):
Kristaps Dzonsons [Mon, 11 Apr 2011 21:59:39 +0000 (21:59 +0000)]
Ignore \# lines alongside \".  From groff(7):

\#     Everything  up  to  and  including  the  next  newline is
       ignored.  This is interpreted in copy mode.  This is like \"
       except that the terminating newline is ignored as well.

13 years agoUse dbt_xxxx functions to stash both filename and manual section in the
Kristaps Dzonsons [Mon, 11 Apr 2011 21:36:44 +0000 (21:36 +0000)]
Use dbt_xxxx functions to stash both filename and manual section in the
value part of the index.  This is the actual manual section---before,
mandoc.cgi was relying on the file suffix, but this can be (e.g.) .man or
whatnot.  This is The Correct Way (tm).

13 years agoTidy up www page: remove all sorts of DIV crap, superfluous CSS, in-line
Kristaps Dzonsons [Sat, 9 Apr 2011 16:43:30 +0000 (16:43 +0000)]
Tidy up www page: remove all sorts of DIV crap, superfluous CSS, in-line
STYLE attributes, and so on.  Now renders nicely in lynx.

13 years agoSkeleton of documentation functions, types, and variables in mandoc.h.
Kristaps Dzonsons [Sat, 9 Apr 2011 15:53:48 +0000 (15:53 +0000)]
Skeleton of documentation functions, types, and variables in mandoc.h.

13 years agoLint catching some potential issues.
Kristaps Dzonsons [Sat, 9 Apr 2011 15:35:30 +0000 (15:35 +0000)]
Lint catching some potential issues.

13 years agoRemove a2roffdeco() and mandoc_special() functions and replace them with
Kristaps Dzonsons [Sat, 9 Apr 2011 15:29:40 +0000 (15:29 +0000)]
Remove a2roffdeco() and mandoc_special() functions and replace them with
a public (mandoc.h) function mandoc_escape(), which merges the
functionality of both prior functions.

Reason: code duplication.  The a2roffdeco() and mandoc_special()
functions were pretty much the same thing and both quite complex.  This
allows one function to receive improvements in (e.g.) subexpression
handling and performance, instead of having to replicate functionality.

As such, the mandoc_escape() function already handles a superset of the
escapes handled in previous versions and has improvements in performance
(using strcspn(), for example) and reliable handling of subexpressions.

This code Works For Me, but may need work to catch any regressions.
Since the benefits are great (leaner code, simpler API), I'd rather have
it in-tree than floating as a patch.

13 years agoDon't shadow global identifiers.
Joerg Sonnenberger [Thu, 7 Apr 2011 01:08:42 +0000 (01:08 +0000)]
Don't shadow global identifiers.

13 years agoFirst, properly escape periods with \&. Then consistently refer to
Kristaps Dzonsons [Wed, 6 Apr 2011 11:39:25 +0000 (11:39 +0000)]
First, properly escape periods with \&.  Then consistently refer to
non-macro lines as "text lines" (after defining them as such).  Clean up
notion of font scope.  Note comma usage in multiple `Nm's.  Note
ordering of SYNOPSIS section stuff.  Add some bits about DESCRIPTION
syntax (brief description, then args).  Note that `Bl' can also contain
HEAD.  Finally, fix some `Cm' entries to be properly `Ar'.

Ok Jason McIntyre.

13 years agoOn .de macro lines, after the macro name, space and tab are equivalent.
Ingo Schwarze [Tue, 5 Apr 2011 22:22:33 +0000 (22:22 +0000)]
On .de macro lines, after the macro name, space and tab are equivalent.
Bug reported by Tristan dot LeGuern at gmail dot com in fvwm2(1).
tweaks and ok kristaps@; earlier version looked good to espie@ as well

13 years agoLint-checks over mandoc-db.c.
Kristaps Dzonsons [Tue, 5 Apr 2011 14:16:05 +0000 (14:16 +0000)]
Lint-checks over mandoc-db.c.

13 years agoUse a little more horsepower in parsing out NAME sections from -man
Kristaps Dzonsons [Tue, 5 Apr 2011 14:10:52 +0000 (14:10 +0000)]
Use a little more horsepower in parsing out NAME sections from -man
manuals.  This covers the majority case.

13 years agoFix type- and NULL-check to be correct node (last, not child). Prevents
Kristaps Dzonsons [Tue, 5 Apr 2011 13:12:34 +0000 (13:12 +0000)]
Fix type- and NULL-check to be correct node (last, not child).  Prevents
segfault in NetBSD.

13 years agoAdd mandoc-db.c checking for utility-name in NAME section of -man
Kristaps Dzonsons [Tue, 5 Apr 2011 13:09:33 +0000 (13:09 +0000)]
Add mandoc-db.c checking for utility-name in NAME section of -man
documents.

13 years agoMake sure to create LIBDIR. From a patch by Thomas Klausner, thanks!
Kristaps Dzonsons [Tue, 5 Apr 2011 09:34:00 +0000 (09:34 +0000)]
Make sure to create LIBDIR.  From a patch by Thomas Klausner, thanks!

13 years agoAdd config.h Glue for OpenIndiana (and older OpenSolaris) to build.
Kristaps Dzonsons [Mon, 4 Apr 2011 23:04:38 +0000 (23:04 +0000)]
Add config.h Glue for OpenIndiana (and older OpenSolaris) to build.
From a patch by Yuri Pankov, thanks!

13 years agoSuppress a space following the "(" for -T[x]html `Fn'. Found by random
Kristaps Dzonsons [Mon, 4 Apr 2011 22:38:26 +0000 (22:38 +0000)]
Suppress a space following the "(" for -T[x]html `Fn'.  Found by random
perusal of online manuals.

13 years agoSnafu: forgetting to tar up critical files. Pointed out by Yuri Pankov. VERSION_1_11_1
Kristaps Dzonsons [Mon, 4 Apr 2011 22:05:28 +0000 (22:05 +0000)]
Snafu: forgetting to tar up critical files.  Pointed out by Yuri Pankov.

13 years agoRemove an unused variable (caught in lint-check)
Kristaps Dzonsons [Mon, 4 Apr 2011 21:14:12 +0000 (21:14 +0000)]
Remove an unused variable (caught in lint-check)

13 years agoVersion up to 1.11.1: here we go!
Kristaps Dzonsons [Mon, 4 Apr 2011 21:07:20 +0000 (21:07 +0000)]
Version up to 1.11.1: here we go!

13 years agoHave `Fd' detection in mandoc-db also look for local includes (i.e.,
Kristaps Dzonsons [Mon, 4 Apr 2011 16:49:03 +0000 (16:49 +0000)]
Have `Fd' detection in mandoc-db also look for local includes (i.e.,
those that are quoted and not angular-bracketed).

13 years agoHave `Fd' in -T[x]html generate an "include" link if it detects one
Kristaps Dzonsons [Mon, 4 Apr 2011 16:48:18 +0000 (16:48 +0000)]
Have `Fd' in -T[x]html generate an "include" link if it detects one
being used.

13 years agoFix a bug that slip in: PAIR_XXXX macros expanded to run the increment
Kristaps Dzonsons [Mon, 4 Apr 2011 16:44:56 +0000 (16:44 +0000)]
Fix a bug that slip in: PAIR_XXXX macros expanded to run the increment
twice.

13 years agoLast low-hanging removal of superfluous variable assignments.
Kristaps Dzonsons [Mon, 4 Apr 2011 16:27:03 +0000 (16:27 +0000)]
Last low-hanging removal of superfluous variable assignments.

13 years agoClean up superfluous variables in `Xr' handling in -Tascii.
Kristaps Dzonsons [Mon, 4 Apr 2011 16:21:51 +0000 (16:21 +0000)]
Clean up superfluous variables in `Xr' handling in -Tascii.

13 years agoFully fix the `Rv' and `Ex' handlers for -T[x]html and -Tascii. This
Kristaps Dzonsons [Mon, 4 Apr 2011 16:15:58 +0000 (16:15 +0000)]
Fully fix the `Rv' and `Ex' handlers for -T[x]html and -Tascii.  This
includes an unreported bug where `Ex' wasn't properly adding a newline.

13 years agoClean up -Tascii in the same way as -T[x]html regarding `Rv' arguments.
Kristaps Dzonsons [Mon, 4 Apr 2011 16:05:36 +0000 (16:05 +0000)]
Clean up -Tascii in the same way as -T[x]html regarding `Rv' arguments.

13 years agoMake `Rv' do the Right Thing regarding commas and "and" when listing its
Kristaps Dzonsons [Mon, 4 Apr 2011 16:01:47 +0000 (16:01 +0000)]
Make `Rv' do the Right Thing regarding commas and "and" when listing its
output.  This also makes it easier to read.  While here, remove
superfluous assignment to local variables for this and `Mt'.

13 years agoRoll back Linux-ism that crept into Makefile.
Kristaps Dzonsons [Mon, 4 Apr 2011 15:46:05 +0000 (15:46 +0000)]
Roll back Linux-ism that crept into Makefile.

13 years agoFix possible segfaults in `Lk' -T[x]html handler, which made some
Kristaps Dzonsons [Mon, 4 Apr 2011 15:45:12 +0000 (15:45 +0000)]
Fix possible segfaults in `Lk' -T[x]html handler, which made some
assumptions about its children.  Also remove superfluous reassignment to
local variable.

13 years agoClean-up in -T[x]html: remove some unnecessary assignments to local
Kristaps Dzonsons [Mon, 4 Apr 2011 15:41:05 +0000 (15:41 +0000)]
Clean-up in -T[x]html: remove some unnecessary assignments to local
variables.

13 years agoClean up handling of `In' for -T[x]html such that it only links to the
Kristaps Dzonsons [Mon, 4 Apr 2011 15:33:03 +0000 (15:33 +0000)]
Clean up handling of `In' for -T[x]html such that it only links to the
first argument.  groff of course doesn't do links, but it will uglify
subsequent arguments in the list (we warn about >1, anyway).

13 years agoAdd manual page for mandoc-db (mostly to document the file format of
Kristaps Dzonsons [Mon, 4 Apr 2011 10:53:15 +0000 (10:53 +0000)]
Add manual page for mandoc-db (mostly to document the file format of
the generated index and keyword databases).  Add some documentation
within mandoc-db.c.

13 years agoHave mandoc-db create an recno-addressed index of files alongside the
Kristaps Dzonsons [Sun, 3 Apr 2011 14:18:29 +0000 (14:18 +0000)]
Have mandoc-db create an recno-addressed index of files alongside the
keyword database, which references the index of hard-coding files.

13 years agoHave mandoc-db use config.h for strlcat(). Then create the btree
Kristaps Dzonsons [Sun, 3 Apr 2011 10:14:45 +0000 (10:14 +0000)]
Have mandoc-db use config.h for strlcat().  Then create the btree
database from a directory, instead of a path.  This is because it'll
also output an index of files to that same directory.  Add documentation
to the local variable names, too.

13 years agoIf wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL, we'll
Kristaps Dzonsons [Sun, 3 Apr 2011 10:11:25 +0000 (10:11 +0000)]
If wlevel in mparse_alloc() is greater than MANDOCLEVEL_FATAL, we'll
throw assertions due to per-file-error not being properly set in mmsg().
This is reasonable behaviour (we shouldn't be able to ignore FATAL after
all).  Thus, make sure wlevel is sanitised.

13 years agoAllow mparse_result() pointers to be NULL.
Kristaps Dzonsons [Sun, 3 Apr 2011 10:05:37 +0000 (10:05 +0000)]
Allow mparse_result() pointers to be NULL.

13 years agoMake uname have its return value checked for -1 (POSIX style), not
Kristaps Dzonsons [Sun, 3 Apr 2011 09:53:50 +0000 (09:53 +0000)]
Make uname have its return value checked for -1 (POSIX style), not
non-zero.  From a PR by Yuri Pankov, ok schwarze@.

13 years agoAdd an initial keyword-indexer as an alternative front-end to libmandoc.a.
Kristaps Dzonsons [Sat, 2 Apr 2011 15:40:40 +0000 (15:40 +0000)]
Add an initial keyword-indexer as an alternative front-end to libmandoc.a.
This will be used during BSDCan-2011, paired with a web front-end, as a
demonstrandum of semantic annotations (mdoc) versus those of man.  This
isn't linked to the build in any way but for cleaning created files.  This
code has been heavily tested under valgrind and is known to work on
GNU/Linux (needs -ldb library), all BSDs, and Mac OSX.

Please don't repost this, for the time being, as I don't want to spoil the
fun for the conference.  This utility is still constantly under development
(e.g., it will also generate a recno database of filenames and `Nd' output
so that paths needn't be hard-coded) but is mature enough to warrant being
checked in.

13 years agoIn reality `In' only accepts one argument. Subsequent ones are not
Kristaps Dzonsons [Fri, 1 Apr 2011 19:50:49 +0000 (19:50 +0000)]
In reality `In' only accepts one argument.  Subsequent ones are not
included in the brackets.  We really should have a warning about this,
but that'll wait for another day.

13 years agoProperly quote arguments in `Fn' documentation. Also make standalone
Kristaps Dzonsons [Fri, 1 Apr 2011 19:47:33 +0000 (19:47 +0000)]
Properly quote arguments in `Fn' documentation.  Also make standalone
'...' have a properly-escaped initial dot.

13 years agoAllow a NULL mmsg passed to libmandoc.
Kristaps Dzonsons [Thu, 31 Mar 2011 10:54:39 +0000 (10:54 +0000)]
Allow a NULL mmsg passed to libmandoc.

13 years agoMake -Werr be -Wlevel, keeping it in sync with mandoc.1. Noted by
Kristaps Dzonsons [Thu, 31 Mar 2011 10:53:43 +0000 (10:53 +0000)]
Make -Werr be -Wlevel, keeping it in sync with mandoc.1.  Noted by
Alexander Schrijver---thanks!

13 years agonaddy@ reports rsync(1)
Ingo Schwarze [Wed, 30 Mar 2011 00:02:40 +0000 (00:02 +0000)]
naddy@ reports rsync(1)

13 years agoAdd lint target to Makefile.
Kristaps Dzonsons [Tue, 29 Mar 2011 09:37:24 +0000 (09:37 +0000)]
Add lint target to Makefile.

13 years agoGetting ready for next [minor-number] release.
Kristaps Dzonsons [Tue, 29 Mar 2011 09:29:29 +0000 (09:29 +0000)]
Getting ready for next [minor-number] release.

13 years agoCarefully let mandoc_getcontrol() handle libroff's detection of a macro
Kristaps Dzonsons [Tue, 29 Mar 2011 09:00:48 +0000 (09:00 +0000)]
Carefully let mandoc_getcontrol() handle libroff's detection of a macro
line.  Note that we now properly ignore \.", which earlier would have
been pushed through macro detection.  This required attention to all
entries of roff_parse().

This removes a TODO by schwarze@ to the effect that \. can be a control
character, which is now handled in mandoc_getcontrol().

13 years agoMake libman use mandoc_getcontrol() for real this time.
Kristaps Dzonsons [Tue, 29 Mar 2011 08:30:49 +0000 (08:30 +0000)]
Make libman use mandoc_getcontrol() for real this time.

13 years agoHave libman and libmdoc use mandoc_getcontrol() to determine whether a
Kristaps Dzonsons [Mon, 28 Mar 2011 23:52:13 +0000 (23:52 +0000)]
Have libman and libmdoc use mandoc_getcontrol() to determine whether a
macro has been invoked.  libroff is next.

13 years agoPut mandocerrs and mandoclevels arrays into libmandoc with accessors
Kristaps Dzonsons [Mon, 28 Mar 2011 21:49:42 +0000 (21:49 +0000)]
Put mandocerrs and mandoclevels arrays into libmandoc with accessors
mparse_strerror() and mparse_strlevel().

13 years agonew: \. at the beginning of a line
Ingo Schwarze [Wed, 23 Mar 2011 22:16:03 +0000 (22:16 +0000)]
new: \. at the beginning of a line
partially done: date cleanup

13 years agoAs per joerg@'s suggestion, use const arrays when looking up mdoc argvs.
Kristaps Dzonsons [Wed, 23 Mar 2011 15:46:02 +0000 (15:46 +0000)]
As per joerg@'s suggestion, use const arrays when looking up mdoc argvs.

13 years agoMerge man_args() into man_macro.c, the only place where it's called, and
Kristaps Dzonsons [Wed, 23 Mar 2011 15:33:57 +0000 (15:33 +0000)]
Merge man_args() into man_macro.c, the only place where it's called, and
make its return value boolean (we don't care about QWORD).  We can move
it into mdoc_macro.c because it's basically just a wrapper around
mandoc_getarg().  Then blow away man_argv.c, which is left empty.

13 years agoFirst, make -man ARGS_EOLN et al. be an enum. Second, remove
Kristaps Dzonsons [Wed, 23 Mar 2011 12:40:04 +0000 (12:40 +0000)]
First, make -man ARGS_EOLN et al. be an enum.  Second, remove
ARGS_ERROR, as it is never returned by man_args().  Then clean up
invocations of man_args() to only check for ARGS_EOLN.

13 years agoAdd MAN_TAIL, which will be used by `UE' (forthcoming) and needs to be
Kristaps Dzonsons [Wed, 23 Mar 2011 12:33:01 +0000 (12:33 +0000)]
Add MAN_TAIL, which will be used by `UE' (forthcoming) and needs to be
used for `RE'.

13 years agoFix "libman" dependence.
Kristaps Dzonsons [Wed, 23 Mar 2011 12:32:39 +0000 (12:32 +0000)]
Fix "libman" dependence.

13 years agoMake (e.g.) `SM' before `B' be only a warning. In reality, this refers
Kristaps Dzonsons [Wed, 23 Mar 2011 09:47:13 +0000 (09:47 +0000)]
Make (e.g.) `SM' before `B' be only a warning.  In reality, this refers
to ELINE macros ("next-line", but not unbreakable like the next-line
paragraph macros) followed by other macros.  This addresses a report by
Christian Weisgerber, posted in the TODO by schwarze@, and aired on
discuss@ (22/03/2011) for whether a fix is warranted.

13 years agoMake empty sections and parts (SH, SS, RS) only produce a warning if it
Kristaps Dzonsons [Tue, 22 Mar 2011 15:30:30 +0000 (15:30 +0000)]
Make empty sections and parts (SH, SS, RS) only produce a warning if it
has no children.  Noted by Brad, added to TODO by schwarze@.

13 years agolibmdoc.h and libman.h were including mdoc.h and man.h, respectively.
Kristaps Dzonsons [Tue, 22 Mar 2011 14:33:05 +0000 (14:33 +0000)]
libmdoc.h and libman.h were including mdoc.h and man.h, respectively.
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.

13 years agomdoc_argn_free is only used local to mdoc_argv.c, so make it static.
Kristaps Dzonsons [Tue, 22 Mar 2011 14:28:48 +0000 (14:28 +0000)]
mdoc_argn_free is only used local to mdoc_argv.c, so make it static.

13 years agoMove mandoc_isdelim() back into libmdoc.h. This fixes an unreported
Kristaps Dzonsons [Tue, 22 Mar 2011 14:05:45 +0000 (14:05 +0000)]
Move mandoc_isdelim() back into libmdoc.h.  This fixes an unreported
error where (1) -man pages were punctuating delimiters (e.g., `.B a ;')
and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its
own line) would also be punctuated.  This introduces a small amount of
complexity of mdoc_{html,term}.c must manage their own spacing with
running print_word() or print_text().  The check for delimiting now
happens in mdoc_macro.c's dword().

13 years agoAdd some documentation and clean up mdoc.h/man.h.
Kristaps Dzonsons [Tue, 22 Mar 2011 13:28:22 +0000 (13:28 +0000)]
Add some documentation and clean up mdoc.h/man.h.

13 years agoHave the default include/lib install path end with "mandoc" to prevent
Kristaps Dzonsons [Tue, 22 Mar 2011 13:28:03 +0000 (13:28 +0000)]
Have the default include/lib install path end with "mandoc" to prevent
clobbering other stuff that may have the same name.

13 years agoNote the TODO file on the website. Also install index.html (oops).
Kristaps Dzonsons [Tue, 22 Mar 2011 13:15:38 +0000 (13:15 +0000)]
Note the TODO file on the website.  Also install index.html (oops).

13 years agoAdd a FATAL error for when no manual type was assigned (you can repeat
Kristaps Dzonsons [Tue, 22 Mar 2011 10:35:26 +0000 (10:35 +0000)]
Add a FATAL error for when no manual type was assigned (you can repeat
this for yourself by having a file consisting only of comments).

13 years agoBe a bit more specific on where we compile. Are there any ANSI-C
Kristaps Dzonsons [Tue, 22 Mar 2011 10:30:07 +0000 (10:30 +0000)]
Be a bit more specific on where we compile.  Are there any ANSI-C
compilers where we don't compile?  I'm pretty sure that mmap() is
non-standard (we'll fail, e.g., on mingw32).

13 years agoAs mentioned: ChangeLog isn't being built any more.
Kristaps Dzonsons [Tue, 22 Mar 2011 10:20:56 +0000 (10:20 +0000)]
As mentioned: ChangeLog isn't being built any more.

13 years agoStep 5: re-write Makefile and relax. This restructures the Makefile to
Kristaps Dzonsons [Tue, 22 Mar 2011 10:20:33 +0000 (10:20 +0000)]
Step 5: re-write Makefile and relax.  This restructures the Makefile to
do actual dependency checking for headers and to build everything nicer
(www properly depends on mandoc, etc.).

Note that the ChangeLog isn't being built any more: if people are
interested, they can visit the source-changes mailing list archive.

13 years agoStep 4: merge chars.h into out.h. The functions in this file are
Kristaps Dzonsons [Tue, 22 Mar 2011 10:13:01 +0000 (10:13 +0000)]
Step 4: merge chars.h into out.h.  The functions in this file are
necessary to all [real] front-ends, so stop pretending it's special.
While here, add some documentation to the variable types.

13 years agoStep 3: consolidate manuals. The parse functions in mdoc.h, roff.h, and
Kristaps Dzonsons [Tue, 22 Mar 2011 10:02:50 +0000 (10:02 +0000)]
Step 3: consolidate manuals.  The parse functions in mdoc.h, roff.h, and
man.h are now part of libmandoc.h, so remove these from their respective
manuals (they're no longer public-facing and we don't need a libmandoc.3
(yet?)).  Before that, move the juicy data (parse tree syntax) into
new-born mandoc.3.  Peck around in Makefile and index.sgml to reflect
reality.

13 years agoStep 2: blow away roff.h, as all of its functions have been moved into
Kristaps Dzonsons [Tue, 22 Mar 2011 09:50:11 +0000 (09:50 +0000)]
Step 2: blow away roff.h, as all of its functions have been moved into
libmandoc.h and there's nothing left.

13 years agoStep 1 of restructuring: libmandoc.h. Move all compiler-set-specific
Kristaps Dzonsons [Tue, 22 Mar 2011 09:48:13 +0000 (09:48 +0000)]
Step 1 of restructuring: libmandoc.h.  Move all compiler-set-specific
stuff into libmandoc.h, including old mdoc.h/man.h/roff.h functions now
used by read.c.  The motivation behind this is to tighten the
relationship between the underlying compilers while keeping parse data
hidden from general callers (e.g., main.c).

While here, also move register values from mandoc.h into libmandoc.h as
noted by schwarze@.  See above for explanation.

13 years agomain.c doesn't need roff.h anymore.
Kristaps Dzonsons [Mon, 21 Mar 2011 12:04:26 +0000 (12:04 +0000)]
main.c doesn't need roff.h anymore.

13 years agoLet read.c worry about the currently-open file instead of having this
Kristaps Dzonsons [Sun, 20 Mar 2011 16:05:21 +0000 (16:05 +0000)]
Let read.c worry about the currently-open file instead of having this
information duplicated in main.c.  For the time being, remove evt_close
and evt_open, as the only known mparse interface (main.c) doesn't need
them.

13 years agoConsolidate messages. Have all parse-time messages (in libmdoc,
Kristaps Dzonsons [Sun, 20 Mar 2011 16:02:05 +0000 (16:02 +0000)]
Consolidate messages.  Have all parse-time messages (in libmdoc,
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h.  This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.

13 years agoChange around include ordering for compilation on OpenBSD.
Kristaps Dzonsons [Sun, 20 Mar 2011 11:43:06 +0000 (11:43 +0000)]
Change around include ordering for compilation on OpenBSD.

13 years agoSplit the document parsing sequence out of main.c and into read.c,
Kristaps Dzonsons [Sun, 20 Mar 2011 11:41:24 +0000 (11:41 +0000)]
Split the document parsing sequence out of main.c and into read.c,
putting the interface into mandoc.h.  This effectively makes the
function of main.c be command-line handling, invoking the parser, and
sending its output to the output handler.  The sequence of parsing
(pfile(), pdesc(), etc.) has changed very little but for clean-up of
some state variables (curp->fd, etc.).

13 years agoBumped internal version. There will be no formal release with this: it
Kristaps Dzonsons [Sun, 20 Mar 2011 11:07:05 +0000 (11:07 +0000)]
Bumped internal version.  There will be no formal release with this: it
precedes some major structural changes for easier roll-back in the case
of errors or whatnot.

13 years ago.RS w/o line args is not serious VERSION_1_10_10
Ingo Schwarze [Sat, 19 Mar 2011 23:36:08 +0000 (23:36 +0000)]
.RS w/o line args is not serious

13 years agoNote the development status of eqn.7 and tbl.7.
Kristaps Dzonsons [Thu, 17 Mar 2011 15:12:42 +0000 (15:12 +0000)]
Note the development status of eqn.7 and tbl.7.

13 years ago"Reserved Characters" isn't correct since `\.' and `\*(Ba' aren't
Kristaps Dzonsons [Thu, 17 Mar 2011 14:50:14 +0000 (14:50 +0000)]
"Reserved Characters" isn't correct since `\.' and `\*(Ba' aren't
characters.  Use "Reserved Terms" instead.

13 years agoNote that mdoc_valids[] is static.
Kristaps Dzonsons [Thu, 17 Mar 2011 12:14:19 +0000 (12:14 +0000)]
Note that mdoc_valids[] is static.

13 years agomandocmsg finally has no return value.
Kristaps Dzonsons [Thu, 17 Mar 2011 12:08:01 +0000 (12:08 +0000)]
mandocmsg finally has no return value.

13 years agoClean-up in libman: make all calls to man_*msg not check return value.
Kristaps Dzonsons [Thu, 17 Mar 2011 11:56:17 +0000 (11:56 +0000)]
Clean-up in libman: make all calls to man_*msg not check return value.
Also convert man_vmsg to return void.