diff -ruN klic-3.003-2002-01-07a/runtime/cntlmsg.c klic-3.003-2002-01-07b/runtime/cntlmsg.c
--- klic-3.003-2002-01-07a/runtime/cntlmsg.c	Mon Jan  7 14:27:13 2002
+++ klic-3.003-2002-01-07b/runtime/cntlmsg.c	Mon Jan  7 15:17:49 2002
@@ -62,6 +62,14 @@
 
 q pop_decode_stack();
 
+static timerstruct before_exec, after_exec;
+
+extern void
+init_rusage()
+{
+  measure(before_exec);
+}
+
 /*
   ANSWER VALUE
   */
@@ -600,7 +608,6 @@
 {
   declare_globals;
   long utime, stime;
-  extern timerstruct before_exec, after_exec;
 
   measure(after_exec);
 #define  field_diff_dist(field) (after_exec.field - before_exec.field)
diff -ruN klic-3.003-2002-01-07a/runtime/gunix.kl1 klic-3.003-2002-01-07b/runtime/gunix.kl1
--- klic-3.003-2002-01-07a/runtime/gunix.kl1	Tue Jan  1 14:17:47 2002
+++ klic-3.003-2002-01-07b/runtime/gunix.kl1	Mon Jan  7 16:41:19 2002
@@ -12,9 +12,11 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
+
 #ifdef USESELECT
 #include <sys/select.h>
 #endif
+
 #include <netinet/in.h>
 #include <netdb.h>
 #include <stdio.h>
@@ -31,6 +33,7 @@
 
 #if defined(ASYNCIO) && !defined(FASYNC)
 #include <fcntl.h>
+
 #ifndef USESTREAMINCLUDEDIR
 #include <stropts.h>
 #endif
@@ -40,21 +43,27 @@
 #define O_NONBLOCK FNDELAY
 #endif
 
+/* Let's assume 60Hz clock if HZ is left undefined */
+#ifndef HZ
+#define HZ 60
+#endif
+
+#define KLIC2C convert_klic_string_to_c_string
+#define C2KLIC convert_c_string_to_klic_string
+#define BC2KLIC convert_binary_c_string_to_klic_string
+
 GD_USE_CLASS(pointer);
 extern q* register_streamed_signal();
 
-extern char* generic_string_body();
 extern char* convert_klic_string_to_c_string();
 extern q convert_c_string_to_klic_string();
 extern q convert_binary_c_string_to_klic_string();
 
-#define KLIC2C convert_klic_string_to_c_string
-#define C2KLIC convert_c_string_to_klic_string
-#define BC2KLIC convert_binary_c_string_to_klic_string
-
 extern q gd_new_pointer();
+extern char* getenv();
+
 #define FilePointer(x) \\
-  ((FILE*) ((struct pointer_object*) (data_objectp(x)))->pointer)
+  ((FILE*) ((struct pointer_object*) data_objectp(x))->pointer)
 
 #define MakeFilePointer(klicvar, file) \\
 do{ \\
@@ -67,14 +76,14 @@
   char* path = KLIC2C(P); \\
   FILE* file = fopen(path, (M)); \\
   free(path); \\
-  if (file==NULL) goto L; \\
+  if( file==NULL ) goto L; \\
   MakeFilePointer((F), file); \\
 }while(0)
 
 #define Fdopen(Fd,F,L,M) \\
 do{ \\
   FILE* file = fdopen((Fd), (M)); \\
-  if (file==NULL) goto L; \\
+  if( file==NULL ) goto L; \\
   MakeFilePointer((F), file); \\
 }while(0)
 
@@ -84,7 +93,8 @@
   int bufsize;
 };
 
-static struct iobuf* make_iobuf(
+static struct iobuf*
+make_iobuf(
   int fd,
   int size,
   int isout )
@@ -103,7 +113,8 @@
   struct iobuf obuf;
 };
 
-static struct biobuf* make_biobuf(
+static struct biobuf*
+make_biobuf(
   int ifd,
   int ofd,
   int size )
@@ -140,7 +151,7 @@
 }while(0)
 
 #define IOBuf(x) \\
-  ((struct iobuf*) ((struct pointer_object*) (data_objectp(x)))->pointer)
+  ((struct iobuf*) ((struct pointer_object*) data_objectp(x))->pointer)
 
 #define MakeBIOBuf(klicvar, ifd, ofd, size) \\
 do{ \\
@@ -149,26 +160,29 @@
 }while(0)
 
 #define BIOBuf(x) \\
-  ((struct biobuf*) ((struct pointer_object*) (data_objectp(x)))->pointer)
+  ((struct biobuf*) ((struct pointer_object*) data_objectp(x))->pointer)
 
-static int fill_buf(
+static int
+fill_buf(
   struct iobuf* iob )
 {
-  while (1) {
+  for(;;){
     int result = read(iob->fd, iob->buf, iob->bufsize);
-    if (result == 0) {
+    if( result == 0 ){
       return 0;			/* end of file */
-    } else if (result > 0) {
+    }else if( result > 0 ){
       iob->lim = iob->buf + result;
       iob->ptr = iob->buf;
       return 1;
-    } else {  /* result < 0 */
-      switch (errno) {
+    }else{  /* read error */
+      switch( errno ){
       case EINTR: continue;
+
 #ifdef EPIPE
       case EPIPE:
         return -2;
 #endif /* EPIPE */
+
 #ifdef ASYNCIO
       case EAGAIN:
 #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
@@ -176,6 +190,7 @@
 #endif
 	return -1;
 #endif /* ASINCIO */
+
       default:
 	fatalp(\"read\", \"Error in asynchronous input\");
       }
@@ -183,28 +198,31 @@
   }
 }
 
-static int write_buf(
+static int
+write_buf(
   struct iobuf* iob )
 {
   unsigned char* wp = iob->buf;
-  while (1) {
+  for(;;){
     int result = write(iob->fd, wp, (iob->ptr - wp));
-    if (result >= 0) {
+    if( result >= 0 ){
       wp += result;
-      if (wp != iob->ptr) {
+      if( wp != iob->ptr ){
 	continue;
-      } else {
+      }else{
 	iob->lim = iob->buf + iob->bufsize;
 	iob->ptr = iob->buf;
 	return 1;
       }
-    } else {  /* result < 0 */
-      switch (errno) {
+    }else{  /* write error */
+      switch( errno ){
       case EINTR: continue;
+
 #ifdef EPIPE
       case EPIPE:
         return -2;
 #endif /* EPIPE */
+
 #ifdef ASYNCIO
       case EAGAIN:
 #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
@@ -212,16 +230,16 @@
 #endif
 
 /*
-  Patch to detour a suspected bug of SunOS 4.1.3
-	(1994/12/02 Takashi Chikayama)
-
-  As SIGIO signal is not raised during sigpause for socket output,
-  we will use polling instead of signal-based I/O.
-
-  The original code was the following.
-
-	return -1;
-*/
+ * Patch to detour a suspected bug of SunOS 4.1.3
+ *	(1994/12/02 Takashi Chikayama)
+ *
+ * As SIGIO signal is not raised during sigpause for socket output,
+ * we will use polling instead of signal-based I/O.
+ *
+ * The original code was the following.
+ *
+ *	return -1;
+ */
 
 /* Begin Patch */
 	{
@@ -232,7 +250,7 @@
 #else
 #ifdef USEULIMIT
 	  fd_setsize = ulimit(4, 0);
-	  if (fd_setsize < 0) {
+	  if( fd_setsize < 0 ){
 	    fatal(\"Can't obtain file descriptor table size\");
 	  }
 #else
@@ -246,6 +264,7 @@
 	continue;
 /* End of Patch */
 #endif /* ASYNCIO */
+
       default:
 	fatalp(\"write\", \"Error in asynchronous output\");
       }
@@ -253,23 +272,24 @@
   }
 }
 
-static void setasync(
+static void
+setasync(
   int sock,
   char* msg )
 {
 #ifdef ASYNCIO
-  if (fcntl(sock, F_SETOWN, getpid()) < -1) {
+  if( fcntl(sock, F_SETOWN, getpid()) < -1 ){
     fatalp(\"fcntl\", \"Setting error for %%s\", msg);
   }
 #ifdef FASYNC
-  if (fcntl(sock, F_SETFL, FASYNC|O_NONBLOCK) < -1) {
+  if( fcntl(sock, F_SETFL, FASYNC|O_NONBLOCK) < -1 ){
     fatalp(\"fcntl\", \"Setting error for %%s\", msg);
   }
 #else
-  if (fcntl(sock, F_SETFL, O_NONBLOCK) < -1) {
+  if( fcntl(sock, F_SETFL, O_NONBLOCK) < -1 ){
     fatalp(\"fcntl\", \"Setting error for %%s\", msg);
   }
-  if (ioctl(sock, I_SETSIG, S_INPUT|S_OUTPUT) != 0) {
+  if( ioctl(sock, I_SETSIG, S_INPUT|S_OUTPUT) != 0 ){
     fatalp(\"ioctl\", \"Setting error for %%s\", msg);
   }
 #endif
@@ -280,7 +300,7 @@
 :- module unix.
 
 exit(Stat) :- inline:"
-klic_exit((intval(%0)));
+klic_exit(intval(%0));
 ":[Stat+int] | true.
 
 unix([]).
@@ -374,10 +394,9 @@
 
 net_convert(unix(Path),Fam,Addr) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = PF_UNIX;
-  struct sockaddr *addr;
-  char *path = KLIC2C(%0);
+  struct sockaddr* addr;
+  char* path = KLIC2C(%0);
 
   addr =
     (struct sockaddr*) malloc_check(sizeof(struct sockaddr) + strlen(path));
@@ -387,44 +406,36 @@
   %1 = makeint(family);
   %2 = gd_new_pointer((q) addr, allocp);
   allocp = heapp;
-#else
-  goto %f;
-#endif
 }":[Path+object(byte_string),Fam0-int,Addr0-object(pointer)] |
     Fam=Fam0, Addr=Addr0.
 net_convert(inet(HostName,Port),Fam,Addr) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = PF_INET;
   struct sockaddr_in* addr;
   char* host = KLIC2C(%0);
   struct hostent* ent = gethostbyname(host);
 
-  if (ent == NULL) { fatalf(\"Unknown host %%s\", host); }
+  if( ent == NULL ){ fatalf(\"Unknown host %%s\", host); }
   free(host);
   addr = (struct sockaddr_in*)
     malloc_check(sizeof(struct sockaddr_in));
   addr->sin_family = family;
   BCOPY((char*) *ent->h_addr_list, (char*) &addr->sin_addr,
 	sizeof(struct in_addr));
-/*
-  The following is not used as some systems don't understand it.
-
-  addr->sin_addr.S_un.S_addr = *(int*)*ent->h_addr_list;
-*/
+  /*
+   * The following is not used as some systems don't understand it.
+   *
+   * addr->sin_addr.S_un.S_addr = *(int*) *ent->h_addr_list;
+   */
   addr->sin_port = htons(intval(%1));
   %2 = makeint(family);
   %3 = gd_new_pointer((q) addr, allocp);
   allocp = heapp;
-#else
-  goto %f;
-#endif
 }":[HostName+object(byte_string),Port+int,
     Fam0-int,Addr0-object(pointer)] |
     Fam=Fam0, Addr=Addr0.
 net_convert(inet({B1,B2,B3,B4},Port),Fam,Addr) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = PF_INET;
   struct sockaddr_in* addr;
   int b1, b2, b3, b4;
@@ -435,25 +446,22 @@
     malloc_check(sizeof(struct sockaddr_in));
   addr->sin_family = family;
   b1 = intval(%0); b2 = intval(%1); b3 = intval(%2); b4 = intval(%3);
-  (void) sprintf(buf, \"%%d.%%d.%%d.%%d\", b1, b2, b3, b4);
+  sprintf(buf, \"%%d.%%d.%%d.%%d\", b1, b2, b3, b4);
   laddr = inet_addr(buf);
-  if (laddr == -1) goto %f;
+  if( laddr == -1 ) goto %f;
   BCOPY((char*) &laddr, (char*) &addr->sin_addr, sizeof(struct in_addr));
-/*
-  The following is not used as some systems don't understand it.
-
-  addr->sin_addr.S_un.S_un_b.s_b1 = intval(%0);
-  addr->sin_addr.S_un.S_un_b.s_b2 = intval(%1);
-  addr->sin_addr.S_un.S_un_b.s_b3 = intval(%2);
-  addr->sin_addr.S_un.S_un_b.s_b4 = intval(%3);
-*/
+  /*
+   * The following is not used as some systems don't understand it.
+   *
+   * addr->sin_addr.S_un.S_un_b.s_b1 = intval(%0);
+   * addr->sin_addr.S_un.S_un_b.s_b2 = intval(%1);
+   * addr->sin_addr.S_un.S_un_b.s_b3 = intval(%2);
+   * addr->sin_addr.S_un.S_un_b.s_b4 = intval(%3);
+   */
   addr->sin_port = htons(intval(%4));
   %5 = makeint(family);
   %6 = gd_new_pointer((q) addr, allocp);
   allocp = heapp;
-#else
-  goto %f;
-#endif
 }":[B1+int,B2+int,B3+int,B4+int,Port+int,
     Fam0-int,Addr0-object(pointer)] |
     Fam=Fam0, Addr=Addr0.
@@ -464,36 +472,31 @@
 
 connect(Fam,Addr,Async,R) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = intval(%0);
   int sock = socket(family, SOCK_STREAM, 0);
 
-  if (sock < 0) { fatalp(\"socket\", \"Socket creation error\"); }
+  if( sock < 0 ){ fatalp(\"socket\", \"Socket creation error\"); }
 #ifdef ASYNCIO
   init_asynchronous_io();
   setasync(sock, \"connection\");
   register_asynchronous_io_stream(sock, %1);
 #endif
   %2 = makeint(sock);
-#else
-  goto %f;
-#endif
 }":[Fam+int,Async+any,FD-int] |
     connect_sub(FD,Addr,Async,R).
 
 connect_sub(FD,Addr,Async,R) :- inline:"
 {
-#ifndef NO_USESOCKET
   int sock = intval(%0);
   struct sockaddr* addr = (struct sockaddr*)
-    ((struct pointer_object*) (data_objectp(%1)))->pointer;
+    ((struct pointer_object*) data_objectp(%1))->pointer;
 
  again:
-  if (connect(sock, addr, sizeof(struct sockaddr)) < 0) {
+  if( connect(sock, addr, sizeof(struct sockaddr)) < 0 ){
 #ifdef ASYNCIO
-    if (errno == EINTR) goto again;
-    if (errno != EISCONN) {
-      if (errno == EINPROGRESS || errno == EALREADY) goto %f;
+    if( errno == EINTR ) goto again;
+    if( errno != EISCONN ){
+      if( errno == EINPROGRESS || errno == EALREADY ) goto %f;
 #endif
       fatalp(\"connect\", \"Socket connection error\");
 #ifdef ASYNCIO
@@ -503,18 +506,11 @@
   free(addr);
   MakeInBuf(%2, sock, 4096);
   MakeOutBuf(%3, sock, 4096);
-#else
-  goto %f;
-#endif
 }":[FD+int,Addr+object(pointer),InB-object(pointer),OutB-object(pointer)] |
     R=normal(S),
     async_io(S,Async,InB,OutB,0).
 alternatively.
-connect_sub(FD,Addr,Async,R) :- inline:"{
-#ifdef NO_USE_SOCKET
-  goto %f;
-#endif
-}":[] |
+connect_sub(FD,Addr,Async,R) :- true |
     timer:instantiate_after(time(0,3,0), Timer),
     connect_sub(FD, Addr, Async, Timer, R).
 
@@ -530,36 +526,31 @@
 
 connect2(Fam,Addr,Async,R) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = intval(%0);
   int sock = socket(family, SOCK_STREAM, 0);
 
-  if (sock < 0) { fatalp(\"socket\", \"Socket creation error\"); }
+  if( sock < 0 ){ fatalp(\"socket\", \"Socket creation error\"); }
 #ifdef ASYNCIO
   init_asynchronous_io();
   setasync(sock, \"connection\");
   register_asynchronous_io_stream(sock, %1);
 #endif
   %2 = makeint(sock);
-#else
-  goto %f;
-#endif
 }":[Fam+int,Async+any,FD-int] |
     connect2_sub(FD,Addr,Async,R).
 
 connect2_sub(FD,Addr,Async,R) :- inline:"
 {
-#ifndef NO_USESOCKET
   int sock = intval(%0);
   struct sockaddr* addr = (struct sockaddr*)
-    ((struct pointer_object*) (data_objectp(%1)))->pointer;
+    ((struct pointer_object*) data_objectp(%1))->pointer;
 
  again2:
-  if (connect(sock, addr, sizeof(struct sockaddr)) < 0) {
+  if( connect(sock, addr, sizeof(struct sockaddr)) < 0 ){
 #ifdef ASYNCIO
-    if (errno == EINTR) goto again2;
-    if (errno != EISCONN) {
-      if (errno == EINPROGRESS || errno == EALREADY) goto %f;
+    if( errno == EINTR ) goto again2;
+    if( errno != EISCONN ){
+      if( errno == EINPROGRESS || errno == EALREADY ) goto %f;
 #endif
       fatalp(\"connect\", \"Socket connection error\");
 #ifdef ASYNCIO
@@ -568,19 +559,12 @@
   }
   free(addr);
   MakeBIOBuf(%2, sock, sock, 4096);
-#else
-  goto %f;
-#endif
 }":[FD+int,Addr+object(pointer),IOB-object(pointer)] |
     R=normal(SIn,SOut),
     async_input(SIn,Async,IOB,0),
     async_output(SOut,Async,IOB,0).
 otherwise.
-connect2_sub(FD,Addr,Async,R) :- inline:"{
-#ifdef NO_USE_SOCKET
-  goto %f;
-#endif
-}":[] |
+connect2_sub(FD,Addr,Async,R) :- true |
     timer:instantiate_after(time(0,3,0), Timer),
     connect2_sub(FD, Addr, Async, Timer, R).
 
@@ -599,80 +583,72 @@
 
 bind(Fam,Addr,Async,R) :- inline:"
 {
-#ifndef NO_USESOCKET
   int family = intval(%0);
   int reuse = 1;
   struct sockaddr* addr = (struct sockaddr*)
-    ((struct pointer_object*) (data_objectp(%1)))->pointer;
+    ((struct pointer_object*) data_objectp(%1))->pointer;
   int sock = socket(family, SOCK_STREAM, 0);
 
-  if (sock < 0) { fatalp(\"socket\", \"Socket creation error\"); }
+  if( sock < 0 ){ fatalp(\"socket\", \"Socket creation error\"); }
 #ifdef ASYNCIO
   init_asynchronous_io();
 #endif
 
-  if (addr->sa_family == PF_INET) {
-    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
-		   (char*) &reuse, sizeof(reuse))) {
+  if( addr->sa_family == PF_INET ){
+    if( setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+		   (char*) &reuse, sizeof(reuse)) ){
       fatalp(\"setsockopt\", \"Socket reuse setting error for binding\");
     }
   }
-  if (bind(sock, addr, sizeof(struct sockaddr)) < 0) {
+  if( bind(sock, addr, sizeof(struct sockaddr)) < 0 ){
     fatalp(\"bind\", \"Socket binding error\");
   }
   free(addr);
 #ifdef ASYNCIO
   setasync(sock, \"bound socket\");
 #endif
-  if (listen(sock, 5) < 0) {
+  if( listen(sock, 5) < 0 ){
     fatalp(\"listen\", \"Socket listen error\");
   }
 #ifdef ASYNCIO
   register_asynchronous_io_stream(sock, %2);
 #endif
   %3 = makeint(sock);
-#else
-  goto %f;
-#endif
 }":[Fam+int,Addr+object(pointer),Async+any,FD-int] |
     R=normal(S),
     bound_sock(S,FD,Async,_).
 
 bound_sock([],FD,_Async,_Async1) :- inline:"
 {
-#ifndef NO_USESOCKET
   int fd = intval(%0);
   int namelen = 1000;
   struct sockaddr* name = (struct sockaddr*) malloc_check(namelen);
   getsockname(fd, name, &namelen);
-  if (close(fd) != 0) {
+  if( close(fd) != 0 ){
     fatalp(\"close\", \"Error in closing bound socket\");
   }
 #ifdef ASYNCIO
   close_asynchronous_io_stream(fd);
 #endif
-  if (name->sa_family == PF_UNIX) {
-    if (unlink(name->sa_data)) {
+  if( name->sa_family == PF_UNIX ){
+    if( unlink(name->sa_data) ){
       fatalp(\"unlink\", \"Error in unlinking socket: %%s\", name->sa_data);
     }
   }
   free(name);
-#else
-  goto %f;
-#endif
 }":[FD+int] | true.
 bound_sock([accept(R)|S],FD,Async,Async1) :- inline:"
 {
-#ifndef NO_USESOCKET
   int sock;
   struct sockaddr addr;
   int socklen = sizeof(addr);
 #ifdef ASYNCIO
-  if (!poll_read_available(intval(%0))) goto %f;
+  if( !poll_read_available(intval(%0)) ) goto %f;
 #endif
-  while (1) {
-    if ((sock = accept(intval(%0), &addr, &socklen)) > 0) break;
-    if (errno != EINTR) {
+  for(;;){
+    sock = accept(intval(%0), &addr, &socklen);
+    if( sock > 0 ) break;
+    if( errno != EINTR ){
       fatalp(\"accept\", \"Error in accept\");
     }
   }
@@ -682,9 +658,6 @@
 #endif
   MakeInBuf(%2, sock, 4096);
   MakeOutBuf(%3, sock, 4096);
-#else
-  goto %f;
-#endif
 }":[FD+int,Async1+any,InB-object(pointer),OutB-object(pointer)] |
     R=normal(In),
     async_io(In,Async1,InB,OutB,0),
@@ -694,16 +667,16 @@
 
 bound_sock([accept2(R)|S],FD,Async,Async1) :- inline:"
 {
-#ifndef NO_USESOCKET
   int sock;
   struct sockaddr addr;
   int socklen = sizeof(addr);
 #ifdef ASYNCIO
-  if (!poll_read_available(intval(%0))) goto %f;
+  if( !poll_read_available(intval(%0)) ) goto %f;
 #endif
-  while (1) {
-    if ((sock = accept(intval(%0), &addr, &socklen)) > 0) break;
-    if (errno != EINTR) {
+  for(;;){
+    sock = accept(intval(%0), &addr, &socklen);
+    if( sock > 0 ) break;
+    if( errno != EINTR ){
       fatalp(\"accept\", \"Error in accept\");
     }
   }
@@ -712,9 +685,6 @@
   register_asynchronous_io_stream(sock,%1);
 #endif
   MakeBIOBuf(%2, sock, sock, 4096);
-#else
-  goto %f;
-#endif
 }":[FD+int,Async1+any,IOB-object(pointer)] |
     R=normal(SIn,SOut),
     async_input(SIn,Async1,IOB,0),
@@ -726,9 +696,9 @@
 pipe(R) :- inline:"
 {
   int fd[2];
-  if (pipe(fd)!=0) goto %f;
-  Fdopen(fd[0],%0,%f,\"r\");
-  Fdopen(fd[1],%1,%f,\"w\");
+  if( pipe(fd) != 0 ) goto %f;
+  Fdopen(fd[0], %0, %f, \"r\");
+  Fdopen(fd[1], %1, %f, \"w\");
 }":[Fin-object,Fout-object] |
     generic:new(file_io,Sin,Fin,"pipe-input",[],""),
     generic:new(file_io,Sout,[],"",Fout,"pipe-output"),
@@ -743,13 +713,13 @@
 #ifdef ASYNCIO
   struct iobuf* outb = IOBuf(%0);
   struct iobuf* inb = IOBuf(%1);
-  if (outb->ptr != outb->buf) {
-    switch (write_buf(outb)) {
+  if( outb->ptr != outb->buf ){
+    switch( write_buf(outb) ){
     case -1: goto %f;
     case 1: break;
     }
   }
-  if (close(outb->fd) != 0) {
+  if( close(outb->fd) != 0 ){
     fatalp(\"close\", \"Error in closing asynchronous I/O\");
   }
   close_asynchronous_io_stream(outb->fd);
@@ -763,8 +733,8 @@
 {
 #ifdef ASYNCIO
   struct iobuf* iob = IOBuf(%0);
-  if (iob->ptr == iob->lim) {
-    switch (write_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case 1: break;
     }
@@ -781,18 +751,18 @@
 #ifdef ASYNCIO
   struct iobuf* iob = IOBuf(%0);
   int c;
-  if (iob->ptr == iob->lim) {
-    switch (fill_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: c = -1; break;
     case 1: c = *iob->ptr; iob->ptr++; break;
     }
-  } else {
+  }else{
     c = *iob->ptr;
     iob->ptr++;
   }
-  %3 = makeint(intval(%2) + ( c=='\\n' ? 1 : 0 ));
+  %3 = makeint(intval(%2) + (c=='\\n' ? 1 : 0));
   %1 = makeint(c);
 #else
   goto %f;
@@ -808,26 +778,26 @@
   int k, nnl;
   int ready_bytes = iob->lim - iob->ptr;
   q str;
-  if (ready_bytes==0) {
-    switch (fill_buf(iob)) {
+  if( ready_bytes==0 ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: goto %f;
     case 1: break;
     }
   }
-  if (toread > iob->lim - iob->ptr) toread = iob->lim - iob->ptr;
-  if ((char*) allocp +
+  if( toread > iob->lim - iob->ptr ) toread = iob->lim - iob->ptr;
+  if( (char*) allocp +
       sizeof(struct byte_string_object) + toread + sizeof(long) >=
-      (char*) real_heaplimit) {
+      (char*) real_heaplimit ){
     allocp = real_heaplimit;
     goto async__io_5_ext_interrupt;
   }
-  for (k=0, nnl=0; k<toread; k++) {
-    if (iob->ptr[k] == '\\n') nnl++;
+  for( k=0, nnl=0; k<toread; k++ ){
+    if( iob->ptr[k] == '\\n' ) nnl++;
   }
   str = BC2KLIC(iob->ptr, toread, allocp);
-  if (isref(str)) {
+  if( isref(str) ){
     fatal(\"internal error: string allocation failure for fread\");
   }
   %2 = str;
@@ -847,14 +817,14 @@
 {
 #ifdef ASYNCIO
   struct iobuf* iob = IOBuf(%0);
-  if (iob->ptr == iob->lim) {
-    switch (fill_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: %1 = makeint(1); break;
     case 1: %1 = makeint(0); break;
     }
-  } else {
+  }else{
     %1 = makeint(0);
   }
 #else
@@ -863,24 +833,21 @@
 }":[InB+object(pointer),R0-int] |
     R=R0,
     async_io(S,Async,InB,OutB,LC).
-async_io([putc(C)|S],Async,InB,OutB,LC) :- inline:"
-#ifndef ASYNCIO
-#endif
-":[] |
+async_io([putc(C)|S],Async,InB,OutB,LC) :- true |
     async_io([C|S],Async,InB,OutB,LC).
 async_io([fwrite(X,R)|S],Async,InB,OutB,LC) :- string(X,L,8), inline:"
 {
 #ifdef ASYNCIO
   struct iobuf* iob = IOBuf(%0);
   char* str = KLIC2C(%1);
-  int len =intval(%2);
+  int len = intval(%2);
   int room = iob->lim - iob->ptr;
-  while (iob->ptr + len >= iob->lim) {
+  while( iob->ptr + len >= iob->lim ){
     BCOPY(str, iob->ptr, room);
     len -= room;
     str += room;
     iob->ptr += room;
-    switch (write_buf(iob)) {
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case 1: break;
     }
@@ -899,8 +866,8 @@
 {
 #ifdef ASYNCIO
   struct iobuf* iob = IOBuf(%0);
-  if (iob->ptr != iob->buf) {
-    switch (write_buf(iob)) {
+  if( iob->ptr != iob->buf ){
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case 1: break;
     }
@@ -915,7 +882,7 @@
 #ifdef ASYNCIO
 {
   struct iobuf* iob = IOBuf(%0);
-  switch (write_buf(iob)) {
+  switch( write_buf(iob) ){
   case -1: goto %f;
   case 1: break;
   }
@@ -934,13 +901,13 @@
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* inb = &(biob->ibuf);
   struct iobuf* outb = &(biob->obuf);
-  if (inb->fd != outb->fd) {
-    if (close(inb->fd) != 0) {
+  if( inb->fd != outb->fd ){
+    if( close(inb->fd) != 0 ){
       fatalp(\"close\", \"Error in closing asynchronous input\");
     }
     close_asynchronous_io_stream(inb->fd);
   }
-  if (outb->fd == -1) {
+  if( outb->fd == -1 ){
     free(inb->buf);
     free(outb->buf);
   }
@@ -955,18 +922,18 @@
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* iob = &(biob->ibuf);
   int c;
-  if (iob->ptr == iob->lim) {
-    switch (fill_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: c = -1; break;
     case 1: c = *iob->ptr; iob->ptr++; break;
     }
-  } else {
+  }else{
     c = *iob->ptr;
     iob->ptr++;
   }
-  %3 = makeint(intval(%2) + ( c=='\\n' ? 1 : 0 ));
+  %3 = makeint(intval(%2) + (c=='\\n' ? 1 : 0));
   %1 = makeint(c);
 #else
   goto %f;
@@ -983,26 +950,26 @@
   int k, nnl;
   int ready_bytes = iob->lim - iob->ptr;
   q str;
-  if (ready_bytes==0) {
-    switch (fill_buf(iob)) {
+  if( ready_bytes==0 ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: goto %f;
     case 1: break;
     }
   }
-  if (toread > iob->lim - iob->ptr) toread = iob->lim - iob->ptr;
-  if ((char*) allocp +
+  if( toread > iob->lim - iob->ptr ) toread = iob->lim - iob->ptr;
+  if( (char*) allocp +
       sizeof(struct byte_string_object) + toread + sizeof(long) >=
-      (char*) real_heaplimit) {
+      (char*) real_heaplimit ){
     allocp = real_heaplimit;
     goto async__input_4_ext_interrupt;
   }
-  for (k=0, nnl=0; k<toread; k++) {
-    if (iob->ptr[k] == '\\n') nnl++;
+  for( k=0, nnl=0; k<toread; k++ ){
+    if( iob->ptr[k] == '\\n' ) nnl++;
   }
   str = BC2KLIC(iob->ptr, toread, allocp);
-  if (isref(str)) {
+  if( isref(str) ){
     fatal(\"internal error: string allocation failure for fread\");
   }
   %2 = str;
@@ -1023,14 +990,14 @@
 #ifdef ASYNCIO
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* iob = &(biob->ibuf);
-  if (iob->ptr == iob->lim) {
-    switch (fill_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( fill_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 0: %1 = makeint(1); break;
     case 1: %1 = makeint(0); break;
     }
-  } else {
+  }else{
     %1 = makeint(0);
   }
 #else
@@ -1049,20 +1016,20 @@
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* inb = &(biob->ibuf);
   struct iobuf* outb = &(biob->obuf);
-  if (outb->ptr != outb->buf) {
-    switch (write_buf(outb)) {
+  if( outb->ptr != outb->buf ){
+    switch( write_buf(outb) ){
     case -1: goto %f;
     case -2: break;
     case 1: break;
     }
   }
-  if (inb->fd != outb->fd) {
-    if (close(outb->fd) != 0) {
+  if( inb->fd != outb->fd ){
+    if( close(outb->fd) != 0 ){
       fatalp(\"close\", \"Error in closing asynchronous output\");
     }
     close_asynchronous_io_stream(outb->fd);
   }
-  if (inb->fd == -1) {
+  if( inb->fd == -1 ){
     free(inb->buf);
     free(outb->buf);
   }
@@ -1076,8 +1043,8 @@
 #ifdef ASYNCIO
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* iob = &(biob->obuf);
-  if (iob->ptr == iob->lim) {
-    switch (write_buf(iob)) {
+  if( iob->ptr == iob->lim ){
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 1: break;
@@ -1093,10 +1060,7 @@
 async_output([linecount(N)|S],Async,IOB,LC) :-
     N=LC,
     async_output(S,Async,IOB,LC).
-async_output([putc(C)|S],Async,IOB,LC) :- inline:"
-#ifndef ASYNCIO
-#endif
-":[] |
+async_output([putc(C)|S],Async,IOB,LC) :- true |
     async_output([C|S],Async,IOB,LC).
 async_output([fwrite(X,R)|S],Async,IOB,LC) :- string(X,L,8), inline:"
 {
@@ -1106,12 +1070,12 @@
   char* str = KLIC2C(%1);
   int len = intval(%2);
   int room = iob->lim - iob->ptr;
-  while (iob->ptr + len >= iob->lim) {
+  while( iob->ptr + len >= iob->lim ){
     BCOPY(str, iob->ptr, room);
     len -= room;
     str += room;
     iob->ptr += room;
-    switch (write_buf(iob)) {
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 1: break;
@@ -1136,8 +1100,8 @@
 #ifdef ASYNCIO
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* iob = &(biob->obuf);
-  if (iob->ptr != iob->buf) {
-    switch (write_buf(iob)) {
+  if( iob->ptr != iob->buf ){
+    switch( write_buf(iob) ){
     case -1: goto %f;
     case -2: goto %f;
     case 1: break;
@@ -1158,7 +1122,7 @@
 {
   struct biobuf* biob = BIOBuf(%0);
   struct iobuf* outb = &(biob->obuf);
-  switch (write_buf(outb)) {
+  switch( write_buf(outb) ){
   case -1: goto %f;
   case -2: goto %f;
   case 1: break;
@@ -1205,9 +1169,9 @@
 {
   char* template = KLIC2C(%0);
   char* real_template = (char*) malloc_check(strlen(template) + 7);
-  (void) strcpy(real_template, template);
-  (void) strcat(real_template, \"XXXXXX\");
-  if(mkstemp(real_template) < 0) real_template[0] = '\0';
+  strcpy(real_template, template);
+  strcat(real_template, \"XXXXXX\");
+  if( mkstemp(real_template) < 0 ) real_template[0] = '\0';
   %1 = C2KLIC(real_template, allocp);
   allocp = heapp;
   free(template);
@@ -1232,24 +1196,23 @@
 umask(Old) :- inline:"
 {
   %0 = makeint(umask(0));
-  (void) umask(intval(%0));
+  umask(intval(%0));
 }":[Old0-int] | Old=Old0.
 
 umask(Old,New) :- inline:"
 {
   %0 = makeint(umask(0));
-  (void) umask(intval(%1));
+  umask(intval(%1));
 }":[Old0-int,New+int] | Old = Old0.
 
 getenv(Name,Value) :- inline:"
 {
-  extern char* getenv();
   char* str = KLIC2C(%0);
   char* value = getenv(str);
   free(str);
-  if (value==0) {
+  if( value==NULL ){
     %1 = makeint(0);
-  } else {
+  }else{
     %1 = C2KLIC(value, allocp);
     allocp = heapp;
   }
@@ -1272,17 +1235,17 @@
 {
   int fd1[2], fd2[2];
   long pid;
-  if (pipe(fd1) != 0) goto %f;
+  if( pipe(fd1) != 0 ) goto %f;
   Fdopen(fd1[0], %1, %f, \"r\");
   Fdopen(fd1[1], %2, %f, \"w\");
-  if (pipe(fd2) != 0) goto %f;
+  if( pipe(fd2) != 0 ) goto %f;
   Fdopen(fd2[0], %3, %f, \"r\");
   Fdopen(fd2[1], %4, %f, \"w\");
   pid = fork();
-  if (pid==0) {
+  if( pid==0 ){
     fclose(FilePointer(%1));
     fclose(FilePointer(%4));
-  } else {
+  }else{
     fclose(FilePointer(%2));
     fclose(FilePointer(%3));
   }
@@ -1327,16 +1290,12 @@
 
 times(U,S,CU,CS) :- inline:"
 {
-  /* Let's assume 60Hz clock if HZ is left undefined */
-#ifndef HZ
-#define HZ 60
-#endif
   struct tms buf;
-  (void) times(&buf);
-  %0 = makeint((int)(buf.tms_utime * 1000.0/HZ));
-  %1 = makeint((int)(buf.tms_stime * 1000.0/HZ));
-  %2 = makeint((int)(buf.tms_cutime * 1000.0/HZ));
-  %3 = makeint((int)(buf.tms_cstime * 1000.0/HZ));
+  times(&buf);
+  %0 = makeint((int) (buf.tms_utime * 1000.0/HZ));
+  %1 = makeint((int) (buf.tms_stime * 1000.0/HZ));
+  %2 = makeint((int) (buf.tms_cutime * 1000.0/HZ));
+  %3 = makeint((int) (buf.tms_cstime * 1000.0/HZ));
 }":[U0-int,S0-int,CU0-int,CS0-int] |
     U=U0, S=S0, CU=CU0, CS=CS0.
 
diff -ruN klic-3.003-2002-01-07a/runtime/import_table.c klic-3.003-2002-01-07b/runtime/import_table.c
--- klic-3.003-2002-01-07a/runtime/import_table.c	Mon Jan  7 14:42:04 2002
+++ klic-3.003-2002-01-07b/runtime/import_table.c	Mon Jan  7 15:40:54 2002
@@ -4,6 +4,7 @@
 %   (C)1996, 1997, 1998, 1999 Japan Information Processing Development Center
 %       (Read COPYRIGHT-JIPDEC for detailed information.)
 ----------------------------------------------------------- */
+
 #include <klic/basic.h>  /* fatal */
 #include <klic/struct.h>
 #include <klic/primitives.h>
@@ -21,11 +22,8 @@
 #define END_IMP_TABLE		(-1)
 #define UNUSED_IMPREC  0xf0f0f0ff  /* This value is curious!! */
 
-extern int exref_g_generator_method_table;
-extern int read_hook_g_data_method_table;
-
 struct exref_object{
-  struct generator_object_method_table *method_table;
+  struct generator_object_method_table* method_table;
   long pe_num;
   long index;
   long wec;
@@ -44,42 +42,44 @@
 static long active_imp_rec;
 static long free_imp_rec;
 
-static void initiate_allocated_imp_table()
+static void
+initiate_allocated_imp_table()
 {
   int i;
 
-  for(i = current_imp_size ; i < (current_imp_size+IMP_TABLE_INC_SIZE); i++){
+  for( i = current_imp_size; i < current_imp_size+IMP_TABLE_INC_SIZE; i++ ){
     imp_table[i].next = i+1;
-    imp_table[i].object = (q)UNUSED_IMPREC;
+    imp_table[i].object = (q) UNUSED_IMPREC;
     free_imp_rec++;
   }
   imp_table[current_imp_size+IMP_TABLE_INC_SIZE-1].next = END_IMP_FREELIST;
 
-  if(current_imp_size == 0){
+  if( current_imp_size == 0 ){
     top_of_imp_freelist.next = 1;
     imp_table[0].next = END_IMP_TABLE;
     free_imp_rec--;
-  } else {
+  }else{
     top_of_imp_freelist.next = current_imp_size;
   }
   current_imp_size += IMP_TABLE_INC_SIZE;
 }
 
-void regist_imp_entry(obj)
-     q obj;
+extern void
+regist_imp_entry(obj)
+  q obj;
 {
   long import;
 
-  if(top_of_imp_freelist.next == END_IMP_FREELIST){
-    char *imp_alloc;
+  if( top_of_imp_freelist.next == END_IMP_FREELIST ){
+    char* imp_alloc;
 
-    imp_alloc = (char *) realloc((char *)imp_table,
+    imp_alloc = (char*) realloc((char*) imp_table,
        (current_imp_size+IMP_TABLE_INC_SIZE)*sizeof(struct imp_entry));
 
-    if(imp_alloc == NULL){
+    if( imp_alloc == NULL ){
       fatal("realloc failed in regist_imp_entry");
     }
-    imp_table = (struct imp_entry*)imp_alloc;
+    imp_table = (struct imp_entry*) imp_alloc;
     initiate_allocated_imp_table();
   }
 
@@ -96,17 +96,18 @@
   free_imp_rec--;
 }
 
-static void send_release_after_gc(next_import)
-     long next_import;
+static void
+send_release_after_gc(next_import)
+  long next_import;
 {
   declare_globals;
-  struct exref_object *exref;
-  
-  exref = (struct exref_object *)(imp_table[next_import].object);
-
-  if(exref->pe_num>total_node){
-    ioeprintf("next_import is %d\n",next_import);
-    ioeprintf("PE %d invalid pe_num in send_release_after_gc\n",my_node);
+  struct exref_object* exref;
+
+  exref = (struct exref_object*) imp_table[next_import].object;
+
+  if( exref->pe_num>total_node ){
+    ioeprintf("next_import is %d\n", next_import);
+    ioeprintf("PE %d invalid pe_num in send_release_after_gc\n", my_node);
     ERROR_STOP;
 
     fatal("invalid pe_num in send_release_after_gc");
@@ -116,61 +117,47 @@
 }
 
 
-static void check_imp_before_scan()
+static void
+check_imp_when_scan(char* when)
 {
   declare_globals;
-  struct exref_object *ex_ref;
+  struct exref_object* ex_ref;
   int next_impo = imp_table[0].next;
 
-  while(next_impo != END_IMP_TABLE){
-    ex_ref = (struct exref_object *)imp_table[next_impo].object;
-    if(intval(ex_ref->pe_num)>total_node){
-      ioeprintf("next_impo is %d\n",next_impo);
-      fatal("invalid pe_num in checi_imp_before_scan");
+  while( next_impo != END_IMP_TABLE ){
+    ex_ref = (struct exref_object*) imp_table[next_impo].object;
+    if( intval(ex_ref->pe_num) > total_node ){
+      ioeprintf("next_impo is %d\n", next_impo);
+      fatalf("invalid pe_num in chech_imp %s scan", when);
     }
     next_impo = imp_table[next_impo].next;
   }
 }
 
-static void check_imp_after_scan()
-{
-  declare_globals;
-  struct exref_object *ex_ref;
-  int next_impor = imp_table[0].next;
-
-  while(next_impor != END_IMP_TABLE){
-    ex_ref = (struct exref_object *)imp_table[next_impor].object;
-    if(intval(ex_ref->pe_num)>total_node){
-      ioeprintf("next_impor is %d\n",next_impor);
-      fatal("invalid pe_num in check_imp_after_scan");
-    }
-
-    next_impor = imp_table[next_impor].next;
-  }
-}
-
-q* scan_imp_table(allocp)
-     q* allocp;
+extern q*
+scan_imp_table(allocp)
+  q* allocp;
 {
   declare_globals;
   long next_imp, next_imp_d, prev_imp;
 
-  struct exref_object *ex_obj;
+  struct exref_object* ex_obj;
 
-  /*check_imp_before_scan();*/
+  /* check_imp_when_scan("before"); */
 
   prev_imp = 0;
   next_imp = imp_table[prev_imp].next;
 
-  while(next_imp != END_IMP_TABLE){
-    ex_obj = (struct exref_object *)imp_table[next_imp].object;
-    
-    switch(ex_obj->gc_flag){
+  while( next_imp != END_IMP_TABLE ){
+    ex_obj = (struct exref_object*) imp_table[next_imp].object;
+
+    switch( ex_obj->gc_flag ){
+
     case IMPREC_COPIED:
-      imp_table[next_imp].object = (q)derefone(ex_obj);
+      imp_table[next_imp].object = (q) derefone(ex_obj);
 
-      ex_obj = (struct exref_object *)((long)imp_table[next_imp].object & ~0x3L);
-      imp_table[next_imp].object = (q)ex_obj;
+      ex_obj = (struct exref_object*) ((long)imp_table[next_imp].object & ~0x3L);
+      imp_table[next_imp].object = (q) ex_obj;
       ex_obj->gc_flag = IMPREC_NOT_COPIED;
 
       prev_imp = next_imp;
@@ -178,7 +165,6 @@
       break;
 
     case IMPREC_NOT_COPIED:
-
       imp_table[prev_imp].next = imp_table[next_imp].next;
       next_imp_d = imp_table[next_imp].next;
 
@@ -205,6 +191,7 @@
       active_imp_rec--;
       free_imp_rec++;
       break;
+
     default:
       ioeprintf("invalid gc_flag in imprec\n");
       ERROR_STOP;
@@ -212,27 +199,27 @@
     }
   }
 
-  /*check_imp_after_scan();*/
+  /* check_imp_when_scan("after"); */
 
-  return(allocp);
+  return allocp;
 }
 
-void initiate_imp_table()
+extern void
+initiate_imp_table()
 {
-  char *imp_alloc;
+  char* imp_alloc;
 
   active_imp_rec = 0;
   free_imp_rec = 0;
 
   current_imp_size = 0;
 
-  imp_alloc = (char *) malloc(IMP_TABLE_INC_SIZE*sizeof(struct imp_entry));
-  if(imp_alloc == NULL){
-    fatal("malloc failed in initiate_imp_table");    
+  imp_alloc = (char*) malloc(IMP_TABLE_INC_SIZE*sizeof(struct imp_entry));
+  if( imp_alloc == NULL ){
+    fatal("malloc failed in initiate_imp_table");
   }
 
-  imp_table = (struct imp_entry *)imp_alloc;
+  imp_table = (struct imp_entry*) imp_alloc;
 
   initiate_allocated_imp_table();
-
 }
diff -ruN klic-3.003-2002-01-07a/runtime/init_dist.c klic-3.003-2002-01-07b/runtime/init_dist.c
--- klic-3.003-2002-01-07a/runtime/init_dist.c	Fri Dec 28 13:46:47 2001
+++ klic-3.003-2002-01-07b/runtime/init_dist.c	Mon Jan  7 15:20:02 2002
@@ -4,6 +4,7 @@
 %   (C)1996, 1997, 1998, 1999 Japan Information Processing Development Center
 %       (Read COPYRIGHT-JIPDEC for detailed information.)
 ----------------------------------------------------------- */
+
 #include <klic/basic.h>
 #include <klic/struct.h>
 #include <klic/primitives.h>
@@ -21,37 +22,31 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-combuf *alloc_combuf();
-void init_comm();
-void init_rmonitor();
-
-timerstruct before_exec, after_exec;
-
-void init_rusage()
-{
-  measure(before_exec);
-}
+extern void init_comm();
+extern void init_rmonitor();
 
 
-static void initiate_global_data()
+static void
+initiate_global_data()
 {
-/* Hack to avoid sending %unify when a ReadHook receives answer_value. */
+  /* Hack to avoid sending %unify when a ReadHook receives answer_value. */
   receive_answer_flag = 0;
   answer_return_exp_index = -1;
-/* Hack to avoid sending %unify when a ReadHook receives answer_value. */
+  /* Hack to avoid sending %unify when a ReadHook receives answer_value. */
 
   active_exp_entry = 0;
 
   /* for suspending message */
-  susp_msg_list = (struct susp_msg_rec *)0;
+  susp_msg_list = NULL;
 
   /* Measurement Initialization */
-  BZERO((char *)&netstat, sizeof(netstat));
+  BZERO((char*) &netstat, sizeof(netstat));
 
   /* For runtime monitor */
 }
 
-void init_dist()
+extern void
+init_dist()
 {
   initiate_exp_table();
   initiate_global_data();
