From 2fd8f8bb99a2832b3684878c020ba47322e79332 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Sun, 30 Jul 2017 12:27:57 +0100 Subject: Replace Unicode quotes in user-facing strings by ASCII MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g" --- src/libexpr/parser.y | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libexpr/parser.y') diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index ca3d057451ab..669312bb7cff 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -65,14 +65,14 @@ namespace nix { static void dupAttr(const AttrPath & attrPath, const Pos & pos, const Pos & prevPos) { - throw ParseError(format("attribute ‘%1%’ at %2% already defined at %3%") + throw ParseError(format("attribute '%1%' at %2% already defined at %3%") % showAttrPath(attrPath) % pos % prevPos); } static void dupAttr(Symbol attr, const Pos & pos, const Pos & prevPos) { - throw ParseError(format("attribute ‘%1%’ at %2% already defined at %3%") + throw ParseError(format("attribute '%1%' at %2% already defined at %3%") % attr % pos % prevPos); } @@ -121,7 +121,7 @@ static void addAttr(ExprAttrs * attrs, AttrPath & attrPath, static void addFormal(const Pos & pos, Formals * formals, const Formal & formal) { if (formals->argNames.find(formal.name) != formals->argNames.end()) - throw ParseError(format("duplicate formal function argument ‘%1%’ at %2%") + throw ParseError(format("duplicate formal function argument '%1%' at %2%") % formal.name % pos); formals->formals.push_front(formal); formals->argNames.insert(formal.name); @@ -564,7 +564,7 @@ Path resolveExprPath(Path path) struct stat st; while (true) { if (lstat(path.c_str(), &st)) - throw SysError(format("getting status of ‘%1%’") % path); + throw SysError(format("getting status of '%1%'") % path); if (!S_ISLNK(st.st_mode)) break; path = absPath(readLink(path), dirOf(path)); } @@ -649,7 +649,7 @@ Path EvalState::findFile(SearchPath & searchPath, const string & path, const Pos if (pathExists(res)) return canonPath(res); } format f = format( - "file ‘%1%’ was not found in the Nix search path (add it using $NIX_PATH or -I)" + "file '%1%' was not found in the Nix search path (add it using $NIX_PATH or -I)" + string(pos ? ", at %2%" : "")); f.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit); throw ThrownError(f % path % pos); @@ -671,7 +671,7 @@ std::pair EvalState::resolveSearchPathElem(const SearchPathEl else res = { true, getDownloader()->downloadCached(store, elem.second, true) }; } catch (DownloadError & e) { - printError(format("warning: Nix search path entry ‘%1%’ cannot be downloaded, ignoring") % elem.second); + printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second); res = { false, "" }; } } else { @@ -679,12 +679,12 @@ std::pair EvalState::resolveSearchPathElem(const SearchPathEl if (pathExists(path)) res = { true, path }; else { - printError(format("warning: Nix search path entry ‘%1%’ does not exist, ignoring") % elem.second); + printError(format("warning: Nix search path entry '%1%' does not exist, ignoring") % elem.second); res = { false, "" }; } } - debug(format("resolved search path element ‘%s’ to ‘%s’") % elem.second % res.second); + debug(format("resolved search path element '%s' to '%s'") % elem.second % res.second); searchPathResolved[elem.second] = res; return res; -- cgit 1.4.1