Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Nov 15, 2024
1 parent fe3f8b7 commit a478381
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions trunk/core/judge_client/judge_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ void make_diff_out_simple(FILE *f1, FILE *f2,char * prefix, int c1, int c2, cons
}
else if(isprint(c2))fprintf(diff,"%c",c2);
else if(c2==EOF)
fprintf(diff,"`End Of File`"); //Binary Code
fprintf(diff,"🔚"); //Binary Code
else {
fprintf(diff,"`0x%02x`",c2); //Binary Code
}
Expand All @@ -786,12 +786,15 @@ void make_diff_out_simple(FILE *f1, FILE *f2,char * prefix, int c1, int c2, cons
str_replace(buf2,"(","");
str_replace(buf2,")","");
str_replace(buf2,"\r","");
str_replace(buf2,"\n","`EOL`");
for(size_t i=0;i<strlen(buf2);i++){
if (isprint(buf2[i]))
if(buf2[i]==' ')
fprintf(diff,"");
else if(buf2[i]=='\n')
fprintf(diff,"");
else if (isprint(buf2[i]))
fprintf(diff,"%c",buf2[i]);
else if(buf2[i]==EOF)
fprintf(diff,"`End Of File`"); //Binary Code
fprintf(diff,"🔚"); //Binary Code
else
fprintf(diff,"`0x%02x`",buf2[i]); //Binary Code
}
Expand Down

0 comments on commit a478381

Please sign in to comment.