Commit 4fae1e8f authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Reformat and cleanup the shrink.c file included in the documentation

for consistency with the Wine source.
parent ceecf123
...@@ -403,31 +403,25 @@ wait: ff ...@@ -403,31 +403,25 @@ wait: ff
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
void int main (void)
main (void)
{ {
char buff[256], lastline[256]; char buff[256], lastline[256] = "";
int count; int count = 0;
count = 0;
lastline[0] = 0;
while (!feof (stdin)) while (!feof (stdin))
{ {
fgets (buff, sizeof (buff), stdin); fgets (buff, sizeof (buff), stdin);
if (strcmp (buff, lastline) == 0) if (strcmp (buff, lastline))
{
count++;
}
else
{ {
if (count > 1) if (count > 1)
fprintf (stdout, "# Last line repeated %i times #\n", count); printf ("# Last line repeated %i times #\n", count);
fprintf (stdout, "%s", buff); printf ("%s", buff);
strcpy (lastline, buff); strcpy (lastline, buff);
count = 1; count = 1;
} }
else count++;
} }
return 0;
} }
</programlisting> </programlisting>
</para> </para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment