Lines Matching refs:curr
211 char *curr ,*start,*end; in handle_iacs() local
214 curr = start = tm->buff2+tm->buff2_avail; in handle_iacs()
217 while (curr <= end) { in handle_iacs()
218 if (*curr != IAC){ in handle_iacs()
220 if (*curr != '\r') { in handle_iacs()
221 toybuf[i++] = *curr++; in handle_iacs()
224 toybuf[i++] = *curr++; in handle_iacs()
225 curr++; in handle_iacs()
226 if (curr < end && (*curr == '\n' || *curr == '\0')) in handle_iacs()
227 curr++; in handle_iacs()
232 if ((curr + 1) > end) { in handle_iacs()
236 if (*(curr+1) == IAC) { //IAC as data --> IAC IAC in handle_iacs()
237 toybuf[i++] = *(curr+1); in handle_iacs()
238 curr += 2; //IAC IAC --> 2 bytes in handle_iacs()
241 if (*(curr + 1) == NOP || *(curr + 1) == SE) { in handle_iacs()
242 curr += 2; in handle_iacs()
246 if (*(curr + 1) == SB ) { in handle_iacs()
247 if (*(curr+2) == TELOPT_NAWS) { in handle_iacs()
249 if ((curr+8) >= end) { //ensure we have data to process. in handle_iacs()
250 tm->rem = end - curr; in handle_iacs()
253 ws.ws_col = (curr[3] << 8) | curr[4]; in handle_iacs()
254 ws.ws_row = (curr[5] << 8) | curr[6]; in handle_iacs()
256 curr += 9; in handle_iacs()
259 curr++, tm->rem++; in handle_iacs()
260 while (*curr != IAC && curr <= end) { in handle_iacs()
261 curr++; in handle_iacs()
264 if (*curr == IAC) { in handle_iacs()
270 curr += 3; //skip non-supported 3 bytes. in handle_iacs()