Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 1996 09:57:13 -0700 (MST)
From:      Don Yuniskis <dgy@rtd.com>
To:        freebsd-ports@freefall.FreeBSD.org (FreeBSD ports)
Subject:   tkinfo-0.6 patch
Message-ID:  <199606041657.JAA08434@seagull.rtd.com>

next in thread | raw e-mail | index | archive | help
Greetings!
    The following patch lets tkinfo-0.6 from the 2.1R distribution
handle gzipped info files.  Could someone please commit it?
Thx, --don
------------8<-------------------8<-------------------8<---------------
*** tkinfo.tcl.orig	Tue Jun  4 09:36:54 1996
--- tkinfo.tcl	Tue Jun  4 09:39:50 1996
***************
*** 69,75 ****
  		for info files.  Equivalent to each -dir option above.
     INFOSUFFIX	A colon seperated list of file suffixes to try when searching
  		for an info file.  tkinfo will automatically try the
! 		suffixes .z and .Z and deal with the compressed files
  		if required.
  The default INFOPATH and INFOSUFFIX is defined in tkiInit() below.
  
--- 69,75 ----
  		for info files.  Equivalent to each -dir option above.
     INFOSUFFIX	A colon seperated list of file suffixes to try when searching
  		for an info file.  tkinfo will automatically try the
! 		suffixes .gz, .z and .Z and deal with the compressed files
  		if required.
  The default INFOPATH and INFOSUFFIX is defined in tkiInit() below.
  
***************
*** 179,185 ****
  #	this is because we parse the file when loaded.  However, they are
  #	used to identify which indirect file the node is in.
  # 5.	The function tkiLoadFile() attempts to deal with compressed files.
! #	Currently it uses "zcat" for .Z files and "gunzip -c" for .z files.
  #	If you have better suggestions, please let me know.
  #
  
--- 179,186 ----
  #	this is because we parse the file when loaded.  However, they are
  #	used to identify which indirect file the node is in.
  # 5.	The function tkiLoadFile() attempts to deal with compressed files.
! #	Currently it uses "zcat" for .Z files, "gzcat" for .gz files and
! #	"gunzip -c" for .z files.
  #	If you have better suggestions, please let me know.
  #
  
***************
*** 199,204 ****
--- 200,206 ----
      set tki(sn)		0
      set tki(compresscat-Z)	"zcat"
      set tki(compresscat-z)	"gunzip -c"
+     set tki(compresscat-gz)	"gzcat"
      set tki(background)		"#ffe4c4"
      set tki(rawHeadersB)	0
      set tki(nodeSep)		"\037"
***************
*** 611,617 ****
      global tki
  
      foreach suf $tki(infoSuffix) {
! 	foreach extrasuf {"" .Z .z} {
  	    set filePath "$fileName$suf$extrasuf"
  	    if { [file isfile $filePath] } {
  		return $filePath
--- 613,619 ----
      global tki
  
      foreach suf $tki(infoSuffix) {
! 	foreach extrasuf {"" .gz .Z .z} {
  	    set filePath "$fileName$suf$extrasuf"
  	    if { [file isfile $filePath] } {
  		return $filePath
***************
*** 807,812 ****
--- 809,815 ----
      global tki
  
      case $filePath in {
+       *.gz	{ set fp "|$tki(compresscat-gz) $filePath" }
        *.Z	{ set fp "|$tki(compresscat-Z) $filePath" }
        *.z	{ set fp "|$tki(compresscat-z) $filePath" }
        default	{ set fp $filePath }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606041657.JAA08434>