Made the error codes start sufficiently high
authorDaniel Kouřil <kouril@ics.muni.cz>
Wed, 18 Jan 2012 12:21:41 +0000 (12:21 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Wed, 18 Jan 2012 12:21:41 +0000 (12:21 +0000)
emi.canl.canl-c/src/gen_err_codes.pl

index 04ef224..6e3b5df 100755 (executable)
@@ -2,6 +2,8 @@
 
 $err_name = "";
 
+$num = 0;
+
 print STDOUT qq (/*
  * Automatically generated file. Don't edit.
  */
@@ -11,7 +13,9 @@ typedef enum _CANL_ERROR {);
 while (<STDIN>) {
     chomp;
     next if /^\s*#/;
-    printf ("\n    CANL_ERR_%s,", $_);
+    printf ("\n    CANL_ERR_%s%s,",
+           $_,
+           (!$num++) ? " = 1024" : "");
 }
 
 print STDOUT qq (