Added statev to sql transform script
[libfirm] / ir / be / test / Queens.c
index dd34c64..2c1015b 100644 (file)
@@ -26,20 +26,20 @@ typedef int boolean;
 static int *row;
 // queen in column c is at row[c]
 
-static int abs(int i) {
+static int myabs(int i) {
   if(0 > i)
     i = -i;
   return(i);
 }
 
-boolean place_ok (int i) {
+static boolean place_ok (int i) {
   // return whether queen in column i is
   // not in check from queens left of it
   int j = 0;
   boolean res;
 
   while (j < i) {
-    if ((row[j] == row[i]) || ((abs(row[i]-row[j])) == (i-j))) {
+    if ((row[j] == row[i]) || ((myabs(row[i]-row[j])) == (i-j))) {
       res = false;
       return(res);
     }
@@ -49,7 +49,7 @@ boolean place_ok (int i) {
   return(res);
 }
 
-int solve (int n) {
+static int solve (int n) {
   // return the number of solutions to the n-queens problem
   int c = 0;
   int res = 0;