]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Removed lots of superfluous includes.
authorMartin Mares <mj@ucw.cz>
Fri, 31 Mar 2000 23:35:59 +0000 (23:35 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Mar 2000 23:35:59 +0000 (23:35 +0000)
Use debug() instead of printf().

filter/f-util.c
filter/filter.c
filter/tree.c

index 1f3c79a3b41087efc653dd425c566d0aceafda64..82dc1c3dfa150408314a3f57e5969fb4c1f4d6b1 100644 (file)
@@ -6,19 +6,7 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/signal.h>
-#include <setjmp.h>
-
 #include "nest/bird.h"
-#include "lib/lists.h"
-#include "lib/resource.h"
-#include "lib/socket.h"
-#include "nest/route.h"
-#include "nest/protocol.h"
-#include "nest/iface.h"
 #include "conf/conf.h"
 #include "filter/filter.h"
 
index fc9046594b70fc490a391692bb9dbf693321680b..cc1637eb473b6e1dd367a43dc8e376fc8f6c5732 100644 (file)
 
 #undef LOCAL_DEBUG
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/signal.h>
-#include <setjmp.h>
-
 #include "nest/bird.h"
 #include "lib/lists.h"
 #include "lib/resource.h"
@@ -112,14 +106,14 @@ static void
 tree_print(struct f_tree *t)
 {
   if (!t) {
-    printf( "() " );
+    debug( "() " );
     return;
   }
-  printf( "[ " );
+  debug( "[ " );
   tree_print( t->left );
-  printf( ", " ); val_print( t->from ); printf( ".." ); val_print( t->to ); printf( ", " );
+  debug( ", " ); val_print( t->from ); debug( ".." ); val_print( t->to ); debug( ", " );
   tree_print( t->right );
-  printf( "] " );
+  debug( "] " );
 }
 
 void
@@ -140,7 +134,7 @@ val_print(struct f_val v)
   case T_ENUM: PRINTF( "(enum %x)%d", v.type, v.val.i ); break;
   default: PRINTF( "[unknown type %x]", v.type );
   }
-  printf( buf );
+  debug( buf );
 }
 
 static struct rte **f_rte, *f_rte_old;
@@ -283,12 +277,12 @@ interpret(struct f_inst *what)
     res.type = T_BOOL;
     break;
   case '0':
-    printf( "No operation\n" );
+    debug( "No operation\n" );
     break;
   case P('p',','):
     ONEARG;
     if (what->a2.i != F_NONL)
-      printf( "\n" );
+      debug( "\n" );
 
     switch (what->a2.i) {
     case F_QUITBIRD:
@@ -420,7 +414,7 @@ interpret(struct f_inst *what)
        v1.type = T_VOID;
        t = find_tree(what->a2.p, v1);
        if (!t) {
-         printf( "No else statement?\n ");
+         debug( "No else statement?\n ");
          break;
        }
       }        
@@ -554,11 +548,11 @@ filters_postconfig(void)
 {
   struct f_val res;
   if (startup_func) {
-    printf( "Launching startup function...\n" );
+    debug( "Launching startup function...\n" );
     res = interpret(startup_func);
     if (res.type == F_ERROR)
       die( "Startup function resulted in error." );
-    printf( "done\n" );
+    debug( "done\n" );
   }
 } 
 
index 5e57bb73f3fdd36f1a625666a6ccb3ce2a58e445..1d329695ea3b986ab413a189e69493ee2cd1c25e 100644 (file)
@@ -6,19 +6,7 @@
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/signal.h>
-#include <setjmp.h>
-
 #include "nest/bird.h"
-#include "lib/lists.h"
-#include "lib/resource.h"
-#include "lib/socket.h"
-#include "nest/route.h"
-#include "nest/protocol.h"
-#include "nest/iface.h"
 #include "conf/conf.h"
 #include "filter/filter.h"