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