Lines Matching defs:fn
84 int nf, fn = FAIL;
90 fn = getto(flds);
91 CDEBUG(4, "getto ret %d\n", fn);
92 if (fn < 0)
95 if (chat(nf - F_LOGIN, flds + F_LOGIN, fn, "", "") ==
98 return (fn); /* successful return */
102 DEBUG(6, "close caller (%d)\n", fn);
103 fd_rmlock(fn);
104 (void) close(fn);
111 return (fn);
369 * fn - write file number
377 chat(int nf, char *flds[], int fn, char *phstr1, char *phstr2)
389 ok = expect(want, fn);
400 sendthem(altern, fn, phstr1, phstr2);
404 sendthem(flds[k+1], fn, phstr1, phstr2);
412 * expect(str, fn) look for expected string w/ possible special chars
422 expect(char *str, int fn)
434 if (expect_str(buf, fn) == FAIL) {
437 if (wait_for_hangup(fn) == FAIL) {
454 if (expect_str(buf, fn) == FAIL) {
461 * expect_str(str, fn) look for expected string, w/ no special chars
470 expect_str(char *str, int fn)
502 kr = (*Read)(fn, &nextch, 1);
563 * sendthem(str, fn, phstr1, phstr2) send line of chat sequence
571 if (wrstr(fn, buf, bptr - buf, echocheck) != SUCCESS) \
577 sendthem(char *str, int fn, char *phstr1, char *phstr2)
589 (*genbrk)(fn);
595 (void) (*Write)(fn, EOTMSG, strlen(EOTMSG));
671 (*genbrk)(fn);
678 if ((*Ioctl)(fn, TCGETA, &ttybuf) != 0) {
688 if ((*Ioctl)(fn, TCSETAW, &ttybuf) != 0)
703 (void) wrstr(fn, buf, bptr - buf, echocheck);
712 wrstr(int fn, char *buf, int len, int echocheck)
720 return (wrchr(fn, buf, len));
738 if ((*Write)(fn, buf, len) != len)
744 wrchr(int fn, char *buf, int len)
764 if (((*Write)(fn, &cout, 1)) != 1)
768 if ((*Read)(fn, &cin, 1) != 1)