datatracker/bin/count.c
Henrik Levkowetz b3fe24d76b Merged in [13503] from rjsparks@nostrum.com:
Add usernames to the email sent to the secretariat when a possible duplicate person has been detected. Fixes #2307.
 - Legacy-Id: 13521
Note: SVN reference [13503] has been migrated to Git commit d330b8ded453b61eabc59589d44785d4fc09c767
2017-06-04 21:49:43 +00:00

27 lines
461 B
C

#include <stdio.h>
int main( void )
{
int c;
int count = 0;
//turn off buffering
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
c = fgetc(stdin);
while(c != EOF)
{
if (c=='.' || c=='E' || c=='F') count++;
fputc(c, stdout);
fflush(stdout);
if ( count % 76 == 0) {
fprintf(stderr, "%4d", count);
fflush(stderr);
}
c = fgetc(stdin);
}
return 0;
}