Skip to content

Commit

Permalink
Remove trailing whitespace in Ddoc pages
Browse files Browse the repository at this point in the history
sed -i 's/[ \t]*$//' **/*.dd
  • Loading branch information
wilzbach committed Jun 24, 2016
1 parent 0d6045d commit baeca3f
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 109 deletions.
2 changes: 1 addition & 1 deletion ctarguments.dd
Expand Up @@ -12,7 +12,7 @@ $(D_S Compile-time Argument Lists,
internals but don't get confused : this doesn't have much in common with tuples that
commonly exist in other languages. Sequences of values of different types that can be
returned from functions are provided by $(LINK2 phobos/std_typecons.html#.Tuple, std.typecons.Tuple).
Using term "tuple" to mean compile-time lists is discouraged to avoid confusion, and if encountered
Using term "tuple" to mean compile-time lists is discouraged to avoid confusion, and if encountered
should result in a $(LINK2 https://issues.dlang.org, documentation bug report).
)

Expand Down
2 changes: 1 addition & 1 deletion exception-safe.dd
Expand Up @@ -153,7 +153,7 @@ struct FooX
bool commit;

@disable this();

static FooX create()
{
auto fx = FooX.init;
Expand Down
14 changes: 7 additions & 7 deletions overview.dd
Expand Up @@ -244,7 +244,7 @@ $(SECTION3 $(LNAME2 features_to_keep, Features To Keep From C++),
$(LI $(B Custom memory management).
There are times in systems programming where developers need
alternatives to garbage collection. D also allows for manual memory
management, techniques such as reference counting, and the use of
management, techniques such as reference counting, and the use of
specialized memory allocators.
)

Expand Down Expand Up @@ -897,7 +897,7 @@ void main()

$(P All of the algorithms in std.algorithm work with ranges to avoid the
problem of rewriting common functionality for every project. std.algorithm
implements sorts, filters, maps, reductions, and more.
implements sorts, filters, maps, reductions, and more.
)

$(P Because our Employees struct conforms to the input range definition,
Expand Down Expand Up @@ -934,7 +934,7 @@ for(; !employees.empty; employees.popFront())

$(P Each of these ranges represents a distinct way of accessing the
underlying data. Or, in the case of the output range, a way to send data
to another source. To learn more about each type of range, see the
to another source. To learn more about each type of range, see the
$(MREF_ALTTEXT range primitives, std, range, primitives)
page in the standard library documentation.
)
Expand Down Expand Up @@ -980,7 +980,7 @@ void main()

$(P For more examples of range based code, see the
$(LINK2 http://ddili.org/ders/d.en/ranges.html, Ranges) chapter in Ali
Çehreli's book "Programming In D". Also, see the article
Çehreli's book "Programming In D". Also, see the article
$(LINK2 https://wiki.dlang.org/Component_programming_with_ranges,
Component programming with ranges) by H. S. Teoh.
)
Expand Down Expand Up @@ -1304,7 +1304,7 @@ void main()
bool[8191] flags;

writeln("10 iterations");

// using iter as a throwaway variable
foreach(iter; 1 .. 11)
{
Expand All @@ -1317,13 +1317,13 @@ void main()
{
size_t prime = index + index + 3;
size_t k = index + prime;

while (k < flags.length)
{
flags[k] = 0;
k += prime;
}

count += 1;
}
}
Expand Down
132 changes: 66 additions & 66 deletions safed.dd

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions spec/arrays.dd
Expand Up @@ -195,7 +195,7 @@ s[1..3] = s[0..2]; // error, overlapping copy
parallel code optimizations than possible with the serial
semantics of C.
)

$(P If overlapping is required, use
$(REF copy, std,algorithm,mutation):
)
Expand Down Expand Up @@ -827,21 +827,21 @@ d = 'd'; // d is assigned the character 'd'

$(H4 $(LEGACY_LNAME2 strings_unicode, strings-unicode, Strings and Unicode))
$(P Note that built-in comparison operators operate on a
$(HTTPS goo.gl/zRY1K, code unit) basis.
The end result for valid strings is the same as that of
$(HTTPS goo.gl/WR424, code point)
$(HTTPS goo.gl/zRY1K, code unit) basis.
The end result for valid strings is the same as that of
$(HTTPS goo.gl/WR424, code point)
for $(HTTPS goo.gl/WR424, code point)
comparison as long as both strings are in the same
$(HTTPS goo.gl/3DKfI, normalization form).
Since normalization is a costly operation not suitable for language
Since normalization is a costly operation not suitable for language
primitives it's assumed to be enforced by the user.
)
$(P The standard library lends a hand for comparing strings with mixed encodings
(by transparently decoding, see $(PHOBOS algorithm, cmp, std.algorithm.cmp)),
(by transparently decoding, see $(PHOBOS algorithm, cmp, std.algorithm.cmp)),
$(PHOBOS uni, icmp, case-insensitive comparison) and $(PHOBOS uni, normalize, normalization).
)
$(P Last but not least, a desired string sorting order differs
by culture and language and is usually nothing like code point
$(P Last but not least, a desired string sorting order differs
by culture and language and is usually nothing like code point
for code point comparison. The natural order of strings is obtained by applying
$(HTTP www.unicode.org/reports/tr10/, the Unicode collation algorithm)
that should be implemented in the standard library.
Expand Down
2 changes: 1 addition & 1 deletion spec/ddoc.dd
Expand Up @@ -775,7 +775,7 @@ DDOC_PSUPER_SYMBOL = $(DOLLAR)(U $(DOLLAR)0)
DDOC_KEYWORD = $(DOLLAR)(B $(DOLLAR)0)
DDOC_PARAM = $(DOLLAR)(I $(DOLLAR)0)
DDOC_CONSTRAINT = $(DDOC_CONSTRAINT) if ($0)
DDOC_OVERLOAD_SEPARATOR =
DDOC_OVERLOAD_SEPARATOR =
DDOC_TEMPLATE_PARAM_LIST= $0
DDOC_TEMPLATE_PARAM = $0
DDOC_BACKQUOTED = $(DOLLAR)(D_INLINECODE $(DOLLAR)0)
Expand Down
2 changes: 1 addition & 1 deletion spec/declaration.dd
Expand Up @@ -621,7 +621,7 @@ $(H3 $(LNAME2 global_static_init, Global and Static Initializers))
$(H3 $(LNAME2 typequal_vs_storageclass, Type Qualifiers vs. Storage Classes))

$(P D draws a distinction between a type qualifer and a storage class.)

$(P A $(I type qualifier) creates a derived type from an existing base
type, and the resulting type may be used to create multiple instances
of that type.)
Expand Down
2 changes: 1 addition & 1 deletion spec/hash-map.dd
Expand Up @@ -37,7 +37,7 @@ $(H3 $(LNAME2 removing_keys, Removing Keys))
returns $(D false). If the given $(I key) does exist, it removes it
from the AA and returns $(D true).
)

$(P All keys can be removed by using the method `clear`.)

$(H3 $(LNAME2 testing_membership, Testing Membership))
Expand Down
2 changes: 1 addition & 1 deletion spec/lex.dd
Expand Up @@ -722,7 +722,7 @@ $(GNAME HexDigit):
$(GNAME HexDigitUS):
$(GLINK HexDigit)
$(D _)

$(GNAME HexLetter):
$(B a)
$(B b)
Expand Down
8 changes: 4 additions & 4 deletions spec/memory-safe-d.dd
Expand Up @@ -4,7 +4,7 @@ $(SPEC_S Memory Safety,

$(P $(I Memory Safety) for a program is defined as it being
impossible for the program to corrupt memory.
Therefore, the safe subset of D consists only of programming
Therefore, the safe subset of D consists only of programming
language features that are guaranteed to never result in memory
corruption. See $(LINK2 $(ROOT_DIR)safed.html, this article) for a
rationale.
Expand All @@ -28,9 +28,9 @@ $(H3 Usage)
interface, but uses unsafe code internally. These functions can
be called from $(D @safe) code.
)
$(P Array bounds checks are necessary to enforce memory safety, so
these are enabled (by default) for $(D @safe) code even in $(B

$(P Array bounds checks are necessary to enforce memory safety, so
these are enabled (by default) for $(D @safe) code even in $(B
-release) mode.
)

Expand Down
14 changes: 7 additions & 7 deletions spec/operatoroverloading.dd
Expand Up @@ -297,8 +297,8 @@ $(H2 $(LNAME2 eqcmp, Overloading the Comparison Operators))
be linear. For example, one may define an ordering on sets via the
subset relation, such that $(D x < y) is true if $(D x) is a (strict)
subset of $(D y). If $(D x) and $(D y) are disjoint sets, then neither
$(D x < y) nor $(D y < x) holds, but that does not imply that
$(D x == y). Thus, it is insufficient to determine equality purely based on
$(D x < y) nor $(D y < x) holds, but that does not imply that
$(D x == y). Thus, it is insufficient to determine equality purely based on
$(D opCmp) alone. For this reason, $(D opCmp) is only used for the
inequality operators $(D <), $(D <=), $(D >=), and $(D >). The equality
operators $(D ==) and $(D !=) always employ $(D opEquals) instead.)
Expand Down Expand Up @@ -513,9 +513,9 @@ $(H3 $(LNAME2 static-opcall, Static opCall))
}
---

$(P Note: $(D static opCall) can be used to simulate struct
constructors with no arguments, but this is not recommended
practice. Instead, the preferred solution is to use a factory
$(P Note: $(D static opCall) can be used to simulate struct
constructors with no arguments, but this is not recommended
practice. Instead, the preferred solution is to use a factory
function to create struct instances.
)

Expand Down Expand Up @@ -869,7 +869,7 @@ void test()
in which case it is passed directly as the corresponding argument $(I
c)$(SUBSCRIPT i) to $(D opIndex); or it can be a slice expression of
the form $(I x)$(SUBSCRIPT i)$(D ..)$(I y)$(SUBSCRIPT i), in which case
the corresponding argument $(I c)$(SUBSCRIPT i) to $(D opIndex) is
the corresponding argument $(I c)$(SUBSCRIPT i) to $(D opIndex) is
$(D arr.opSlice!i$(LPAREN))$(I x)$(SUBSCRIPT i)$(D , )$(I y)$(SUBSCRIPT i)$(D $(RPAREN)). Namely:
)

Expand Down Expand Up @@ -1067,7 +1067,7 @@ void main()

$(H2 $(LEGACY_LNAME2 Old-Style, old-style, D1 style operator overloading))

$(P
$(P
While the preferred style for operator overloading is to use the above
mechanisms, the $(LINK2 http://digitalmars.com/d/1.0/operatoroverloading.html, D1 operator overload mechanisms)
are still allowed. There is no guarantee that these mechanisms will be
Expand Down
6 changes: 3 additions & 3 deletions spec/simd.dd
Expand Up @@ -59,11 +59,11 @@ import core.simd;
$(P These types and operations will be the ones defined for the architecture
the compiler is targeting. If a particular CPU family has varying
support for vector types, an additional runtime check may be necessary.
The compiler does not emit runtime checks; those must be done by the
The compiler does not emit runtime checks; those must be done by the
programmer.
)
$(P Depending on the architecture, compiler flags may be required to

$(P Depending on the architecture, compiler flags may be required to
activate support for SIMD types.
)

Expand Down
14 changes: 7 additions & 7 deletions spec/template.dd
Expand Up @@ -528,12 +528,12 @@ $(GNAME TemplateAliasParameterDefault):
)

$(P Alias parameters enable templates to be parameterized with
almost any kind of D symbol, including user-defined type names,
global names, local names, module names, template names, and
almost any kind of D symbol, including user-defined type names,
global names, local names, module names, template names, and
template instance names.
Literals can also be used as arguments to alias parameters.
)

$(P $(B Examples:))

$(UL
Expand Down Expand Up @@ -1401,13 +1401,13 @@ $(GNAME Constraint):
foo!(4)(); // Error, no match
---
)
$(P Template constraints can be used with aggregate types (structs, classes, unions).

$(P Template constraints can be used with aggregate types (structs, classes, unions).
Constraints are effectively used with library module "std.traits":

---
import std.traits;

struct Bar(T)
if (isIntegral!T)
{
Expand Down
2 changes: 1 addition & 1 deletion warnings.dd
Expand Up @@ -19,7 +19,7 @@ $(D_S Warnings,

$(P These are the warnings generated by the Digital Mars D compiler
when the $(B -w) switch is thrown. This mode also forces compiler
to stop if any warning is produced.
to stop if any warning is produced.
Most have generated some spirited debate as to whether it should
be a warning, an error, and what the correct way to write D code
in these situations should be. Since no consensus emerged,
Expand Down

0 comments on commit baeca3f

Please sign in to comment.