Skip to content

Commit

Permalink
XREF -> REF (sed)
Browse files Browse the repository at this point in the history
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
  • Loading branch information
aG0aep6G committed May 27, 2016
1 parent a207b27 commit 764caef
Show file tree
Hide file tree
Showing 37 changed files with 167 additions and 167 deletions.
18 changes: 9 additions & 9 deletions changelog.dd
Expand Up @@ -28,12 +28,12 @@ $(BUGSTITLE Library Changes,
exposed))
$(LI $(RELATIVE_LINK2 iota-length-size_t, `std.range.iota's `.length`
property is fixed to `size_t` instead of the type being iterated))
$(LI $(XREF uni, isNumber) and $(XREF uni, isPunctuation) now use a separate,
$(LI $(REF isNumber, std,uni) and $(REF isPunctuation, std,uni) now use a separate,
optimized path for ASCII inputs.)
$(LI $(XREF uni, isAlphaNum), which is analogous to $(XREF ascii, isAlphaNum)
$(LI $(REF isAlphaNum, std,uni), which is analogous to $(REF isAlphaNum, std,ascii)
was added.)
$(LI $(XREF regex, regex) now supports inline comments with (?#...) syntax.)
$(LI std.regex had numerous optimization applied, compile-time $(XREF regex, ctRegex)
$(LI $(REF regex, std,regex) now supports inline comments with (?#...) syntax.)
$(LI std.regex had numerous optimization applied, compile-time $(REF ctRegex, std,regex)
should now be generally faster then the run-time version.)
$(LI $(REF moveAt, std,range,primitives) accepts only `size_t` for its index
arguments.)
Expand All @@ -42,7 +42,7 @@ $(BUGSTITLE Library Changes,
$(LI $(REF readLink, std,file) and $(REF symlink, std,file) have been
rangified.)
$(LI All overloads of `std.conv.toImpl` has been made private. Please use
$(XREF conv, to) instead.)
$(REF to, std,conv) instead.)
$(LI $(RELATIVE_LINK2 min-max-element,
`std.algorithm.searching.{min,max}Element` for ranges have been added.))
$(LI $(XREF Ternary, std,typecons) was added to represent three valued
Expand All @@ -63,7 +63,7 @@ $(LI $(LNAME2 process, Process creation in `std.process` was sped up on Posix.)
$(LI $(LNAME2 std-algorithm-iteration-cumulativeFold, $(XREF algorithm.iteration,
cumulativeFold) was added.)

$(P $(XREF algorithm.iterator, cumulativeFold) returns the successive
$(P $(REF cumulativeFold, std,algorithm.iterator) returns the successive
reduced values of an input range.)
------
assert([1, 2, 3, 4, 5].cumulativeFold!((a, b) => a + b).array == [1, 3, 6, 10, 15]);
Expand All @@ -73,7 +73,7 @@ assert([1, 2, 3].cumulativeFold!((a, b) => a + b)(100).array == [101, 103, 106])

$(LI $(LNAME2 padLeft-padRight, `std.range.padLeft` and `std.range.padRight`
were added.)
$(P $(XREF range, padLeft) and $(XREF range, padRight) are functions for
$(P $(REF padLeft, std,range) and $(REF padRight, std,range) are functions for
padding ranges to a specified length using the given element.
)

Expand Down Expand Up @@ -102,7 +102,7 @@ assert(m.front[1] == "12");
-------
)

$(LI $(LNAME2 regex-with-matches, $(XREF regex, splitter) now supports keeping the
$(LI $(LNAME2 regex-with-matches, $(REF splitter, std,regex) now supports keeping the
pattern matches in the resulting range.)
-------
import std.regex;
Expand Down Expand Up @@ -203,7 +203,7 @@ $(LI $(LNAME2 mutation, `std.algorithm.mutation.swapAt` was exposed)

$(LI $(LNAME2 iota-length-size_t, `std.range.iota's `.length` property is fixed
to `size_t` instead of the type being iterated)
$(P $(XREF range, iota)'s `.length` property is now always returned as
$(P $(REF iota, std,range)'s `.length` property is now always returned as
`size_t`. This means if you are on a 32-bit CPU and you are using
iota to iterate 64-bit types, the length will be truncated to `size_t`.
In non-release mode, you will get an exception if the length exceeds
Expand Down
2 changes: 1 addition & 1 deletion std/algorithm/comparison.d
Expand Up @@ -1767,7 +1767,7 @@ the benefit of have better complexity than the $(D AllocateGC.no) option. Howeve
this option is only available for ranges whose equality can be determined via each
element's $(D toHash) method. If customized equality is needed, then the $(D pred)
template parameter can be passed, and the function will automatically switch to
the non-allocating algorithm. See $(XREF functional,binaryFun) for more details on
the non-allocating algorithm. See $(REF binaryFun, std,functional) for more details on
how to define $(D pred).
Non-allocating forward range option: $(BIGOH n^2)
Expand Down
40 changes: 20 additions & 20 deletions std/algorithm/iteration.d
Expand Up @@ -122,7 +122,7 @@ The result is then directly returned when $(D front) is called,
rather than re-evaluated.
This can be a useful function to place in a chain, after functions
that have expensive evaluation, as a lazy alternative to $(XREF array,array).
that have expensive evaluation, as a lazy alternative to $(REF array, std,array).
In particular, it can be placed after a call to $(D map), or before a call
to $(D filter).
Expand Down Expand Up @@ -205,7 +205,7 @@ Tip: $(D cache) is eager when evaluating elements. If calling front on the
underlying _range has a side effect, it will be observeable before calling
front on the actual cached _range.
Furthermore, care should be taken composing $(D cache) with $(XREF _range,take).
Furthermore, care should be taken composing $(D cache) with $(REF take, std,_range).
By placing $(D take) before $(D cache), then $(D cache) will be "aware"
of when the _range ends, and correctly stop caching elements when needed.
If calling front has no side effect though, placing $(D take) after $(D cache)
Expand Down Expand Up @@ -840,13 +840,13 @@ can be avoided by explicitly specifying a predicate lambda with a
$(D lazy) parameter.
$(D each) also supports $(D opApply)-based iterators, so it will work
with e.g. $(XREF parallelism, parallel).
with e.g. $(REF parallel, std,parallelism).
Params:
pred = predicate to apply to each element of the range
r = range or iterable over which each iterates
See_Also: $(XREF range,tee)
See_Also: $(REF tee, std,range)
*/
template each(alias pred = "a")
Expand Down Expand Up @@ -1029,7 +1029,7 @@ unittest
$(D auto filter(Range)(Range rs) if (isInputRange!(Unqual!Range));)
Implements the higher order _filter function. The predicate is passed to
$(XREF functional,unaryFun), and can either accept a string, or any callable
$(REF unaryFun, std,functional), and can either accept a string, or any callable
that can be executed via $(D pred(element)).
Params:
Expand Down Expand Up @@ -1232,9 +1232,9 @@ private struct FilterResult(alias pred, Range)
* finding the last element in the range that satisfies the filtering
* condition (in addition to finding the first one). The advantage is
* that the filtered range can be spanned from both directions. Also,
* $(XREF range, retro) can be applied against the filtered range.
* $(REF retro, std,range) can be applied against the filtered range.
*
* The predicate is passed to $(XREF functional,unaryFun), and can either
* The predicate is passed to $(REF unaryFun, std,functional), and can either
* accept a string, or any callable that can be executed via $(D pred(element)).
*
* Params:
Expand Down Expand Up @@ -1325,7 +1325,7 @@ Similarly to $(D uniq), $(D group) produces a range that iterates over unique
consecutive elements of the given range. Each element of this range is a tuple
of the element and the number of times it is repeated in the original range.
Equivalence of elements is assessed by using the predicate $(D pred), which
defaults to $(D "a == b"). The predicate is passed to $(XREF functional,binaryFun),
defaults to $(D "a == b"). The predicate is passed to $(REF binaryFun, std,functional),
and can either accept a string, or any callable that can be executed via
$(D pred(element, element)).
Expand Down Expand Up @@ -1772,8 +1772,8 @@ unittest
* Chunks an input range into subranges of equivalent adjacent elements.
*
* Equivalence is defined by the predicate $(D pred), which can be either
* binary, which is passed to $(XREF functional,binaryFun), or unary, which is
* passed to $(XREF functional,unaryFun). In the binary form, two _range elements
* binary, which is passed to $(REF binaryFun, std,functional), or unary, which is
* passed to $(REF unaryFun, std,functional). In the binary form, two _range elements
* $(D a) and $(D b) are considered equivalent if $(D pred(a,b)) is true. In
* unary form, two elements are considered equivalent if $(D pred(a) == pred(b))
* is true.
Expand Down Expand Up @@ -2025,7 +2025,7 @@ both outer and inner ranges of $(D RoR) are forward ranges; otherwise it will
be only an input range.
See_also:
$(XREF range,chain), which chains a sequence of ranges with compatible elements
$(REF chain, std,range), which chains a sequence of ranges with compatible elements
into a single range.
*/
auto joiner(RoR, Separator)(RoR r, Separator sep)
Expand Down Expand Up @@ -2626,7 +2626,7 @@ template reduce(fun...) if (fun.length >= 1)
/++
Seed version. The seed should be a single value if $(D fun) is a
single function. If $(D fun) is multiple functions, then $(D seed)
should be a $(XREF typecons,Tuple), with one field per function in $(D f).
should be a $(REF Tuple, std,typecons), with one field per function in $(D f).
For convenience, if the seed is const, or has qualified fields, then
$(D reduce) will operate on an unqualified copy. If this happens
Expand Down Expand Up @@ -2768,7 +2768,7 @@ Sometimes it is very useful to compute multiple aggregates in one pass.
One advantage is that the computation is faster because the looping overhead
is shared. That's why $(D reduce) accepts multiple functions.
If two or more functions are passed, $(D reduce) returns a
$(XREF typecons, Tuple) object with one member per passed-in function.
$(REF Tuple, std,typecons) object with one member per passed-in function.
The number of seeds must be correspondingly increased.
*/
@safe unittest
Expand Down Expand Up @@ -3459,7 +3459,7 @@ Two adjacent separators are considered to surround an empty element in
the split range. Use $(D filter!(a => !a.empty)) on the result to compress
empty elements.
The predicate is passed to $(XREF functional,binaryFun), and can either accept
The predicate is passed to $(REF binaryFun, std,functional), and can either accept
a string, or any callable that can be executed via $(D pred(element, s)).
If the empty range is given, the result is a range with one empty
Expand Down Expand Up @@ -3488,7 +3488,7 @@ Returns:
likewise.
See_Also:
$(XREF regex, _splitter) for a version that splits using a regular
$(REF _splitter, std,regex) for a version that splits using a regular
expression defined separator.
*/
auto splitter(alias pred = "a == b", Range, Separator)(Range r, Separator s)
Expand Down Expand Up @@ -3744,7 +3744,7 @@ if (is(typeof(binaryFun!pred(r.front, s)) : bool)
Similar to the previous overload of $(D splitter), except this one uses another
range as a separator. This can be used with any narrow string type or sliceable
range type, but is most popular with string types. The predicate is passed to
$(XREF functional,binaryFun), and can either accept a string, or any callable
$(REF binaryFun, std,functional), and can either accept a string, or any callable
that can be executed via $(D pred(r.front, s.front)).
Two adjacent separators are considered to surround an empty element in
Expand All @@ -3768,7 +3768,7 @@ Returns:
is a forward range or bidirectional range, the returned range will be
likewise.
See_Also: $(XREF regex, _splitter) for a version that splits using a regular
See_Also: $(REF _splitter, std,regex) for a version that splits using a regular
expression defined separator.
*/
auto splitter(alias pred = "a == b", Range, Separator)(Range r, Separator s)
Expand Down Expand Up @@ -4017,7 +4017,7 @@ if (is(typeof(binaryFun!pred(r.front, s.front)) : bool)
Similar to the previous overload of $(D splitter), except this one does not use a separator.
Instead, the predicate is an unary function on the input range's element type.
The $(D isTerminator) predicate is passed to $(XREF functional,unaryFun) and can
The $(D isTerminator) predicate is passed to $(REF unaryFun, std,functional) and can
either accept a string, or any callable that can be executed via $(D pred(element, s)).
Two adjacent separators are considered to surround an empty element in
Expand All @@ -4037,7 +4037,7 @@ Returns:
is a forward range or bidirectional range, the returned range will be
likewise.
See_Also: $(XREF regex, _splitter) for a version that splits using a regular
See_Also: $(REF _splitter, std,regex) for a version that splits using a regular
expression defined separator.
*/
auto splitter(alias isTerminator, Range)(Range input)
Expand Down Expand Up @@ -4754,7 +4754,7 @@ Lazily iterates unique consecutive elements of the given range (functionality
akin to the $(WEB wikipedia.org/wiki/_Uniq, _uniq) system
utility). Equivalence of elements is assessed by using the predicate
$(D pred), by default $(D "a == b"). The predicate is passed to
$(XREF functional,binaryFun), and can either accept a string, or any callable
$(REF binaryFun, std,functional), and can either accept a string, or any callable
that can be executed via $(D pred(element, element)). If the given range is
bidirectional, $(D uniq) also yields a bidirectional range.
Expand Down
4 changes: 2 additions & 2 deletions std/algorithm/mutation.d
Expand Up @@ -385,7 +385,7 @@ range elements, different types of ranges are accepted:

/**
To _copy at most $(D n) elements from a range, you may want to use
$(XREF range, take):
$(REF take, std,range):
*/
@safe unittest
{
Expand All @@ -412,7 +412,7 @@ use $(LREF filter):
}

/**
$(XREF range, retro) can be used to achieve behavior similar to
$(REF retro, std,range) can be used to achieve behavior similar to
$(WEB sgi.com/tech/stl/copy_backward.html, STL's copy_backward'):
*/
@safe unittest
Expand Down
6 changes: 3 additions & 3 deletions std/algorithm/searching.d
Expand Up @@ -33,7 +33,7 @@ $(T2 endsWith,
$(D endsWith("rocks", "ks")) returns $(D true).)
$(T2 find,
$(D find("hello world", "or")) returns $(D "orld") using linear search.
(For binary search refer to $(XREF range,sortedRange).))
(For binary search refer to $(REF sortedRange, std,range).))
$(T2 findAdjacent,
$(D findAdjacent([1, 2, 3, 3, 4])) returns the subrange starting with
two equal adjacent elements, i.e. $(D [3, 3, 4]).)
Expand Down Expand Up @@ -398,7 +398,7 @@ $(D takeExactly(r1, n)), where $(D n) is the number of elements in the common
prefix of both ranges.
See_Also:
$(XREF range, takeExactly)
$(REF takeExactly, std,range)
*/
auto commonPrefix(alias pred = "a == b", R1, R2)(R1 r1, R2 r2)
if (isForwardRange!R1 && isInputRange!R2 &&
Expand Down Expand Up @@ -1317,7 +1317,7 @@ pred). Performs $(BIGOH walkLength(haystack)) evaluations of $(D
pred).
To _find the last occurrence of $(D needle) in $(D haystack), call $(D
find(retro(haystack), needle)). See $(XREF range, retro).
find(retro(haystack), needle)). See $(REF retro, std,range).
Params:
Expand Down
2 changes: 1 addition & 1 deletion std/algorithm/setops.d
Expand Up @@ -72,7 +72,7 @@ Params:
otherRanges = Zero or more non-infinite forward ranges
Returns:
A forward range of $(XREF typecons,Tuple) representing elements of the
A forward range of $(REF Tuple, std,typecons) representing elements of the
cartesian product of the given ranges.
*/
auto cartesianProduct(R1, R2)(R1 range1, R2 range2)
Expand Down
18 changes: 9 additions & 9 deletions std/algorithm/sorting.d
Expand Up @@ -10,7 +10,7 @@ $(T2 completeSort,
$(D completeSort(a, b)) leaves $(D a = [6, 10, 15]) and $(D b = [20,
30, 40]).
The range $(D a) must be sorted prior to the call, and as a result the
combination $(D $(XREF range,chain)(a, b)) is sorted.)
combination $(D $(REF chain, std,range)(a, b)) is sorted.)
$(T2 isPartitioned,
$(D isPartitioned!"a < 0"([-1, -2, 1, 0, 2])) returns $(D true) because
the predicate is $(D true) for a portion of the range and $(D false)
Expand Down Expand Up @@ -594,7 +594,7 @@ Params:
pivot = The pivot element.
Returns:
A $(XREF typecons,Tuple) of the three resulting ranges. These ranges are
A $(REF Tuple, std,typecons) of the three resulting ranges. These ranges are
slices of the original range.
BUGS: stable $(D partition3) has not been implemented yet.
Expand Down Expand Up @@ -1084,12 +1084,12 @@ Sorts a random-access range according to the predicate $(D less). Performs
$(BIGOH r.length * log(r.length)) evaluations of $(D less). Stable sorting
requires $(D hasAssignableElements!Range) to be true.
$(D sort) returns a $(XREF range, SortedRange) over the original range, which
$(D sort) returns a $(REF SortedRange, std,range) over the original range, which
functions that can take advantage of sorted data can then use to know that the
range is sorted and adjust accordingly. The $(XREF range, SortedRange) is a
range is sorted and adjust accordingly. The $(REF SortedRange, std,range) is a
wrapper around the original range, so both it and the original range are sorted,
but other functions won't know that the original range has been sorted, whereas
they $(I can) know that $(XREF range, SortedRange) has been sorted.
they $(I can) know that $(REF SortedRange, std,range) has been sorted.
The predicate is expected to satisfy certain rules in order for $(D sort) to
behave as expected - otherwise, the program may fail on certain inputs (but not
Expand All @@ -1099,7 +1099,7 @@ $(D less(a,c)) (transitivity), and, conversely, $(D !less(a,b) && !less(b,c)) to
imply $(D !less(a,c)). Note that the default predicate ($(D "a < b")) does not
always satisfy these conditions for floating point types, because the expression
will always be $(D false) when either $(D a) or $(D b) is NaN.
Use $(XREF math, cmp) instead.
Use $(REF cmp, std,math) instead.
If `less` involves expensive computations on the _sort key, it may be
worthwhile to use $(LREF schwartzSort) instead.
Expand All @@ -1121,10 +1121,10 @@ or more allocations per call. Both algorithms have $(BIGOH n log n) worst-case
time complexity.
See_Also:
$(XREF range, assumeSorted)$(BR)
$(XREF range, SortedRange)$(BR)
$(REF assumeSorted, std,range)$(BR)
$(REF SortedRange, std,range)$(BR)
$(XREF_PACK algorithm,mutation,SwapStrategy)$(BR)
$(XREF functional, binaryFun)
$(REF binaryFun, std,functional)
*/
SortedRange!(Range, less)
sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable,
Expand Down
6 changes: 3 additions & 3 deletions std/array.d
Expand Up @@ -339,7 +339,7 @@ range, which must be a range of tuples (Key, Value). Returns a null associative
array reference when given an empty range.
Duplicates: Associative arrays have unique keys. If r contains duplicate keys,
then the result will contain the value of the last pair for that key in r.
See_Also: $(XREF typecons, Tuple)
See_Also: $(REF Tuple, std,typecons)
*/

auto assocArray(Range)(Range r)
Expand Down Expand Up @@ -1247,7 +1247,7 @@ pure nothrow bool sameTail(T)(in T[] lhs, in T[] rhs)
/********************************************
Returns an array that consists of $(D s) (which must be an input
range) repeated $(D n) times. This function allocates, fills, and
returns a new array. For a lazy version, refer to $(XREF range, repeat).
returns a new array. For a lazy version, refer to $(REF repeat, std,range).
*/
ElementEncodingType!S[] replicate(S)(S s, size_t n) if (isDynamicArray!S)
{
Expand Down Expand Up @@ -1330,7 +1330,7 @@ See_Also:
$(XREF_PACK algorithm,iteration,splitter) for a version that splits using any
separator.
$(XREF regex, splitter) for a version that splits using a regular
$(REF splitter, std,regex) for a version that splits using a regular
expression defined separator.
+/
S[] split(S)(S s) @safe pure
Expand Down
2 changes: 1 addition & 1 deletion std/bigint.d
Expand Up @@ -632,7 +632,7 @@ public:
/**
Implements casting to integer types.
Throws: $(XREF conv,ConvOverflowException) if the number exceeds
Throws: $(REF ConvOverflowException, std,conv) if the number exceeds
the target type's range.
*/
T opCast(T:ulong)() /*pure*/ const
Expand Down

0 comments on commit 764caef

Please sign in to comment.