mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Replace Unicode quotes in user-facing strings by ASCII
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
This commit is contained in:
parent
c7654bc491
commit
2fd8f8bb99
86 changed files with 662 additions and 662 deletions
|
@ -32,25 +32,25 @@ std::set<std::string> runResolver(const Path & filename)
|
|||
{
|
||||
AutoCloseFD fd = open(filename.c_str(), O_RDONLY);
|
||||
if (!fd)
|
||||
throw SysError("opening ‘%s’", filename);
|
||||
throw SysError("opening '%s'", filename);
|
||||
|
||||
struct stat st;
|
||||
if (fstat(fd.get(), &st))
|
||||
throw SysError("statting ‘%s’", filename);
|
||||
throw SysError("statting '%s'", filename);
|
||||
|
||||
if (!S_ISREG(st.st_mode)) {
|
||||
printError("file ‘%s’ is not a regular file", filename);
|
||||
printError("file '%s' is not a regular file", filename);
|
||||
return {};
|
||||
}
|
||||
|
||||
if (st.st_size < sizeof(mach_header_64)) {
|
||||
printError("file ‘%s’ is too short for a MACH binary", filename);
|
||||
printError("file '%s' is too short for a MACH binary", filename);
|
||||
return {};
|
||||
}
|
||||
|
||||
char* obj = (char*) mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd.get(), 0);
|
||||
if (!obj)
|
||||
throw SysError("mmapping ‘%s’", filename);
|
||||
throw SysError("mmapping '%s'", filename);
|
||||
|
||||
ptrdiff_t mach64_offset = 0;
|
||||
|
||||
|
@ -66,13 +66,13 @@ std::set<std::string> runResolver(const Path & filename)
|
|||
}
|
||||
}
|
||||
if (mach64_offset == 0) {
|
||||
printError(format("Could not find any mach64 blobs in file ‘%1%’, continuing...") % filename);
|
||||
printError(format("Could not find any mach64 blobs in file '%1%', continuing...") % filename);
|
||||
return {};
|
||||
}
|
||||
} else if (magic == MH_MAGIC_64 || magic == MH_CIGAM_64) {
|
||||
mach64_offset = 0;
|
||||
} else {
|
||||
printError(format("Object file has unknown magic number ‘%1%’, skipping it...") % magic);
|
||||
printError(format("Object file has unknown magic number '%1%', skipping it...") % magic);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ bool isSymlink(const Path & path)
|
|||
{
|
||||
struct stat st;
|
||||
if (lstat(path.c_str(), &st) == -1)
|
||||
throw SysError("getting attributes of path ‘%1%’", path);
|
||||
throw SysError("getting attributes of path '%1%'", path);
|
||||
|
||||
return S_ISLNK(st.st_mode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue