Skip to content

Commit

Permalink
Merge pull request #28 from denis-sh/minor-fixes
Browse files Browse the repository at this point in the history
Links fixes
  • Loading branch information
andralex committed Dec 13, 2011
2 parents 77e6013 + dc1cb83 commit a0d9616
Show file tree
Hide file tree
Showing 24 changed files with 59 additions and 56 deletions.
2 changes: 1 addition & 1 deletion arrays.dd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $(SPEC_S Arrays,

$(TR $(TD $(I type)[]) $(TD $(LINK2 #dynamic-arrays, Dynamic arrays)))

$(TR $(TD $(I type)[$(I type)]) $(TD $(LINK2 $(WEB hash-map.html)$(EBOOK #Associative Arrays), Associative arrays)))
$(TR $(TD $(I type)[$(I type)]) $(TD $(DDLINK hash-map, Associative Arrays, Associative arrays)))
)

<h3>$(LNAME2 pointers, Pointers)</h3>
Expand Down
8 changes: 4 additions & 4 deletions class.dd
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $(UL
$(LI $(LINK2 #member-functions, member functions)
$(UL
$(LI static member functions)
$(LI $(LINK2 function.html#virtual-functions, Virtual Functions))
$(LI $(DDSUBLINK function, virtual-functions, Virtual Functions))
$(LI $(LINK2 #synchronized-functions, Synchronized Functions))
$(LI $(LINK2 #constructors, Constructors))
$(LI $(LINK2 #destructors, Destructors))
Expand All @@ -78,7 +78,7 @@ $(UL
$(LI $(GLINK SharedStaticConstructor)s)
$(LI $(GLINK SharedStaticDestructor)s)
$(LI $(LINK2 #invariants, Class Invariants))
$(LI $(LINK2 unittest.html, Unit Tests))
$(LI $(DDSUBLINK unittest, unittest, Unit Tests))
$(LI $(LINK2 #allocators, Class Allocators))
$(LI $(LINK2 #deallocators, Class Deallocators))
$(V2
Expand Down Expand Up @@ -741,7 +741,7 @@ new(1,2) Foo(a); // calls new(Foo.sizeof,1,2)
)

$(P See also
$(LINK2 $(WEBURL)memory.html#newdelete, Explicit Class Instance Allocation).
$(DPLLINK memory.html#newdelete, Explicit Class Instance Allocation).
)

<h3>$(LNAME2 deallocators, Class Deallocators)</h3>
Expand Down Expand Up @@ -784,7 +784,7 @@ delete f;
)

$(P See also
$(LINK2 $(WEBURL)memory.html#newdelete, Explicit Class Instance Allocation).
$(DPLLINK memory.html#newdelete, Explicit Class Instance Allocation).
)

$(V2
Expand Down
8 changes: 4 additions & 4 deletions cpp_interface.dd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(SPEC_S Interfacing to C++,

$(P
While D is fully capable of
$(LINK2 $(WEB interfaceToC.html)$(EBOOK #Interfacing to C), interfacing to C),
$(DDLINK interfaceToC, Interfacing to C, interfacing to C),
its ability to interface to C++ is much more limited.
There are three ways to do it:
)
Expand All @@ -13,13 +13,13 @@ $(SPEC_S Interfacing to C++,

$(LI Use C++'s ability to create a C interface, and then
use D's ability to
$(LINK2 $(WEB interfaceToC.html)$(EBOOK #Interfacing to C), interface with C)
$(DDLINK interfaceToC, Interfacing to C, interface with C)
to access that interface.
)

$(LI Use C++'s ability to create a COM interface, and then
use D's ability to
$(LINK2 $(WEBURL)COM.html, interface with COM)
$(DPLLINK COM.html, interface with COM)
to access that interface.
)

Expand Down Expand Up @@ -536,7 +536,7 @@ int callE(E *e) {

$(P D does not support bit fields. If needed, they can be emulated
with shift and mask operations.
$(LINK2 $(WEBURL)htod.html, htod) will convert bit fields to inline functions that
$(DPLLINK htod.html, htod) will convert bit fields to inline functions that
do the right shift and masks.
)

Expand Down
2 changes: 1 addition & 1 deletion dbc.dd
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void func()
$(P Class invariants are used to specify characteristics of a class that
always
must be true (except while executing a member function).
They are described in $(LINK2 $(WEB class.html)$(EBOOK #Classes), Classes).
They are described in $(DDLINK class, Classes, Classes).
)

<h2>References</h2>
Expand Down
6 changes: 3 additions & 3 deletions ddoc.dd
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ $(P

$(OL
$(LI Predefined macros.)
$(LI Definitions from file specified by $(LINK2 $(WEBURL)dmd-windows.html#sc_ini, sc.ini)'s
or $(LINK2 $(WEBURL)dmd-linux.html#dmd_conf, dmd.conf) DDOCFILE setting.)
$(LI Definitions from file specified by $(DPLLINK dmd-windows.html#sc_ini, sc.ini)'s
or $(DPLLINK dmd-linux.html#dmd_conf, dmd.conf) DDOCFILE setting.)
$(LI Definitions from *.ddoc files specified on the command line.)
$(LI Runtime definitions generated by Ddoc.)
$(LI Definitions from any Macros: sections.)
Expand Down Expand Up @@ -816,7 +816,7 @@ $(P
And all the summary sections will now be green.
)

<h3>Macro Definitions from $(LINK2 $(WEBURL)dmd-windows.html#sc_ini, $(D sc.ini))'s DDOCFILE</h3>
<h3>Macro Definitions from $(DPLLINK dmd-windows.html#sc_ini, $(D sc.ini))'s DDOCFILE</h3>

$(P
A text file of macro definitions can be created,
Expand Down
4 changes: 4 additions & 0 deletions doc.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ OPT=<sub>opt</sub>
GLINK=$(LINK2 #$0, $(I $0))
GLINK2=$(LINK2 $1.html#$2, $(I $2))
GNAME=$(LNAME2 $0, $(I $0))
DDLINK=$(LINK2 $1.html, $3)
DDSUBLINK=$(LINK2 $1.html#$2, $3)
DPLLINK=$(LINK2 $1, $2)
NOT_EBOOK=$0
ASSIGNEXPRESSION=$(GLINK2 expression, AssignExpression)
ISEXPRESSION=$(GLINK2 expression, IsExpression)
META_KEYWORDS=D programming language
Expand Down
7 changes: 4 additions & 3 deletions ebook.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ CONSOLE=<pre class="console">$0</pre><p></p>
MODDEFFILE=<pre class="moddeffile">$0</pre><p></p>

GLINK2=$(GLINK $2)
WEB=
EBOOK=$0
WEBURL=http://www.d-programming-language.org/
DDLINK=$(LINK2 #$2, $3)
DDSUBLINK=$(LINK2 #$2, $3)
DPLLINK=$(LINK2 http://www.d-programming-language.org/$1, $2)
NOT_EBOOK=
4 changes: 2 additions & 2 deletions errors.dd
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ description of the error.
If code detects an error like "out of memory," then an Error is thrown
with a message saying "Out of memory". The function call stack is unwound,
looking for a handler for the Error.
$(LINK2 statement.html#TryStatement, Finally blocks)
$(DDSUBLINK statement, TryStatement, Finally blocks)
are executed as the
stack is unwound. If an error handler is found, execution resumes there. If
not, the default Error handler is run, which displays the message and
Expand Down Expand Up @@ -177,7 +177,7 @@ How does this meet our assumptions about errors?
</dl>

Using exceptions to handle errors leads to another issue - how to write
exception safe programs. $(LINK2 $(WEBURL)exception-safe.html, Here's how).
exception safe programs. $(DPLLINK exception-safe.html, Here's how).

$(COMMENT
$(OL
Expand Down
14 changes: 7 additions & 7 deletions expression.dd
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ $(GNAME RelExpression):
$(LI "Exception" means the $(I Invalid Exception) is raised if one
of the operands is a NAN. It does not mean an exception
is thrown. The $(I Invalid Exception) can be checked
using the functions in $(LINK2 $(WEBURL)phobos/std_c_fenv.html, std.c.fenv).
using the functions in $(DPLLINK phobos/std_c_fenv.html, std.c.fenv).
)
)

Expand Down Expand Up @@ -1050,7 +1050,7 @@ $(V2 $(B __FILE__)
$(GLINK AssertExpression)
$(GLINK MixinExpression)
$(GLINK ImportExpression)
$(LINK2 declaration.html#BasicTypeX, $(I BasicType)) $(B .) $(I Identifier)
$(DDSUBLINK declaration, BasicTypeX, $(I BasicType)) $(B .) $(I Identifier)
$(GLINK2 declaration, Typeof)
$(GLINK TypeidExpression)
$(GLINK IsExpression)
Expand Down Expand Up @@ -1385,7 +1385,7 @@ double test() {
}
-------------

When comparing with $(LINK2 function.html#nested, nested functions),
When comparing with $(DDSUBLINK function, nested, nested functions),
the $(B function) form is analogous to static
or non-nested functions, and the $(B delegate) form is
analogous to non-static nested functions. In other words,
Expand All @@ -1409,7 +1409,7 @@ $(GNAME AssertExpression):
evaluate assert expressions at all.
The result type of an assert expression is $(D void).
Asserts are a fundamental part of the
$(LINK2 $(WEB dbc.html)$(EBOOK #Contract Programming), Contract Programming)
$(DDLINK dbc, Contract Programming, Contract Programming)
support in D.
)

Expand Down Expand Up @@ -1499,20 +1499,20 @@ $(V2 $(B typeid $(LPAREN)) $(GLINK Expression) $(B $(RPAREN)))

$(V1
$(P Returns an instance of class
$(LINK2 $(WEBURL)phobos/object.html, $(B TypeInfo))
$(DPLLINK phobos/object.html, $(B TypeInfo))
corresponding
to $(I Type).
)
)
$(V2
$(P If $(I Type), returns an instance of class
$(LINK2 $(WEBURL)phobos/object.html, $(B TypeInfo))
$(DPLLINK phobos/object.html, $(B TypeInfo))
corresponding
to $(I Type).
)

$(P If $(I Expression), returns an instance of class
$(LINK2 $(WEBURL)phobos/object.html, $(B TypeInfo))
$(DPLLINK phobos/object.html, $(B TypeInfo))
corresponding
to the type of the $(I Expression).
If the type is a class, it returns the $(B TypeInfo)
Expand Down
4 changes: 2 additions & 2 deletions float.dd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ $(V2
)

$(P These flags can be set/reset via the functions in
$(LINK2 $(WEBURL)phobos/std_c_fenv.html, std.c.fenv).)
$(DPLLINK phobos/std_c_fenv.html, std.c.fenv).)

<h3>Floating Point Comparisons</h3>

Expand All @@ -138,7 +138,7 @@ $(V2
!&lt;&gt;
and match the semantics for the
NCEG extensions to C.
See $(LINK2 expression.html#floating_point_comparisons, Floating point comparisons).
See $(DDSUBLINK expression, floating_point_comparisons, Floating point comparisons).
)

<h3><a name="floating-point-transformations">Floating Point Transformations</a></h2>
Expand Down
4 changes: 2 additions & 2 deletions function.dd
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ $(V2

$(P $(I Safe functions) are functions that are statically checked
to exhibit no possibility of
$(LINK2 $(WEBURL)glossary.html#undefined_behavior, $(I undefined behavior)).
$(DPLLINK glossary.html#undefined_behavior, $(I undefined behavior)).
Undefined behavior is often used as a vector for malicious
attacks.
)
Expand Down Expand Up @@ -1702,7 +1702,7 @@ $(V2
<h2>$(LNAME2 function-attribute-inference, Function Attribute Inference)</h2>

$(P $(GLINK2 expression, FunctionLiteral)s and
$(LINK2 template.html#function-templates, function template)s, since their function bodies
$(DDSUBLINK template, function-templates, function template)s, since their function bodies
are always present, infer the
$(LINK2 #pure-functions, $(B pure)),
$(LINK2 #nothrow-functions, $(B nothrow)), and
Expand Down
2 changes: 1 addition & 1 deletion garbage.dd
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ $(SPEC_S Garbage Collection,
)

$(P These constraints are addressed by techniques outlined
in $(LINK2 $(WEBURL)memory.html, Memory Management).
in $(DPLLINK memory.html, Memory Management).
)

<h2>How Garbage Collection Works</h2>
Expand Down
4 changes: 2 additions & 2 deletions interfaceToC.dd
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ void foo(char[] string) {

$(P D does not support bit fields. If needed, they can be emulated
with shift and mask operations.
$(LINK2 $(WEBURL)htod.html, htod) will convert bit fields to inline functions that
$(DPLLINK htod.html, htod) will convert bit fields to inline functions that
do the right shift and masks.
)

Expand All @@ -408,7 +408,7 @@ $(V1
<h1>Interfacing to C++</h1>

$(P D does not provide an interface to C++, other than
through $(LINK2 $(WEBURL)COM.html, COM programming). Since D, however,
through $(DPLLINK COM.html, COM programming). Since D, however,
interfaces directly to C, it can interface directly to
C++ code if it is declared as having C linkage.
)
Expand Down
2 changes: 1 addition & 1 deletion intro.dd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(OL
$(LI $(B lexical analysis)$(BR)

The source file is divided up into a sequence of tokens.
$(LINK2 $(WEB lex.html)#specialtokens, Special tokens))
$(DDSUBLINK lex, specialtokens, Special tokens))
are replaced with other tokens.
$(GLINK2 lex, SpecialTokenSequence)s
are processed and removed.
Expand Down
2 changes: 1 addition & 1 deletion memory-safe-d.dd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(SPEC_S Memory Safety,
<h3>Proscribed Forms</h3>

$(UL
$(LI $(LINK2 $(WEB iasm.html)$(EBOOK #Inline Assembler), Inline assembler).
$(LI $(DDLINK iasm, Inline Assembler, Inline assembler).
)

$(LI Casting away const or immutable attributes.
Expand Down
4 changes: 2 additions & 2 deletions property.dd
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ $(SECTION2 $(LNAME2 classinfo, .classinfo) Property,

$(P $(CODE .classinfo) provides information about the dynamic type
of a class object.
$(V1 It returns a reference to type $(LINK2 $(WEBURL)phobos/object.html, object.ClassInfo).)
$(V2 It returns a reference to type $(LINK2 $(WEBURL)phobos/object.html#TypeInfo_Class, object.TypeInfo_Class).)
$(V1 It returns a reference to type $(DPLLINK phobos/object.html, object.ClassInfo).)
$(V2 It returns a reference to type $(DPLLINK phobos/object.html#TypeInfo_Class, object.TypeInfo_Class).)
)
)

Expand Down
2 changes: 1 addition & 1 deletion spec.dd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(SPEC_S Table of Contents,
$(LINK2 http://www.d-programming-language.org, d-programming-language.org).
)

$(WEB $(P This is also available as a
$(NOT_EBOOK $(P This is also available as a
$(LINK2 http://www.digitalmars.com/d/2.0/dlangspec.mobi, Mobi ebook) or as a
$(AMAZONLINK B005CCQPKK, Kindle ebook).))

Expand Down
4 changes: 2 additions & 2 deletions statement.dd
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ $(COMMENT
<p>

If there is an out postcondition
(see $(LINK2 $(WEB dbc.html)$(EBOOK #Contract Programming), Contract Programming)),
(see $(DDLINK dbc, Contract Programming, Contract Programming)),
that postcondition is executed
after the $(EXPRESSION) is evaluated and before the function
actually returns.
Expand Down Expand Up @@ -1677,7 +1677,7 @@ $(GNAME AsmInstructionList):

The format of the instructions is, of course, highly dependent
on the native instruction set of the target CPU, and so is
$(LINK2 $(WEB iasm.html)$(EBOOK #Inline Assembler), implementation defined).)
$(DDLINK iasm, Inline Assembler, implementation defined).)
But, the format will follow the following
conventions:

Expand Down
4 changes: 2 additions & 2 deletions struct.dd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $(SPEC_S Structs &amp; Unions,
$(P Whereas classes are reference types, structs are value types.
Any C struct can be exactly represented as a D struct.
In C++ parlance, a D struct is a
$(LINK2 $(WEBURL)glossary.html#pod, POD (Plain Old Data)) type,
$(DPLLINK glossary.html#pod, POD (Plain Old Data)) type,
with a trivial constructors and destructors.
Structs and unions are meant as simple aggregations of data, or as a way
to paint a data structure over hardware or an external type. External
Expand Down Expand Up @@ -342,7 +342,7 @@ $(V2
$(TR
$(TD inner nesting)
$(TD $(LINK2 #nested, YES))
$(TD $(LINK2 $(WEB class.html)#nested, YES))
$(TD $(DDSUBLINK class, nested, YES))
$(NO)
$(NO)
$(NO)
Expand Down
2 changes: 1 addition & 1 deletion template-comparison.dd
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ return Foo_foo&lt;char,int&gt('c',3);

$(TR
$(TD Compile time execution of functions)
$(TD $(LINK2 function.html#interpretation, Yes):
$(TD $(DDSUBLINK function, interpretation, Yes):
---
int factorial(int i)
{ if (i == 0)
Expand Down
2 changes: 1 addition & 1 deletion type.dd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $(SECTION2 Derived Data Types,
$(LI delegate)
)

$(P $(LINK2 arrays.html#strings, $(I Strings)) are a special case of arrays.)
$(P $(DDSUBLINK arrays, strings, $(I Strings)) are a special case of arrays.)
)

$(SECTION2 User Defined Types,
Expand Down
4 changes: 2 additions & 2 deletions unittest.dd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unittest {
following it.
)

$(P A compiler switch, such as $(LINK2 $(WEBURL)dmd-windows.html#switches, $(B -unittest))
$(P A compiler switch, such as $(DPLLINK dmd-windows.html#switches, $(B -unittest))
for $(B dmd), will
cause the unittest test code to be compiled and incorporated into
the resulting executable. The unittest code gets run after
Expand All @@ -52,7 +52,7 @@ class Sum {

<h3>Versioning</h3>

$(P The $(LINK2 version.html#PredefinedVersions, version identifier)
$(P The $(DDSUBLINK version, PredefinedVersions, version identifier)
$(B unittest) is predefined if the compilation
is done with unit tests enabled.
)
Expand Down
Loading

0 comments on commit a0d9616

Please sign in to comment.