suggested change to 'write'
How Can ThisBe
howcanthisbe300 at hotmail.com
Thu Apr 24 12:54:17 PDT 2003
A friend and I have been using 'write' to communticate to each other,
its very handy but has a small annoyance (to us anyway) where you can
lose track for the thread when you look back over it. Anyway, below
is a tiny patch that helps to see who wrote what. We have found it
very helpful.
*** write.c.orig Thu Apr 24 21:29:02 2003
--- write.c Thu Apr 24 21:40:08 2003
***************
*** 280,287 ****
(void)printf("\r\n\007\007\007Message from %s@%s on %s at %s
...\r\n",
login, host, mytty, nows + 11);
! while (fgets(line, sizeof(line), stdin) != NULL)
wr_fputs(line);
}
/*
--- 280,289 ----
(void)printf("\r\n\007\007\007Message from %s@%s on %s at %s
...\r\n",
login, host, mytty, nows + 11);
! while (fgets(line, sizeof(line), stdin) != NULL){
! (void)printf("\n%s: ",login);
wr_fputs(line);
+ }
}
/*
_________________________________________________________________
More information about the freebsd-current
mailing list