version 1.26, 2002/08/02 02:07:09 |
version 1.27, 2002/08/16 20:21:49 |
Line 272 sendmes(char *tty, char *message) |
|
Line 272 sendmes(char *tty, char *message) |
|
int lmsg = 1; |
int lmsg = 1; |
FILE *f_tty; |
FILE *f_tty; |
|
|
|
if (strcspn(tty, "./") != strlen(tty)) |
|
return; |
|
|
(void)strncpy(t, _PATH_DEV, sizeof(t) - 1); |
(void)strncpy(t, _PATH_DEV, sizeof(t) - 1); |
(void)strncat(t, tty, sizeof(t) - sizeof(_PATH_DEV) - 1); |
(void)strncat(t, tty, sizeof(t) - sizeof(_PATH_DEV) - 1); |
t[sizeof(t) - 1] = '\0'; |
t[sizeof(t) - 1] = '\0'; |
|
|
if ((f_tty = fopen(t, "w")) != NULL) { |
if ((f_tty = fopen(t, "w")) != NULL) { |
|
if (!isatty(fileno(f_tty))) |
|
return; |
setbuf(f_tty, buf); |
setbuf(f_tty, buf); |
(void) fprintf(f_tty, |
(void) fprintf(f_tty, |
"\n\ |
"\n\ |