Skip to content

Commit

Permalink
Merge pull request #181 from denis-sh/macros-fixes
Browse files Browse the repository at this point in the history
Macros fixes
  • Loading branch information
andralex committed Nov 19, 2012
2 parents cb75f57 + 91d4cbe commit 9129911
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 42 deletions.
5 changes: 3 additions & 2 deletions doc.ddoc
Expand Up @@ -451,8 +451,9 @@ DOLLAR=$
AMAZON= <iframe src="http://rcm.amazon.com/e/cm?t=classicempire&o=1&p=8&l=as1&asins=$0&fc1=000000&IS2=1&lt1=_blank&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
AMAZONLINK= $(LINK2 http://www.amazon.com/exec/obidos/ASIN/$1/classicempire, $+)

WEB = $(LINK2 http://$1,$2)
LUCKY = $(WEB
HTTP = $(LINK2 http://$1,$2)
HTTPS = $(LINK2 https://$1,$2)
LUCKY = $(HTTP
google.com/search?btnI=I%27m+Feeling+Lucky&amp;ie=UTF-8&amp;oe=UTF-8&amp;q=$0,$0)

FOO=FOO
Expand Down
2 changes: 0 additions & 2 deletions glossary.dd
Expand Up @@ -231,6 +231,4 @@ Macros:
TITLE=Glossary
WIKI=Glossary
D=<span class="d_inlinecode">$0</span>
LUCKY=$(WEB google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=$0,$0)
WEB=$(LINK2 http://$1,$2)
CATEGORY_APPENDICES=$0
42 changes: 20 additions & 22 deletions index.dd
Expand Up @@ -65,7 +65,7 @@ auto min(T1, T2)(T1 lhs, T2 rhs) {

$(LI Automatic memory management makes for safe, simple, and robust code.
D also supports scoped resource management (aka the
$(WEB en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization, RAII) idiom)
$(HTTP en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization, RAII) idiom)
and $(LINK2 statement.html#ScopeGuardStatement, $(D scope) statements) for
deterministic transactional code that is easy to write and read. $(EXAMPLE 2,

Expand Down Expand Up @@ -165,13 +165,13 @@ void main()

$(LI D offers an innovative approach to concurrency, featuring true
immutable data, message passing, no sharing by default, and
controlled mutable sharing across threads. $(WEBX
controlled mutable sharing across threads. $(HTTP
informit.com/articles/article.aspx?p=1609144, Read more).)

$(LI From simple scripts to large projects, D has the breadth
to scale with any application's needs: unit testing,
information hiding, refined modularity, fast compilation, precise
interfaces. $(WEBX drdobbs.com/high-performance-computing/217801225,
interfaces. $(HTTP drdobbs.com/high-performance-computing/217801225,
Read more).)

))
Expand Down Expand Up @@ -242,51 +242,51 @@ $(XXXXSECTION2 Community,

$(P D is the center of a growing, vibrant community. Get D-related
news from the $(D digitalmars.D.announce) forum $(TAG2 span,
style="font-size:80%", $(WEB
style="font-size:80%", $(HTTP
digitalmars.com/pnews/indexing.php?server=news.digitalmars.com&group=digitalmars.D.announce,
[browse]) $(LINK2 news://news.digitalmars.com/digitalmars.D.announce,
[usenet]) $(WEB
[usenet]) $(HTTP
lists.puremagic.com/cgi-bin/mailman/listinfo/digitalmars-d-announce,
[mailing list])). On Twitter, subscribe to D's official announcements
channel, $(WEB twitter.com/#!/D_Programming,@D_Programming), and
search for (and disseminate) news using tag $(WEB
channel, $(HTTP twitter.com/#!/D_Programming,@D_Programming), and
search for (and disseminate) news using tag $(HTTP
twitter.com/#!/search/%23d_lang, #d_lang).)

$(P Learning D and have a question about the best way to do X? The $(D
digitalmars.D.learn) forum $(TAG2 span, style="font-size:80%", $(WEB
digitalmars.D.learn) forum $(TAG2 span, style="font-size:80%", $(HTTP
digitalmars.com/pnews/indexing.php?server=news.digitalmars.com&group=digitalmars.D.learn,
[browse]) $(LINK2 news://news.digitalmars.com/digitalmars.D.learn,
[usenet]) $(WEB
[usenet]) $(HTTP
lists.puremagic.com/cgi-bin/mailman/listinfo/digitalmars-d-learn,
[mailing list])) is the hangout place where many D experts are ready
to help fellow hackers.)

$(P The $(D digitalmars.D) forum $(TAG2 span, style="font-size:80%",
$(WEB
$(HTTP
digitalmars.com/pnews/indexing.php?server=news.digitalmars.com&group=digitalmars.D,
[browse]) $(LINK2 news://news.digitalmars.com/digitalmars.D, [usenet])
$(WEB lists.puremagic.com/cgi-bin/mailman/listinfo/digitalmars-d,
$(HTTP lists.puremagic.com/cgi-bin/mailman/listinfo/digitalmars-d,
[mailing list])) is the best place to discuss anything and everything
related to D: language design ideas, suggestions, status and future,
contributions to the language and its standard library. Reach and
engage all major D contributors, including the very creator of D,
$(WEB walterbright.com, Walter Bright). For real-time conversation, use #d IRC channel on freenode.)
$(HTTP walterbright.com, Walter Bright). For real-time conversation, use #d IRC channel on freenode.)

$(SECTION3 To contribute,

$(P Many D enthusiasts are not only using, but also contributing to
the language, its implementation, and its standard library. The main
hub of D development is $(WEB github.com/D-Programming-Language,
hub of D development is $(HTTP github.com/D-Programming-Language,
D-Programming-Language on github). The project has been awash in
contributions ever since creating the github repository on January 23,
2011, with an average of over 3 pull requests per day. (That doesn't
mean there's not a lot more to do!) You are welcome to fork any
subproject ($(WEB github.com/D-Programming-Language/dmd, compiler),
$(WEB github.com/D-Programming-Language/druntime, runtime), $(WEB
github.com/D-Programming-Language/phobos, standard library), $(WEB
subproject ($(HTTP github.com/D-Programming-Language/dmd, compiler),
$(HTTP github.com/D-Programming-Language/druntime, runtime), $(HTTP
github.com/D-Programming-Language/phobos, standard library), $(HTTP
github.com/D-Programming-Language/d-programming-language.org,
website), $(WEB github.com/D-Programming-Language/tools, tools), or
$(WEB github.com/D-Programming-Language/installer, installer)), change
website), $(HTTP github.com/D-Programming-Language/tools, tools), or
$(HTTP github.com/D-Programming-Language/installer, installer)), change
it in useful ways, and propose your changes back to the community.

$(P The reference compiler $(LINK2 download.html, dmd) has inspired
Expand All @@ -297,15 +297,15 @@ $(UL

$(LI GNU D compiler $(LINK2 http://bitbucket.org/goshawk/gdc/wiki/Home, gdc).)

$(LI LLVM D Compiler $(WEB dsource.org/projects/ldc, ldc).)
$(LI LLVM D Compiler $(HTTP dsource.org/projects/ldc, ldc).)

)

$(P The gdc compiler is of particular interest because it taps into
gcc's extremely portable back-end and large installation base. The D
development team has signed the appropriate documents with FSF and is
pursuing integration of gdc with gcc version 4.8 starting March 2012.
$(WEB https://launchpad.net/~ibuclaw, Iain Buclaw) is leading that
$(HTTPS launchpad.net/~ibuclaw, Iain Buclaw) is leading that
effort.)

)
Expand Down Expand Up @@ -524,8 +524,6 @@ Macros:
WIKI=Intro
TAG=<$1>$+</$1>
TAG2=<$1 $2>$3</$1>
WEB=$(LINK2 http://$1,$2)
WEBX=$(LINK2 http://$1,$2)
D=<span class="d_inlinecode">$0</span>
EXAMPLE=
<script>
Expand Down
6 changes: 3 additions & 3 deletions interfaceToC.dd
Expand Up @@ -51,7 +51,7 @@ int myDfunction(char[] s) {
or other such C
$(LINK2 http://www.digitalmars.com/ctg/ctgLanguageImplementation.html#extended, extended type modifiers)
in D. These are handled by
$(LINK2 $(WEBURL)attribute.html#linkage, linkage attributes),
$(DPLLINK attribute.html#linkage, linkage attributes),
such as $(D extern (C)).)

$(LI There is no volatile type modifier in D. To declare a C function that uses
Expand Down Expand Up @@ -109,10 +109,10 @@ extern (C) {

$(LI Registering the pointer with the garbage collector with the
$(V1 std.gc.addRoot())
$(V2 $(LINK2 $(WEBURL)phobos/core_memory.html#addRoot, std.gc.addRoot()))
$(V2 $(DPLLINK phobos/core_memory.html#addRoot, std.gc.addRoot()))
or
$(V1 std.gc.addRange())
$(V2 $(LINK2 $(WEBURL)phobos/core_memory.html#addRange, std.gc.addRange()))
$(V2 $(DPLLINK phobos/core_memory.html#addRange, std.gc.addRange()))
calls.)

)
Expand Down
11 changes: 5 additions & 6 deletions intro-to-datetime.dd
Expand Up @@ -35,7 +35,7 @@ $(D_S $(TITLE),

$(P $(STD_DATETIME), on the other hand, is very much an object-oriented
solution, and it's not C-based at all. Rather, its API is based on
$(WEB www.boost.org/doc/libs/release/doc/html/date_time.html, Boost)'s
$(HTTP www.boost.org/doc/libs/release/doc/html/date_time.html, Boost)'s
types for handling dates and times (though they're far from identical).
So, it's a bit of a paradigm shift to move from $(STD_DATE) to
$(STD_DATETIME). Don't expect much to be the same between the two.
Expand Down Expand Up @@ -234,7 +234,7 @@ assert(stdTime == st.stdTime);
C# uses, so if you need to interface with C# for any reason, converting
between its representation of time and $(STD_DATETIME)'s representation
is extremely easy, since no conversion is necessary.
$(WEB msdn.microsoft.com/en-us/library/system.datetime.aspx,
$(HTTP msdn.microsoft.com/en-us/library/system.datetime.aspx,
C#'s $(D DateTime)) uses both the same units and epoch for its internal
representation (which it calls $(D Ticks)) as $(SYSTIME), though unlike
$(SYSTIME), it doesn't work with negative values (which would be B.C.)
Expand Down Expand Up @@ -264,7 +264,7 @@ assert(stdTime == st.stdTime);
That's unlikely to be necessary, however (and if you think that you
have come up with such a class which would be generally useful, please
bring it up in the
$(WEB www.digitalmars.com/NewsGroup.html, digitalmars.D newsgroup),
$(HTTP www.digitalmars.com/NewsGroup.html, digitalmars.D newsgroup),
since if it's truly generally useful, we may want some version of it in
$(STD_DATETIME)). Read their documentation for more details. Most
applications shouldn't have to worry about time zones though, beyond
Expand Down Expand Up @@ -751,12 +751,12 @@ int dateFromNthWeekdayOfMonth(int year, Month month,
$(STD_DATETIME) and will get you well on your way to being able to
migrate your code from $(STD_DATE) to $(STD_DATETIME). If you have any
further questions, please ask them on the
$(WEB www.digitalmars.com/NewsGroup.html, digitalmars.D.learn newsgroup).
$(HTTP www.digitalmars.com/NewsGroup.html, digitalmars.D.learn newsgroup).
And if there's a major use case of $(STD_DATE) which is not easy to
convert over to $(STD_DATETIME) which I missed in this
article and you think should be in it, please feel free to bring it up
on the
$(WEB www.digitalmars.com/NewsGroup.html, digitalmars.D newsgroup),
$(HTTP www.digitalmars.com/NewsGroup.html, digitalmars.D newsgroup),
and if need be, I'll update this article with the relevant information.)
)

Expand All @@ -769,7 +769,6 @@ Macros:
H3 = <h3>$0</h3>
RED = <span style="color:red">$0</span>
TITLE = Introduction to std.datetime
WEB = $(LINK2 http://$1,$2)

CXREF = <a href="phobos/core_$1.html#$2">$(D $2)</a>
FULL_CXREF = <a href="phobos/core_$1.html#$2">$(D core.$1.$2)</a>
Expand Down
6 changes: 4 additions & 2 deletions std.ddoc
Expand Up @@ -313,8 +313,10 @@ RPAREN = )
LPAREN = (
LESS = &lt;
GREATER = &gt;
WEB = $(LINK2 http://$1,$2)
LUCKY = $(WEB
HTTP = $(LINK2 http://$1,$2)
HTTPS = $(LINK2 https://$1,$2)
WEB = $(HTTP $1,$2)
LUCKY = $(HTTP
google.com/search?btnI=I%27m+Feeling+Lucky&amp;ie=UTF-8&amp;oe=UTF-8&amp;q=$0,$0)
D = <span class="d_inlinecode">$0</span>
BIGOH = <b><i>&Omicron;</i>(</b>$(D $0)<b><i>)</i></b>
Expand Down
6 changes: 4 additions & 2 deletions std_consolidated.ddoc
Expand Up @@ -39,8 +39,10 @@ RPAREN = )
LPAREN = (
LESS = &lt;
GREATER = &gt;
WEB = $(LINK2 http://$1,$2)
LUCKY = $(WEB
HTTP = $(LINK2 http://$1,$2)
HTTPS = $(LINK2 https://$1,$2)
WEB = $(HTTP $1,$2)
LUCKY = $(HTTP
google.com/search?btnI=I%27m+Feeling+Lucky&amp;ie=UTF-8&amp;oe=UTF-8&amp;q=$0,$0)
D = <font face=Courier><b>$0</b></font>
D = <span class="d_inlinecode">$0</span>
Expand Down
5 changes: 2 additions & 3 deletions todo.dd
Expand Up @@ -8,9 +8,9 @@ $(P You are of course gladly invited to contribute with any suggestions, bug rep

$(SECTION2 $(D gdc))

$(P $(WEB bitbucket.org/goshawk/gdc/wiki/Home, gdc) is a project that integrates the front-end of the D reference compiler with gcc's backend. The goal of the project is to fully integrate D in the GNU compiler suite version 4.7. All legal documents have been completed, which leaves things to "a small matter of programming".
$(P $(HTTP bitbucket.org/goshawk/gdc/wiki/Home, gdc) is a project that integrates the front-end of the D reference compiler with gcc's backend. The goal of the project is to fully integrate D in the GNU compiler suite version 4.7. All legal documents have been completed, which leaves things to "a small matter of programming".

$(P If you are interested in contributing, contact $(WEB bitbucket.org/ibuclaw, Iain Buclaw), the leader of the project.)
$(P If you are interested in contributing, contact $(HTTP bitbucket.org/ibuclaw, Iain Buclaw), the leader of the project.)
)

$(SECTION2 On-Demand RTTI)
Expand All @@ -37,4 +37,3 @@ instances of the class, and dynamically invoking methods.)

Macros:
TITLE=The D Programming Language official TODO list
WEB=$(LINK2 http://$1,$2)

0 comments on commit 9129911

Please sign in to comment.