PATCHES for STk-2.1.4

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Mon, 14 Nov 1994 16:02:49 +0000

OOPS, I have introduced a serious bug in 2.1.4 with numbers. Harvey J. Stein
has proposed a fix for it. However, I'm not sure it is correct for all kind of
architecture. If you have already make the patch be sure to take the original
version. The following patch also correct some other little problem which have
been signaled and which are easily correctable).
To apply this patch, go in the STk-2.1.4 directory and type

                patch -p0 < patch-file

Thanks to all of you who have sent me corrections or advices.
I hope to be able to be able to make the new release very soon.


                -- Erick

                

*** Src/number.c~ Mon Nov 14 14:24:20 1994
--- Src/number.c Fri Nov 11 10:34:40 1994
***************
*** 34,40 ****
   *
   * Author: Erick Gallesio [eg_at_kaolin.unice.fr]
   * Creation date: 12-May-1993 10:34
! * Last file update: 28-Oct-1994 15:25
   */
  
  #include "stk.h"
--- 34,40 ----
   *
   * Author: Erick Gallesio [eg_at_kaolin.unice.fr]
   * Creation date: 12-May-1993 10:34
! * Last file update: 11-Nov-1994 10:34
   */
  
  #include "stk.h"
***************
*** 280,285 ****
--- 280,286 ----
                         
                         NEWCELL(z, tc_bignum);
                         BIGNUM(z) = must_malloc(sizeof(MP_INT));
+ mpz_init(BIGNUM(z));
                         mpz_set(BIGNUM(z), BIGNUM(number));
                         return z;
                       }
*** Src/tk-glue.c~ Mon Nov 14 14:24:45 1994
--- Src/tk-glue.c Fri Nov 11 11:27:09 1994
***************
*** 19,25 ****
   *
   * Author: Erick Gallesio [eg_at_unice.fr]
   * Creation date: 19-Feb-1993 22:15
! * Last file update: 13-Oct-1994 22:52
   *
   *
   */
--- 19,25 ----
   *
   * Author: Erick Gallesio [eg_at_unice.fr]
   * Creation date: 19-Feb-1993 22:15
! * Last file update: 11-Nov-1994 11:27
   *
   *
   */
***************
*** 151,158 ****
    int tkres;
    char **argv = buffer;
    int argc = llength(args);
! SCM start, conv_res, *v = args;
    struct Tk_command *W = cmd->storage_as.tk.data;
    
    if (argc >= MAXARG) {
      /* allocate dynamically the argv array (one extra for argv[0] and one
--- 151,159 ----
    int tkres;
    char **argv = buffer;
    int argc = llength(args);
! SCM conv_res, *v, start = args;
    struct Tk_command *W = cmd->storage_as.tk.data;
+
    
    if (argc >= MAXARG) {
      /* allocate dynamically the argv array (one extra for argv[0] and one
*** STklos/stklos.c~ Mon Nov 14 14:25:05 1994
--- STklos/stklos.c Mon Nov 14 12:16:48 1994
***************
*** 19,25 ****
   *
   * Author: Erick Gallesio [eg_at_unice.fr]
   * Creation date: 9-Feb-1994 15:56
! * Last file update: 14-Sep-1994 18:44
   */
  
  #include <stk.h>
--- 19,25 ----
   *
   * Author: Erick Gallesio [eg_at_unice.fr]
   * Creation date: 9-Feb-1994 15:56
! * Last file update: 14-Nov-1994 12:16
   */
  
  #include <stk.h>
***************
*** 381,386 ****
--- 381,387 ----
      case tc_boolean: return Boolean;
      case tc_char: return Char;
      case tc_cons: return Pair;
+ case tc_nil: return Null;
      case tc_string: return String;
      case tc_symbol: return Symbol;
      case tc_vector: return Vector;
*** Extensions/process.c~ Mon Nov 14 14:25:22 1994
--- Extensions/process.c Mon Nov 14 13:47:20 1994
***************
*** 41,46 ****
--- 41,47 ----
  };
  
  #define PROCESS(x) ((struct process_info *)((x)->
storage_as.extension.data))
+ #define LPROCESS(x) ((x)->storage_as.extension.data)
  #define PROCESSP(x) (TYPEP ((x), tc_process))
  #define NPROCESSP(x) (NTYPEP ((x), tc_process))
  #define PROCPID(x) (PROCESS(x)->pid)
***************
*** 93,99 ****
    if (i < 0) err("Too many processes", NIL);
  
    NEWCELL(z, tc_process);
! PROCESS(z) = (struct process_info *) must_malloc(sizeof(struct
process_info));
    PROCESS(z)->stream[0] = PROCESS(z)->stream[1] = PROCESS(z)->stream[2] =
ntruth;
  
    /* Enter this process in the process table */
--- 94,100 ----
    if (i < 0) err("Too many processes", NIL);
  
    NEWCELL(z, tc_process);
! LPROCESS(z) = (struct process_info *) must_malloc(sizeof(struct
process_info));
    PROCESS(z)->stream[0] = PROCESS(z)->stream[1] = PROCESS(z)->stream[2] =
ntruth;
  
    /* Enter this process in the process table */
*** Extensions/socket.c~ Mon Nov 14 14:26:03 1994
--- Extensions/socket.c Mon Nov 14 13:46:00 1994
***************
*** 85,92 ****
  };
  
  
! #define SOCKHANDLE(x) ((struct socket_handle*)(x->storage_as.extension.data))
! #define SOCKHANDLEP(x) (TYPEP(x,tc_sockhandle))
  #define NSOCKHANDLEP(x) (NTYPEP(x,tc_sockhandle))
  
  void mark_sockhandle(SCM handle)
--- 85,93 ----
  };
  
  
! #define SOCKHANDLE(x) ((struct socket_handle*)(x->
storage_as.extension.data))
! #define LSOCKHANDLE(x) (x->storage_as.extension.data)
! #define SOCKHANDLEP(x) (TYPEP(x,tc_sockhandle))
  #define NSOCKHANDLEP(x) (NTYPEP(x,tc_sockhandle))
  
  void mark_sockhandle(SCM handle)
***************
*** 100,106 ****
          if(sh->hostname) free(sh->hostname);
          close(sh->handle);
          free(sh);
! SOCKHANDLE(handle) = NULL;
  }
  
  void displ_sockhandle(SCM handle, FILE *f, int mode)
--- 101,107 ----
          if(sh->hostname) free(sh->hostname);
          close(sh->handle);
          free(sh);
! LSOCKHANDLE(handle) = NULL;
  }
  
  void displ_sockhandle(SCM handle, FILE *f, int mode)
***************
*** 166,172 ****
                  }
          /* now we're ready to create the object */
          NEWCELL(ys, tc_sockhandle);
! SOCKHANDLE(ys) = (struct socket_handle*)must_malloc(sizeof (struct
socket_handle));
          SOCKHANDLE(ys)->portnum = sin.sin_port;
          SOCKHANDLE(ys)->hostname = (char*)must_malloc(strlen("localhost")+1);
          strcpy(SOCKHANDLE(ys)->hostname, "localhost");
--- 167,173 ----
                  }
          /* now we're ready to create the object */
          NEWCELL(ys, tc_sockhandle);
! LSOCKHANDLE(ys) = (struct socket_handle*)must_malloc(sizeof (struct
socket_handle));
          SOCKHANDLE(ys)->portnum = sin.sin_port;
          SOCKHANDLE(ys)->hostname = (char*)must_malloc(strlen("localhost")+1);
          strcpy(SOCKHANDLE(ys)->hostname, "localhost");
Received on Mon Nov 14 1994 - 16:02:50 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST