summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-11 17:38:10 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-11 17:38:10 -0400
commitf2927f74d768b3e732a6074d2faa28a6a14d04a8 (patch)
treee5ab00a500b125a2aa9f520af5d28cadaafc6981
parent74a1cc9be3d65f508ec50c78a80d28e52672b982 (diff)
downloadwebpage-f2927f74d768b3e732a6074d2faa28a6a14d04a8.tar.gz
webpage-f2927f74d768b3e732a6074d2faa28a6a14d04a8.tar.bz2
webpage-f2927f74d768b3e732a6074d2faa28a6a14d04a8.zip
Fixed bugs display to not need to keep track of comments
-rw-r--r--cgi-bin/a.exebin0 -> 70440 bytes
-rw-r--r--ws2a/bugs/13
-rw-r--r--ws2a/bugs/21
-rw-r--r--ws2a/bugs/31
-rw-r--r--ws2a/bugs/41
-rw-r--r--ws2a/bugs/51
-rw-r--r--ws2a/bugs/61
-rw-r--r--ws2a/bugs/71
-rw-r--r--ws2a/bugs/81
-rw-r--r--ws2a/bugsdata.c33
10 files changed, 18 insertions, 25 deletions
diff --git a/cgi-bin/a.exe b/cgi-bin/a.exe
new file mode 100644
index 0000000..ce182f6
--- /dev/null
+++ b/cgi-bin/a.exe
Binary files differ
diff --git a/ws2a/bugs/1 b/ws2a/bugs/1
index 932a7ab..f2d27fe 100644
--- a/ws2a/bugs/1
+++ b/ws2a/bugs/1
@@ -4,7 +4,6 @@ Date_submitted
Short Description
0:
Long description
-2
User person
sdlfkj13221lkjl
@@ -15,5 +14,5 @@ Another User
Their comment
Apickx
-eD=$U&C]s&Ofyr6y^"{*cmd.Zò̺
+eD=$U&C]s&Ofyr6y^"{*cmd.Z�̺
This Is My Comment
diff --git a/ws2a/bugs/2 b/ws2a/bugs/2
index 1a3b1db..79813e9 100644
--- a/ws2a/bugs/2
+++ b/ws2a/bugs/2
@@ -4,4 +4,3 @@ Date_submitted
Short Description
0:
Long description
-0
diff --git a/ws2a/bugs/3 b/ws2a/bugs/3
index d4f6325..a098504 100644
--- a/ws2a/bugs/3
+++ b/ws2a/bugs/3
@@ -4,4 +4,3 @@ Date_submitted
Short Description
1:Test User
Long description
-0
diff --git a/ws2a/bugs/4 b/ws2a/bugs/4
index f4b517a..6fb6752 100644
--- a/ws2a/bugs/4
+++ b/ws2a/bugs/4
@@ -4,4 +4,3 @@ Date_submitted
Short Description
2:
Long description
-0
diff --git a/ws2a/bugs/5 b/ws2a/bugs/5
index 2eabc1e..92d3f6f 100644
--- a/ws2a/bugs/5
+++ b/ws2a/bugs/5
@@ -4,4 +4,3 @@ Date_submitted
Short Description
0:
Long description
-0
diff --git a/ws2a/bugs/6 b/ws2a/bugs/6
index a424908..36dc7fb 100644
--- a/ws2a/bugs/6
+++ b/ws2a/bugs/6
@@ -4,4 +4,3 @@ Date_submitted
Short Description
1:Another test user
Long description
-0
diff --git a/ws2a/bugs/7 b/ws2a/bugs/7
index 8a7e203..3df129f 100644
--- a/ws2a/bugs/7
+++ b/ws2a/bugs/7
@@ -4,4 +4,3 @@ Date_submitted
Short Description
2:
Long description
-0
diff --git a/ws2a/bugs/8 b/ws2a/bugs/8
index 4c55c82..cb01572 100644
--- a/ws2a/bugs/8
+++ b/ws2a/bugs/8
@@ -4,4 +4,3 @@ Date_submitted
Short Description
2:
Long description
-0
diff --git a/ws2a/bugsdata.c b/ws2a/bugsdata.c
index 5deecaf..0370147 100644
--- a/ws2a/bugsdata.c
+++ b/ws2a/bugsdata.c
@@ -40,28 +40,29 @@ int main(){
}
/*Prints bugs, format:
Submitter\n
+ SubmitterID
Date_submitted\n
Short Description\n
Status<Unassigned, Assigned, Closed>\n
- long description
+ numcomments\n
+ bugid
*/
void printbug(FILE* f){
- int part = 0;
- while(!feof(f) && part < 7){
- char c = fgetc(f);
- if(feof(f)){
- return;
- }
- if(c == '\n'){
- part++;
- if(part != 5){
- putchar(c);
- }
- }
- else if(part != 5){
- putchar(c);
- }
+
+ int line = 0;
+ char tchar = ' ';
+ while((tchar = fgetc(f)) && tchar != EOF){
+ if(tchar == '\n')
+ line++;
+ if(line > 4)
+ break;
+ putchar(tchar);
}
+
+ unsigned int comments = 0;
+ while (EOF != (fscanf(f,"%*[^\n]"), fscanf(f,"%*c")))
+ ++comments;
+ printf("\n%u\n",(comments-1)/4);
}
/*