Created
January 10, 2011 16:08
-
-
Save zbyhoo/772958 to your computer and use it in GitHub Desktop.
Ruby script converting gcc output to msvc compatible one (go to line when error appears).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = 0 | |
while (line = gets) | |
index = line.index(/\.[ch]pp\:[0-9]/) | |
if (index == nil) | |
puts line | |
else | |
path_end = line.index(":", index) | |
linenr_end = line.index(":", path_end + 1) | |
filepath = line[0,path_end] | |
linenr = line[(path_end+1)...linenr_end] | |
message = line[(linenr_end+2)..line.length] | |
puts "#{filepath}(#{linenr}) : #{message}" | |
result = 1 | |
end | |
end | |
exit result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment