doc: one more copyright year issue. Add metadata macros to fix.
Yet another place in the documentation where the copyright year comes in. Instead of having to deal with it manually over and over, add support for inserting the metadata strings as macros in the output. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
2d53846aab
commit
d76663a637
2 changed files with 17 additions and 8 deletions
|
@ -39,7 +39,7 @@
|
|||
\M{title}{NASM - The Netwide Assembler}
|
||||
\M{author}{The NASM Development Team}
|
||||
\M{copyright_tail}{-- All Rights Reserved}
|
||||
\M{license}{This document is redistributable under the license given in the file "LICENSE" distributed in the NASM archive.}
|
||||
\M{license}{This document is redistributable under the license given in the section "License".}
|
||||
\M{summary}{This file documents NASM, the Netwide Assembler: an assembler targetting the Intel x86 series of processors, with portable source.}
|
||||
\M{infoname}{NASM}
|
||||
\M{infofile}{nasm}
|
||||
|
@ -321,14 +321,12 @@ known x86 architectural extensions, and has strong support for macros.
|
|||
NASM also comes with a set of utilities for handling its own RDOFF2
|
||||
object-file format.
|
||||
|
||||
\S{legal} \i{License} Conditions
|
||||
\S{legal} \i{License}
|
||||
|
||||
Please see the file \c{LICENSE}, supplied as part of any NASM
|
||||
distribution archive, for the license conditions under which you may
|
||||
use NASM. NASM is now under the so-called 2-clause BSD license, also
|
||||
known as the simplified BSD license.
|
||||
NASM is under the so-called 2-clause BSD license, also
|
||||
known as the simplified BSD license:
|
||||
|
||||
Copyright 1996-2017 the NASM Authors - All rights reserved.
|
||||
Copyright \m{year} the NASM Authors - All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
|
13
doc/rdsrc.pl
13
doc/rdsrc.pl
|
@ -115,10 +115,12 @@
|
|||
# another, so that \I{foobar} has the effect of \I{bazquux}, and
|
||||
# \i{foobar} has the effect of \I{bazquux}foobar
|
||||
#
|
||||
# Metadata
|
||||
# Metadata/macros
|
||||
# \M{key}{something}
|
||||
# defines document metadata, such as authorship, title and copyright;
|
||||
# different output formats use this differently.
|
||||
# \m{key}
|
||||
# insert the {something} string associated with metadata {key}
|
||||
#
|
||||
# Include subfile
|
||||
# \&{filename}
|
||||
|
@ -270,6 +272,15 @@ sub got_para {
|
|||
|
||||
@$pname = ();
|
||||
|
||||
# Replace metadata macros
|
||||
while (/^(.*)\\m\{([^\}]*)\}(.*)$/) {
|
||||
if (defined($metadata{$2})) {
|
||||
$_ = $1.$metadata{$2}.$3;
|
||||
} else {
|
||||
$_ = $1.$2.$3;
|
||||
}
|
||||
}
|
||||
|
||||
# Strip off _leading_ spaces, then determine type of paragraph.
|
||||
s/^\s*//;
|
||||
$irewrite = undef;
|
||||
|
|
Loading…
Reference in a new issue