From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12197 invoked from network); 23 Feb 2003 23:21:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Feb 2003 23:21:53 -0000 Received: (qmail 20827 invoked by alias); 23 Feb 2003 23:21:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18278 Received: (qmail 20816 invoked from network); 23 Feb 2003 23:21:47 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Feb 2003 23:21:47 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.92.193.18] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Feb 2003 23:21:47 -0000 Received: from modem-32.celegorm.dialup.pol.co.uk ([62.136.147.32] helo=pwstephenson.fsnet.co.uk) by cmailm1.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 18n5RJ-0003qp-00 for zsh-workers@sunsite.dk; Sun, 23 Feb 2003 23:21:46 +0000 Received: by pwstephenson.fsnet.co.uk (Postfix, from userid 501) id 482CC1B76A; Sun, 23 Feb 2003 23:23:14 +0000 (GMT) Received: from pwstephenson.fsnet.co.uk (localhost [127.0.0.1]) by pwstephenson.fsnet.co.uk (Postfix) with ESMTP id 2E1931B769 for ; Sun, 23 Feb 2003 23:23:14 +0000 (GMT) To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: TCP functions: zgprintf not necessary Date: Sun, 23 Feb 2003 23:23:09 +0000 From: Peter Stephenson Message-Id: <20030223232314.482CC1B76A@pwstephenson.fsnet.co.uk> Just realised that zformat already does exactly what I was trying to do with zgprintf, so the latter isn't necessary. Index: Doc/Zsh/tcpsys.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/tcpsys.yo,v retrieving revision 1.1 diff -u -r1.1 tcpsys.yo --- Doc/Zsh/tcpsys.yo 6 Feb 2003 12:21:51 -0000 1.1 +++ Doc/Zsh/tcpsys.yo 23 Feb 2003 23:20:43 -0000 @@ -495,24 +495,6 @@ The tt(-S) and tt(-F) options are used to pass in the session name and file descriptor for possible replacement in the prompt. ) -findex(zgprintf) -item(tt(zgprintf) tt(-rPR -%)var(X)tt(=)var(subst) var(fmt) tt([) var(val) tt(... ]))( -This function is used for performing tt(%)-replacement in prompts supplied -to tt(tcp_output). The var(fmt) string is printed to standard output. -The option tt(-%)var(X)tt(=)var(subst) specifies that any occurrence -of tt(%)var(X) in the var(fmt) string should be replaced by var(subst). -These arguments may be repeated for arbitrary var(X). - -The option tt(-r) specifies that the normal tt(print) conventions are not -to be used, as with the corresponding argument to the tt(print) builtin. - -The option tt(-R) specifies that the output is to be left in the parameter -tt($REPLY) instead of being printed. - -The option tt(-P) specifies that unhandled tt(%)-escapes should be -formatted by a call to tt(printf). Each is assumed to consume exactly one -additional var(val) argument. This option is only minimally implemented. -) enditem() texinode(TCP Parameters)(TCP Examples)(TCP Functions)(TCP Function System) Index: Functions/TCP/tcp_open =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/TCP/tcp_open,v retrieving revision 1.1 diff -u -r1.1 tcp_open --- Functions/TCP/tcp_open 6 Feb 2003 12:21:51 -0000 1.1 +++ Functions/TCP/tcp_open 23 Feb 2003 23:20:43 -0000 @@ -54,7 +54,8 @@ setopt extendedglob cbases zmodload -i zsh/net/tcp || return 1 -autoload -U zgprintf tcp_alias tcp_close tcp_command tcp_expect tcp_fd_handler +zmodload -i zsh/zutil +autoload -U tcp_alias tcp_close tcp_command tcp_expect tcp_fd_handler autoload -U tcp_log tcp_output tcp_proxy tcp_read tcp_rename tcp_send autoload -U tcp_sess tcp_spam tcp_talk tcp_wait Index: Functions/TCP/tcp_output =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/TCP/tcp_output,v retrieving revision 1.1 diff -u -r1.1 tcp_output --- Functions/TCP/tcp_output 6 Feb 2003 12:21:51 -0000 1.1 +++ Functions/TCP/tcp_output 23 Feb 2003 23:20:44 -0000 @@ -29,7 +29,7 @@ # where data is coming from; also, it allows more predictable # behaviour in tcp_expect. if [[ -n $tprompt ]]; then - zgprintf -R -%s=$sess -%f=$read_fd -- $tprompt + zformat -f REPLY $tprompt "s:$sess" "f:$read_fd" # We will pass this back up. REPLY="$REPLY$*" else Index: Functions/TCP/tcp_spam =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/TCP/tcp_spam,v retrieving revision 1.1 diff -u -r1.1 tcp_spam --- Functions/TCP/tcp_spam 6 Feb 2003 12:21:51 -0000 1.1 +++ Functions/TCP/tcp_spam 23 Feb 2003 23:20:44 -0000 @@ -91,7 +91,7 @@ tcp_on_spam $TCP_SESS $cmd $* [[ $REPLY = done ]] && continue fi - [[ -n $verbose ]] && zgprintf -R -%s=$TCP_SESS \ - -%f=${tcp_by_name[$TCP_SESS]} -- $TCP_PROMPT + [[ -n $verbose ]] && zformat REPLY $TCP_PROMPT "s:$TCP_SESS" \ + "f:${tcp_by_name[$TCP_SESS]}" eval $cmd '$*' done -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk