Bug 2381 – (D1 only) Minor mistakes in DDoc comments of std.path.
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-09-30T20:21:00Z
Last change time
2012-02-18T12:41:33Z
Keywords
ddoc, pull
Assigned to
bugzilla
Creator
aziz.koeksal
Comments
Comment #0 by aziz.koeksal — 2008-09-30T20:21:21Z
Please correct the following errors. It helps documentation generation and the syntax-highlighter in Kwrite/Kate.
phobos/std/path.d @ line 343 and 344 (pseudo diff format :)
- * getDirName(r"d:\path\foo.bat") => "d:\path"
- * getDirName(getDirName(r"d:\path\foo.bat")) => "d:\"
+ * getDirName(r"d:\path\foo.bat") => r"d:\path"
+ * getDirName(getDirName(r"d:\path\foo.bat")) => r"d:\"
While you're at it, could you also create a GENERATED_BY macro for the "Page generated by XYZ" message. That way other ddoc generation tools can override this macro to customize this message without having to modify std.ddoc for example. Thanks.
Comment #1 by andrei — 2008-09-30T21:07:15Z
Fixed the doc but not the GENERATED_BY. I understand the latter would need a change in the compiler, correct?
Comment #2 by aziz.koeksal — 2008-10-01T05:28:15Z
(In reply to comment #1)
> Fixed the doc but not the GENERATED_BY. I understand the latter would need a
> change in the compiler, correct?
>
The change would have to be made in src/dmd/doc.c at line 118:
- <hr>$(SMALL Page generated by $(LINK2 http://www.digitalmars.com/d/1.0/ddoc.html, Ddoc). $(COPYRIGHT))\n\
+ <hr>$(SMALL $(GENERATED_BY) $(COPYRIGHT))\n\
+GENERATED_BY = Page generated by $(LINK2 http://www.digitalmars.com/d/1.0/ddoc.html, Ddoc).
Please, also make this change in src/phobos/std.ddoc at line 65:
-Page generated by $(LINK2 http://www.digitalmars.com/d/1.0/ddoc.html, Ddoc).
+$(GENERATED_BY)
At line 70 add:
+GENERATED_BY = Page generated by $(LINK2 http://www.digitalmars.com/d/1.0/ddoc.html, Ddoc).
Comment #3 by aziz.koeksal — 2008-10-01T16:47:14Z
Two other strings that should have an r-prefix in phobos/std/path.d:
@line 195
- * getName(r"d:\path\foo.bat") => "d:\path\foo"
+ * getName(r"d:\path\foo.bat") => r"d:\path\foo"
@line 201
- * getName(r"d:\path.two\bar") => "d:\path"
+ * getName(r"d:\path.two\bar") => r"d:\path"
Comment #4 by bugzilla — 2008-10-02T03:59:34Z
I don't see a real need to change this in the compiler source, but it's fine to change it in std.ddoc.
Comment #5 by yao.gomez — 2012-02-05T11:11:17Z
== D2 std.path ==
getDirName doesn't appear anymore in the documentation. In the code is just an alias to dirname.
Moreover, std.path.dirname[1], and std.path.getName[2] will be marked as deprecated this very same month (february 2012), so I think that it's safe to close this bug report now, or when the deprecation actually takes place, because there's no point in updating the docs.
[1] http://dlang.org/phobos/std_path.html#dirname
[2] http://dlang.org/phobos/std_path.html#getName
== D1 std.path ==
pull: https://github.com/D-Programming-Language/phobos/pull/419
This fixes only the documentation issues. The GENERATED_BY macro is an issue apart (or not an issue at all).