[Gridflow-cvs] [svn] commit: r5568 - /trunk/src/MacErrorsCollect.rb

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat May 1 13:03:53 EDT 2010


Author: matju
Date: Sat May  1 13:03:51 2010
New Revision: 5568

Log:
reveal some error messages that didn't get through because they didn't have a comment /**/

Modified:
    trunk/src/MacErrorsCollect.rb

Modified: trunk/src/MacErrorsCollect.rb
==============================================================================
--- trunk/src/MacErrorsCollect.rb (original)
+++ trunk/src/MacErrorsCollect.rb Sat May  1 13:03:51 2010
@@ -1,6 +1,6 @@
 # Copyright © 2010 Mathieu Bouchard
 
-pattern = %r{\s*(\w+)\s*=\s*(-\d+),\s+/\*\s*(.*)\s*\*/}
+pattern = %r{\s*(\w+)\s*=\s*(-\d+),(?:\s+/\*\s*(.*)\s*\*/)?}
 
 f = File.open("MacErrors.h")
 g = File.open("MacErrors2.i","w")
@@ -11,10 +11,11 @@
 f.each {|line|
   if m = pattern.match(line)
     if table[m[2]] then
-      puts "#{m[2]} est en double"
+      puts "#{m[2]} est en double (#{table[m[2]].inspect})"
     else
-      g.puts "OSERR(#{m[2]},\"#{m[1]}\",#{m[3].inspect})"
+      g.puts "OSERR(#{m[2]},\"#{m[1]}\",#{(m[3]||'').inspect})"
       table[m[2]] = [m[1],m[3]]
     end
   end
 }
+



More information about the Gridflow-cvs mailing list