Lines Matching defs:fd
106 getnum(fd)
107 int fd;
111 if (read(fd, bytes, 2) != 2)
127 int fd;
135 if ((fd = open(filename, 0)) < 0)
138 if ((header.magic = getnum(fd)) != __TERMINFO_MAGIC
139 || (header.name_size = getnum(fd)) < 0
140 || (header.bool_count = getnum(fd)) < 0
141 || (header.num_count = getnum(fd)) < 0
142 || (header.str_count = getnum(fd)) < 0
143 || (header.str_size = getnum(fd)) < 0)
150 if (read(fd, tp->_names, len) != len)
155 (void) lseek(fd, (off_t) (header.name_size - 127), SEEK_CUR);
159 if (read(fd, tp->_bool, len) != len)
164 fd, (off_t) (header.bool_count - __COUNT_BOOL),
174 (void) read(fd, &ch, sizeof ch);
179 tp->_num[i] = getnum(fd);
183 fd, (off_t) (2 * (header.num_count - __COUNT_NUM)),
198 if ((offset = getnum(fd)) == SHRT_MIN)
209 fd, (off_t) (2 * (header.str_count - __COUNT_STR)),
217 if (read(fd, tp->_str_table, header.str_size) != header.str_size)
219 (void) close(fd);
227 (void) close(fd);
401 restartterm(tm, fd, err_return)
403 int fd, *err_return;
413 __m_trace("restartterm(%s, %d, %p)", tm ? tm : "NULL", fd, err_return);
483 if (ioctl(fd, TIOCGWINSZ, &wininfo) != -1) {
588 int fd;
591 fd = cur_term->_ifd;
593 fd = cur_term->_ofd;
598 return tcsetattr(fd, TCSADRAIN, tp) == 0 ? OK : ERR;
603 return tcsetattr(fd, TCSANOW, tp) == 0 ? OK : ERR;