Skip to content

Commit

Permalink
fix various broken links in articles
Browse files Browse the repository at this point in the history
fixes issue 19067 - [Mixins] Dead Link to template-mixin
  • Loading branch information
aG0aep6G committed Jul 7, 2018
1 parent f7d330c commit 378c032
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 20 deletions.
4 changes: 2 additions & 2 deletions articles/code_coverage.dd
Expand Up @@ -7,8 +7,8 @@ is creating a test suite for it. Without some sort of test suite,
it is impossible to know if the software works at all.
The D language has
many features to aid in the creation of test suites, such as
$(LINK2 spec/unittest.html, unit tests) and
$(LINK2 spec/contracts.html, contract programming).
$(DDLINK spec/unittest, Unit Tests, unit tests) and
$(DDLINK spec/contracts, Contract Programming, contract programming).
But there's the issue of how thoroughly the test suite tests
the code.
The $(LINK2 http://www.digitalmars.com/ctg/trace.html, profiler)
Expand Down
2 changes: 1 addition & 1 deletion articles/ctarguments.dd
Expand Up @@ -113,7 +113,7 @@ $(H2 $(LNAME2 available-operations, Available operations))

$(H3 $(LNAME2 loops, Loops))

$(P D's $(LINK2 spec/statement.html#ForeachStatement, foreach statement) has special
$(P D's $(DDSUBLINK spec/statement, ForeachStatement, foreach statement) has special
semantics when iterating over compile-time sequences. It repeats the body of the loop
for each of the sequence elements, with the loop iteration symbol being an alias
for each compile-time sequence element in turn.
Expand Down
4 changes: 2 additions & 2 deletions articles/exception-safe.dd
Expand Up @@ -97,8 +97,8 @@ solution separates the unwinding code from the setup, and it can often be
a visually large separation. Closely related code should be grouped together.
)

$(P The $(LINK2 spec/statement.html#ScopeGuardStatement, scope guard statement) is a
better approach:
$(P The $(DDSUBLINK spec/statement, ScopeGuardStatement, scope guard statement)
is a better approach:
)

---
Expand Down
12 changes: 7 additions & 5 deletions articles/faq.dd
Expand Up @@ -91,7 +91,7 @@ $(H2 General D FAQ)
$(ITEM case_range, Why doesn't the case range statement
use the $(D case X..Y:) syntax?)

$(P See the $(LINK2 spec/statement.html#CaseRangeStatement, case range statement).)
$(P See the $(DDSUBLINK spec/statement, CaseRangeStatement, case range statement).)

$(P The usages of .. would then be:
$(OL
Expand Down Expand Up @@ -189,7 +189,8 @@ $(ITEM q1_1, Could you change the name? D is kind of hard to search for on searc

$(ITEM q1_2, Is there a linux port of D?)

$(P Yes, the D compiler includes a $(LINK2 dmd-linux.html, linux version).
$(P Yes, the D compiler includes a $(DDLINK dmd-linux,
DMD Compiler for Linux, linux version).
)

$(ITEM gdc, Is there a GNU version of D?)
Expand Down Expand Up @@ -261,7 +262,7 @@ $(ITEM q6, Why $(I no) fall through on switch statements?)
)

$(P In D2, implicit fall through is disallowed. You have to add a
$(LINK2 spec/statement.html#GotoStatement, goto case;) statement to explicitly
$(DDSUBLINK spec/statement, GotoStatement, goto case;) statement to explicitly
state the intention of falling through.
)

Expand Down Expand Up @@ -624,7 +625,8 @@ the termination condition on the fly.)
$(ITEM cpp_interface, Why doesn't D have an interface to C++ as well as C?)

$(P D 2.0 does have a
$(LINK2 spec/cpp_interface.html, limited interface to C++ code.)
$(DDLINK spec/cpp_interface, Interfacing to C++,
limited interface to C++ code.)
) Here are some reasons why it isn't a full interface:


Expand Down Expand Up @@ -775,7 +777,7 @@ $(ITEM reference-counting, Why doesn't D use reference counting for garbage coll
counting, as rc is better for managing scarce resources like file
handles.
Furthermore, if ref counting is a must, Phobos has the
$(LINK2 phobos/std_typecons.html#RefCounted, std.typecons.RefCounted) type
$(REF RefCounted, std,typecons) type
which implements it as a library, similar to C++'s shared_ptr<>.
)

Expand Down
5 changes: 3 additions & 2 deletions articles/migrate-to-shared.dd
Expand Up @@ -4,10 +4,11 @@ $(D_S $(TITLE),

$(HEADERNAV_TOC)

$(P Starting with $(LINK2 changelog/2.030.html, dmd version 2.030),
$(P Starting with
$(DDLINK changelog/2.030, Change Log: 2.030, dmd version 2.030),
the default storage class
for statics and globals will be
$(LINK2 glossary.html#tls, thread local storage (TLS)), rather
$(DDSUBLINK glossary, tls, thread local storage (TLS)), rather
than the classic global data segment.
While most D code should just compile and run successfully without
change, there can be some issues.
Expand Down
2 changes: 1 addition & 1 deletion articles/mixin.dd
Expand Up @@ -3,7 +3,7 @@ Ddoc
$(D_S Mixins,

$(P Mixins (not to be confused with
$(LINK2 spec/template-mixin.html, template mixins))
$(DDLINK spec/template-mixin, Template Mixins, template mixins))
enable string constants to be compiled as regular D code
and inserted into the program.
Combining this with compile time manipulation of strings
Expand Down
4 changes: 2 additions & 2 deletions articles/pretod.dd
Expand Up @@ -615,7 +615,7 @@ void foo(T t)

$(DWAY

$(P D has the <a href="spec/version.html#StaticAssert">static assert</a>,
$(P D has the $(DDSUBLINK spec/version, StaticAssert, static assert),
which can be used anywhere a declaration
or a statement can be used. For example:
)
Expand Down Expand Up @@ -649,7 +649,7 @@ else
<hr><!-- -------------------------------------------- -->
$(H2 $(LNAME2 mixins, Template Mixins))

$(P D $(LINK2 spec/template-mixin.html, template mixins)
$(P D $(DDLINK spec/template-mixin, Template Mixins, template mixins)
superficially look just
like using C's preprocessor to insert blocks of code and
parse them in the scope of where they are instantiated.
Expand Down
2 changes: 1 addition & 1 deletion articles/regular-expression.dd
Expand Up @@ -143,7 +143,7 @@ $(D_S $(TITLE),
auto replaced = replaceAll(text, r"([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})".regex, "$3-$1-$2");
---
$(P $(D r"pattern".regex) is just another notation of writing $(D regex("pattern")) called
$(LINK2 spec/function.html#pseudo-member, UFCS) that some may find more
$(DDSUBLINK spec/function, pseudo-member, UFCS) that some may find more
slick.
As can be seen the replacement is controlled by a format string not unlike one in C's famous printf.
The &#36;1, &#36;2, &#36;3 substituted with content of sub-expressions.
Expand Down
4 changes: 2 additions & 2 deletions articles/template-comparison.dd
Expand Up @@ -349,7 +349,7 @@ void foo()
$(TR
$(TD Pointer to Member Parameters)
$(TD No, D does not have pointers to members, it has
$(LINK2 spec/type.html#delegates, delegates),
$(DDSUBLINK spec/type, delegates, delegates),
which can be used as parameters)
$(TD Yes)
$(TD No change)
Expand Down Expand Up @@ -639,7 +639,7 @@ struct Bar(T1, T2) { }
alias BarInst = Bar!(int, float);
Foo!(BarInst) f;
---
See $(LINK2 spec/expression.html#IsExpression, is expressions).
See $(DDSUBLINK spec/expression, IsExpression, is expressions).
)
$(TD No)
$(TD No change)
Expand Down
6 changes: 4 additions & 2 deletions articles/templates-revisited.dd
Expand Up @@ -550,8 +550,10 @@ an invalid type, the $(D T[]) fails and $(D is(T[])) returns false.
)

$(P
Although $(SFINAE) can be used, the $(LINK2 spec/expression.html#IsExpression, is expressions) can test a type directly,
so it isn't even necessary to use a template to ask questions about a type:
Although $(SFINAE) can be used, the
$(DDSUBLINK spec/expression, IsExpression, is expressions) can test a type
directly, so it isn't even necessary to use a template to ask questions about a
type:
)

---
Expand Down

0 comments on commit 378c032

Please sign in to comment.