* PATCH: ztcp -v
@ 2001-09-08 21:40 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2001-09-08 21:40 UTC (permalink / raw)
To: zsh-workers
Default to easily-parsable.
Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.5
diff -u -r1.5 tcp.c
--- Src/Modules/tcp.c 2001/09/08 21:09:56 1.5
+++ Src/Modules/tcp.c 2001/09/08 21:35:30
@@ -381,13 +381,16 @@
static int
bin_ztcp(char *nam, char **args, char *ops, int func)
{
- int herrno, err=1, destport, force=0, len;
+ int herrno, err=1, destport, force=0, verbose=0, len;
char **addrp, *desthost;
struct hostent *zthost = NULL;
Tcp_session sess;
if (ops['f'])
force=1;
+
+ if (ops['v'])
+ verbose=1;
if (ops['c']) {
if (!args[0]) {
@@ -473,7 +476,10 @@
zwarnnam(nam, "connection failed: %e", NULL, errno);
else
{
- fprintf(shout, "%s:%d is now on fd %d\n", desthost, destport, sess->fd);
+ if(verbose)
+ fprintf(shout, "%s:%d is now on fd %d\n", desthost, destport, sess->fd);
+ else
+ fprintf(shout, "%d\n", sess->fd);
}
zsfree(desthost);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-09-08 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-08 21:40 PATCH: ztcp -v Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).