diff -ruN klic-3.003-2001-11-21/include/klic/alloc.h klic-3.003-2001-11-22/include/klic/alloc.h
--- klic-3.003-2001-11-21/include/klic/alloc.h	Tue Nov 20 22:31:08 2001
+++ klic-3.003-2001-11-22/include/klic/alloc.h	Wed Nov 21 11:48:47 2001
@@ -8,16 +8,18 @@
 #ifndef _KLIC_ALLOC_H_
 #define _KLIC_ALLOC_H_
 
-extern q *klic_interrupt();
+extern q* klic_interrupt();
 
 /* Reverse allocation from "heaptop" */
 
 #define revalloc(s, words, maketype) \
 do{ \
-  (s) = maketype(heapbottom -= (words)); \
+  heapbottom -= (words); \
+  (s) = maketype(heapbottom); \
+\
   real_heaplimit -= (words); \
-  if (heaplimit && interrupt_off) heaplimit = real_heaplimit; \
-  else heaplimit = 0; \
+  if(heaplimit != 0) \
+    heaplimit = (interrupt_off ? real_heaplimit : 0); \
 }while(0)
 
 #define heapalloc(s, words, maketype) \
diff -ruN klic-3.003-2001-11-21/include/klic/interpe.h klic-3.003-2001-11-22/include/klic/interpe.h
--- klic-3.003-2001-11-21/include/klic/interpe.h	Tue Nov 20 22:31:08 2001
+++ klic-3.003-2001-11-22/include/klic/interpe.h	Wed Nov 21 12:04:04 2001
@@ -11,9 +11,9 @@
 #include <malloc.h>
 #ifdef __alpha
 /* dec malloc.h does not supply function return value decralations */
-void *malloc();
-void *calloc();
-void *realloc();
+extern void* malloc();
+extern void* calloc();
+extern void* realloc();
 #endif
 #include <string.h>
 
@@ -48,7 +48,7 @@
 #endif
 
 /*********** Some convenient macros **************/
-/*Extern long total_node, my_node;*/
+/*extern long total_node, my_node;*/
 #define MASTER_NODE		0L
 #define SHOEN_NODE		total_node
 #define IS_MASTER_NODE(node)	((node) == MASTER_NODE)
@@ -76,8 +76,8 @@
 #endif
 
 /************* WTC related definition ***************/
-Extern long shoen_wtc;
-Extern long node_wtc;
+extern long shoen_wtc;
+extern long node_wtc;
 
 #define SUPPLY_WTC_UNIT		0x1000000L
 #define THROW_WTC_UNIT		0x1000L
@@ -107,20 +107,20 @@
     long index;
     long wec;
     q data;
-    struct exp_entry *next;
+    struct exp_entry* next;
 };
 
-Extern struct exp_entry *exp_table;
-Extern long current_exp_size;
-Extern long active_exp_entry;
+extern struct exp_entry* exp_table;
+extern long current_exp_size;
+extern long active_exp_entry;
 
 #define UNUSED_EXPREC 0xf0f0f0ff /* This value is curious!! */
 #define UNUSED_IMPREC 0xf0f0f0ff /* it too. */
 
 /* Export Hash Table */
-Extern struct exp_entry *exp_hash_table[EXP_TABLE_HASH_SIZE];
+extern struct exp_entry* exp_hash_table[EXP_TABLE_HASH_SIZE];
 
-Extern struct exp_entry *top_of_exp_freelist;
+extern struct exp_entry* top_of_exp_freelist;
 
 /************** Import Table ********************/
 
@@ -129,45 +129,46 @@
     q object;
 };
 
-Extern struct imp_entry *imp_table;
-Extern long current_imp_size;
+extern struct imp_entry* imp_table;
+extern long current_imp_size;
 
-Extern struct imp_entry top_of_imp_freelist;
+extern struct imp_entry top_of_imp_freelist;
 
-Extern long active_imp_rec;
-Extern long free_imp_rec;
+extern long active_imp_rec;
+extern long free_imp_rec;
 
-Extern long receive_answer_flag;
-Extern long answer_return_exp_index;
-Extern q decode_data;		/* Un natural way of value passing. */
+extern long receive_answer_flag;
+extern long answer_return_exp_index;
+extern q decode_data;		/* Un natural way of value passing. */
 
 /* Options set by program arguments */
-Extern long eager_transfer_level	Init(0);
-Extern int network_statistics_flag	Init(0);
-Extern int msg_busywait_flag		Init(0);
+extern long eager_transfer_level	Init(0);
+extern int network_statistics_flag	Init(0);
+extern int msg_busywait_flag		Init(0);
 
 /************* message suspend record **************/
 
 struct susp_msg_rec {
-    struct susp_msg_rec *next;
+    struct susp_msg_rec* next;
     long node;
     long wtc_needed;
-    combuf *outbuf;
+    combuf* outbuf;
 };
-Extern struct susp_msg_rec *susp_msg_list;
+
+extern struct susp_msg_rec* susp_msg_list;
 
 /************* Message decoder stack ****************/
 
 #define INIT_DECODE_STACK_SIZE 0x1000
 
-Extern q *decode_stack;
-Extern q *decode_stack_ptr;
-Extern q *decode_stack_limit;
-Extern int decode_stack_size;
+extern q* decode_stack;
+extern q* decode_stack_ptr;
+extern q* decode_stack_limit;
+extern int decode_stack_size;
 
 /************* Network Statistics Measurement *******/
 
-Extern struct netstat {
+struct netstat {
     long start_sec;		/* only SHOEN uses this field */
     long start_usec;		/* only SHOEN uses this field */
 
@@ -194,8 +195,9 @@
     
     long send_data_siz;
     long recv_data_siz;
+};
 
-} netstat;
+extern struct netstat netstat;
 
 #define ERROR_STOP for(;;)
 
diff -ruN klic-3.003-2001-11-21/include/klic/rmon.h klic-3.003-2001-11-22/include/klic/rmon.h
--- klic-3.003-2001-11-21/include/klic/rmon.h	Tue Nov 20 22:31:08 2001
+++ klic-3.003-2001-11-22/include/klic/rmon.h	Wed Nov 21 12:07:08 2001
@@ -23,7 +23,8 @@
     int ms_on;
     int mr_on;
 };
-Extern Volatile struct perfmon_state perfmon_state;
+extern volatile struct perfmon_state perfmon_state;
+
 struct perfmon_counter {
     long intr_count;
     long idle_count;
@@ -31,10 +32,10 @@
     long ms_count;
     long mr_count;
 };
-Extern Volatile struct perfmon_counter perfmon_counter;
+extern volatile struct perfmon_counter perfmon_counter;
 
-Extern char *rmonnode;
-Extern int rmon_tid;
+extern char* rmonnode;
+extern int rmon_tid;
 
 #define IDLE_ON()  (perfmon_state.idle_on = 1)
 #define IDLE_OFF() (perfmon_state.idle_on = 0)
@@ -45,7 +46,7 @@
 #define RECV_ON()  (perfmon_state.mr_on = 1)
 #define RECV_OFF() (perfmon_state.mr_on = 0)
 
-Extern int gather_prof_ready Init(1);
+extern int gather_prof_ready Init(1);
 struct profile_rec {
     long stimes;  /* sampling times */
     long itimes;  /* idle times */
@@ -54,9 +55,9 @@
     long mrtimes; /* message receiving times */
 };
 
-Extern struct profile_rec *shoen_profile;
-Extern int gathered_count Init(0);
+extern struct profile_rec* shoen_profile;
+extern int gathered_count Init(0);
 
-Extern long *send_pbuf;
+extern long* send_pbuf;
 
 #endif /* _KLIC_RMON_H_ */
diff -ruN klic-3.003-2001-11-21/include/klic/sighndl.h klic-3.003-2001-11-22/include/klic/sighndl.h
--- klic-3.003-2001-11-21/include/klic/sighndl.h	Tue Nov 20 22:31:08 2001
+++ klic-3.003-2001-11-22/include/klic/sighndl.h	Wed Nov 21 12:08:57 2001
@@ -23,15 +23,15 @@
 #define signal_done		(klic_sgnl_flags->done)
 
 struct klic_sgnl_flags {
-  Volatile long flags[NSIG];
-  int ((* Volatile sgnl_handlers[NSIG])());
-  Volatile long done;
+  volatile long flags[NSIG];
+  int ((* volatile sgnl_handlers[NSIG])());
+  volatile long done;
 } my_klic_sgnl_flags;
 
 #ifdef SIGMAIN
-Volatile struct klic_sgnl_flags *klic_sgnl_flags = &my_klic_sgnl_flags;
+volatile struct klic_sgnl_flags* klic_sgnl_flags = &my_klic_sgnl_flags;
 #else
-extern Volatile struct klic_sgnl_flags *klic_sgnl_flags;
+extern volatile struct klic_sgnl_flags* klic_sgnl_flags;
 #endif
 
 #endif /* USESIG */
diff -ruN klic-3.003-2001-11-21/include/klic/timing.h klic-3.003-2001-11-22/include/klic/timing.h
--- klic-3.003-2001-11-21/include/klic/timing.h	Tue Nov 20 22:31:08 2001
+++ klic-3.003-2001-11-22/include/klic/timing.h	Wed Nov 21 12:10:05 2001
@@ -35,9 +35,9 @@
 
 #endif
 
-Extern int gctimes Init(0);
-Extern int gcums Init(0);
-Extern int gcsms Init(0);
-Extern int measure_gc Init(0);
+extern int gctimes Init(0);
+extern int gcums Init(0);
+extern int gcsms Init(0);
+extern int measure_gc Init(0);
 
 #endif /* _KLIC_TIMING_H_ */
