void gobeginblk( unsigned int *x ) { if ( haveblock( ) ) { goline( blkbegin.lineno ); gocol( blkbegin.column, x ); } }
void goendblk( unsigned int *x ) { if ( haveblock( ) ) { goline( blkend.lineno ); gocol( blkend.column, x ); } }
void displine(struct line_node *line,unsigned y,unsigned linenum) { register unsigned x = 0; int count = firstcol; font_attr tempfont, curfont = 0; char *st; st = line->text; y += wind.row; while ((count > 0) && (*st != '\0')) { if (whatlevel(*st) == MIDDLE) { if (*st < 32) { togglefont(&curfont,*st); } else { if ((curfont & ENLARGEATTR) == ENLARGEATTR) { count--; } count--; } } st++; } if ((count < 0) && ((curfont & ENLARGEATTR) == ENLARGEATTR)) { x++; } while ((*st != '\0') && (x < (wind.length - 2))){ if (*st < 32) { togglefont(&curfont,*st); } else { tempfont = curfont; if (haveblock() && inblock(linenum,x + firstcol) && dispblock) { curfont = curfont | REVERSEATTR; } if (whatlevel(*st) != MIDDLE) { if (x > 0) { if ((curfont & ENLARGEATTR) == ENLARGEATTR) { if (x >= 2) { prchar(*st,curfont,wind.col+x-2,y); } } else { prchar(*st,curfont,wind.col+x-1,y); } } } else { if ((*st != ' ') || (curfont != 0)) { if ((curfont & ENLARGEATTR) != ENLARGEATTR) { prchar(*st,curfont,wind.col+x,y); x++; } else { prchar(*st,curfont,wind.col+x,y); x += 2; } } else { /* if it's blank and normal attribute,use prblank to speed up */ prblank(wind.col+x,y); x++; } } curfont = tempfont; } st++; } clrline(wind.col+x,y,wind.col+wind.length-1); if (line->wrap == NO) { prchar('<',0,wind.col + wind.length - 1,y); } if (*st != '\0') { prchar('+',0,wind.col + wind.length - 1,y); } y -= wind.row; /* if (graphbuff[y] != NULL) paintlinegraph(graphbuff[y],y); */ }