summaryrefslogtreecommitdiff
path: root/ws2a/bugsdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'ws2a/bugsdata.c')
-rw-r--r--ws2a/bugsdata.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ws2a/bugsdata.c b/ws2a/bugsdata.c
index f8951a9..ef15c08 100644
--- a/ws2a/bugsdata.c
+++ b/ws2a/bugsdata.c
@@ -4,18 +4,21 @@
#include <stdint.h>
int main(){
+ printf("%s%c%c\n",
+ "Content-Type:text/html;charset=iso-8859-1",13,10);
FILE* lastfilenum;
- lastfilenum = fopen("../ws2a/bugs/lastbug","r")
+ lastfilenum = fopen("../ws2a/bugs/lastbug","r");
if(lastfilenum == NULL){
- printf("Error reteriveing bugs, contact the admin!")
+ printf("Error reteriveing bugs, contact the admin!");
}
long long last = 0;
fscanf(lastfilenum,"%u",&last);
long long end = last-20;
while(last > end && last > 0){
char filestring[64];
+ char filename[10];
strcat(filestring,"../ws2a/bugs/");
- strcat(filestring,itoa(last));
+ strcat(filestring,itoa(last,filename,10));
FILE* thisbug;
thisbug = fopen(filestring,"r");
if(thisbug == NULL){
@@ -23,12 +26,9 @@ int main(){
continue;
}
while(!feof(thisbug)){
- putc(fgetc(thisbug));
+ putchar(fgetc(thisbug));
}
printf("<br/>");
last--;
}
- printf("%s%c%c\n",
- "Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Data:%s",data);
}