[pkg-d-commits] [ldc] 23/95: move config utility functions
Matthias Klumpp
mak at moszumanska.debian.org
Thu Jul 13 20:53:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.
commit d36d06620630e5ed65bead370f5aeb247e71402a
Author: Remi THEBAULT <remi.thebault at gmail.com>
Date: Sat Feb 25 11:16:03 2017 +0100
move config utility functions
---
driver/config.d | 20 ++++++++++++--------
driver/configfile.d | 12 ------------
2 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/driver/config.d b/driver/config.d
index e9b31ec..1b18a7c 100644
--- a/driver/config.d
+++ b/driver/config.d
@@ -103,6 +103,18 @@ Setting[] parseConfigFile(const(char)* filename)
return parser.parseConfig();
}
+
+string fromStringz(const(char)* cstr)
+{
+ return cstr[0 .. strlen(cstr)].idup;
+}
+
+immutable(char)* toStringz(in string s)
+{
+ auto nullTerm = s ~ '\0';
+ return nullTerm.ptr;
+}
+
private:
/+
@@ -145,14 +157,6 @@ The following escape sequences are allowed in strings:
+/
-
-immutable(char)* toStringz(in string s)
-{
- auto nullTerm = s ~ '\0';
- return nullTerm.ptr;
-}
-
-
enum Token
{
name,
diff --git a/driver/configfile.d b/driver/configfile.d
index 7edde4b..45e8aec 100644
--- a/driver/configfile.d
+++ b/driver/configfile.d
@@ -17,18 +17,6 @@ import core.stdc.stdio;
import core.stdc.string;
-string fromStringz(const(char)* cstr)
-{
- return cstr[0 .. strlen(cstr)].idup;
-}
-
-immutable(char)* toStringz(in string s)
-{
- auto nullTerm = s ~ '\0';
- return nullTerm.ptr;
-}
-
-
string prepareBinDir(const(char)* binDir)
{
immutable len = strlen(binDir);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list