CVS log for pod2mdoc/pod2mdoc.c

[BACK] Up to [cvsweb.bsd.lv] / pod2mdoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.62 / (download) - annotate - [select for diffs], Thu Nov 3 15:50:28 2016 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.61: +30 -26 lines
Diff to previous 1.61 (colored)

write function prototypes without arguments using .Fn rather than .Fo

Revision 1.61 / (download) - annotate - [select for diffs], Tue May 19 19:22:14 2015 UTC (5 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_0_2
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

strftime(3), time(3), and localtime(3) are in <time.h>, not <sys/time.h>
noticed while testing on Linux

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 19 09:59:01 2015 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.59: +50 -50 lines
Diff to previous 1.59 (colored)

zap trailing whitespace; verified with diff -b;
patch from Svyatoslav Mishyn <juef at openmailbox dot org>

Revision 1.59 / (download) - annotate - [select for diffs], Mon Feb 23 15:12:06 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.58: +4 -5 lines
Diff to previous 1.58 (colored)

Not all perlpod(1) documents mark up function arguments with B<>.
Some use I<> instead.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Feb 23 14:30:29 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.57: +15 -3 lines
Diff to previous 1.57 (colored)

Re-wrap text lines.  Preserving the original man(7) input line
breaks has no syntactic or semantic relevance and merely results
in awkwardly wrapped mdoc(7) code.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 21 21:15:41 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +3 -1 lines
Diff to previous 1.56 (colored)

chomp trailing dots off the .Nd line

Revision 1.56 / (download) - annotate - [select for diffs], Fri Feb 20 13:33:52 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.55: +93 -92 lines
Diff to previous 1.55 (colored)

Stop bypassing the text output buffer when printing macro arguments,
stop ignoring the wantws flag for macro argument spacing, and stop
attempting artificial argument spacing by manually printing blank
characters at more than twenty distinct places in the code.

This fixes a wide range of formatting issues:

* Print named escapes inside format codes at the correct position.
* Escape quotes at the beginning of command arguments.
* Correct spacing in words like B<x>yB<z>.
* Do not escape "Xx" at the end of words, but only if it's the whole word.
* Avoid an additional blank when a command line starts with a format code.
* Avoid an additional blank after Qc.

I tried to do this in smaller, incremental steps, but it did not
work out.  All these aspects are related to each other; so i'm
committing it as one big diff, thoroughly tested for regressions.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Feb 19 16:34:32 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.54: +27 -1 lines
Diff to previous 1.54 (colored)

add function prototypes; no functional change

Revision 1.54 / (download) - annotate - [select for diffs], Thu Feb 19 15:26:45 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.53: +24 -25 lines
Diff to previous 1.53 (colored)

Escape literal double quotes when they start a macro argument.
Making this work requires properly keeping track of the output state
in the function formatcode() - which actually simplifies the code
in that function and removes one local variable.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Feb 19 13:50:45 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +68 -26 lines
Diff to previous 1.52 (colored)

Preserve blank lines inside literal displays,
do not render them by closing the display and opening a new one.
Besides, ignore leading newlines.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Feb 19 11:14:27 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

Fix a regression that broke Regress/formatcode/escape.pod:
Do not skip whitespace after E<> formatcodes.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Feb 19 11:09:44 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.50: +6 -7 lines
Diff to previous 1.50 (colored)

After converting a formatcode to a macro in ordinary mode,
handle all middle and closing punctuation characters.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Feb 19 11:05:24 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.49: +5 -2 lines
Diff to previous 1.49 (colored)

do not include an .Fa argument in quotes if it does not contain a blank;
written on the train back from Munich

Revision 1.49 / (download) - annotate - [select for diffs], Thu Feb 19 10:59:35 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.48: +41 -6 lines
Diff to previous 1.48 (colored)

If the SYNOPSIS section mentions a name as #defined,
mark it up with .Dv or .Fn when it later occurs in the text.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Feb 19 10:53:21 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

fix unintended CVS keyword expansion

Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 19 10:46:40 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +8 -6 lines
Diff to previous 1.46 (colored)

ignore line breaks in the NAME section;
written on the train to Munich

Revision 1.46 / (download) - annotate - [select for diffs], Sat Feb 14 15:34:39 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.45: +8 -4 lines
Diff to previous 1.45 (colored)

support -d Mdocdate

Revision 1.45 / (download) - annotate - [select for diffs], Sat Feb 14 13:11:10 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.44: +4 -2 lines
Diff to previous 1.44 (colored)

don't get confused by tabs in function declarations in the SYNOPSIS

Revision 1.44 / (download) - annotate - [select for diffs], Sat Feb 14 12:47:09 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +47 -20 lines
Diff to previous 1.43 (colored)

Detect function names not only before blanks, but also at the end
of input lines, and let the detection of function names and the
detection of the end of sentences cope with trailing punctuation.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Feb 14 11:12:48 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +20 -10 lines
Diff to previous 1.42 (colored)

mark up foreign function names with .Xr

Revision 1.42 / (download) - annotate - [select for diffs], Sat Feb 14 10:35:02 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.41: +33 -15 lines
Diff to previous 1.41 (colored)

New sentence, new line.
In ordinary text mode, treat tab characters just like blanks.
Treat multiple whitespace characters just like single blanks.
Avoid buffer underruns when detecting function names.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 13 18:44:04 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +14 -4 lines
Diff to previous 1.40 (colored)

in the SYNOPSIS, render preprocessor lines with .Fd

Revision 1.40 / (download) - annotate - [select for diffs], Fri Feb 13 18:01:53 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.39: +22 -17 lines
Diff to previous 1.39 (colored)

In text mode, do not print whitespace *after* printing a word
because that may end up at the end of a line if a macro follows.
Instead, delay printing whitespace until before printing the next word.
Requires being a bit more careful about the wantws flag in the
function formatcode().

Revision 1.39 / (download) - annotate - [select for diffs], Fri Feb 13 15:35:15 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +49 -13 lines
Diff to previous 1.38 (colored)

use .Vt to mark up types mentioned in the SYNOPSIS

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 13 12:40:54 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.37: +20 -4 lines
Diff to previous 1.37 (colored)

use .Fa to mark up function arguments mentioned in the SYNOPSIS

Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 13 00:44:16 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.36: +26 -6 lines
Diff to previous 1.36 (colored)

If a function is listed in the SYNOPSIS and its name occurs later in the
text, followed by "()", mark it up with `Fn'.  This is the first of
a number of features assigning markup by looking at earlier content.
Portability glue will be added later.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Oct 24 00:28:34 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_0_1
Changes since 1.35: +50 -14 lines
Diff to previous 1.35 (colored)

handle function declarations spanning more than one line
and trim leading whitespace from function arguments;
kindly asked for by bentley@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Oct 22 23:10:05 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +56 -10 lines
Diff to previous 1.34 (colored)

Simple Ft/Fo/Fa/Fc parser and formatter for the SYNOPSIS.
Dedicated to bentley@.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jul 19 00:42:22 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_0_0_13
Changes since 1.33: +12 -6 lines
Diff to previous 1.33 (colored)

only capital ASCII letters A-Z introduce formatting codes

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jul 18 23:56:57 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +49 -24 lines
Diff to previous 1.32 (colored)

Almost a rewrite of formatcodeln().
It never handled spacing properly, and my recent overhaul of
formatting code spacing introduced additional regressions.

Besides, fix two more regressions, one regarding character escapes
in outbuf_addstr(), and do not print Ns during invalid escapes in
formatcode().  Finally, correct the name of the E<verbar> character.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 18 05:09:32 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +193 -104 lines
Diff to previous 1.31 (colored)

Proper translation of POD escape sequences into mdoc macros,
including correct whitespace handling.
This is surprisingly hard to get right.

The main idea is to not write Ns at the end of formatcode(),
but instead clear the wantws state and let the caller parse
ahead (in the manner required by the context) to see what is
following, then break the line or print Ns as appropriate.

Also use the following logic throughout:
* Clear wantws after writing a non-whitespace character.
* Switch to text state after flushing text output.
* Switch back to OUST_NL/wantws after a line break.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jul 15 19:03:07 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +130 -62 lines
Diff to previous 1.30 (colored)

When formatting codes follow text without intervening whitespace,
a .Pf macro was issued without arguments.  While this (accidentally)
works in mandoc(1), groff(1) does not support it.  Introduce an output
buffer such that the previous word of the text can be given as an
argument to .Pf.

In some situations, for example right after a section header, the
newline printed before the .Pf could result in an empty line.
Introduce the "hasnl" state variable to avoid this.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jul 15 19:00:48 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +17 -21 lines
Diff to previous 1.29 (colored)

Invalid format codes were skipped including their contents.
Instead, just skip the code, but not the content.
Also improve the comments at the place in ordinary()
where formatcode() is called.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jul 11 20:45:55 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +31 -20 lines
Diff to previous 1.28 (colored)

When -s is specified but -n is not, the filename extension is not needed
to determine the section number, but it still has to be trimmed from
the page title.  Keeping the code readable required a rewrite of the
first half of dofile().

Bug reported by bentley@, thanks!

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jul 11 10:31:28 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Remove unused variable.
Noticed by Thomas Klausner <wiz at NetBSD dor org>.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jul 11 09:10:50 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +7 -2 lines
Diff to previous 1.26 (colored)

cvs commit: render B<NULL> as .Dv NULL

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 11 09:07:33 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +1 -3 lines
Diff to previous 1.25 (colored)

no need to assert() !NULL right before the pointer is accessed

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jul 11 09:05:03 2014 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored)

polish main:
* Correctly check the number of arguments.
* Show the usage() message if there are too many arguments.
* Mention the optional file argument in the usage() message.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 7 11:58:35 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_11
Changes since 1.23: +8 -1 lines
Diff to previous 1.23 (colored)

Properly consume whitespace at the end of ignored format codes X<> and N<>.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 7 11:46:03 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.22: +8 -2 lines
Diff to previous 1.22 (colored)

Allow (ignored) nested escapes in L<>.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Apr 3 16:50:32 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.21: +39 -2 lines
Diff to previous 1.21 (colored)

Translate leading #include statements in verbatim SYNOPSIS text as In.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 3 11:55:01 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_10
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored)

Tweak for version: time to put this to rest for a bit.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Apr 3 11:34:30 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.19: +27 -16 lines
Diff to previous 1.19 (colored)

Account for sections as well as links.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Apr 3 10:17:14 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.18: +81 -46 lines
Diff to previous 1.18 (colored)

Lots of L<> power: intuit manual links, Perl links, hyperlinks, and so on.
All of this is documented in the manpage's "Smarts" section.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Apr 2 22:36:56 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.17: +24 -11 lines
Diff to previous 1.17 (colored)

Clean up the link handler to omit the title.
This really cleans up SSL's links (Xr) and also sets the stage for the
generalised Xr/Lk/Sx handling.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 2 20:32:41 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.16: +38 -4 lines
Diff to previous 1.16 (colored)

Accomodate for multiple names in the NAME section.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Apr 2 16:41:02 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.15: +12 -1 lines
Diff to previous 1.15 (colored)

Swallow trailing comma or period after a macro line instead of printing
it on the next line.
No functional change in output, but generated mdoc(7) is a bit nicer.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Apr 2 14:50:09 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.14: +17 -12 lines
Diff to previous 1.14 (colored)

Pick out the first B<> as an Nm when in SYNOPSIS.
Document all of these tricks in the manpage.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 1 19:50:34 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_9
Changes since 1.13: +22 -7 lines
Diff to previous 1.13 (colored)

Make sure that SYNOPSIS flags are really flags and default to using Ar,
not Sy, when in the SYNOPSIS.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Apr 1 13:05:50 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.12: +124 -40 lines
Diff to previous 1.12 (colored)

Smarts: notice, in a SYNOPSIS, that we're an optional block ("[" matched
to a subsequent, and possibly nested, "]").  Also, re-write the flag
detector to match with real manuals, which use B<-flag arg> very often.
Now accomodate for both the "Fl" (possibly multiple) and the (possible
multiple) subsequent "Ar".

Revision 1.12 / (download) - annotate - [select for diffs], Tue Apr 1 11:58:32 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.11: +22 -14 lines
Diff to previous 1.11 (colored)

Remove a condition branch already accepted at the start of loop.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 1 08:31:00 2014 UTC (6 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.10: +52 -19 lines
Diff to previous 1.10 (colored)

Make state's "isname" field into a "known section" field.
Pass state into formatcode() and friends.
Intuit when B<-flag> is a flag in the SYNOPSIS section.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 24 01:43:42 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_0_0_8
Changes since 1.9: +8 -3 lines
Diff to previous 1.9 (colored)

Add index page.
Update manual to note usage.
Make "3p" suffix be a preprocessor macro.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Mar 24 01:07:30 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.8: +74 -3 lines
Diff to previous 1.8 (colored)

Primitive understanding of L<> format codes.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 23 23:57:38 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +34 -23 lines
Diff to previous 1.7 (colored)

Guard against unexpected character escapes.
Remove once-used skipspace() function.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Mar 23 23:35:59 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +9 -2 lines
Diff to previous 1.6 (colored)

Make .Bd -literal not interpret macros.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Mar 23 23:23:38 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +76 -65 lines
Diff to previous 1.5 (colored)

Considerably clean up whitespace handling in character escapes.
The handlers now accomodate for all permutations of escape whitespace except as
specifically noted in the manpage.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 23 13:00:24 2014 UTC (6 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +74 -16 lines
Diff to previous 1.4 (colored)

Add support for overriden delimeter codes.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Mar 20 15:29:57 2014 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +126 -25 lines
Diff to previous 1.3 (colored)

Version 0.0.5 from kristaps@.
* elementary list support
* less excessive escaping of possible mdoc macros in formatcode()
* same escaping of possible mdoc macros in formatcodeln()

Revision 1.3 / (download) - annotate - [select for diffs], Thu Mar 20 15:18:56 2014 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +8 -4 lines
Diff to previous 1.2 (colored)

If an input line break occurs in formatcode(),
it translates to whitespace.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 20 15:15:32 2014 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

Enclose code samples in quotation marks.
Otherwise, they would look just like normal text.
The pod2man(1) utility does the same.

Includes an added blank character after Qc added by kristaps@.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Mar 20 15:07:56 2014 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN

initial version 0.0.4 from kristaps@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb