Difference for server/hiscore.c from version 1.12 to 1.13


version 1.12 version 1.13
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_hiscore_c =   * static char *rcsid_hiscore_c =
  *   "$Id: hiscore.c,v 1.12 2005/08/12 08:18:59 ryo_saeba Exp $";   *   "$Id: hiscore.c,v 1.13 2005/09/04 16:58:12 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 220
 
Line 220
   if(!flag&&nrofscores<HIGHSCORE_LENGTH)    if(!flag&&nrofscores<HIGHSCORE_LENGTH)
     copy_score(new_score,&pscore[nrofscores++]);      copy_score(new_score,&pscore[nrofscores++]);
   if((fp=fopen(filename,"w"))==NULL) {    if((fp=fopen(filename,"w"))==NULL) {
     perror("Can't write to highscore-list.\n");      LOG(llevError, "Cannot write to highscore file %s: %s\n", filename, strerror_local(errno));
     return NULL;      return NULL;
   }    }
   for(i=0;i<nrofscores;i++) {    for(i=0;i<nrofscores;i++) {
Line 331
 
Line 331
   
     sprintf(buf,"%s/%s",settings.localdir,HIGHSCORE);      sprintf(buf,"%s/%s",settings.localdir,HIGHSCORE);
     if((fp=open_and_uncompress(buf,0,&comp))==NULL) {      if((fp=open_and_uncompress(buf,0,&comp))==NULL) {
  perror("Can't open highscore file");   LOG(llevError, "Cannot open highscore file %s: %s\n", buf, strerror_local(errno));
  if(op!=NULL)   if(op!=NULL)
      new_draw_info(NDI_UNIQUE, 0,op,"There is no highscore file.");       new_draw_info(NDI_UNIQUE, 0,op,"There is no highscore file.");
  return;   return;
Line 368
 
Line 368
      while (*bp != ' ' && bp>cp) bp--;       while (*bp != ' ' && bp>cp) bp--;
      *bp='\0';       *bp='\0';
      if (op == NULL) {       if (op == NULL) {
  printf("%s\n",cp);   LOG(llevDebug, "%s\n", cp);
      }       }
      else {       else {
  new_draw_info(NDI_UNIQUE, 0,op,cp);   new_draw_info(NDI_UNIQUE, 0,op,cp);
Line 378
 
Line 378
      i++;       i++;
  }   }
  if(op == NULL)    if(op == NULL)
  printf("%s\n",buf);   LOG(llevDebug, "%s\n", buf);
  else   else
  new_draw_info(NDI_UNIQUE, 0,op,buf);   new_draw_info(NDI_UNIQUE, 0,op,buf);
     }      }


Legend:
line(s) removed in v.1.12 
line(s) changed
 line(s) added in v.1.13

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:33