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
#include <stdio.h>
#include <string.h>
void
main (void)
int main (void)
{
char buff[256], lastline[256];
int count;
count = 0;
lastline[0] = 0;
char buff[256], lastline[256] = "";
int count = 0;
while (!feof (stdin))
{
fgets (buff, sizeof (buff), stdin);
if (strcmp (buff, lastline) == 0)
{
count++;
}
else
if (strcmp (buff, lastline))
{
if (count > 1)
fprintf (stdout, "# Last line repeated %i times #\n", count);
fprintf (stdout, "%s", buff);
printf ("# Last line repeated %i times #\n", count);
printf ("%s", buff);
strcpy (lastline, buff);
count = 1;
}
else count++;
}
return 0;
}
</programlisting>
</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