if (slp->flags & FL_MODE) { if (slp->mode == SL_MODE_RAW) set_raw_mode(slp); else if (slp->mode == SL_MODE_LINE) set_line_mode(slp); }
static void do_update(sl_t* slp){    if ((slp->flags == 0) || (slp->com == INVALID))	return;    if (slp->flags & FL_BAUD)	set_baud(slp, slp->baud);    if (slp->flags & FL_CSIZE)	set_csize(slp, slp->csize);    if (slp->flags & FL_STOPB)	set_stopb(slp, slp->stopb);    if (slp->flags & FL_PARITY)	set_parity(slp, slp->parity);    if (slp->flags & FL_BUFSZ)	set_bufsz(slp, slp->bufsz);    if (slp->flags & FL_BUFTM)	set_buftm(slp, slp->buftm);        if (slp->flags & FL_XONCHAR)	set_xonchar(slp, slp->xonchar);    if (slp->flags & FL_XOFFCHAR)	set_xoffchar(slp, slp->xoffchar);    if (slp->flags & FL_HWFLOW)	set_hwflow(slp, slp->hwflow);    if (slp->flags & FL_SWFLOW)	set_swflow(slp, slp->swflow);    if (slp->flags & FL_ECHO)	set_echo(slp, slp->echo);    set_com_state(slp);    slp->flags = 0;}