///////////////////////////OUTBLOCK/////////////////////// void outblock(void) { if(!isvar){ printf("Error : Var is expected\n"); exit(-1); } do{ get_token(); if(!isidentifier){ printf("Error : Identifier is expected\n"); exit(-1); } get_token(); }while(iscomma); if(!issemicolon){ printf("Error : Symbol ';' is expected\n"); exit(-1); } get_token(); while(isprocedure) { get_token(); if(!isidentifier) { printf("Error : Identifier is expected\n"); exit(-1); } get_token(); inblock(); if(!issemicolon) { printf("Error : Symbol ';' is expected\n"); exit(-1); } get_token(); } statement(); }
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); */ }