/* Modified 18/12/82 for variable width tabs - user sets in comm.c -PLS */ #include "ded.h" #include "char.h" /************************************************************************ * * * copyright Richard Bornat 1981 * * * ************************************************************************/ int emptyrow(srow) register int srow; { return(lastcol(srow)=lim) ; return (lp-rp); } /* return the next tab position - multiple of tabsiz (now variable - UMIST) */ int nextab(scol) register int scol; { if ((scol -= leftcol)<0) return(leftcol); scol = (scol/tabsiz)*tabsiz+tabsiz + leftcol; return(scol>=rightcol ? rightcol : scol); } charsin(r1,r2) int r1,r2; { register int count, row, cc; count = 0; for (row=r1; row<=r2; row++) { cc = lastcol(row) - firstcol(row)+1; if (cc>0) count += cc; } return(count); } /************************************************************************ * * * investigate characters at ends of line * * * ************************************************************************/ int lmargin(srow) int srow; { return(srow==EDITROW ? 1 : MARGIN); } int rmargin(srow) int srow; { return(srow==EDITROW ? editright : RIGHTCOL); }