diff options
author | kennykb <kennykb@noemail.net> | 2005-05-10 18:33:37 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2005-05-10 18:33:37 (GMT) |
commit | 12f35b8171c95899a2a2a30542cec622fc022868 (patch) | |
tree | 2f108341f2c542f48532e6057d79bfa551a4245f /tools | |
parent | b4e4f618035fce9c41fdbdb94a781e6e33d02427 (diff) | |
download | tcl-12f35b8171c95899a2a2a30542cec622fc022868.zip tcl-12f35b8171c95899a2a2a30542cec622fc022868.tar.gz tcl-12f35b8171c95899a2a2a30542cec622fc022868.tar.bz2 |
Merged kennykb-numerics-branch back to the head; TIPs 132 and 232
FossilOrigin-Name: 1cc2336920c70c6b9f7825b88dec87fc223f2c4e
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/fix_tommath_h.tcl | 54 | ||||
-rw-r--r-- | tools/man2html2.tcl | 2 | ||||
-rwxr-xr-x | tools/tclZIC.tcl | 2 |
3 files changed, 56 insertions, 2 deletions
diff --git a/tools/fix_tommath_h.tcl b/tools/fix_tommath_h.tcl new file mode 100755 index 0000000..92b1f77 --- /dev/null +++ b/tools/fix_tommath_h.tcl @@ -0,0 +1,54 @@ +# fixtommath.tcl -- +# +# Changes to 'tommath.h' to make it conform with Tcl's linking +# conventions. +# +# Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: fix_tommath_h.tcl,v 1.2 2005/05/10 18:35:25 kennykb Exp $ +# +#---------------------------------------------------------------------- + +set f [open [lindex $argv 0] r] +set data [read $f] +close $f + +foreach line [split $data \n] { + switch -regexp -- $line { + {#define BN_H_} { + puts $line + puts {} + puts "\#ifdef TCL_TOMMATH" + puts "\#include <tclTomMath.h>" + puts "\#endif" + puts "\#ifndef TOMMATH_STORAGE_CLASS" + puts "\#define TOMMATH_STORAGE_CLASS extern" + puts "\#endif" + } + {typedef.*mp_digit;} { + puts "\#ifndef MP_DIGIT_DECLARED" + puts $line + puts "\#define MP_DIGIT_DECLARED" + puts "\#endif" + } + {typedef struct} { + puts "\#ifndef MP_INT_DECLARED" + puts "\#define MP_INT_DECLARED" + puts "typedef struct mp_int mp_int;" + puts "\#endif" + puts "struct mp_int \{" + } + \}\ mp_int\; { + puts "\};" + } + "^(char|int|void)" { + puts "TOMMATH_STORAGE_CLASS $line" + } + default { + puts $line + } + } +}
\ No newline at end of file diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl index b9388cb..14bbab0 100644 --- a/tools/man2html2.tcl +++ b/tools/man2html2.tcl @@ -5,7 +5,7 @@ # # Copyright (c) 1996 by Sun Microsystems, Inc. # -# $Id: man2html2.tcl,v 1.8 2005/04/06 09:52:00 dkf Exp $ +# $Id: man2html2.tcl,v 1.9 2005/05/10 18:35:25 kennykb Exp $ # package require Tcl 8.4 diff --git a/tools/tclZIC.tcl b/tools/tclZIC.tcl index 23e373f..f3750c1 100755 --- a/tools/tclZIC.tcl +++ b/tools/tclZIC.tcl @@ -29,7 +29,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclZIC.tcl,v 1.4 2005/04/11 10:02:12 dkf Exp $ +# RCS: @(#) $Id: tclZIC.tcl,v 1.5 2005/05/10 18:35:25 kennykb Exp $ # #---------------------------------------------------------------------- |