scbuf.c
/*-----------------------------------------------*/
/* Writes an integer value as a string on screen */
/*-----------------------------------------------*/
Writes an integer value as a string on screen
Writes an integer value as a string on screen
int write_num(SCREENCELL *newScreen, int x, int y, int num, char backcolor,
	       char forecolor, BOOL raw) {
  char   astr[30];
  char len=0;
  SCREENCELL *aux = newScreen;
  if (aux!=NULL){
    sprintf(astr, "%d", num);
    write_str(newScreen, x, y, astr, backcolor, forecolor,raw);
    len = strlen(astr);
  }
  return len;
}
int write_num ( SCREENCELL * newScreen , int x , int y , int num , char backcolor , char forecolor , BOOL raw ) { char astr [ 30 ] ; char len = 0 ; SCREENCELL * aux = newScreen ; if ( aux != NULL ) { sprintf ( astr , " " , num ) ; write_str ( newScreen , x , y , astr , backcolor , forecolor , raw ) ; len = strlen ( astr ) ; } return len ; }
Writes an integer value as a string on screen
Writes an integer value as a string on screen
//the length of the string must be passed on the function