Allan Odgaard
421f087b18
Do not destroy shared authorization rights
...
Each time we used an authorization right in the privileged helper tool, TextMate would lose the right since the helper tool destroyed it after use.
2014-07-30 17:40:23 +02:00
Allan Odgaard
795909748b
Only report privileged helper tool outdated when a new one exists
...
This is so that we can use the privileged helper tool from tests, assuming it has already been installed.
2014-07-30 15:15:47 +02:00
Allan Odgaard
c2397484b8
Use C++11 for loop
...
Majority of the edits done using the following ruby script:
def update_loops(src)
dst, cnt = '', 0
block_indent, variable = nil, nil
src.each_line do |line|
if block_indent
if line =~ /^#{block_indent}([{}\t])|^\t*$/
block_indent = nil if $1 == '}'
line = line.gsub(%r{ ([^a-z>]) \(\*#{variable}\) | \*#{variable}\b | \b#{variable}(->) }x) do
$1.to_s + variable + ($2 == "->" ? "." : "")
end
else
block_indent = nil
end
elsif line =~ /^(\t*)c?iterate\((\w+), (?!diacritics::make_range)(.*\))$/
block_indent, variable = $1, $2
line = "#$1for(auto const& #$2 : #$3\n"
cnt += 1
end
dst << line
end
return dst, cnt
end
paths.each do |path|
src = IO.read(path)
cnt = 1
while cnt != 0
src, cnt = update_loops(src)
STDERR << "#{path}: #{cnt}\n"
end
File.open(path, "w") { |io| io << src }
end
2014-03-03 10:34:13 +07:00
Allan Odgaard
e4e80a946c
Use std::make_shared
2013-09-03 12:27:20 +02:00
Allan Odgaard
7ccd7add60
Use digittoint() instead of std::stoi()
...
Both because of performance and because the latter can throw an exception (although we check the input, so it should not happen with our use of the API).
2013-08-27 15:30:09 +02:00
Allan Odgaard
a74bfcc206
Remove some uses of foreach()
2013-08-12 19:32:23 +02:00
Allan Odgaard
b489687403
Disable AuthorizationExecuteWithPrivileges deprecation warning
...
The “proper” replacement for this API is to use the ServiceManagement framework’s SMJobBless() to bless our helper tool. In two of the three use-cases our helper tool is however regular shell commands, so it seems redundant to wrap these shell tools as helper tools we can install as launchd jobs.
2013-05-06 14:51:31 +07:00
Allan Odgaard
cd2b0882f0
Use new test system for a few frameworks
2013-02-22 15:55:28 +01:00
Allan Odgaard
fd60fd25c7
Change strtol → std::stol (C++11)
...
I initially wanted to do this change globally, but std::stoX will throw an exception if it fails to parse something and we use strtoX a few places where parsing nothing (and getting back zero) is fine.
2013-02-08 11:20:35 +01:00
Allan Odgaard
ebc4fa26af
Use regexp::match_t::operator[]
...
Also bypass NSString/c_str() by using std::stod().
2013-02-08 11:20:35 +01:00
Allan Odgaard
9eb4044fdb
Switch to simpler regexp::search
2013-02-08 11:20:35 +01:00
Allan Odgaard
49ae19c527
Keep (installed) auth server up-to-date
...
The recent move to 64 bit broke the (binary) protocol used between TextMate and the server for authenticated reads/writes (since size_t is now 64 bit).
This fixes issue #354 .
2012-08-31 23:16:39 +02:00
Allan Odgaard
022e29689b
Remove debug output
2012-08-31 23:16:39 +02:00
Allan Odgaard
cbe91ff831
Assume compiler support for explicit keyword
...
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Jacob Bandes-Storch
5634ebbf28
Use 64-bit: CF byte order functions & 64b version
2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
e3aa997b06
Use libc++: replace std::tr1 with std
2012-08-28 13:30:20 +02:00
Allan Odgaard
9894969e67
Initial commit
2012-08-09 16:25:56 +02:00