Lines Matching refs:wlen
675 (wlen, start, end, seq) = win_hdr(hdr)
676 if wlen > SHELL_MAX_VALID_SLOT_SIZE:
679 if wlen == 0:
682 last_seq = seq if args.no_history else (seq - ((end - start) % wlen))
686 if behind > ((end - start) % wlen):
688 copy = (end - behind) % wlen
689 suffix = min(behind, wlen - copy)
693 (wlen, start1, end, seq1) = win_hdr(hdr)
699 def idx_mod(wlen, idx): argument
700 if idx >= wlen:
701 return idx - wlen
704 def idx_sub(wlen, a, b): argument
705 return idx_mod(wlen, a + (wlen - b))
711 (wlen, start, end, seq) = win_hdr(hdr)
712 if wlen > SHELL_MAX_VALID_SLOT_SIZE:
715 if wlen == 0:
719 if len(msg) > wlen + 1:
721 lenmsg = wlen - 1
722 lenmsg = min(lenmsg, wlen)
724 avail = (wlen - 1) - idx_sub(wlen, end, start)
726 hdr.START = idx_mod(wlen, start + (lenmsg - avail))
731 suffix = min(lenmsg, wlen - end)
737 hdr.END = idx_mod(wlen, end + lenmsg)