summaryrefslogtreecommitdiff
path: root/ws2a/showbug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ws2a/showbug.c')
-rw-r--r--ws2a/showbug.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/ws2a/showbug.c b/ws2a/showbug.c
index 2e57076..20ce229 100644
--- a/ws2a/showbug.c
+++ b/ws2a/showbug.c
@@ -39,7 +39,30 @@ int main(){
return 1;
}
while(!feof(bugfile)){
- putchar(fgetc(bugfile));
+ char c = fgetc(bugfile);
+ if(c == '\n'){
+ part++;
+ printf("</td>");
+ if(part <= 3){
+ printf("<td>");
+ }else{
+ return;
+ }
+ }else if(c == '&'){
+ printf("&amp;");
+ }else if(c == '\"'){
+ printf("&quot;");
+ }else if(c == '\''){
+ printf("&#39;");
+ }else if(c == '<'){
+ printf("&lt;");
+ }else if(c == '>'){
+ printf("&gt;");
+ }else if(c == '\\'){
+ printf("&#x2F;");
+ }else{
+ putchar(c);
+ }
}
fclose(bugfile);
return 0;