Allan Odgaard
9078ae7771
Use __DATE__ instead of (custom) COMPILE_DATE macro
...
I prefer the YYYY-MM-DD format of our custom macro, but it has a problem with precompiled headers in that the macro changes value daily, and so, if specified when precompiling headers, they become invalid the next day.
Previously we solved it by declaring the macro only for application targets, but the new build system is not hierarchical in the same way and does not currently support this.
2019-06-26 23:32:54 +02:00
Allan Odgaard
f92d36571a
Use DISPATCH_APPLY_AUTO instead of explicit global queue
...
This is “strongly recommended” (according to `man dispatch_apply`) and should work on 10.9 and later (according to a WWDC session).
2018-11-12 19:15:12 +07:00
Allan Odgaard
8785f0e807
Include uninstalled bundles when asking for dependents
2016-12-10 12:43:08 +07:00
mathbunnyru
440414f96c
Use nullptr in all C++ files instead of NULL
...
This brings us a bit of extra type safety, for example where an integer is expected, nullptr should be disallowed by the compiler (unlike NULL).
2016-10-22 21:40:14 +07:00
Allan Odgaard
a778f0b3da
Combine std::set’s find and insert into a single operation
2014-11-10 17:11:31 +01:00
Allan Odgaard
f16e83fb4f
Get rid of APP_REVISION
...
This was just mirroring the last part of our version number so redundant and it wasn’t monotonically increasing as we switched from alpha.n → beta.1 (with n > 1), so it probably did more harm than good.
2014-10-30 20:49:10 +01:00
Allan Odgaard
f515bc70f8
Use lowercase for the status of implicitly installed bundles
2014-04-14 14:26:53 +07:00
Allan Odgaard
39b94e6ac3
Harmonize whitespace and add trailing newline
2014-04-14 14:26:52 +07:00
Allan Odgaard
ec8208bbf5
Use constants from sysexits.h for bl failure codes
2014-04-14 08:55:06 +07:00
Allan Odgaard
8f18aefe66
Update ‘bl’ to support list/install of default/mandatory bundles
...
We now have four meta-names: outdated, installed, defaults, and mandatories. These can be used to list or update/install the respective group of bundles.
2014-04-14 08:55:06 +07:00
Allan Odgaard
d7660bd89e
Detect first loop iteration using std::exchange “idiom”
2014-03-23 22:47:15 +07:00
Allan Odgaard
f26145e6cc
Only print download progress when stderr is a tty
2014-03-05 16:39:53 +07: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
4b67c6d587
Use dispatch queues when updating bundle sources
2012-09-30 23:06:58 +02:00
Allan Odgaard
c7c3d3af38
Use dispatch queues when downloading bundles
...
This enables concurrency which offers a nice speedup.
2012-09-30 23:06:58 +02:00
Allan Odgaard
ebab500ba3
Use std::map/set instead of C arrays
...
These types come with a find() method and avoids having to use helper functions to get the begin/end of the array (for linear search).
2012-09-20 12:22:20 +02:00
Allan Odgaard
9894969e67
Initial commit
2012-08-09 16:25:56 +02:00