scbuf.c
/*------------------------------------*/
/* Dumps buffer to screen for display */
/*------------------------------------*/
Dumps buffer to screen for display
Dumps buffer to screen for display
void dump_screen(SCREENCELL *newScreen) {
  int     i=0;
  int     wherex=0, wherey=0;
  SCREENCELL *aux=newScreen;
  if (aux!=NULL && buffersize <= length(&aux)){
  for(i = 0; i < buffersize; i++) {
      update_ch(wherex,wherey,aux->ch,aux->backColor,aux->foreColor); 
      wherex = wherex + 1; 
      if(wherex == sc_columns) {
        wherex = 0;
        wherey = wherey + 1;
      }
      aux = aux->next;
    }
  }
}
void dump_screen ( SCREENCELL * newScreen ) { int i = 0 ; int wherex = 0 , wherey = 0 ; SCREENCELL * aux = newScreen ; if ( aux != NULL && buffersize <= length ( & aux ) ) { for ( i = 0 ; i < buffersize ; i ++ ) { update_ch ( wherex , wherey , aux -> ch , aux -> backColor , aux -> foreColor ) ; wherex = wherex + 1 ; if ( wherex == sc_columns ) { wherex = 0 ; wherey = wherey + 1 ; } aux = aux -> next ; } } }
Dumps buffer to screen for display
Dumps buffer to screen for display
/* UPDATES ALL SCREEN CELLS TO DISPLAY */ //line counter //new line