diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-10 16:03:12 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-10 16:03:12 +0000 |
commit | 67f090859d67cb9bbd3ad8b5c698ae7a1deacb41 (patch) | |
tree | 83850f43b1c2a5c3a40977de0263da988e53a8f6 | |
parent | 0bc1f13021a450fc521bf86070429eaf338594e5 (diff) | |
download | mandoc-67f090859d67cb9bbd3ad8b5c698ae7a1deacb41.tar.gz |
Ready for looking over by people.
-rw-r--r-- | Makefile | 46 | ||||
-rw-r--r-- | Makefile.port | 2 | ||||
-rw-r--r-- | index.7 | 19 | ||||
-rw-r--r-- | noop.c | 2 | ||||
-rw-r--r-- | roff.c | 6 |
5 files changed, 48 insertions, 27 deletions
@@ -1,7 +1,7 @@ VERSION = 1.0.3 # FIXME -CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG +CFLAGS += -W -Wall -Wno-unused-parameter -g LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln \ compat.ln tokens.ln literals.ln tags.ln noop.ln @@ -26,10 +26,10 @@ XML = index.xml TEXT = index.txt -CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML) \ - $(XML) $(TEXT) +CLEAN = mdocml $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML) $(XML) $(TEXT) \ + mdocml-$(VERSION).tar.gz mdocml-port-$(VERSION).tar.gz -INSTALL = Makefile $(HEADS) $(SRCS) $(MANS) +INSTALL = Makefile $(HEADS) $(SRCS) $(MANS) mdocml.css FAIL = test.0 test.1 test.2 test.3 test.4 test.5 test.6 \ test.15 test.20 test.22 test.24 test.26 test.27 test.30 \ @@ -48,7 +48,7 @@ all: mdocml lint: llib-lmdocml.ln -dist: mdocml.tgz mdocml-port.tgz +dist: mdocml-$(VERSION).tar.gz mdocml-port-$(VERSION).tar.gz www: all $(HTML) $(XML) $(TEXT) @@ -69,10 +69,10 @@ clean: rm -f $(CLEAN) index.html: index.7 mdocml.css - ./mdocml -Wall -fhtml -e -o $@ index.7 + ./mdocml -fhtml -Wall -e -o $@ index.7 index.xml: index.7 mdocml.css - ./mdocml -Wall -o $@ index.7 + ./mdocml -fxml -Wall -o $@ index.7 index.txt: index.7 cp -f index.7 index.txt @@ -80,28 +80,42 @@ index.txt: index.7 mdocml.html: mdocml.1 mdocml.css ./mdocml -Wall -fhtml -e -o $@ mdocml.1 +install: + mkdir -p $(PREFIX)/bin/ + install -m 0755 mdocml $(PREFIX)/bin/ + mkdir -p $(PREFIX)/man/man1/ + install -m 0444 mdocml.1 $(PREFIX)/man/man1/ + mkdir -p $(PREFIX)/share/mdocml/ + install -m 0444 mdocml.css $(PREFIX)/share/mdocml/ + +uninstall: + rm -f $(PREFIX)/bin/mdocml + rm -f $(PREFIX)/man/man1/mdocml.1 + rm -f $(PREFIX)/share/mdocml/mdocml.css + install-www: www dist - install -m 0644 mdocml.tgz $(PREFIX)/mdocml-$(VERSION).tgz - install -m 0644 mdocml.tgz $(PREFIX)/mdocml.tgz - install -m 0644 mdocml-port.tgz $(PREFIX)/mdocml-port-$(VERSION).tgz - install -m 0644 mdocml-port.tgz $(PREFIX)/mdocml-port.tgz + install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/ + install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/mdocml.tar.gz + install -m 0644 mdocml-port-$(VERSION).tar.gz $(PREFIX)/ + install -m 0644 mdocml-port-$(VERSION).tar.gz $(PREFIX)/mdocml-port.tar.gz install -m 0644 $(HTML) $(XML) $(TEXT) $(PREFIX)/ -mdocml.tgz: $(INSTALL) +mdocml-$(VERSION).tar.gz: $(INSTALL) mkdir -p .dist/mdocml/mdocml-$(VERSION)/ install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/ ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ ) rm -rf .dist/ -mdocml-port.tgz: $(INSTALL) +mdocml-port-$(VERSION).tar.gz: $(INSTALL) mkdir -p .dist/mdocml/pkg sed -e "s!@VERSION@!$(VERSION)!" Makefile.port > .dist/mdocml/Makefile - md5 mdocml-$(VERSION).tgz > .dist/mdocml/distinfo - rmd160 mdocml-$(VERSION).tgz >> .dist/mdocml/distinfo - sha1 mdocml-$(VERSION).tgz >> .dist/mdocml/distinfo + md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo + rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo + sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo install -m 0644 DESCR .dist/mdocml/pkg/DESCR echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST echo bin/mdocml >> .dist/mdocml/pkg/PLIST + echo share/mdocml/mdocml.css >> .dist/mdocml/pkg/PLIST echo @man man/man1/mdocml.1 >> .dist/mdocml/pkg/PLIST ( cd .dist/ && tar zcf ../$@ mdocml/ ) rm -rf .dist/ diff --git a/Makefile.port b/Makefile.port index a4637d2d..8e002b5d 100644 --- a/Makefile.port +++ b/Makefile.port @@ -15,7 +15,7 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= http://sysjail.bsd.lv/dist/ +MASTER_SITES= http://mdocml.bsd.lv/ WANTLIB= c @@ -79,15 +79,17 @@ The HTML filter has the following features: .Pp .Bl -enum -compact .It -HTML-4.01 strict compliance. +HTML-4.01 strict compliance; .It -Proper render of values in UTF-8, such as +proper rendering of values in UTF-8, such as .Dq quotes -and \*(>= predefined values. +and \*(>= predefined values; .It -URI-appearing http://bsd.lv/ strings are correctly enclosed in link tags. +URI-appearing http://bsd.lv/ strings are correctly enclosed in link tags; .It -CSS-dictated style with meaningful non-CSS defaults. +CSS-dictated style with meaningful non-CSS defaults; +.It +and so on. .El .Pp The XML filter creates a correct XML tree with @@ -104,13 +106,16 @@ http://mdocml.bsd.lv/index.xml .Sh DOWNLOADS Download .Nm -at http://mdocml.bsd.lv/mdocml.tgz +at http://mdocml.bsd.lv/mdocml.tar.gz .Ns . .\" - UPDATE ME WITH EVERY RELEASE. ---------------------------------- The current version is 1.0.3, dated 10/12/2008. .\" ------------------------------------------------------------------ .Pp -Previous versions are archived as mdocml-x.y.z.tgz, with the appropriate +An OpenBSD port is available at http://mdocml.bsd.lv/mdocml-port.tar.gz +.Ns . +.Pp +Previous versions are archived as mdocml-x.y.z.tar.gz, with the appropriate versions filled in. .\" .Sh DOCUMENTS @@ -19,6 +19,7 @@ #include <assert.h> #include <err.h> #include <stdlib.h> +#include <string.h> #include "private.h" @@ -86,6 +87,7 @@ md_line_noop(void *data, char *buf) } +/* ARGSUSED */ void * md_init_noop(const struct md_args *args, struct md_mbuf *mbuf, const struct md_rbuf *rbuf) @@ -1181,7 +1181,7 @@ roff_layout(ROFFCALL_ARGS) assert( ! (ROFF_CALLABLE & tokens[tok].flags)); - if ( ! ROFFSec_NAME & tree->asec) + if ( ! (ROFFSec_PR_Os & tree->asec)) return(roff_errp(tree, *argv, tok, ERR_NOT_PR)); if (ROFF_EXIT == type) { @@ -1349,7 +1349,7 @@ roff_ordered(ROFFCALL_ARGS) * .Xr arg1 arg2 punctuation */ - if ( ! ROFFSec_NAME & tree->asec) + if ( ! (ROFFSec_PR_Os & tree->asec)) return(roff_errp(tree, *argv, tok, ERR_NOT_PR)); first = (*argv == tree->cur); @@ -1421,7 +1421,7 @@ roff_text(ROFFCALL_ARGS) * <fl> v W f </fl> ; */ - if ( ! ROFFSec_NAME & tree->asec) + if ( ! (ROFFSec_PR_Os & tree->asec)) return(roff_errp(tree, *argv, tok, ERR_NOT_PR)); first = (*argv == tree->cur); |