summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-09 14:38:21 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-09 14:38:21 -0400
commit0cf78c75746614b7ab95b414a3d8d9e1a535ffe4 (patch)
treeb54598fc57252a8c473ba5c4b1af3f6842d2f9ea
parentabf6d217627175a5a0e67f5334e608e0cd9e0cfa (diff)
downloadwebpage-0cf78c75746614b7ab95b414a3d8d9e1a535ffe4.tar.gz
webpage-0cf78c75746614b7ab95b414a3d8d9e1a535ffe4.tar.bz2
webpage-0cf78c75746614b7ab95b414a3d8d9e1a535ffe4.zip
Bug fixes to bug reporter
-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);
}