diff -ruN klic-3.003-2002-03-02/runtime/cntlmsg.c klic-3.003-2002-03-04/runtime/cntlmsg.c
--- klic-3.003-2002-03-02/runtime/cntlmsg.c	Tue Feb 26 14:27:22 2002
+++ klic-3.003-2002-03-04/runtime/cntlmsg.c	Mon Mar  4 10:37:35 2002
@@ -29,10 +29,7 @@
 #include "interpe.h"
 #include "rmon.h"
 #include "ge_exref.h"
-
-#ifdef DEBUGLIB
 #include "trace.h"  /* trace_flag, trace_goal */
-#endif
 
 #define THROW_WTC_UNIT		0x1000L
 #define UNIFY_WTC_UNIT		0x10L
@@ -532,13 +529,11 @@
     return(goal);
   } else {
     buffer = NODE_TO_BUFFER(node);
-#ifdef DEBUGLIB
     if (trace_flag) {
       static long throw_trace_count = 0;
       goal = trace_goal(goal, (node+1)*100000+throw_trace_count, NULL);
       throw_trace_count++;
     }
-#endif
     if(!encode_throw_goal(goal, buffer)){
       message_suspend(THROW_WTC_UNIT, node, buffer);
     } else {
diff -ruN klic-3.003-2002-03-02/runtime/datamsg.c klic-3.003-2002-03-04/runtime/datamsg.c
--- klic-3.003-2002-03-02/runtime/datamsg.c	Mon Feb 25 14:47:52 2002
+++ klic-3.003-2002-03-04/runtime/datamsg.c	Mon Mar  4 10:22:14 2002
@@ -162,13 +162,14 @@
   if depth is zero, only one word structures are encoded.
   */
 
-#define END_ENCODE_DATA() \
-do{ \
-  int i; \
-  for(i = 0 ; i < cdrlist ; i++){ \
-    PUT_BUFFER(buffer, decode_list); \
-  } \
-}while(0)
+static void
+end_encode_data(combuf* buffer, int cdrlist)
+{
+  int i;
+  for(i = 0; i < cdrlist; i++){
+    PUT_BUFFER(buffer, decode_list);
+  }
+}
 
 extern void
 encode_data(buffer, data, depth)
@@ -277,20 +278,20 @@
     }
     break;
   }
-  END_ENCODE_DATA();
+  end_encode_data(buffer, cdrlist);
   return;
 
  Make_exref:
   {
     long index = regist_exptbl(data);
     PUT4_BUFFER(buffer, decode_exref, my_node, index, EXPORT_UNIT_WEC);
-    END_ENCODE_DATA();
+    end_encode_data(buffer, cdrlist);
     return;
   }
 
  Atomic_case:
  Const_case:
   PUT2_BUFFER(buffer, decode_atomic_or_const, data);
-  END_ENCODE_DATA();
+  end_encode_data(buffer, cdrlist);
   return;
 }
diff -ruN klic-3.003-2002-03-02/runtime/debug.c klic-3.003-2002-03-04/runtime/debug.c
--- klic-3.003-2002-03-02/runtime/debug.c	Sat Mar  2 18:22:30 2002
+++ klic-3.003-2002-03-04/runtime/debug.c	Mon Mar  4 10:38:31 2002
@@ -4,7 +4,8 @@
 %   (C)1996, 1997, 1998, 1999 Japan Information Processing Development Center
 %       (Read COPYRIGHT-JIPDEC for detailed information.)
 ----------------------------------------------------------- */
-#include <stdio.h>
+
+#include <stdio.h>  /* fprintf */
 #include <setjmp.h>
 #include <ctype.h>
 #include <errno.h>
@@ -47,11 +48,7 @@
 
 extern jmp_buf klic_topmost;
 
-#ifdef DECL_FPRINTF
-extern int fprintf VA_ARGS((FILE* out, char* format, ...));
-#endif
-
-typedef void (*FPRINTF) VA_ARGS((FILE* out, char* format, ...));
+typedef void (*fprintf_t) VA_ARGS((FILE* out, char* format, ...));
 
 extern NeverReturn void
 fatal(message)
@@ -259,7 +256,7 @@
   char* bufp = buf;
   declare_globals;
 
-  FPRINTF fprintf_func;
+  fprintf_t fprintf_func;
 
   long args[12], *argp;
   args[0] = a0; args[1] = a1; args[2] = a2; args[3] = a3;
@@ -273,7 +270,7 @@
   } else
 #endif
   {
-    fprintf_func = (FPRINTF) fprintf;
+    fprintf_func = (fprintf_t) fprintf;
   }
 
   for (f = format; *f != '\0'; f++) {
@@ -282,20 +279,12 @@
       f++;
       switch (*f) {
       case 'k':
-#ifdef DEBUGLIB
 	fprint_partially(out, (q) *argp, 3, 10);
-#else
-	fprintf_func(out, "???");
-#endif
 	argp++;
 	break;
       case 'F':
 	fprintf_func(out, "%s/%d",
-#ifdef DEBUGLIB
 		atomname (functors (*argp)),
-#else
-		"???",
-#endif
 		arities (*argp) );
 	argp++;
 	break;
diff -ruN klic-3.003-2002-03-02/runtime/faisus.c klic-3.003-2002-03-04/runtime/faisus.c
--- klic-3.003-2002-03-02/runtime/faisus.c	Tue Feb 26 12:33:52 2002
+++ klic-3.003-2002-03-04/runtime/faisus.c	Mon Mar  4 10:39:39 2002
@@ -14,10 +14,7 @@
 #include <klic/susp.h>
 #include <klic/generic.h>
 #include "gobj.h"
-
-#ifdef DEBUGLIB
 #include "trace.h"  /* trace_flag, trace_susp, trace_failure */
-#endif
 
 #define generic_suspend(obj, ref, goal) \
   (method_table_of(obj)->suspend((ref), (goal)))
@@ -25,13 +22,11 @@
 extern struct predicate predicate_unify__term__dcode_xunify__goal_2;
 
 
-#ifdef DEBUGLIB
 extern int count_suspension;
 extern int stepping_flag;
 
 extern void record_suspended_pred();
 extern void step_susp();
-#endif /* DEBUGLIB */
 
 
 static unsigned long suspensions0;
@@ -43,14 +38,12 @@
   struct goalrec* goal;
   q* reasonp;
 {
-#ifdef DEBUGLIB
   goal->next = 0;
   if (stepping_flag) {
     step_failure(goal);
     return;
   }
   trace_failure(goal);
-#endif /* DEBUGLIB */
 
   fatal("Reduction Failure");
 }
@@ -60,7 +53,6 @@
   q* allocp;
   struct goalrec* goal;
 {
-#ifdef DEBUGLIB
   declare_globals;
   struct suspended_goal_rec* sm;
   heapalloc(sm, sizeof(struct suspended_goal_rec)/sizeof(q),
@@ -71,7 +63,6 @@
   if (count_suspension) {
     record_suspended_pred(goal);
   }
-#endif /* DEBUGLIB */
 
   return allocp;
 }
@@ -212,7 +203,6 @@
     }
     /* OK, the goal should really be suspended */
 
-#ifdef DEBUGLIB
     if (reasonp > reasons) {
       if (stepping_flag) {
 	set_heapp(allocp);
@@ -222,7 +212,6 @@
 	goal = trace_susp(goal, reasonp, 0);
       }
     }
-#endif /* DEBUGLIB */
 
     goal->next = (struct goalrec*) makeint(current_prio());
     {
diff -ruN klic-3.003-2002-03-02/runtime/gc.c klic-3.003-2002-03-04/runtime/gc.c
--- klic-3.003-2002-03-02/runtime/gc.c	Mon Feb 25 16:09:34 2002
+++ klic-3.003-2002-03-04/runtime/gc.c	Mon Mar  4 10:40:22 2002
@@ -13,10 +13,7 @@
 #include <klic/functorstuffs.h>  /* arityof */
 #include "gobj.h"
 #include <klic/susp.h>
-
-#ifdef DEBUGLIB
 #include "trace.h"  /* trace_deadlock */
-#endif
 
 #ifdef DIST
 #include "interpe.h"
@@ -38,9 +35,7 @@
 #define generic_gc(obj, allocp, sp) \
   (method_table_of(obj)->gc((obj), (allocp), (sp)))
 
-#ifdef DEBUGLIB
 extern const struct predicate queue_empty_pred;
-#endif
 
 extern struct goalrec goal_queue_tail;
 
@@ -692,7 +687,6 @@
   }
 #endif /* SHM */
 
-#ifdef DEBUGLIB
   {
     struct suspended_goal_rec* sgl;
     struct suspended_goal_rec** sgl_tail = &suspended_goal_list0;
@@ -742,7 +736,6 @@
       trace_deadlock(dead_goal);
     }
   }
-#endif /* DEBUGLIB */
 
   if( copied_susp != suspensions() - resumes() ){
     fatal("Perpetually suspending goal(s) found during GC");
diff -ruN klic-3.003-2002-03-02/runtime/intrpt.c klic-3.003-2002-03-04/runtime/intrpt.c
--- klic-3.003-2002-03-02/runtime/intrpt.c	Tue Feb 26 12:35:33 2002
+++ klic-3.003-2002-03-04/runtime/intrpt.c	Mon Mar  4 10:41:11 2002
@@ -10,6 +10,7 @@
 #include <klic/sighndl.h>
 #include <klic/primitives.h>
 #include "schedule.h"
+#include "trace.h"  /* trace_flag, trace_after */
 
 #ifdef DIST
 #include "rmon.h"
@@ -26,16 +27,10 @@
 #include "shm.h"
 #endif
 
-#ifdef DEBUGLIB
-#include "trace.h"  /* trace_flag, trace_after */
-#endif
-
 extern struct goalrec* klic_gc();
 
-#ifdef DEBUGLIB
 extern int stepping_flag;
 extern struct goalrec* step_after();
-#endif
 
 int sigint_interrupt = 0;
 
@@ -81,7 +76,6 @@
 
   qp = enqueue_resumed_goals(qp);
 
-#ifdef DEBUGLIB
   if( stepping_flag ){
     qp = step_after(qp, allocp);
     allocp = heapp();
@@ -89,7 +83,6 @@
     qp = trace_after(qp, allocp);
     allocp = heapp();
   }
-#endif
 
   do{
     retry = 0;
diff -ruN klic-3.003-2002-03-02/runtime/kmain.c klic-3.003-2002-03-04/runtime/kmain.c
--- klic-3.003-2002-03-02/runtime/kmain.c	Sat Mar  2 15:58:47 2002
+++ klic-3.003-2002-03-04/runtime/kmain.c	Mon Mar  4 10:42:58 2002
@@ -21,6 +21,9 @@
 #include <setjmp.h>
 #include <errno.h>
 
+#include "options.h"
+#include "trace.h"  /* trace_goal */
+
 #ifdef USESIG
 #include <signal.h>
 #endif
@@ -49,8 +52,6 @@
 static int eager_transfer_all_flag;
 #endif  /* DIST */
 
-#include "options.h"
-
 extern void initiate_prioq(void);
 
 static long num_pes;
@@ -59,7 +60,7 @@
 static unsigned long max_h_size;
 static unsigned long inc_size;
 static int verbose;
-extern int start_tracing;
+static int start_tracing = 0;
 extern int count_suspension;
 
 #if defined(DIST) && defined(USE_REDUCTION_COUNT)
@@ -139,13 +140,11 @@
 
     "v",	(union all_type*) &verbose, ARG_SET,
     "-v: display KLIC runtime version",
-#ifdef DEBUGLIB
     "t",	(union all_type*) &start_tracing, ARG_SET,
     "-t: start execution with tracing",
 
     "s",	(union all_type*) &count_suspension, ARG_SET,
     "-s: count suspension",
-#endif /* DEBUGLIB */
 #ifdef USETIMER
     "deadlock-detection-interval",
 		(union all_type*) &dl_det_interval, ARG_SIZE,
@@ -155,20 +154,13 @@
 #endif /*USETIMER*/
     0, 0 };
 
-#ifdef DEBUGLIB
-#include "trace.h"  /* trace_goal */
-#endif
-
 #define klic_local_fprintf fprintf
 
 
 extern char *runtime_version, *runtime_date;
 
 jmp_buf klic_topmost;
-int start_tracing = 0;
-#ifdef DEBUGLIB
 int count_suspension = 0;
-#endif
 #ifdef USETIMER
 static volatile int dummy_alarm_set;
 #endif /*USETIMER*/
@@ -354,14 +346,11 @@
     qp->pred = &predicate_main_xmain_0;
     set_heapp(allocp + 2);
 #endif /* DIST */
-#ifdef DEBUGLIB
     cum_susps0 = 0;
     cum_resumps0 = 0;
     reset_suspensions();
     resumes0 = 0;
-#endif /* DEBUGLIB */
     while (1) {
-#ifdef DEBUGLIB
       cum_susps0 += suspensions();
       reset_suspensions();
       cum_resumps0 += resumes();
@@ -377,7 +366,6 @@
 	  start_tracing = 0;
       }
       initialize_suspension_count_table();
-#endif	/*DEBUGLIB*/
 #ifdef DIST
       if (IS_MASTER_NODE(my_node))
 #endif
@@ -548,7 +536,6 @@
 {
   extern const struct predicate topsucceed_pred;
   if (suspensions() == resumes()) {
-#ifdef DEBUGLIB
     if(count_suspension) {
       if(suspensions() != 0) {
 	klic_fprintf(stderr, "Suspension counts:\n");
@@ -557,7 +544,6 @@
 	klic_fprintf(stderr, "No suspension in this run.\n");
       }
     }
-#endif
     longjmp(klic_topmost, 1);
   }
 
diff -ruN klic-3.003-2002-03-02/runtime/print.c klic-3.003-2002-03-04/runtime/print.c
--- klic-3.003-2002-03-02/runtime/print.c	Tue Feb 19 13:59:00 2002
+++ klic-3.003-2002-03-04/runtime/print.c	Mon Mar  4 10:43:27 2002
@@ -14,12 +14,9 @@
 #include <stdio.h>
 #include "gobj.h"
 #include <klic/susp.h>
-
-#ifdef DEBUGLIB
 #include "trace.h"  /* subterm_sp, fprint_goal */
 
 int verbose_print;
-#endif
 
 #define generic_print(obj, stream, depth, length) \
   (method_table_of(obj)->print((obj), (stream), (depth), (length)))
@@ -47,7 +44,6 @@
 
  var:
   klic_fprintf(stream, "_%X", (q*)x-new_space_top());
-#ifdef DEBUGLIB
   if( verbose_print ){
     if( derefone(x) != x ){
       struct susprec* susp = suspp(derefone(x));
@@ -80,7 +76,6 @@
       }
     }
   }
-#endif
   return;
 
  cons:
diff -ruN klic-3.003-2002-03-02/runtime/sched.c klic-3.003-2002-03-04/runtime/sched.c
--- klic-3.003-2002-03-02/runtime/sched.c	Tue Feb 26 12:38:02 2002
+++ klic-3.003-2002-03-04/runtime/sched.c	Mon Mar  4 10:43:58 2002
@@ -16,9 +16,7 @@
 
 #include <stdio.h>
 
-#ifdef DEBUGLIB
 #include "trace.h"  /* enqueue_trace_rec, trace_enqueued_goals, trace_flag */
-#endif
 
 #ifdef SHM
 #include <setjmp.h>
@@ -180,7 +178,6 @@
     gp->next = qp;
     qp = gp;
   }else{
-#ifdef DEBUGLIB
     if( trace_flag ){
       struct enqueue_trace_rec* tr;
       tr = (struct enqueue_trace_rec*)
@@ -190,7 +187,6 @@
       tr->prio = prio;
       trace_enqueued_goals = tr;
     }else
-#endif
     {
       struct prioqrec* pq = &prioq0;
       while( pq->next->prio > prio ){
diff -ruN klic-3.003-2002-03-02/runtime/shm_throw.c klic-3.003-2002-03-04/runtime/shm_throw.c
--- klic-3.003-2002-03-02/runtime/shm_throw.c	Mon Feb 25 14:30:44 2002
+++ klic-3.003-2002-03-04/runtime/shm_throw.c	Mon Mar  4 10:44:13 2002
@@ -14,10 +14,7 @@
 #include "gobj.h"
 #include "shm.h"  /* last_shm_var */
 #include <signal.h>
-
-#ifdef DEBUGLIB
 #include "trace.h"  /* trace_flag, trace_goal */
-#endif
 
 #define is_locala(X) \
   ((unsigned long) ((long) (X) - (long) heaptop()) < real_heapbytesize())
@@ -93,13 +90,11 @@
 
   ck_throw_new_galloc(num);
 
-#ifdef DEBUGLIB
   if( trace_flag ){
     static long throw_trace_count = 0;
     gp = trace_goal(gp, (num+1)*100000+throw_trace_count, NULL);
     throw_trace_count++;
   }
-#endif
 
   sh_goal = shm_goal_copy(gp, current_prio());
   shm_goal_stack(sh_goal, num);
diff -ruN klic-3.003-2002-03-02/runtime/unify.c klic-3.003-2002-03-04/runtime/unify.c
--- klic-3.003-2002-03-02/runtime/unify.c	Tue Feb 26 12:38:46 2002
+++ klic-3.003-2002-03-04/runtime/unify.c	Mon Mar  4 10:44:42 2002
@@ -14,9 +14,7 @@
 #include "gobj.h"
 #include <klic/susp.h>
 #include <klic/unify.h>  /* do_unify* */
-#ifdef DEBUGLIB
 #include "trace.h"  /* trace_flag, trace_resumption */
-#endif
 
 extern struct predicate predicate_unify__term__dcode_xunify_2;
 extern struct predicate predicate_unify__term__dcode_xunify__goal_2;
@@ -176,23 +174,19 @@
 	consumer_terminate:;
 	} else if (isint(u.g->next)) {
 	  long gp = intval(u.g->next);
-#ifdef DEBUGLIB
 	  extern int stepping_flag;
 	  if (stepping_flag) {
 	    extern void step_wokenup();
 	    u.g->next = 0;	/* to nullify deadlock check */
 	    step_wokenup(u.g, gp);
 	  } else
-#endif
 	    {
 	      if (gp != current_prio()) {
 		(void) enqueue_goal(NULL, gp, u.g, glbl);
 	      } else {
 		resume_same_prio(u.g);
 	      }
-#ifdef DEBUGLIB
 	      if(trace_flag) trace_resumption(u.g);
-#endif
 	    }
 	  inc_resumes();
 	}
