Replace deprecated getenv(X) with environment[X].

This commit is contained in:
H. S. Teoh 2014-08-08 14:36:19 -07:00
parent 8a925179ad
commit 3931c20de4
1 changed files with 3 additions and 3 deletions

View File

@ -303,7 +303,7 @@ struct Terminal {
bool terminalInFamily(string[] terms...) { bool terminalInFamily(string[] terms...) {
import std.process; import std.process;
import std.string; import std.string;
auto term = getenv("TERM"); auto term = environment["TERM"];
foreach(t; terms) foreach(t; terms)
if(indexOf(term, t) != -1) if(indexOf(term, t) != -1)
return true; return true;
@ -393,9 +393,9 @@ struct Terminal {
import std.string; import std.string;
import std.array; import std.array;
string termcapData = getenv("TERMCAP"); string termcapData = environment["TERMCAP"];
if(termcapData.length == 0) { if(termcapData.length == 0) {
termcapData = getTermcapDatabase(getenv("TERM")); termcapData = getTermcapDatabase(environment["TERM"]);
} }
auto e = replace(termcapData, "\\\n", "\n"); auto e = replace(termcapData, "\\\n", "\n");