Return-Path: localhost!smtp_client
Return-Path: <smtp_client@localhost>
X-POP3-Rcpt: a.kupries@genesis
Received: from ergolab4.psych.kun.nl (ergolab4.psych.kun.nl [131.174.200.119]) by genesis.westend.com (8.7.5/8.7.3) with SMTP id OAA07273 for <a.kupries@westend.COM>; Thu, 5 Dec 1996 14:07:41 +0100 (MET)
From: nijtmans@ergolab4.psych.kun.nl
Received: (from nijtmans@localhost) by ergolab4.psych.kun.nl (8.6.12/8.6.12) id OAA17275; Thu, 5 Dec 1996 14:02:47 +0100
Date: Thu, 5 Dec 1996 14:02:47 +0100
Message-Id: <199612051302.OAA17275@ergolab4.psych.kun.nl>
To: a.kupries@westend.COM
Subject: memchan and trf, again
Cc: nijtmans@ergolab4.psych.kun.nl
X-Sun-Charset: US-ASCII

And here are my patches for trf1.0a2

- Addition of LIB_RUNTIME_DIR (needed for Solaris, otherwise
  the custom tclsh cannot find libtrf1.0.so at run-time.)
- Changed pkgIndex.tcl such that the library is only loaded
  when one of the commands are used for the first time
  (like memchan).
- Add a Tcl_StaticPackage() call in tclAppInit.c
- blowfish/bf_tab.h needs to be devided into 4 blocks with
  {}'s around it, otherwise a warning is given.

Further on, it looks great.

Regards,
	Jan Nijtmans
	NICI (Nijmegen Institute of Cognition and Information)
	email: nijtmans@nici.kun.nl
	url:   http://www.cogsci.kun.nl/~nijtmans/

============= patch for trf1.0a2 =====================
*** Makefile.in.orig	Thu Dec  5 12:41:28 1996
--- Makefile.in	Thu Dec  5 12:42:44 1996
***************
*** 46,53 ****
  INSTALL_ROOT =
  
  
  # Directory in which to install the archive libtrf.a:
! LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib
  
  
  # Directory in which to install the extended shell tclsh:
--- 46,57 ----
  INSTALL_ROOT =
  
  
+ # Directory where libtrf.a is at run-time:
+ LIB_RUNTIME_DIR =	$(exec_prefix)/lib
+ 
+ 
  # Directory in which to install the archive libtrf.a:
! LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
  
  
  # Directory in which to install the extended shell tclsh:
*** pkgIndex.tcl.in.orig	Thu Dec  5 13:57:23 1996
--- pkgIndex.tcl.in	Thu Dec  5 13:58:26 1996
***************
*** 2,5 ****
  #
  # @configure_input@
  #
! package ifneeded Trf @TRF_VERSION@ "load @TRF_LIB_DIR@/@TRF_LIB_FILE@"
--- 2,8 ----
  #
  # @configure_input@
  #
! package ifneeded Trf @TRF_VERSION@ [list tclPkgSetup $dir Trf @TRF_VERSION@ {
! {@TRF_LIB_FILE@ load {adler ascii85 base64 bin blowfish crc crc-zlib des
! haval hex idea md5 oct rc4 rs_ecc sha uuencode zip}}
! }]
*** app/tclAppInit.c.orig	Thu Dec  5 12:38:57 1996
--- app/tclAppInit.c	Thu Dec  5 12:40:48 1996
***************
*** 95,100 ****
--- 95,101 ----
        {
  	return TCL_ERROR;
        }
+     Tcl_StaticPackage(interp, "Trf", Trf_Init, Trf_SafeInit);
  
      /*
       * Call Tcl_CreateCommand for application-specific commands, if
*** blowfish/bf_tab.h.orig	Thu Dec  5 12:21:06 1996
--- blowfish/bf_tab.h	Thu Dec  5 12:24:19 1996
***************
*** 19,25 ****
  
  
  static UWORD_32bits bf_S [4][256] = {
!   0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 
    0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 
    0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 
    0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 
--- 19,25 ----
  
  
  static UWORD_32bits bf_S [4][256] = {
! { 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,\
    0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 
    0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 
    0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 
***************
*** 82,89 ****
    0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 
    0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 
    0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 
!   0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 
!   0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 
    0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 
    0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 
    0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 
--- 82,89 ----
    0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 
    0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 
    0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 
!   0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a},
! { 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,\
    0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 
    0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 
    0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 
***************
*** 146,153 ****
    0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 
    0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 
    0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 
!   0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7, 
!   0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 
    0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 
    0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 
    0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 
--- 146,153 ----
    0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 
    0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 
    0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 
!   0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7},\
! { 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\
    0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 
    0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 
    0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 
***************
*** 210,217 ****
    0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 
    0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 
    0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 
!   0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0, 
!   0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 
    0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, 
    0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 
    0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 
--- 210,217 ----
    0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 
    0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 
    0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 
!   0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0},\
! { 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,\
    0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, 
    0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 
    0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 
***************
*** 274,280 ****
    0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 
    0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 
    0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 
!   0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6, 
  };
  
  #endif /* BLOWFISH_TABLES_H */
--- 274,280 ----
    0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 
    0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 
    0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 
!   0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6}
  };
  
  #endif /* BLOWFISH_TABLES_H */

