diff options
Diffstat (limited to 'ws2a')
| -rw-r--r-- | ws2a/bugs/1 | 3 | ||||
| -rw-r--r-- | ws2a/bugs/2 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/3 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/4 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/5 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/6 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/7 | 1 | ||||
| -rw-r--r-- | ws2a/bugs/8 | 1 | ||||
| -rw-r--r-- | ws2a/bugsdata.c | 33 |
9 files changed, 18 insertions, 25 deletions
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); } /* |
